#dev 2023-02-08

2023-02-08 UTC
geoffo, angelo and bterry joined the channel; GregL[m] left the channel
#
gRegor
Hm, an issue with Basic Auth for the client credentials flow is it can't have ":" in the client_id part, since that separates user and pass in Basic Auth.
#
gRegor
Think I'll have to have the media endpoint use its URL without scheme as the client_id, and my server will check for both a matching https and http version of it.
#
gRegor
Or just ignore http, since clients/endpoints shouldn't be http
#
GWG
gRegor: I never implemented auth on the introspection endpoint because I couldn't decide how to implement it
#
gRegor
I am now out of necessity. I'm setting up a media endpoint that I don't want tied tightly to my other software, and want it to follow the current spec instead of the previous GET method for verification.
#
GWG
gRegor: Mine follows the spec except for the auth
#
gRegor
It hasn't been as hard as I thought once I wrapped my head around it. I add a client_id in the admin, it generates a client_secret, I set that secret in the media endpoint config, the media endpoint will use Basic Auth of its client_id + secret to authenticate the introspection request.
#
GWG
I was waiting for a use case to figure it out
#
gRegor
Depending how this media endpoint goes I might open source it, so would prefer it be spec compliant
#
GWG
Understood, just there is, as usual, a cost of us not defining how to do auth in the spec
#
gRegor
The defined Client Credentials flow seems like a good starting point. I could add other methods to the media endpoint if necessary.
#
GWG
gRegor: I look forward to hearing more
angelo, mro, gRegor, janboddez, [dave], [pfefferle], [tantek], [tw2113_Slack_], moose333, gxt, AramZS, sp1ff, IWSlackGateway, geoffo and [snarfed] joined the channel
#
[snarfed]
The day before Twitter's supposedly shutting down its free API, it takes its developer forum down entirely. https://twittercommunity.com/
#
[snarfed]
Maybe unintentional, who knows
[tw2113_Slack_] joined the channel
#
[tw2113_Slack_]
has anything lately been unintentional?
#
[snarfed]
Sure, plenty of small and medium breakages that they no longer have the staff to prevent or fix quickly, if at all
#
[snarfed]
But yes also plenty of intentional damage
#
aaronpk
putting up http basic auth doesn't feel unintentional
#
aaronpk
but also seems different than just taking it down entirely. maybe they're changing it and wanted employees to be able to hit the site still?
#
[snarfed]
Except afaik they fired pretty much the entire API team
#
[snarfed]
🤡😭
#
aaronpk
huh gmail search is a bit too generous. I searched "twitter API" and it's highlighting "OAuth" in my emails which is...needless to say not helpful in finding what i am looking for
[dave], mro and [manton] joined the channel
#
[manton]
Taking the Twitter forums down actually seems like a good sign that we’ll hear _something_.
#
[manton]
Every day I’ve been randomly browsing Twitter’s dev accounts and the dev site thinking there will be some news. Silence.
#
[snarfed]
Oh how low our expectations have sunk
mro joined the channel
#
[manton]
Yeah. It’s a pretty sad situation.
#
GWG
[manton]: I hope this is getting you new users
#
[manton]
@GWG The whole Twitter collapse is definitely bringing in new users. Most go to Mastodon because it’s free, but that’s fine.
#
GWG
[manton]: That reminds me, did you ever think on that ActivityPub duplication issue I showed you?
[tantek] and mro joined the channel
#
[manton]
Hmm, remind me… Sorry, I’ve forgotten what it was, I’ve fixed so many ActivityPub issues the last few months.
geoffo joined the channel
#
GWG
[manton]: There's a profile for/dshanske and one for https://micro.blog/dshanske@david.shanske.com
#
[manton]
Thanks, I remember now. No, still no fix for that. 😞
#
[tantek]
is relieved to not find a duplicate with his domain at micro.blog
#
GWG
[manton]: Can I put something in markup you can parse?
#
[manton]
@GWG Yes. I think what I need to do is find a reliable way to verify that your Micro.blog account and Mastodon account are the same person and same posts, and then collapse them into a single “account” in Micro.blog. How exactly we should do that, I’m not sure. We do verify your domain name if it includes a rel=me to your Micro.blog username.
#
[manton]
But just verifying the domain name is not enough, because someone mind have different posts so you wouldn’t necessarily want to combine them.
#
[manton]
_might have_
AramZS and mro joined the channel
#
GWG
[manton]: I will brainstorm. Should I open an issue?
mro, [KevinMarks], gRegor and [hollie] joined the channel
#
[manton]
Sure, thanks!
[jamietanna] joined the channel
#
[jamietanna]
snarfed++ for fixing boosts not being present in the Bridgy Fed feed so quickly 👏
#
Loqi
snarfed has 70 karma in this channel over the last year (113 in all channels)
#
starrwulfe[m]
Oh snap, for real?!
#
Loqi
Snarfed has 71 karma in this channel over the last year (114 in all channels)
#
starrwulfe[m]
Also, manton++ and gwg++ for answering questions at all hours of the day no matter how frivolous mine can be 😅
#
[tantek]
had a moment of apophenia today while coding my automatic footnotes Unicode conversion and linking that preserving fragment-only relative links *is* desirable in e-content parsing, and proposed a solution to mf2 parsing issue 38 accordingly: https://microformats.org/wiki/index.php?title=microformats2-parsing&type=revision&diff=70607&oldid=70606
#
Loqi
[preview] Tantek Çelik
#
[tantek]
good news is that since the Python mf2 parser already doesn't convert relative links in e-* properties, relative fragment links to/from footnotes in posts that are Bridgy Fed into Mastodon should "just" work while viewing *in Mastodon* to scroll to the footnote expansion and back to the inline reference accordingly
#
[tantek]
will be interesting to test it out with a real example of course, and hopefully use that as a reason for keeping fragment-only links relative inside parsed e-* content
#
[KevinMarks]
there's a plausible case to map inline notes into details/summary
#
[KevinMarks]
but that isn't passed through by mastodon afaik
#
[tantek]
not really, the desired layout doesn't map to details/summary
#
[tantek]
maybe sidenotes
#
[tantek]
and yeah, Mastodon /sanitization is a bit brutal
#
[tantek]
not just desired layout, the desired text authoring of footnotes / expansions does not map to details/summary
#
[tantek]
I'm still a big believer that the text-only version of a /note post should stay readable as well (even if you have to ignore inline image URLs)
#
GWG
My insomnia got karmaed?
#
[KevinMarks]
that's effectively what TufteCSS does on narrow text views - you get a clickable superscript number or inline glyph, though the authoring is not good either https://edwardtufte.github.io/tufte-css/#Sidenotes%20consist%20of%20two%20elements
#
[KevinMarks]
```<label for="mn-demo" class="margin-toggle">&#8853;</label>
#
[KevinMarks]
<input type="checkbox" id="mn-demo" class="margin-toggle"/>
#
[KevinMarks]
</span>```
#
[KevinMarks]
This is a margin note. Notice there isn't a number preceding the note.
#
[KevinMarks]
<span class="marginnote">
#
[tantek]
ok that's pretty ugly
#
[snarfed]
[tantek] I'll definitely be curious to see an example federated Mastodon post with preserved `id`s and relative fragment links that works like that!
#
[tantek]
[snarfed] if I get my code right, it will update all of my 100daysofindieweb posts accordingly
#
[tantek]
so you'll get to see several examples 🙂
#
[snarfed]
:crossed_fingers:
#
[KevinMarks]
It feels like there is a better way to do this with CSS Grid rather than floats, though not sure how you make the vertical alignment work there without a new grid cell per note.
#
[tantek]
uh what I'm not using floats
#
[tantek]
not for that anyway
#
[tantek]
Has anyone seen *any* relative fragment links in any post on Mastodon? Wondering if I'm pushing some limits here
#
gRegor
I haven't. I know it doesn't work via Bridgy Fed.
#
gRegor
Actually I guess those were relative URLs, not relative fragments, but I would guess it's the same.
#
[snarfed]
gRegor is right, looking at the example post from https://github.com/snarfed/bridgy-fed/issues/390 , the relative link in the original post https://www.ciccarello.me/posts/2023/01/26/now-with-drafts/ got removed completely in the federated version https://indieweb.social/@anthony@ciccarello.me/109764425730410740 (requires login)
#
Loqi
[preview] [aciccarello] #390 Relative URL isn't appearing in mastodon
#
gRegor
I don't know Ruby, but this is the Mastodon sanitizing linked from the docs https://github.com/mastodon/mastodon/blob/main/lib/sanitize_ext/sanitize_config.rb#L39
#
[snarfed]
we should definnitely try a fragment URL too, just to check, but it's a safe bet that it will get removed too
#
Loqi
yea!
#
gRegor
Thanks for volunteering, Loqi!
#
Loqi
you're welcome
#
sknebel
gives Loqi a fragment URL
#
Loqi
hearts the fragment URL
#
[KevinMarks]
I meant TufteCSS using floats
#
[KevinMarks]
time to update your hardcoded tweet post length limit? https://twitter.com/TwitterBlue/status/1623411400545632256
#
@TwitterBlue
need more than 280 characters to express yourself? we know that lots of you do… and while we love a good thread, sometimes you just want to Tweet everything all at once. we get that. so we're introducing longer Tweets! you're gonna want to check this out. tap this 👉… https://twitter.com/i/web/status/1623411400545632256
(twitter.com/_/status/1623411400545632256)
#
[snarfed]
normally we'd use eg the /1.1/help/configuration.json API call to get the current character limit, but that endpoint got silently removed at some point
#
[snarfed]
I have to hand it to the Twitter API though, it does at least correctly return HTTP 410 Gone
#
[snarfed]
weird flex but ok
#
[manton]
I hadn’t realized that the config endpoint was removed. That’s strange.
#
[manton]
I guess we could try to post a long tweet and if it errors, truncate to 280 and try again. 🙂
#
[manton]
Although I wonder if 1.1 will even support this.
#
Loqi
[preview] [Iván Cavero Belaunde] @KevinMarks interesting to see the variations in rendering from client to client, making it apparent that QT support is entirely solvable client-side. Ice Cubes does best, followed by Metatext; Ivory and Mammoth just show the poster’s profile pic. https://mastodon.mit.edu/system/media_attachments/files/109/831/101/346/865/477/original/532f4e20e5382571.jpeg
#
Loqi
[preview] [Eleventy 🎈 v2.0.0] Eleventy v2.0.0 is now available!https://www.11ty.dev/blog/eleventy-v2/🚅 Best-in-class Build Speed for JavaScript Site Generators 🪢 Dependencies ⬇️ 32.1% 🔬 `node_modules` size ⬇️ 77.8% 🚄 `npm install` 30.5% faster 🏠 Incremental...
[schmarty] joined the channel
#
[schmarty]
i'm sorely tempted to try this out! incremental builds definitely have my attention!!!
#
[tantek]
wow those are big improvements
[aciccarello] joined the channel
#
[aciccarello]
I'm looking forward to trying out the incremental build improvements. The v1 implementation had lots of rough edges.
#
[aciccarello]
Also hoping some pesky dependency vulnerabilities go away 😁
#
[tantek]
Generating a return arrow ⮐ link at the end of footnote expansions is a bit more work so I may drop that from the MVP (MVF?) of auto-footnotes (Unicode + links)
#
[tantek]
thinking right now is to link the footnote number itself both ways. i.e. the inline ref ² would frag link to the ² note expansion, and that ² would link back to the inline ref. So the footnote number is always fragment hyperlinked to its other instance in the post.
mro joined the channel
#
[tantek]
bidirectional fragment hyperlink+anchors
#
[tantek]
even if Mastodon strips the fragment hyperlinks, I will be curious to see what happens in other Reader contexts, e.g. both trad feed readers, and social readers like Monocle
#
[tantek]
I feel this kind of embed-portable-local-fragment linking should be a "thing" that is possible and "just works" across systems
#
[tantek]
from both a user perspective reading such posts, and a publisher perspective creating such content
#
[snarfed]
oh agreed, it definitely _should_ be a thing that is possible and just works!
#
[snarfed]
but the inconsistency in practice makes me think that having mf2 parsers special case fragment links to keep them relative is premature
#
[snarfed]
(apologies if you weren't specifically talking about the parsing proposal)
#
[tantek]
I feel like it may be worth carving out the fragment-only exception even just to allow for it to be "a thing that is possible and just works"
#
[tantek]
even if it doesn't work consistently today
#
[tantek]
but yes I'm keeping the parsing proposal in mind as I'm writing this too
#
[snarfed]
I guess I see the times it doesn't work outweighing the times it does. eg Mastodon will strip some BF users' relative links (the fragments), but not others, and it won't be immediately obvious to them why, or what they can do about it
#
[snarfed]
ok! looking forward to reading it
#
[tantek]
[snarfed] perhaps, even if it doesn’t work, I feel it is something Mastodon would be open to *not* stripping, and enabling this as a user/reader feature. Maybe I'm being too optimistic?
#
[tantek]
especially if we can demonstrate it working in other contexts (feed readers, social readers)
#
[snarfed]
oh sure, absolutely! let's demo it to them and ask them. but that feels separate from, do I want to ship a bad UX in BF to all users and keep it that way indefinitely until if/when Mastodon makes this change
#
[tantek]
what aspect of it will be "bad"? empty links?
#
gRegor
A keep-fragments experimental flag in the parsers sounds like a good start, so BF can always get absolute URLs if it wants
#
[tantek]
I guess I need to try something to see how it breaks or not in Mastodon
#
[snarfed]
right, we expect Mastondo will silently remove fragment links, since that's what it currently does to relative links
#
[snarfed]
(and yes, we should test and confirm!)
#
[snarfed]
gRegor totally! experimental flag sounds good
#
[tantek]
like remove as in sets href="" or remove as in drops the <a></a> tags completely?
#
[tantek]
for relative links that is
#
gRegor
latter, afaik
#
gRegor
keeps the innertext, drops the <a>
#
Loqi
[preview] [[snarfed]] gRegor is right, looking at the example post from https://github.com/snarfed/bridgy-fed/issues/390 , the relative link in the original post https://www.ciccarello.me/posts/2023/01/26/now-with-drafts/ got removed completely in the federated version ht...
#
gRegor
running a test...
#
[snarfed]
gRegor++ thanks!
#
Loqi
gRegor has 24 karma in this channel over the last year (82 in all channels)
#
gRegor
Yeah, dropped. Need to be signed in to Mastodon to view: https://xoxo.zone/@gregorlove.com@gregorlove.com/109831444476945604. Or search gregorlove.com on xoxo.zone and click through to my profile to see it.
#
Loqi
[preview] Testing a federated post with a footnote. ¹ I expect that footnote number won't be linked when this appears on Mastodon, but fingers crossed! ¹ See indieweb.org/footnote  
#
gRegor
ooh, just noticed the delivered-to counter on BF. Nice.
#
[snarfed]
thanks!
[asuh] joined the channel
#
[tantek]
nice manual test gRegor++
#
Loqi
gRegor has 25 karma in this channel over the last year (83 in all channels)
#
[tantek]
now what does that post look like in Monocle or another reader?
#
gRegor
footnote link is made absolute, prob due to php-mf2
#
[aciccarello]
Rather than using relative fragment links that break when unsupported, wouldn't it be more reasonable to expect clients that support them to be able to translate absolute to relative?
#
[aciccarello]
Use the fallback as the default and let smarter clients improve the experience
#
[snarfed]
"client" meaning parser client? yeah this could be a parser option
#
[hollie]
Is this a good place to ask a Hugo question?
#
[aciccarello]
Sure hollie!
#
[hollie]
Cool! I am really struggling with index.md vs. _index.md. I've got the book and I've looked at stuff like this: https://discourse.gohugo.io/t/what-is-the-difference-between-index-md-and-index-md/10330/3
#
[hollie]
But I still don't get it (or my site isn't acting correctly).
#
[tantek]
They don't "break", they fallback to a NOP. There's a big difference
#
[aciccarello]
hollie, what are you expecting to see your site do and what is it actually doing?
#
[tantek]
Falling back to a context switch absolute link seems worse IMO
#
[snarfed]
worse than the link disappearing?!
#
[hollie]
As an example, if I have a folder of dog pages, say, and a path that goes: content/dogs/_index.html, then the resulting page will create a list of all the pages in the /dogs folder. That's fine. This makes sense to me, it's how the blog function works, too. But what I want is something like the traditional html path of content/dogs/index.html, where the index of that folder is a page where I have text that talks about dogs, and then
#
[hollie]
I link to different pages within that folder. This, so far, seems impossible. 404 errors all the time.
#
[aciccarello]
Can you make a content/dogs.md page and have content/dogs/_index.html?
#
[hollie]
I'll test that.
#
[aciccarello]
BTW I'm looking at these docs right now to try to understand what hugo does https://gohugo.io/content-management/organization/#index-pages-_indexmd
#
[hollie]
Lol oh yeah I've been there - it's amazing how many threads there are with people being confused about this
#
[aciccarello]
Clearly a bit confusing
#
[hollie]
yeah 🙂
#
[hollie]
The book (Hugo In Action) says Hugo is makes these bundles that are self-contained, that everything is in the folder. Great! But then the book also says you can't use index.md ANYWHERE except the root folder (Content), that every subsequent folder has to have _index.md or it won't render.
#
[aciccarello]
Ah, interesting
#
[hollie]
It's a total mess. I can't get my site to work.
#
[aciccarello]
So in this example, it makes it sound like _index.md can be used to as you said in your example "talk about dogs, and then link to different pages" https://gohugo.io/templates/lists/#example-project-directory
#
[aciccarello]
For the record, I tried hugo for a minute before realizing I didn't understand what was happening and moved to 11ty since I'm more familiar with javascript than Go
#
[hollie]
That's what it says, but in the Discourse link what folks are upset about is what's happening to me: it doesn't actually work. You can't have text on that _index.md page that shows up. All that _index.md page produces is a list of links to the other pages in the folder.
#
[aciccarello]
The build speed and theme options do sound tempting though.
#
[hollie]
Yeah I tried Eleventy recently and it unloaded 236 folders into my drive (something called Node?) and I was like, "That's it, I'm out". If it needs 236 folders of gunk to run, it isn't simple, lol. 🙂
#
[hollie]
But the Eleventy community is super nice and seem less tense than the Hugo group, so I may have made the wrong choice! 🙂
#
[aciccarello]
lol, node is a big black hole but its a big black hole I already deal with so its fine for me 😆
#
[hollie]
Yeah if I understand Node it might not seem so intimidating.
#
[aciccarello]
My guess is that your layout file probably needs to reference the page content for the _index contents to show up
#
[aciccarello]
Per the docs: "You can now access this `_index.md`’s’ content in your list template:" and later "{{.Content}} pulls from the markdown content of the corresponding _index.md"
#
[hollie]
So there's a command I can put in a layout file somewhere that will tell it to render the text?
#
[hollie]
I really wish we had something that just did the usual HTML thing of folder/index.html.
#
[aciccarello]
Yeah, I think that `{{.Content}}` is supposed to do that
#
[hollie]
I'll look into that, thank you! 🙂 That gives me a place to look in the book and start testing.
#
[tantek]
[snarfed] yes. the link disappearing is a "fall back to look like print" situation, which is just fine and doesn't really violate expectations, or take readers out of flow.
#
gRegor
[schmarty], you use Hugo, right?
#
[snarfed]
[tantek] if Mastodon didn't support links at all, I'd agree, but it does, so losing only relative links is still surprising. hence [aciccarello] filing https://github.com/snarfed/bridgy-fed/issues/390
#
Loqi
[preview] [aciccarello] #390 Relative URL isn't appearing in mastodon
barnaby joined the channel
#
@TwitterDev
A new form of free access will be introduced as this is extremely important to our ecosystem – limited to Tweet creation of up to 1,500 Tweets per month for a single authenticated user token, including Login with Twitter.
(twitter.com/_/status/1623467618400374784)
#
[snarfed]
ugh. minimal information in that thread. $100 for "low level of API usage." no idea what constitutes "low."