#dev 2021-10-14

2021-10-14 UTC
[fluffy], [tantek] and [Ed_Beck] joined the channel
#
GWG
[snarfed]: Looking for a different way than h-app or h-x-app for applications to identify themselves?
gRegor joined the channel
#
[snarfed]
oh, got me, no thoughts
#
[snarfed]
I just count things 😎
#
GWG
[snarfed]: I feel like I should make a The Count reference
wrmilling_alt, nolith1, alex11, bneil1 and doosboox3 joined the channel
#
capjamesg[d]
snarfed I was not really expecting more.
#
capjamesg[d]
I think we should have a list somewhere at the very least 🙂
#
capjamesg[d]
Thanks for sharing the issue above! I shall comment soon.
kogepan and jamietan1a joined the channel
#
jamietanna
Hey aaronpk random OAuth question - is `Authorization: some-token-here` technically valid? Reading https://datatracker.ietf.org/doc/html/rfc7235#section-4.2 makes it read like there's an `auth-scheme` needed, but given `auth-scheme` is just `token`s it's technically OK?
#
jamietanna
*OAuth-adjacent-question
#
Zegnat
[snarfed]++ for the tagline “I just count things 😎”
#
Loqi
[snarfed] has 33 karma in this channel over the last year (62 in all channels)
#
capjamesg[d]
[snarfed] plays it cool 🙂
#
capjamesg[d]
IndieMap is such a useful resource.
#
capjamesg[d]
I don’t store data in a DB so it is harder to query.
#
capjamesg[d]
*crawl data
hendursa1 and neocow6 joined the channel
#
sknebel
jamietanna: fairly sure that's not proper HTTP, wouldn't surprise me to see stuff in the wild that doesn't care though
#
capjamesg[d]
You should inspect it as an XML document.
#
capjamesg[d]
What is OpenSearch?
#
Loqi
OpenSearch is a specification for search engine discovery and syndication of search results https://indieweb.org/OpenSearch
#
Zegnat
Yes, that is also a way to go.
#
doosboox
capjamesg[d]: does that mean I can add your search engine as a preferred one in my browser?
#
Loqi
agreed.
#
capjamesg[d]
I think so…
#
capjamesg[d]
I don’t really use it though. It came from a few recommendations.
#
capjamesg[d]
I have a bookmark with the shortcut “iw” on Firefox.
#
capjamesg[d]
So I can type “iw coffee” and get the search results for “coffee”. But more people will probably make use of the OpenSearch browser integration because it is seamless and doesn’t require creating a bookmark.
#
capjamesg[d]
I think me and [fluffy] write more about coffee than most people in the index 🙂
#
Zegnat
It looks like Mozilla might actually use the rel="search" to discover OpenSearch XMLs: https://developer.mozilla.org/en-US/docs/Web/OpenSearch#autodiscovery_of_search_plugins
#
Zegnat
I do not remember at all where it pops up, sadly :(
#
capjamesg[d]
Ah, yes! Maybe that is in my HTML.
#
capjamesg[d]
Yeah, it is.
#
capjamesg[d]
Although rel=search doesn’t seem to be well documented on the microformats wiki.
#
capjamesg[d]
Maybe there should be a page on it?
#
capjamesg[d]
I found documentation on OpenSearch quite lax across the web.
#
capjamesg[d]
Mozilla’s article was the best.
#
capjamesg[d]
(Rel search is in the last line of the aforementioned file)
#
doosboox
capjamesg[d]: must the search engine use a GET with QUERY_STRING?
#
doosboox
(mine uses POST)
#
Zegnat[d]
Firefox surfaces the search engine and would let me add it to the browser. (Using Discord to share screenshot.)
#
Zegnat
I do not think you can set OpenSearch to use POST. But I am not 100% sure actually. I seem to recall Firefox will let you add POST based forms just fine?
#
capjamesg[d]
I think I used GET based on the docs I read.
#
capjamesg[d]
It’s cool to know that works as expected!
#
Loqi
Zegnat has 12 karma in this channel over the last year (32 in all channels)
#
capjamesg[d]
doosboox generally, I use GET requests for the search actions.
#
capjamesg[d]
I make use of query params for a few things.
#
capjamesg[d]
Like JSON representations of data. Which I realise are broken right now.
#
Zegnat
This might not be standard anymore, but I seem to recall that query params were prefered for search, because it lets you use cache in a better way. Having separate URLs for search results lets browsers and other layers cache them. Which is a lot harder when POST is involved.
#
capjamesg[d]
That is interesting. I had no idea that was a thing. I know that Google uses query params extensively, and I believe for a few tracking operations too.
#
capjamesg[d]
I use them for page number, query, and also for the JSON API on top of each search result.
#
jamietanna
sknebel that's what I was thinking - I've seen it at least once in use, so wanted to clarify whether I was thinking about it in the right way before letting the producers of the API know
#
jamietanna
What should one do if there's a MF2 event that doesn't specify an end time? How would one represent it? https://gregorlove.com/2019/06/indieweb-summit-pre-pre-party/ is what I'm looking at from gRegorLove (discovered from https://aaronparecki.com/2019/06/27/21/)
#
jamietanna
This is as part of my RSVP calendar, I'm finding some fun edge cases!
#
Zegnat
That sounds like a digital calendars edge-case in general ;) The event has no end-time, how do other calendars support that? I think the answer is that they do not, haha
#
jamietanna
Haha fair point :) I'll mark it as invalid
#
Zegnat
This is where paper calendars win, at least I often only put a start time with events there
#
Zegnat
When I digitise that, it can be everything from making the event 4 hours long, to just dragging it out until 00:00
#
Zegnat
(Or 23:59:59.999, I guess)
#
jamietanna
That's a fair shout, I was wondering about doing that too
#
[KevinMarks]
some of the assume an hour duration
tetov-irc and Potato joined the channel
#
jamietanna
If anyone wants to give the RSVP Calendar a go before I put it "officially live", you can get it by going to i.e. https://rsvp-calendar.tanna.dev/feed?url=https://www.jvt.me/kind/rsvps/ where that points to your h-feed URL / page with h-entry RSVPs
#
capjamesg[d]
What is that?
#
Loqi
That! (or "that ^" or "that ^^^") is a rarely seen reply often emphasizing agreement with a This post, but sometimes[1] merely emphasizing agreement with a previous reply https://indieweb.org/that
#
capjamesg[d]
I like it but I don’t know what I am looking at? Is it a way to convert a h feed events into a calendar!
#
capjamesg[d]
What is the best practice for creating an IndieAuth auth server token? Should you store them in a DB with an expiration time?
#
jamietanna
Haha sorry yeah, should've given that context!
#
jamietanna
Ah but the cert is bust, again - woops. Will sort it
#
jamietanna
It depends on whether you want state stored / stateless - DB is generally easiest if you've got a DB already, but stateless can allow resource servers to i.e. verify a JWT's signature without calling the token introspection endpoint - both not without tradeoffs
#
aaronpk
jamietanna: I think this line means the "Bearer" or whatever the scheme is is required
#
aaronpk
> credentials = auth-scheme [ 1*SP ( token68 / #auth-param ) ]
#
jamietanna
aaronpk yeah that's what I'd have expected :) `auth-scheme` being a `token` I think _does_ make it technically valid as it is unfortunately though, just not expected?
#
aaronpk
I think that's "token" as in the original sense of the word, not authorization token
#
aaronpk
> It uses a case-
#
aaronpk
insensitive token as a means to identify the authentication scheme,
#
aaronpk
followed by additional information
#
aaronpk
so the first auth-scheme token is case insensitive and is explicitly the identifier for the type of auth scheme
#
aaronpk
it's very confusing to use the word "token" here but it just means a string
#
jamietanna
Sorry, didn't make myself clear!
#
jamietanna
Yeah reading `token` in terms of it being text
#
jamietanna
So where the `token`s can absolutely be `Bearer` or could be `eyJ...`
#
aaronpk
I guess since the space and second token is optional it's technically valid to have a JWT but it would break because that's case insensitive
#
jamietanna
ah yes good point. Fun edge case!
hendursa1 and [aciccarello] joined the channel
#
jeremycherfas
Is there any reason to prefer `os.path.join` in python to `path = head + tail`?
#
micahrl[m]
os.path.join is a little nicer as it works with either platform's path separator, and you don't have to worry about whether the head has a trailing slash or not like you do when working directly with strings.
hendursaga joined the channel
#
jeremycherfas
Thanks. I'll reconsider my "simple" approach.
#
micahrl[m]
There is a gotcha tho, which I just realized as I was playing around with it - if your tail might start with a slash, os.path.join will ignore your head. Apparently this is intentional, although tbh I can't think of a time when I would want that functionality.
#
jeremycherfas
I was adding the / as a string in the first place, so I don't think that'll be an issue.
strugee joined the channel
#
capjamesg[d]
Good question jeremycherfas.
#
capjamesg[d]
The join() function handles things like slashes. If you have an exact path already or have got one that is formatted correctly then you don’t need to use it.
#
capjamesg[d]
I don’t always use join() as long as I have my paths exactly as expected.
#
capjamesg[d]
But it is useful…
#
capjamesg[d]
Consider this scenario. I have a variable called IMAGES = “/home/James” and I forget that I am missing the trailing slash. Then I try to do path = IMAGES + “photos”. Well that will resolve to “/home/Jamesphotos”
#
capjamesg[d]
It’s useful just to prevent you from making mistakes like that.
#
capjamesg[d]
Which has happened to me a few times.
#
[snarfed]
if you're on a modern Python 3, you may actually prefer pathlib.Path. nicer interface
rommudoh[m], hala-bala[m], Abhas[m], samwilson, doubleloop[m], vikanezrimaya, diegov, Lohn, unrelentingtech, mambang[m], reed, micahrl[m], plindner[m], npd[m], astralbijection[, LaBcasse[m], ChrisHarris[m], KatMMoss[m], mackeveli_, benatkin and nekr0z joined the channel
#
jeremycherfas
I'll take a look. For now, os.path is doing the job.
KartikPrabhu, hendursaga and [schmarty] joined the channel
#
[fluffy]
Ooh, Twitter has a public/not-very-well-publicized user endpoint, https://twitter.com/i/user/NNNNN - that might work better for Authl’s Twitter identifier than the anchor hack I’ve been doing.
#
[fluffy]
Right now I do e.g. https://twitter.com/fluffy#993171 because that keeps it human-readable and also avoids the username hijack issue, but the problem is that if someone changes their username it breaks. But if I can do https://twitter.com/i/user/993171 as the internal identifier then that avoids both problems.
gRegor joined the channel
#
Jeremiah[d]
Are there any good templates/tutorials out there that either have a of the indieweb functionality built into the template or a good tutorial for like converting a static site template for maximum indieweb compatibility?
shoesNsocks and kogepan joined the channel
#
@nekr0z
Do I understand correctly that you have written your own webmention sender/endpoint for your Hugo-powered site in Go? Have you written about it and/or opened the code? The reason I’m asking is that my own site is built with Hugo, and I have written my… https://evgenykuznetsov.org/en/reactions/2021/re-287185934/
(twitter.com/_/status/1448731426455760903)
akevinhuang2 joined the channel
#
Jeremiah[d]
[snarfed]: Thank you!
kimberlyhirsh[d] joined the channel
#
angelo
is there a way to set your Firefox to "dark mode" permanently on linux? after years of getting nowhere i've finally found a button in the CSS inspector but it only allows you to toggle the current site, temporarily...
#
[snarfed]
angelo, you mean site contents? not just the browser UI? afaik no, auto-dark-mode for arbitrary web pages is nontrivial. there are browser extensions though, eg Noir
#
angelo
i just want the browser to respect prefers-color-scheme
#
[snarfed]
for browser UI, sure. for arbitrary web page contents, hard problem, and as much non-technical as it is technical
#
[snarfed]
ie there's no deterministic way to even decide "is this arbitrary web page already in dark mode or not," much less how to convert an arbitrary color palette _to_ dark mode
#
angelo
i'm just talking about plain old standard dark mode.. apparently you need to use the Gnome Tweak Tool on Debian to change your system theme to dark mode.
#
Loqi
frock81
#
[snarfed]
ah, browser UI only, ok
#
angelo
i had zero dark mode up until now. unbelievable.
#
angelo
thanks though!
[schmarty] and mambang joined the channel
#
capjamesg[d]
What is dark mode?
#
Loqi
dark mode is a feature of websites and apps that change the color scheme to be easier to read at night or in low light settings https://indieweb.org/dark_mode
#
capjamesg[d]
I am curious why people prefer dark mode.
#
capjamesg[d]
I found dark mode on Slack when I had a bad head cold a few weeks ago.
#
capjamesg[d]
The darker light helped me get through the day.
#
angelo
a website with a white background open full screen on a 20"+ monitor past 9p?
#
[KevinMarks]
You are allowed to turn down the brightness
#
angelo
that and the color-shifting tech seem like inferior solutions.. i won't know.. until tonight
#
[fluffy]
Twitter intents aren’t actually solving the problem I was trying to solve though
#
[KevinMarks]
Until the last twitter redesign the intents pages had hcard and xfn
#
[fluffy]
I want a stable URL that maps directly to the user. The /i/user/ endpoint does exactly that.
#
[fluffy]
although I wonder if /i/ is just short for ‘intent’ in this case
#
[fluffy]
twitter.com/i/user/993171 behaves differently than twitter.com/intent/user?user_id=993171 though
#
[KevinMarks]
The intent one is documented and encouraged to link to, do the document the I one?
#
[fluffy]
I couldn’t find a document for /i/user, but it’s what the Twitter web interface now uses on user-related notifications (e.g. such-and-such followed you)
#
[fluffy]
Twitter just wants everything to go through the Twitter OAuth API but that doesn’t help with the use case of “I want to identify a user by URL”
#
[fluffy]
and I don’t want a completely separate identity arrangement for Twitter vs. everything else
#
[fluffy]
Previously I was doing twitter.com/user#user_id because that happens to work well and is both human-readable and stable-ish, but that means that URLs break if someone changes their username.
#
[fluffy]
Now I’m just doing twitter.com/i/user/user_id and then having twitter.com/user as the displayable ‘profile_url’ attribute.
#
[snarfed]
[fluffy] agreed, I wish I'd used stable identifiers for all silos in Bridgy. got some of them, but not all. https://github.com/snarfed/bridgy/issues/766
#
Loqi
[snarfed] #766 handle when usernames change
#
[fluffy]
Yeah exactly the issue I’m trying to avoid 🙂
#
[KevinMarks]
The user intent and the follow intent used to be different, looks like they broke that
#
[fluffy]
right and in any case the URL I want isn’t a ‘user intent’ it’s a stable profile URL.
#
[fluffy]
‘user intent’ has implications, assumin git’s being used in the same way as android does.
#
[fluffy]
intent is ‘i intend to do an action’ not ‘i want a resource’
#
Jeremiah[d]
capjamesg[d]: A follow up question Just staring at computers all day. There are some things I don't like it on though. Like my word processor and dbeaver.
#
Jeremiah[d]
[edit] capjamesg[d]: Just staring at computers all day. There are some things I don't like it on though. Like my word processor and dbeaver.
#
GWG
Everyone....what do we need to do to prepare for the Indieauth session?
tetov-irc, [schmarty], Seirdy, Darius_Dunlap[d] and [tw2113_Slack_] joined the channel