#dev 2022-05-23

2022-05-23 UTC
angelo, cybi and Seirdy joined the channel
#
@scojjac
What ways are there to discover blogs that use #WebMention?— Matthew D. Brown (@lordmatt) May 20, 2022 @lordmatt It may not be 1:1, but IndieWebRing directory at https://xn--sr8hvo.ws/ will have many. https://twitter.com/hashtag/WebMention?src=hash&ref_src=twsrc%5Etfw
(twitter.com/_/status/1528562931306201093)
[tw2113_Slack_], vika_nezrimaya, Loqi, Zegnat, jan6 and mro joined the channel
#
@lordmatt
↩️ I pulled the semantic #webmentions plugin and that seems to have fixed it.
(twitter.com/_/status/1528648048137625601)
Loqi, mro and cybi joined the channel
#
@OpenMentions
Update: @LordMatt has applied a hotfix that works around the bug that causes some Webmentions to error while trying to get a semantically relevant ping body. Hopefully we are all good to go again.
(twitter.com/_/status/1528669215384866824)
Loqi, mro, tetov-irc, jacky, vika_nezrimaya, m2m and AramZS joined the channel
#
[tantek]
what is a ping body?
#
Loqi
It looks like we don't have a page for "ping body" yet. Would you like to create it? (Or just say "ping body is ____", a sentence describing the term)
#
[Scott_Jack]
bodybuilder's ping? ping body > lewy body > protein buildup > bodybuilder > i'm sorry everyone
mro, Loqi and [CrowderSoup] joined the channel
#
[CrowderSoup]
I haven't been very active here due to life reasons but I'm trying to solidify my plan for further IndieWebifying my site.
#
[CrowderSoup]
It's a static site, and I'd like to keep it that way. A quick search of the wiki (and internet at large) yields some good information. But since I didn't find anything specifically about this I thought I'd ask here: has anyone had any success using a GitHub action (triggered on a successful deployment in Vercel) to send webmentions?
jacky and chenghiz_ joined the channel
#
jacky
curious: does anyone have ID-level editing of their Micropub-enabled sites?
#
jacky
I have a _niche_ use-case where I want to change some of the things on https://jacky.wtf/uses
#
jacky
if I don't have anchor-level editing, I'd have to do some nested JSON-path editing stuff (which is 🤯️)
#
[CrowderSoup]
[jacky] I don't, but I plan to (eventually)
#
jacky
[CrowderSoup]: nice!
#
jacky
I'll be putting my ideas and workflow for it on my site's wiki page
#
jacky
I think such a thing would be handy for manually built /collection posts
#
[CrowderSoup]
I'm currently building out support for as much as I can with serverless functions (in Vercel) and likely GitHub actions so that I don't have to maintain any supporting infra, while still keeping my website in a git repo.
#
[CrowderSoup]
I totally agree with you on that point though!
mro, [jgmac1106], jacky, [Murray], cybi, Loqi and [tonz] joined the channel
#
Loqi
I think my template unit-tests are one of the most beautilful think I’ve ever written. An MF2-JSON document is randomly generated, rendered using the appropriate template and then checked for expected properties matching whatever was in the MF2-JSO...
#
vika_nezrimaya
I wrote some very beautiful unit tests for my templates. Never thought testing frontend would be THIS easy!
#
vika_nezrimaya
All because MF2-HTML is extremely easy to process with a library.
#
jacky
ooh are you using the newest Rust? I see the local variable serialization in `format!` being used
#
jacky
it's not an Enum but it's an object that optionally has either a time, date and offset (any one of the three is a valid datetime value in MF2)
#
vika_nezrimaya
Yes, and converting it to a chrono::DateTime is a bit more verbose than I thought it would be
#
vika_nezrimaya
If any one of the time, date and offset is a valid dt value, I see why using an Enum would cause a combinatorial explosion...
#
vika_nezrimaya
jacky: rustc --version gives me 1.60.0
#
jacky
ooh yeah that's the newer one
#
jacky
I'm still on 1.56
#
vika_nezrimaya
jacky: btw you can see how the MF2-JSON generator grew! It can now generate replies and likes (with both full and partial reply contexts) as well as articles (h-entry with a name)
#
jacky
nicee
#
vika_nezrimaya
I think separating it into a crate may be a good thing later if `microformats` would want to benefit from it
#
jacky
perhaps; I think I can see me using this in my eventually microsub reader for showing example pages
#
vika_nezrimaya
Yeah, just a little conversion to JF2 and one could plug it in a social reader to demo views with fake data
#
jacky
JF2 conversion is upcoming! I'll be working on that again after I fix that bug you presented
#
vika_nezrimaya
Nice!
#
jacky
vika_nezrimaya: I can look into making a TryInto<chrono::DateTime> for temporal::Stamp if that makes things easier
#
jacky
I know it would for me :)
#
vika_nezrimaya
Yes, this is perfect! Also TryInto<chrono::Date>, TryInto<chrono::Time> and their naive counterparts in case the full range of values isn't specified
#
jacky
opens a ticket to track this
#
jacky
I don't know if you've seen https://lib.rs/crates/indieweb yet - it has some half baked implementations of common IndieWeb things (Webmention, IndieAuth, Micropub)
#
jacky
I do have some 'extensions' that are backcompat with mainline Micropub in there though
#
jacky
I haven't fleshed out the Microsub things just yet - haven't had a chance
#
jacky
I want to reduce its scope of dependencies a bit (like scraper might not be needed, for example)
[aciccarello] and cybi joined the channel
#
vika_nezrimaya
I wish it would let me take care of HTTP requests myself
#
vika_nezrimaya
I see it also including an HTTP client
#
vika_nezrimaya
I wish it could simply provide me neccesary headers/query/body and let me do the requests myself
#
vika_nezrimaya
That would allow you to eliminate a dependency too
#
vika_nezrimaya
jacky: I think I once had a stray thought of taking some of that code and vendoring it into Kittybox, too
#
vika_nezrimaya
namely the indieauth part
#
vika_nezrimaya
my code was spaghetti and I got lost in it, yours IIRC was based on oauth crate
#
jacky
I've wanted that functionality too, vika_nezrimaya
#
jacky
I think I need to expose some sort of 'http client' interface and let people bring their own
#
jacky
and have it ship with ureq as a 'default' but feature-flagged example
#
jacky
that's pretty easy tbh
#
vika_nezrimaya
I would personally be ok with the HTTP part being completely out-of-scope and the protocol's state machine being exposed as structs and possibly typestates with the application developer providing raw values for the protocol
#
jacky
so there's facets of that for IndieAuth
#
vika_nezrimaya
For example, IndieAuth would start with the "me" string (and a bit of MF2 parsing and helpers for parsing Link: headers), then transform into a struct representing an authorization endpoint request that would get serialized and sent as a query string
#
vika_nezrimaya
Yes
#
vika_nezrimaya
I should consider bringing it as a dependency to Kittybox
#
jacky
only if you find it useful! any feedback is helpful/needed since I'm really only the only consumer :)
#
jacky
I also need to flesh out the docs a lot more
#
Loqi
agreed.
#
vika_nezrimaya
The typing of the indieauth module is impressive
#
vika_nezrimaya
There are structs for everything
#
jacky
heh I tried to codify as much as possible to make it hard to do it wrong
#
jacky
thank you :)
#
jacky
refactoring this to the new indieauth standard is going to be interesting to do
#
vika_nezrimaya
Considering Kittybox can be both a server and a client, integrating your `indieweb` crate could exercise a lot of its functionality and, as a result, generate a lot of feedback
#
vika_nezrimaya
I should consider doing it soon, I am bored and have nothing to do
#
jacky
so my 'client' is /Shock currently (for Micropub, Webmention and IndieAuth)
#
jacky
and my 'server'(s) are /Sele and /Koype for IndieAuth and Micropub respectively
#
jacky
I started with a big ol' app but it kinda got clunky (prob from my coding, lol) and it felt easier to separate it out
#
vika_nezrimaya
Kittybox is technically a monolith but the only thing in the frontend that doesn't let me fully separate it is the onboarding page - it uses an internal Micropub function for inserting a post into the database without authentication and other checks (since the post is generated at the backend, it is trusted)
jacky joined the channel
#
vika_nezrimaya
Everything else is completely modular (it only needs to share the database, which can be done with, say, NFS for filesystem mode)
#
jacky
nicee
#
jacky
what kind of DB are you using?
#
vika_nezrimaya
The best kind: none
#
vika_nezrimaya
I can however write a pluggable database backend for anything that can accept and spit back a JSON blob
#
vika_nezrimaya
I've had a Redis backend store in the past
#
jacky
that's most databases tbh
#
vika_nezrimaya
I could probably attempt Postgres and MongoDB
#
jacky
SQLite, Postgres w/ JSON/BSON
#
vika_nezrimaya
Oh, SQLite can also do JSON? cool
#
jacky
yup, it's how I handle the job queue in my projects (b/c there isn't something like celery in Rust that's a bit nimble)
#
jacky
I'm actually working on something using virtual tables and JSON with SQLite so I can search all of the MF2 properties of things on the fly (with a custom function in SQLite of course)
#
vika_nezrimaya
I also think of making some neat features like backends implementing their own search API (since in SQL databases there are sometimes full-text search capabilities) and background integrity checks (for example, restoring corrupted permalinks - see https://fireburn.ru/posts/mending-broken-permalinks-part-1)
#
Loqi
Mending what's broken, or how I discovered some broken links on my website
#
jacky
ah I remember this post
#
vika_nezrimaya
Also the backends are responsible for processing updates, this allows to make them atomic and transactional (e.g. in Redis updates were shipped off to a Redis function in Lua, which blocked the whole database)
#
vika_nezrimaya
In the file backend, updates are processed in the backend code and then written to a temp file that atomically replaces the original with rename(2)
#
jacky
is that to prevent corruption?
#
vika_nezrimaya
Yes, corruption and broken JSON in case someone decides to send a request in the meantime
#
vika_nezrimaya
I'm kinda proud of that, it's completely lockless on reads and I could probably spin in a loop trying to create a tempfile on writes
#
vika_nezrimaya
for now it should return a conflict error though
#
vika_nezrimaya
A proper Micropub client would allow to retry the request
#
vika_nezrimaya
In case of networked filesystems this system can even be horizontally scaled infinitely
#
vika_nezrimaya
I doubt many applications could run on a full range of systems from a Raspberry Pi (probably even the original one, judging by memory usage) to a beefy datacenter cluster
#
vika_nezrimaya
Mine should be able to handle it
#
vika_nezrimaya
...I should probably write some end-to-end tests to prove my boastful words though
#
jacky
always gotta back iot up
#
vika_nezrimaya
Eh, it would not be hard. NixOS, my OS of choice, allows me to write beautiful tests involving a dozen VMs at once. I could probably make them share a filesystem using NFS and then run Kittybox on ALL of them at once to verify my claim
#
vika_nezrimaya
I run one end-to-end test verifying that onboarding works properly. More of a smoke test than anything, but still useful
#
vika_nezrimaya
It caught some interesting breakages due to the VM's architectural differences from my production setup
cybi, [jeremycherfas], gRegor, mro, [schmarty], jacky and ben_thatmust joined the channel
#
@gRegorLove
↩️ No worries! I had another Webmention issue sending to both your site and @openmentions. I tagged you in a GitHub issue. If you’re interested, IndieWeb has a WordPress chat channel with a helpful group of people, including the plugin authors: http://indieweb.org/discuss
(twitter.com/_/status/1528822901641723904)
gRegorLove_ joined the channel
#
@gRegorLove
↩️ I tried sending again with the form and got the general error "There has been a critical error on this website." This is the post I'm trying to send in case you want to debug or try re-sending the webmention: https://gregorlove.com/2022/05/open-mentions-is-an-interesting/
(twitter.com/_/status/1528828010090188800)
cybi joined the channel
#
[tantek]
[Scott_Jack] pretty sure the rounded hexagons thing predates Linktree, e.g. Twitter NFT avatars were rounded hexagons before that
#
[Scott_Jack]
wonder where it comes form
#
[tantek]
what is well-known
#
Loqi
Well-known refers to designating a common URL on domains for data to be easily located https://indieweb.org/well-known
#
[tantek]
well-known << https://twitter.com/mistersql/status/1528833918245511171 (also yet another mislabeling of 'microformats' for something they are not)
#
@mistersql
did you know many gov't sites have a code.json or data.json at the root of their domain to let you discover the opensource and open data they have available? https://www.dol.gov/code.json https://www.dol.gov/data.json I haven't found if there are any more of these microformats
(twitter.com/_/status/1528833918245511171)
#
Loqi
ok, I added "https://twitter.com/mistersql/status/1528833918245511171 (also yet another mislabeling of 'microformats' for something they are not)" to the "See Also" section of /well-known https://indieweb.org/wiki/index.php?diff=81628&oldid=81446
#
[Scott_Jack]
The Verge's coverage of Twitter's 'soft hexagon' is written like that's the original implementation
jacky, jacky__, AramZS, cybi, [jeremycherfas]1, tetov-irc and [James_Van_Dyne] joined the channel
#
jacky
heh figured out how to use https://sqlite.org/vtab.html in SQLite so I can write queries like `SELECT id from entry_mf2 where property_name = 'like-of' and property_value = 'https://indieweb.org/like'``
#
jacky
ideally, I could make it such that if a property has multiple values, it'd appear as multiple rows
#
jacky
a bit easier than searching a bunch of JSON files one at a time (and cache-friendly)
#
[snarfed]
oh wow, nice!
#
[snarfed]
for small datasets, I wonder if SQL engines over flat files like this might get us most of the benefits of flat files and also many of the benefits of databases