#dev 2021-04-29
2021-04-29 UTC
[schmarty], sparseMatrix, [tantek], [tw2113_Slack_], Seirdy and nertzy_ joined the channel
# doosboox hah, that was funny :)
[KevinMarks] joined the channel
# @vponamariov Every single time 🙄 https://pbs.twimg.com/media/E0D3qGCXMAktTyW.png (twitter.com/_/status/1387411278432460801)
# Loqi ok, I added "https://twitter.com/vponamariov/status/1387411278432460801?s=20" to the "See Also" section of /markdown https://indieweb.org/wiki/index.php?diff=75445&oldid=74397
nertzy__, __minoru__shirae and tarball777 joined the channel; enpo left the channel
# tarball777 Hi! I would want to prototype a webring (decentralized web pages with common navigation) using webmentions. I am wondering if the webring users (thos who will make webpages part of the ring) are supposed to run a specific command to “send” the mention to the webring owner.
# tarball777 I can’t really understand if only the receiver needs to run a command, or to use a server-side script, or if the senders also needs to do so.
# doosboox tarball777: basically the idea is that A publishes a page APOST, then runs a tool that finds all URLs mentioned in APOST. For each URL in that list it gets the URL target, then parses that to find a "link rel='webmention'" (I think it could be returned in the http header as well). If it finds one it posts a webmention to that endpoint (which is the
# doosboox receiver B in this example)
# doosboox tarball777: alternatively A might not have an automated sending mechanism, but knows that B has a webmention endpoint and is able to curl it manually. Sometimes B has a form for webmentions on their site.
# doosboox tarball777: B receives the webmention, and gets the URL that supposedly mentions it to validate that it actually does. This can be a manual process, too. Maybe B stores a list of received webmentions and goes through them on Sunday evenings while having a cup of tea and listening to heavy metal.
# tarball777 I see @doosboox that’s very clear. In my case I can’t be sure all the A will be able to run anything. But the form option is interesting!
# tarball777 thank you for you quick help.
[KevinMarks] joined the channel
# [KevinMarks] there are several tools that can send all the webmentions for an A anyway that work by parsing the page
# [KevinMarks] https://indiewebify.me/ has one, http://mention.tech/ does and https://webmention.app/ has good docs on automating
[kimberlyhirsh], __minoru__shirae and [schmarty] joined the channel
# [schmarty] some discussion in chat had me thinking about https://www.manton.org/2021/04/19/how-does-microblog.html again
# [schmarty] !tell manton in your "How does Micro.blog even work?" post you mentioned a fast build step to get the initial post permalink up before rebuilding the rest of the site. would you be willing to talk at a high level about how you do that?
# [schmarty] for my personal site, my micropub handler writes files, calls hugo to build, and publishes the resulting files. waiting for the full build can be very annoying when i just want a single new post to go up and send webmentions.
# [schmarty] i've thought about trying to make a shrunken/sandboxed copy of my hugo site with just enough templates to build permalink pages and do a first-run where i only give it the new or updated post to build
# [schmarty] but that feels like a lot of work to maintain and edge case around
[tantek] and [grantcodes] joined the channel
# @AvniGupta_ ↩️ React.js Project Ideas
1. Map Statistics Dashboard
2. Musical Instrument
3. Personal Portfolio
4. Notebook
5. Space Invaders Game
6. Framework Theme
7. Webmentions
8. Zoom Clone (twitter.com/_/status/1387786950141112320)
[tw2113_Slack_], barnabywalters, alex11, [KevinMarks], __minoru__shirae, minoru_shiraeesh, [kimberlyhirsh] and [aciccarello] joined the channel
KartikPrabhu joined the channel
# [schmarty] jacky: ah that is an interesting idea! i think it would still require duplicating a lot of hugo's logic to figure out things like the post permalink (e.g. what collection does it belong to, etc.), but a "generic" template that doesn't necessarily look like the site itself would work for webmention parsing
# [schmarty] kind of assumes that a human won't see it until hugo is done though
# [aciccarello] I know 11ty is trying to figure out how to incremental builds
# [aciccarello] Knowing what will change is a hard problem
# [aciccarello] Hopefully that matures and netlify makes it easier to manage caching
# [KevinMarks] the ripple effect if your tag pages are chronological can be big
# petermolnar ^^^ this
# [schmarty] things like rebuilding all tag pages (and archives) are why i want to have more control over when things happen. first build and publish the permalink page and start sending webmentions. then update any "main" feeds (and send websub notifications). then start the longer process of building out alternate views like tags, archives, indexes, ...
# doosboox [KevinMarks]: I don’t know what to think about centralised services for webmentions (or indieauth for that matter). I feel like relying on central services defeats the purpose of being outside of silos
# [schmarty] it might be time to revisit my chronological archives on hugo. at the time i could only get them working with what i consider to be weird backflips and i think they probably slow things down.
# doosboox [schmarty]: do you have a version of them live somewhere now?
# [KevinMarks] sending webmentions is still setting up an edge to edge connection
# barnabywalters yeah, there’s a huuuge gap between “setting up a simple HTML+css site/static site generator” and “writing or setting up and managing a piece of software which interacts securely with other servers and content”
# doosboox Websub is something I’d like to implement at some point. Running my own hub for just my domain would reduce workload if it would replace a bunch of polling to my feed :)
# barnabywalters services like indieauth.com and webmention.io help bridge that gap
# doosboox barnabywalters: I definitely see how it does. Having to set up your own site is already a pretty big hurdle for a lot of people
# barnabywalters and yes, they’re centralised, but they’re based on standards which anyone can implement and interop with, so there’s little-to-no entrenchment
# barnabywalters I can send webmentions to a site which is using webmention.io without ever knowing or caring that they’re using it
# barnabywalters and they could switch to another webmention handler without anyone having to know or care
# doosboox True
# barnabywalters and no data is lost if webmention.io goes down or disappears for any reason
# barnabywalters so there are plenty of differences between interim measures like these and siloed content and UX
# barnabywalters jacky: that occurred to me too, but yes it’s an edge case, and also it’s more of an archival issue than a webmention issue, considering that if handled “correctly” the mention would have been deleted anyway
# barnabywalters my site internally archives pages which webmention me (and those which I link to), but that’s separate from the webmention handling, so if a webmention gets deleted (which I still need to implement…) I still have the archive
# barnabywalters but that’s a feature of my site, not something inherent to webmention
# barnabywalters IIRC aaronpk has a similar internal archive
# jacky I have something similar running on https://v2.jacky.wtf (I hash the URL to the raw HTML contents of the sending page)
# barnabywalters wow, I have 253 MB of archived data
# barnabywalters not sure if that’s a lot or a little tbh
# barnabywalters that’s uncompressed, too. I might change the implementation to write directly to a zip archive in the future if it gets too much
# [tw2113_Slack_] wait till you get to the TB territory 😉
# barnabywalters [tw2113_Slack_]: at my current rate of ~30MB per year, it’ll take me only around 35000 years
# barnabywalters so I have plenty of time to implement the zip writing
# barnabywalters yeah, only HTML and HTTP headers
# barnabywalters it’s an opinionated archive ;)
# barnabywalters I figured I can rely on the internet archive for anything more than that
# barnabywalters but there’s no excuse not to at least store an HTML copy of everything I’ve ever linked to
# [schmarty] doosboox: the archive pages are public but I haven't published the source templates etc for my site
# [schmarty] But for example https://martymcgui.re/2021/04/
# barnabywalters jacky: this thing? https://hypercore-protocol.org/
# barnabywalters looks vaguely interesting
# barnabywalters I realised recently that stuff like this (anything with peer-to-peer or blockchain in) is where my BS-detection intuition runs dry
# barnabywalters I just don’t know enough about the problem space to be able to tell if a particular approach makes sense or not
# doosboox [schmarty]: Caaaaats ❤️
# doosboox [schmarty]: what is it about generating the archive that causes issues for you?
# [schmarty] doosboox: cats is probably 90+% of my content these days 😅
# [schmarty] Ah, yeah. Hugo doesn't (didn't) have a way to build date-based archives like /year/month/. So I adopted someone's hack where I make a separate "content page" for each month and the template for those content pages looks up all the posts that fit within that timeframe
# doosboox cats++
# doosboox ah, right
# doosboox is one of those loons that rolled his own static site generator
# [schmarty] So the /2021/04/ archive page is a yaml file with month: 04 and year: 2021. I think having the template query all my posts for every month is probably not optimized at all by hugo but it's just a hunch because it feels like a hack.
# [schmarty] I have been sorely tempted to roll my own 😅
# Poorchop I've been writing my own, it's the only way to go
# [schmarty] looks back down the road at all the site generators I have built and abandoned
# [aciccarello] Is there anything on Date Base Pagination other than the [[pagination]] page?
# Poorchop I don't know if a 20 line script can count as a static site generator but it statically generates my site
# Poorchop only one that I know of that allows for writing html instead of markdown
# [aciccarello] Technically you can write HTML in a markdown file 😉
# Poorchop touche my friend
# [aciccarello] I'm actually curious if anyone with a git based SSG & micropub post HTML to a markdown file. 🤔
# doosboox I write my source files in gemtext. Some is converted to html and posted to my blog, some is posted to my gemlog, and most posts are on both.
# [schmarty] I have occasionally thrown html into posts on my site which works as you described aciccarello
# [schmarty] (Mostly for stuff like before I built in support for RSVPs, or when experimenting with other microformats)
# [aciccarello] I'll sometimes add HTML in a post if I want to add rel= info on hrefs
[manton] joined the channel
# [manton] [schmarty] Just catching up… It’s similar to what [jacky] said. I basically run Hugo on a subset of the site first. The theme and all the core files, but only recent posts needed to construct the home page and permalink for the new post that was just written, and I skip updating some pages like the archive or photos list. Then I run a 2nd pass on it with a totally full content folder. (Still tweaking some of this.)
# [schmarty] manton: thanks! that's very inspiring! Is it a lot of file juggling? (It seems like it's a lot of file juggling of post data and template files)
# [schmarty] GWG sorry I missed it! I sometimes wonder if I should post more reacjis 😂
# [schmarty] manton: ah wow, yeah! That makes sense!
# [schmarty] manton: I guess I am most curious if you subset any of the theme template files on the quick build, or if limiting the content files to recent posts is "enough"?
# [schmarty] That fits my understanding! So I guess a major trick then is choosing which files out of the quick build subset to publish
[tantek] joined the channel
# barnabywalters yep, I do something similar in taproot. all my posts are stored in the filesystem, and then metadata used for indexing them is stored separately in a disposable format
# [schmarty] Ah, sorry, I meant like knowing to publish the feeds and index pages from the quick build and not publishing like incomplete tag pages
# barnabywalters filesystems and databases excell at quite different things, makes sense to use them both for what they’re good for
# Poorchop I'm surprised that people prefer markdown over html
# Poorchop there are too many markdown flavors and I can't ever remember things like []()! or [!]() or is it ![]()
# barnabywalters I author posts in markdown for convenience, but only save the rendered HTML
# Poorchop and is bold *word* or **word** and what is italic and what is underlined, and how do I combine them? I have to look these things up constantly when I'm forced to use markdown
# Poorchop yeah I need to look things up for html sometimes but far less often than with markdown
# barnabywalters yeah, there’s so much screen space available on desktop content authoring UIs, why not use some of it for a toggleable syntax reference
# Poorchop I also like having fine control over every tag
# [schmarty] "Why (not) markdown?" discussions tend to stir up strong opinions 😂
# Poorchop not in my experience - I think that I'm the only person alive who strongly prefers html over markdown and actually enjoys writing html
# [schmarty] manton: nice!! You are giving me confidence I could figure this out for my own site. A danger to my free time! 😂
# Poorchop I think that if this was 1995 and I didn't have a tricked out editor with autocompletion and auto-closing tags, I might slightly prefer markdown but with modern editors, html is a pleasure to write
# [schmarty] Poorchop 😂
# Poorchop that list is too short
# [schmarty] I tend to prefer markdown because I work with a lot of different editors and tools. I can't think of a single Micropub client with HTML highlighting or shortcuts
# Poorchop I'm using dokuwiki now which has its own syntax that is vastly different but the good thing is that it has buttons so that I don't need to commit anything to memory
# Poorchop not sure what that last sentence means
# [schmarty] quill's Editor is great but is much more like a Medium-style minimalist near-wysiwyg that outputs HTML
# Poorchop I'm not familiar with micropub
# Loqi Micropub is an open API standard (W3C Recommendation) for creating, editing, and deleting posts on websites, like on your own domain, supported by numerous third-party clients, CMSs, and social readers https://indieweb.org/Micropub
[benatwork] joined the channel
# barnabywalters technically my note posting UI is a micropub authoring interface with HTML syntax highlighting https://waterpigs.co.uk/notes/new/
# barnabywalters although I’m not sure anyone’s ever used it for posting ot a micropub endpoint, and it may well be broken
# Loqi Taproot Notes https://waterpigs.co.uk/taproot/logo-small.png
# [schmarty] barnabywalters++ sweet!
[KevinMarks] joined the channel
# @kevinmarks I never get <a href=link>text</a> wrong https://twitter.com/vponamariov/status/1387411278432460801 (twitter.com/_/status/1387706056051236864)
# [KevinMarks] you have to flip some config in Hugo, but you can get it to pass html through
# [schmarty] I'd be curious to see the learning curves on HTML vs markdown for someone new to both
# [schmarty] Like markdown is a handful of weird punctuation. HTML has multiple syntax concepts and a vocabulary.
# barnabywalters html has confusing things like <a href> vs <img src> which markdown avoids, at the cost of having to remember which way around the []() go
# [schmarty] tantek: i think context matters too much to map markdown vs html features learned over time without also considering what tools are used to support authoring
# barnabywalters [tantek]: sure, but the element determines that. if we’re talking about learnign experience for people new to both, I think they’re more likely to see both as being a “place to put a URL” rather than “linking vs transclusion”
# [KevinMarks] html has fewer syntax constructs than markdown, as it uses words rather then punctuation to distinguish things
# [schmarty] Just make sure you don't use the word transclusion when teaching someone HTML for the first time 😂
# [schmarty] I think it's a fair call out in the context of teaching folks authoring languages 😄
# barnabywalters sure, but they simultaneously have to learn that <a> links and <img> transcludes
# barnabywalters the attributes being different is just another layer
# barnabywalters e.g. why couldn’t it be <a uri=""> and <img uri="">
# barnabywalters I suppose the hypothetical is: if you could design HTML from scratch, would you still choose to use different attributes for linking and transclusion
# [KevinMarks] theres a post from mark pilgrim about how img src got decided, and what Timbl wanted instead
# [KevinMarks] excuse the fatwigoo from the known template http://www.diveintomark.link/2009/why-do-we-have-an-img-element
# [KevinMarks] <a name=fig1 href="fghjkdfghj" REL="EMBED, PRESENT">Figure </a>
# barnabywalters huh, the <icon> proposal is interesting, I’d not seen that before
# barnabywalters good grief, that’s hideous
# barnabywalters yep aaronpk, right down to “I somewhat prefer ICON since it imlies that the IMAGE should be smallish”
# barnabywalters it’s clearly intended for small, inline graphics rather than large images
# barnabywalters <IMG HREF="http://nsa.gov/pub/sounds/gorby.au" CONTENT-TYPE=audio/basic> is pretty amusing too
# barnabywalters it’s a proto-<audio>
# barnabywalters yeah it’s some fascinating web history
# barnabywalters [KevinMarks]++
# barnabywalters “closer to the actual piece of the data” -> what does that mean
# barnabywalters I’m sure there is, I’m just skeptical about how much of it is based on decisions made somewhat arbitrarily 20 years ago, when “<a name=fig1 href="fghjkdfghj" REL="EMBED, PRESENT">Figure </a>” was also being considered
# barnabywalters and that previous statement still seems pretty incoherent to me
# jacky I keep looking up more SSGs and now I see this https://www.npmjs.com/package/microsite
# barnabywalters CSS isn’t what causes an <img> element to display an image, though
# barnabywalters and if rel=embed, present is required to embed an image, what would rel=embed or rel=present by themselves do?
# barnabywalters ah, that’s how it works internally now? interesting
# barnabywalters from an HTML authors POV that’s an implementation detail, though
# [schmarty] jacky: still in use if you write HTML emails 😒 😭
# barnabywalters the <marquee> element was the first HTML I ever wrote
# barnabywalters fond memories
# barnabywalters back when I didn’t have to worry about linking vs transclusion, only small details like exactly where the / goes in the closing tag
minoru_shiraeesh joined the channel
# [schmarty] dang now i am really curious how many folks write what kind of content into micropub client's like quill's note interface.
# [schmarty] *clients
# barnabywalters [tantek]: I guess it didn’t gel well with elements where the closing tag is optional?
# barnabywalters it’s an interesting idea, reminiscent of universal } or end for defining blocks in programming languages
# barnabywalters when I was first learning HTML, I’m pretty sure I tried putting attributes on closing tags to see what would happen
# barnabywalters kinda like you can use do while
{} or do {}
while in some programming languages, and they mean different things# barnabywalters doesn’t really translate to markup though, of course
# barnabywalters lol
# barnabywalters [schmarty]:
# barnabywalters oops
# [schmarty] 😄
# barnabywalters [schmarty]: re what people type into micropub clients, I’m not up to date on the current status, but back when I was working on micropub a little bit, one the problems was figuring out how to match up authoring UIs with what format the micropub server is expecting
# [schmarty] barnabywalters: for sure! i think that is one of the main reasons a lot of micropub clients often just have plain text content areas.
# barnabywalters as far as I remember, my conclusion was either to send pure plain text (i.e. not assumed to be interpreted as markdown) or HTML
# barnabywalters which correspond to the p- and e- mf2 property types
# [schmarty] ahh, very interesting to try and guess what the resulting HTML's mf2 prefix would be!!
# barnabywalters or to be able to send both, and the server can pick which it wants
# barnabywalters but if a client offered a “rich” authoring UI, and the micropub endpoint only accepted the plaintext version, then there’s mismatched expectations and wasted effort on the part of the user
# [schmarty] i am trying to think of a client that sends both
# barnabywalters so there probably needs to be some way of a micropub endpoint advertising what formats it accepts, if that isn’t already something which was developed while I wasn’t looking
# [schmarty] i think micropublish.net, when editing a post, will prefer the html version if your micropub endpoint returns both.
# barnabywalters another approach would be for a micropub endpoint to offer a “preview” URL, which accepts micropub requests and just renders how they’ll look
[Ana_Rodrigues] joined the channel
# [schmarty] barnabywalters: agreed that without some way to coordinate this becomes a very messy problem for clients to try and tackle.
# barnabywalters which authoring UIs could then use for live previews
# barnabywalters well it looks like the standard already handles explicit HTML content https://www.w3.org/TR/micropub/#new-article-with-html
# [schmarty] with the JSON encoding, yep
# barnabywalters it’s a pity that nested objects don’t reliably work in the form-encoded encoding
# barnabywalters does anyone know exactly why nested form-encoded objects don’t work everywhere? you can definitely use them in PHP to a certain extent
# barnabywalters ah okay thanks aaronpk
# barnabywalters in theory the [] notation could work everywhere
# barnabywalters it’s just a question of parsing it if your framework/environment doesn’t do it for you
# barnabywalters I mean, JSON responses aren’t automatically parsed by every framework either
# barnabywalters yeah, it definitely makes sense to use it in this case
# barnabywalters it’s just frustrating how close we came to not needing it
# barnabywalters and now have to support two parallel encodings :(
# [schmarty] the distinction can be important if you're building a micropub client
# [schmarty] like the "principle of least power" suggests to me i should try to make things work form-encoded until my client's feature-set is somehow outside what form-encoding supports.
# [schmarty] but as a client author how do i know when to make the jump? do i advertise "your endpoint must support Micropub JSON requests"? do i make you check a box to enable the JSON-requiring features? etc.
# [schmarty] seems like a good spot for it.
# barnabywalters AFAIK an endpoint must support both encodings in order to be compliant with the spec, no?
# [schmarty] aaronpk: how does a user choose whether they want form or json mode? (and more importantly: how _should_ they? why would someone want to know this??)
# barnabywalters I don’t see a “MUST” anywhere, but this section doesn’t say anything about JSON support being optional https://www.w3.org/TR/micropub/#json-syntax
# barnabywalters aaronpk: what do you think of my idea above for a discoverable micropub preview endpoint?
# barnabywalters tbh there’s not much more too it than that
# barnabywalters an optional, discoverable endpoint which accepts arbitrary micropub requests and renders what they would result in
# barnabywalters it would route around a lot of client/server mismatch problems, as exactly how the server is interpreting what the client sends it would be immediately visible
# [schmarty] barnabywalters: grantcodes has a neat alternate approach to that, for editing at least https://github.com/grantcodes/postrchild-extension
# [schmarty] live preview by modifying the microformats2-annotated HTML already in the page!
# barnabywalters that’s really cool! it’s solving a bit of a different problem though
# barnabywalters if you’re using your own micropub client and server then you have some implicit knowledge about how their capabilities and formats interact
# barnabywalters not so if you’re using a 3rd party client
# [schmarty] that client runs in your browser so it works on my site just as well as it works on grantcodes'
alex11, [aciccarello], [snarfed] and jamietanna joined the channel
# jamietanna [schmarty] I'm still waiting for Hugo's date-based pagination to be supported (I may also look at raising a PR) https://github.com/gohugoio/hugo/issues/6992
# jamietanna I'm also quite tempted with the pre-render side of things, maybe getting my Micropub server to publish a file to S3 before it rebuilds? Or actually I could do it as a Lambda@Edge maybe - if there's a miss on a resource, check q=source, if it's there, show some minimal HTML?
# [aciccarello] Not the same as date based, but it looks like 11ty supports reverse order pagination which would help avoid rebuilds
# [aciccarello] what is pagination?
# Loqi pagination is a UI pattern for navigation across (typically chronologically) sequential pages that show one or more posts such as permalink post pages, archives, search results, and lists of tagged posts https://indieweb.org/pagination
# barnabywalters PHP devs: when passing a complex configuration value into a class or function, do you prefer having a straightforward array, or a configuration object with better support for type hints, auto documentation, intellisense etc?
# barnabywalters been a while since I wrote any PHP intended for others to use
# [aciccarello] pagination << [https://www.11ty.dev/docs/pagination/#reverse-the-data 11ty supports reverse order pagination for permalinks]
# Loqi ok, I added "[https://www.11ty.dev/docs/pagination/#reverse-the-data 11ty supports reverse order pagination for permalinks]" to the "See Also" section of /pagination https://indieweb.org/wiki/index.php?diff=75467&oldid=55035
# barnabywalters I previously tended towards simple arrays, but recent delving into rust, and exposure to just how great intellisense and automatic documentation can be is swaying me toward config objects…
# barnabywalters aaronpk: am I correct in understanding that a micropub endpoint doesn’t need to know how to give out access tokens, or care where they came from, and only has to know how to verify them?
# barnabywalters great
Poorchop left the channel
# barnabywalters and when it verifies an access token, it gets information about who the user is, right? so one micropub endpoint could potentially be used for many different users?
# barnabywalters ah true, because it gets an access token, but it has to know exactly *where* to verify it, which depends on the user
# barnabywalters I’m starting work on a PHP micropub adapter/frontend, and ideally want to avoid coupling it tightly to a particular auth implementation
# aaronpk gotcha. the most generic way to handle that is for the micropub endpoint to use this to verify access tokens https://indieauth.spec.indieweb.org/#access-token-verification
# barnabywalters okay, I think I can avoid hard-coding even that
# barnabywalters basically my idea is to write only the front-end which handles and dispatches micropub endpoints, and the library consumer passes in a table of functions which get called depending on what the current micropub request is doing
# barnabywalters so I can just have one which is “verify token”, and the user writes whatever they need there
# barnabywalters the idea is to make something which handles all the gnarly format and encoding stuff, and makes it super easy to add micropub support to existing applications
# barnabywalters (such as taproot, which was built before micropub existed and is not really structured around it)
# barnabywalters it should allow for some fun stuff like the endpoint library using reflection to auto-detect what capabilities it has based on which callback methods are implemented
lon3fr1gat3 joined the channel
# lon3fr1gat3 hello?