#dev 2020-07-12

2020-07-12 UTC
geoffo, [jgmac1106] and [chrisaldrich] joined the channel
#
sknebel
people using the github readme thing to automatically add updates: https://simonwillison.net/2020/Jul/10/self-updating-profile-readme/
[jgmac1106]1 joined the channel
#
jacky
so much code to make my homepage customizable D:
#
[tw2113]
you got this Jacky!
#
sknebel
curious to see what you come up with!
#
jacky
me too tbh lol
#
jacky
the current approach is to avoid anything too 'drastic'; when I provide my root site URL to the micropub client; the MF2 given back should be a bunch of properties that'll be used to define my site
#
jacky
right now, I'm focusing on the main content and the footer (it has a way to render `n` items) so if I can do that, I'll push to change more things like the navigation and what not
geoffo, sp1ff`, nickodd and vika_nezrimaya joined the channel
#
vika_nezrimaya
I think I finally understood something. My backend for the Micropub endpoint (the database connector, I'd like to call it from now) was bloated not because it was full of crappy code that I wrote several years ago and never refactored
#
vika_nezrimaya
It was simply doing too much
#
vika_nezrimaya
The database connector was for some unknown reason responsible for maintaining the feeds, which I don't think it should actually do?
#
vika_nezrimaya
With the ?q=source paradigm that I use, the feeds can be the same MF2-JSON pages that h-entries are, only marked up with h-feed
#
vika_nezrimaya
and this means that I can use another microservice for maintaining these feeds after the Micropub endpoint accepts the post
#
vika_nezrimaya
Thus the micropub endpoint's code becomes a lot more simple >.<
#
vika_nezrimaya
I'm kinda not sure what the performance of completely regenerating the feed every time I post something would be... But I don't think it will take more than several seconds?
#
jacky
that's clever - using your micropub endpoint to fetch things for a feed
#
vika_nezrimaya
I'm kinda imagining it like this: each time I post or update something, the Micropub endpoint sends out a call to the feed manager. It loads up its own feeds, rebuilds them and then updates them using the Micropub protocol back to the endpoint
#
vika_nezrimaya
I'll just need a lot of locking to ensure consistency :3
#
vika_nezrimaya
Or I could go with another approach. The feed is stored as a list of URLs, and the Micropub endpoint loads these URLs on-demand when the feed is requested (so paging is on the Micropub endpoint)
#
vika_nezrimaya
kinda like this: ?q=source&url=https://fireburn.ru/feeds/main -> sees h-feed in the data, returns Object.assign(obj, { children: obj.children[skip:count].map(child => source_for(child)) }) except in Python not in JavaScript
#
vika_nezrimaya
default for skip will be 0, default for count will be 10 but it could be customizable
#
vika_nezrimaya
It feels like a good idea!
#
vika_nezrimaya
That will lessen up the load on the Micropub endpoint when posting and almost eliminate the need for locking
#
vika_nezrimaya
The feed operation will probably need to be atomic, so there could only be one feed coordinator instance
#
vika_nezrimaya
and probably only one Micropub endpoint
#
vika_nezrimaya
but this is solved by the fact that the frontend could have a caching layer in front of it, so I can scale it with no limits
#
vika_nezrimaya
and it could also cache MF2-JSON for the Micropub endpoint
#
vika_nezrimaya
The only problem is: that kinda does not solve the problem with feed ordering, it's hard to order feeds
#
vika_nezrimaya
one solution could be leaving the "published" field in the feed stub so the feed manager could insert the post in the right spot every time
#
vika_nezrimaya
yeah, that seems like a nice thing
#
vika_nezrimaya
But the worst thing is: I now have to decide on another name for the feed management service~
#
vika_nezrimaya
Kittybox is the endpoint, blogblaze is my working title for the frontend (because it's supposed to be blazing fast, which I can't guarantee it'll be)
#
vika_nezrimaya
I think I need something cat-related
#
vika_nezrimaya
or maybe dog related? like "Watchdog for Kittybox"?
#
vika_nezrimaya
Ok so sorting my whole list of around 850 posts is around 1ms in Python, assuming all the posts are loaded into memory
#
vika_nezrimaya
which feels like fast enough
#
vika_nezrimaya
yeah, I could make it work!
#
jacky
is kittybox mostly stateless in how it does things?
#
vika_nezrimaya
jacky: define "stateless" in context of Micropub endpoints
#
vika_nezrimaya
Kittybox has a database, but I don't think it has an internal state
#
vika_nezrimaya
if I were to restart the Micropub endpoint in-between transactions, literally nothing would happen
#
vika_nezrimaya
Unrelated: Do we have something like ?q=food for foodstuff? I want to have an app with a recipe book that uses my website as storage
#
vika_nezrimaya
so I could publish recipes and then quickly recall them when I wanna eat something
#
vika_nezrimaya
like right now
#
vika_nezrimaya
except I mostly want a drink and I don't even have a bottle of Coca-Cola >.<
moppy, lahacker and [grantcodes] joined the channel
#
[grantcodes]
What is recipe?
#
Loqi
recipe is special kind of post, that typically has a name, like articles do, a list of ingredients, and a list of instructions for making something, usually food or drink https://indieweb.org/recipe
#
[grantcodes]
I would probably do something like `?post-type=recipe` for the query as that's already defined somewhere
#
vika_nezrimaya
yeah, that's also an option
#
vika_nezrimaya
but considering we already have ?q=contacts, why not ?q=food? :3
leg, [jgmac1106] and [KevinMarks] joined the channel
#
[KevinMarks]
Aaron has food posts
#
[KevinMarks]
Another approach that might be worth a look is Tantek's, where he keeps a lot of posts in a single file, on the assumption that reading the file is the biggest overhead (as opposed to in memory reorganising the posts)
#
[KevinMarks]
You could put your mf2 posts in json lines format perhaps.
KartikPrabhu, Rixon and vika_nezrimaya joined the channel
#
tinfoil-hat
Hi, I am following the guide for making my page indieweb compatible, however I'm following the guide to h-entry here: http://microformats.org/wiki/h-entry and a question comes in mind: Do I have to put the hentry just into a single document or also info the posts I am pointing to?
#
Loqi
[Tantek Çelik] h-entry is a simple, open format for episodic or datestamped content on the web. h-entry is often used with content intended to be syndicated, e.g. blog posts. h-entry is one of several open microformat standards suitable for embedding data in HTML. ...
#
tinfoil-hat
Maybe my english is to bad to understand it completly, could you please tell me in simpler language?
#
tinfoil-hat
I'm not a webdev, I am a hobbyist, that has build his own page. I am kinda lost in the whole h-entry topic
vika_nezrimaya joined the channel
#
tinfoil-hat
I begin to undertand how it's working, but I'm not sure if I understand it completly
[jgmac1106] joined the channel
#
[jgmac1106]
tinfoil-hat we also tried to write a version on MDN https://developer.mozilla.org/en-US/docs/Web/HTML/microformats
#
[jgmac1106]
If you have a single post someone can take a look at your h-entry mark up
#
[jgmac1106]
an h-entry is a post, an h-feed is a usually chronological order of h-entries
#
GWG
Essentially, you wrap your post in h-entry, a list of posts in h-feed, etc. Microformats is just telling a computer what each element is by adding a class
[KevinMarks] joined the channel
#
[KevinMarks]
you may find indiewebify.me helpful too as it checks your page for you
vika_nezrimaya joined the channel
#
GWG
aaronpk: Just a warning, the custom code I put in WordPress could be used with Atlas, even though I am not suggesting it to anyone and will discourage it
nickodd joined the channel
#
GWG
Maybe I should lock mine to specific referer URLs
#
GWG
Anyway, next up is converting things to mf2, another favorite of mine
#
jamietanna[m]
Jacky https://v2.jacky.wtf/post/e83ec653-f18d-4352-b296-7527f1552729 doesn't seem to have syndicated (yet) to GitHub btw
#
GWG
That reminds me...I understand posse to GitHub... but does anyone display issues on their site in a tracker like archive and what about opening or closing them?
[snarfed] joined the channel
#
[snarfed]
basically recreated github's
#
GWG
[snarfed]: I have to go look at your docs... Does Bridgy send webmentions for closed issues?
#
[snarfed]
oh, i mean, for comments or reactions on closed issues yes. not for the actual closing itself
#
GWG
Could it send the actual closing back?
#
[snarfed]
as usual, i'd want to see someone do that themselves in the wild first
#
GWG
I was thinking about it
#
[snarfed]
bridgy follows, it doesn't lead
#
GWG
But I think about a lot of things I may not do soon
#
Loqi
[tantek] #915 Explore support for Bridgy Publish to GitHub POSSE special responses to issues: close, re-open,...
#
GWG
[snarfed]: That's a good slogan
#
sknebel
that issue is the reverse direction though, right?
#
GWG
sknebel: I would want bidirectional in theory
[chrisaldrich] joined the channel
#
[snarfed]
sknebel: true!
[dshanske] joined the channel
#
tinfoil-hat
Thanks for the answers! jgmac1106 and GWG!
[Murray] joined the channel
#
[Murray]
with webmention.io does anyone know if the `url` returned is ever different to the `wmSource` ? Alternatively phrased, which should be treated as the safer option to use for an actual link? (or is there some documentation that I've missed that might answer this)
#
aaronpk
the source is the safe one, "url" is the value reported in the h-entry
#
aaronpk
if they have different domains then my site will say "via (domain)"
#
aaronpk
an h-entry can put whatever value it wants in the u-url property and that's what will show up in that url from webmention.io
#
[Murray]
aaronpk++ perfect thanks 🙂
#
Loqi
aaronpk has 64 karma in this channel over the last year (234 in all channels)
geoffo, [fluffy], [manton], KartikPrabhu, [chrisaldrich] and [tantek] joined the channel; nickodd left the channel
#
[tantek]
snarfed++ yes good slogan for Bridgy! Now can I ask for reacji to pull request reviews since I did post one to my own site first? ;)
#
Loqi
snarfed has 50 karma in this channel over the last year (90 in all channels)
#
jacky
jamietanna[m]: good catch
#
jacky
that's a subtle bug in lighthouse, been meaning to fix that
leg and [michael_lewis] joined the channel
#
[michael_lewis]
Hello. My first post here.
#
[michael_lewis]
I'm working on a side project where I think IndieAuth will work really well, and I've a version on localhost using via indielogin.com.
#
[michael_lewis]
However, I've just tested on my prod server and it seems my side project's domain needs to be registered as a client_id for it to work.
#
jacky
yeah I actually have been wondering about that
#
[michael_lewis]
What's the best approach for this? Log an issue at https://github.com/aaronpk/indielogin.com/issues? Or is there a different tool I should use?
#
jacky
I thought, at first, OAuth2 had a specific method for this, but IndieAuth in particular doesn't (registration is implicit to the client_id provied)
#
aaronpk
indielogin.com is not indieauth
#
aaronpk
it's a service i run that projects can use to implement user login via indieauth or relmeauth
#
aaronpk
anything indielogin.com is doing your project can do itself (either being an indieauth client itself directly, or doing relmeauth itself)
#
aaronpk
i don't want too many people to rely on indielogin.com itself, i would rather they implement an indieauth client directly or set up an instance of indielogin.com for themselves
#
jacky
gotcha - that's what I was figuring tbh
#
jacky
and that'll prevent it from becoming another indieauth.com
#
aaronpk
there's other problems with indieauth.com but generally yes
#
[michael_lewis]
Yes, I was expecting I may have to set up my own version in time, just not so soon:-)
#
jacky
heh :)
#
[michael_lewis]
Does indieauth.com have the same need for the client_id to be registered?
jamietanna joined the channel
#
jacky
it doesn't but like aaronpk mentioned, the moment you feel it's necessary to do it, it'd be safer to do it in-house (indieauth.com has a wavering life span IIRC)
#
aaronpk
(I'm going to eventually turn it off once I figure out how to get everyone off it)
#
[michael_lewis]
Great, I'll try indieauth.com as a super short term thing.
#
[michael_lewis]
The IndieAuth is great BTW. The other way I've implemented for people to prove they own their domain is the usual putting a validation code in your TXT record or meta tag or whatever, and then they have to login with a password they've set, and the IndieAuth is a breeze for users in comparison (assuming they've set it up on their site already of course).
#
aaronpk
hmm I would rather give you an account on indielogin.com than have you send people to IndieAuth.com
#
[michael_lewis]
Would be great if you could. What would you need?
#
aaronpk
just the client_id URL and a promise that you'll eventually run an instance yourself :)
#
jacky
better yet, force expiry of clients every 60 days >:)
#
jacky
[that's how Google got KDE to fix their integration, lol]
[schmarty] joined the channel
#
[schmarty]
return new Promise((fulfill, reject) => { /* your entire life is lived here */});
#
aaronpk
lol good idea jacky
soloninja, jmac and [manton] joined the channel
#
[michael_lewis]
Or a login counter - you get x logins and then you have to set up your own.
#
vilhalmer
or slow down each request past some limit by just a little more each time
#
vilhalmer
I can never find the ref but I think that was a google special as well for deprecating an api
#
[schmarty]
aaronpk: some ideas on how to structure auth endpoint testing on indieauth.rocks https://indieweb.org/User:Martymcgui.re/IndieAuth-Endpoint-Testing#Authorization_Endpoint_Testing
geoffo, [tw2113] and [snarfed] joined the channel
#
[snarfed]
lol [tantek], acknowledged. https://github.com/snarfed/bridgy/issues/955 . pull requests welcome! :troll:
#
Loqi
[tantek] #955 Bridgy Publish: Support reacji to pull request reviews
gRegorLove and KartikPrabhu joined the channel