#microformats 2024-09-05

2024-09-05 UTC
srijan and zicklepop joined the channel
#
catgirlin.space
jimw definitely agree with the akamai feeling soulless thing. idk how to describe it really is just, weird,,,,
SyniToxi, [tantek], [qubyte], [schmarty], [Joe_Crawford], [benatwork], IWSlackGateway, [snarfed], [aciccarello], [Jo], ramsey, ancarda, [KevinMarks], Loqi and [Jo]1 joined the channel
#
[jacky]
ah need to update the rust parser site
#
[jacky]
looks like one of the heroku stacks expire soon
#
[jacky]
probably not _the most important_ thing but I do notice some features in http://php.mf.io (like the bookmarking) that I'd want to bring over
#
[jacky]
I'm guessing those are added on an ad-hoc basis?
IWSlackGateway, [aciccarello], [Joe_Crawford], [KevinMarks], [benatwork], [snarfed], [schmarty] and [tantek] joined the channel
#
[tantek]
^ jacky I errantly clicked on that shorthand URL and not that we don't control mf .io 😂
#
[tantek]
note* that
#
[tantek]
(it was auto-linked in slack)
#
[tantek]
also in the logs bc of course the logs use my auto_link function to auto-link and embed images etc.
ChrisFu, [schmarty], IWSlackGateway, [snarfed], [benatwork], [Joe_Crawford], [tantek], [aciccarello], [KevinMarks], to2ds and voxpelli joined the channel
#
[jacky]
haha, it's def a bit of mental shorthand!
ChrisFu joined the channel
#
[jacky]
but the bookmarklet in question is the blue link at https://php.microformats.io/
#
[tantek]
interesting that bookmarklet uses pin13 though, not the php.microformats site
to2ds joined the channel
#
sebbu
what is the correct way to pretty print code (ie, php) with microformats (or h-card or whatever gives better metadata, such as knowing what is types, what is names, what is keywords, etc...), there's already https://www.srcml.org/ but it's outdated
#
sebbu
(goal is for generated API docs)
#
[snarfed]
I don't think we have microformats like those for code. have you found any on https://microformats.org/wiki/microformats2 ?
#
pcarrier
Sebbu: I use https://prismjs.com/ server side, they have their own span classes but tons of themes
#
[snarfed]
the usual question with microformats is, before you try to mark anything up, what consuming use cases are you expecting?
#
[snarfed]
ah sure, if you just want to style it, do whatever you want
#
sebbu
[snarfed], my usecase is generating api docs from Reflection and comparing it to the official language docs
#
sebbu
(hint : there's differences)
#
[snarfed]
right, that's a publishing use case. I assume you can do that without adding microformats to the generated HTML?
#
sebbu
second use case is to include user code (functions, class, etc... ) in addition to the standard library to the api docs
#
[snarfed]
my question was, what's the use case for someone parsing your generated docs' HTML and extracting any microformats you added?
#
[snarfed]
(that's what we mean by consuming microformats)
#
sebbu
ideally it could integrate into an IDE autocompletion
#
sebbu
(the context-sensitive kind)
#
sebbu
preferably including LSP (language server protocol)
#
sebbu
or even gdb/lldb for pretty printing
#
[snarfed]
interesting, true! athough usually those kinds of code autocomplete systems ingest other formats, not HTML
#
sebbu
yeah, my main thought was to get the metadata correctly, not the exact file format i'ld use
#
[snarfed]
right, but generally that metadata and those file formats are generated directly from the code, not indirectly through HTML with microformats that haven't been invented yet 😁
#
[snarfed]
(etags/ctags are a good example)
#
gRegor
yeah, I don't think there's any experiments with mf2 for this. Since it parses based on prefixes, you could experiment using whichever mf2 class names make sense, and probably with a vendor prefix
#
sebbu
yeah, ctags/global was also something i was thinking about
#
[snarfed]
gRegor we're discouraging vendor prefixes, right? or are we still divided on that?
#
gRegor
I think -x is discouraged, but not so much actual vendor prefix like -p3k
#
[snarfed]
hmm. it didn't go well in the browser world, right?
#
[snarfed]
I remember talking with [tantek] about this recently, let's see what's in my browser history
#
gRegor
I think it got better over time, but not sure. I don't have strong opinions on *actual* vendor prefix like -p3k, but definitely think the -x is a bad idea
#
gRegor
Yeah I know it's come up in this chat before, haha
#
gRegor
hm, they load for me
#
sebbu
obviously, it's when i report it that it's fixed
#
gRegor
sometimes I touch a computer and fix it, sometimes touching a link does the same, hehe
#
sebbu
yeah, it's the same for me when i'm called to techsupport my parents
#
sebbu
just getting there might fix the issue, before even touching the computer
#
[tantek]
[snarfed] we do keep discussing this but somehow the key bit gets forgotten which is that what happened with CSS prefixes (which were always experiment toward standardization) is very different than the use vendor prefixes for vendor-specific formats which are never intended to be standardized
#
[tantek]
so no, the analogy to CSS prefixes is incorrect
#
[snarfed]
hmm. the idea here was microformats for code, hopefully already-standard or if not standard track
#
sebbu
yeah, i found https://schema.org/SoftwareSourceCode but it describe metadata for a source code (repo, tarball, etc...), not the source code itself (variable, function, etc...)
#
gRegor
Are you looking for something like phpdoc? https://docs.phpdoc.org/3.0/guide/getting-started/what-is-a-docblock.html#what-is-a-docblock though maybe for another programming language?
#
sebbu
no, i'm looking for a spec or a format to output code in a semantically expressive way
#
sebbu
https://www.srcml.org/about.html has a small example, the site don't seems to be maintained, but the repo's last commit is a few months ago
#
sebbu
(last version is 4yo)
#
sebbu
i alreadu jabe the informations i need
#
sebbu
have*
#
sebbu
the issue is how to express/format it
#
[tantek]
sebbu, HTML does have the <var> for variables, and also <samp> and <kbd>
#
sebbu
yeah but that's not enough
#
[tantek]
The question is, what's enough? I think that's part of the use case questions others were asking
#
[snarfed]
yeah I don't know that we've heard a clear consuming use case for mf2 for code in HTML yet. auto-complete etc in IDEs is great, but has well-established toolchains that don't use HTML
#
[Joe_Crawford]
I think of `<code>` as an element.
SyniToxi and barnaby joined the channel