#dev 2023-02-25

2023-02-25 UTC
gRegor and jbrr[m] joined the channel
#
gRegor
[tantek], summarized the info I tracked down and from chat: https://github.com/snarfed/bridgy-fed/issues/45#issuecomment-1444950494
#
Loqi
[preview] [gRegorLove] Summarizing some sleuthing and discussion from #indieweb-dev: Fetching the AS2 with `curl -H` for a [Mastodon post](https://hachyderm.io/users/liztai/statuses/109907766432901624): ```json { "@context": [ "https://www.w3.org/ns/activity...
#
[tantek]
so this begs the question as to whether we should be marking up our hashtags with p-category for the term without the # or with the # because until now, we've been marking up p-category WITHOUT the #
#
[tantek]
lol this is a bit thin but I don't think reflects current practice right now: https://indieweb.org/hashtags#Markup
#
gRegor
I'd lean towards no. I've used a mixture of how I display my p-category over the years, with and without the #, but the # is always part of the template when I display them. The tags stored in my CMS don't have #.
#
[tantek]
so that inconsistency is going to bite us
#
[tantek]
"no" wasn't a possible answer. the question was with/without '#' inside the p-category
#
gRegor
If Mastodon requires the # and we agree on BF making p-category into Hashtags, BF could probably ensure the # is added easily
#
[tantek]
well that's a good question though, should BF assume that any p-category is a hashtag, with or without a '#'?
#
gRegor
Not sure!
#
[tantek]
does Mastodon actually require the '#' though? or does it only require the type:"hashtag:
#
gRegor
It appears to currently be "trying" to. In the earlier AS2 examples in that thread it's creating the `type: "Tag"` objects
#
gRegor
All good questions. The extent of my current knowledge is in that summary though :)
#
gRegor
By "No" I meant "no # inside the p-category"
#
[tantek]
do we need an experimental property to indicate to Bridgy Fed that this p-category explicit is a hashtag rather than having Bridgy Fed assume all p-category are hashtags?
#
[tantek]
e.g. class="p-category p-bridgy-hashtag" ? or jump straight to experimenting with class="p-category p-hashtag" ? I ask because if Gargron though it was necessary to introduce an explicit "type": "Hashtag", inside something that is already a "tag", then perhaps there needs to be an explicit distinction for publishing/consuming code to properly make sense of this
#
[tantek]
this is motivated by trying to minimize how much "smarts" we are requesting of Bridgy, e.g. inserting a '#' or inferring all p-category -> hashtags
#
[tantek]
gRegor, I'm basically wondering why Eugen thought he had to introduce that explicit type, since AS2 spec already says (though non-normatively) how to publish (and thus by implication how to detect/consume) hashtags: https://www.w3.org/TR/activitystreams-vocabulary/#microsyntaxes
#
[tantek]
my assumption here is that Eugen introduced "type": "Hashtag" for good reason
#
gRegor
Makes sense. I really don't know, will have to think about it more.
#
[tantek]
I'm curious what [KevinMarks] thinks of these questions too
#
[tantek]
we can discuss more with [snarfed] next week when he's back from vacation
#
gRegor
Yeah, interesting from that non-normative section: "While such microsyntaxes may be used within the values of the content, name, and summary properties on an Activity Streams Object, implementations should not be required to parse the values of those properties in order to determine the appropriate routing of notifications, categorization or linking between objects."
#
gRegor
So Mastodon is going against that "should not" in this case
#
[tantek]
no it's not, re-read that carefully. that "content, name, and summary" refers to the entry, not to the tag object
#
[tantek]
Mastodon is not parsing for "#hashtag" strings inside plain text of the content, name, or summary of a post
#
[tantek]
we know that from your (gRegor) posts with plain text #hashtag in your content property having no effect in Mastodon
#
gRegor
we're saying the same thing
#
[tantek]
Ok I would have phrased that as Mastodon is following that "should not"
AramZS, geoffo, [chrisaldrich], mro and jeremycherfas joined the channel
#
[KevinMarks]
My historic choice was to turn categories into tags - eg for the hierarchical ones in RSS I decomposed the hierarchy into tags for Technorati. I see the # as an authoring affordance, not part of the category. See http://epeus.blogspot.com/2005/10/tags-and-cognitive-load.html
mro joined the channel
#
prologic
Are there any recommendations for caching webfinger lookups?
#
[snarfed]
Spec just says HTTP caching headers are fine: https://www.rfc-editor.org/rfc/rfc7033#section-4.2
#
[snarfed]
So evidently whatever's ok for your own internal rate of change, cache invalidation needs, etc
#
prologic
kk
mro joined the channel
#
prologic
How do mentions typically work in activity pub systems?
#
prologic
do servers/clients expect them to be in plain text in the form @user@domain ?
#
prologic
Can the @user@domain text appear in a HTML <a> tag?
#
[snarfed]
see scrollback in this channel. from https://www.w3.org/TR/activitystreams-vocabulary/#dfn-mention : "microsyntaxes MAY be used within the values of the content, name, and summary properties...implementations SHOULD NOT be required to parse the values of those properties in order to determine the appropriate routing of notifications, categorization or linking between objects."
#
prologic
wait hold up
#
prologic
I have to send an activity of type Mention?
#
prologic
Just to mention someone that's an AP actor?
mro_ joined the channel
#
[snarfed]
you don't necessarily have to, but you can, yes
#
prologic
oh gawd that's awful :)
#
prologic
there's no way to do this just in the Create+Note activity?
#
[snarfed]
I think mastodon puts `Mention` objects in `tag`
#
[snarfed]
so yeah you may be able to bundle them like that for actors on the same instance and have it generate the appropriate notifs
mro joined the channel
#
prologic
same instance?
#
prologic
nah I'm not talking about the same instance here :)
#
prologic
just the rest of the so-called "fediverse"
#
[snarfed]
right. so when you're doing inbox delivery, if your activity mentions someone, you'd need to deliver at least _something_ to their inbox or shared inbox
#
prologic
Yup I am of course
#
prologic
just not sure how to reference them as a mention
#
prologic
Is the way Mastodon does it by shoving a Mention tag in the tags field stnadard?
#
[snarfed]
right. I'm not sure if it should be a `Mention` activity or a `Create` with a `Mention` tag
#
prologic
me neither
#
prologic
I'm too tired to figure this out :)
#
[snarfed]
looked it up, for Mastodon it should go in `tag`
#
[snarfed]
so I expect same for others, for interop
#
prologic
kk
#
[snarfed]
right. I think I only include href and type, but name shouldn't hurt
#
prologic
looks pretty simple actually
#
prologic
thank goodness for that
#
prologic
sending yet another activity would be insane :D
#
[snarfed]
I mean, insane is probably an overstatement
#
prologic
I've already had to teach yarnd how to handle Accept, Reject, Create, Delete, Undo and various sub-types
#
prologic
:D
#
prologic
haha
#
prologic
of course I'm still going to have to have an object called Mention :)
#
[snarfed]
right, that's implementing the protocol, it has meaningful logic
#
[snarfed]
it's definitely trying to do a broader and deeper set of things than some other things, eg twtxt
#
prologic
it hasn't been too bad really
#
[snarfed]
which is beautifully simple!
#
prologic
just some hiccups along the way, finally getting the hang of it
#
prologic
well in twtxt/yarn we just parse the content
#
[snarfed]
but _very_ simple, and that extreme simplicity itself motivated expansions like yarn.social, right?
#
prologic
if it has a mention that is us, we highlight it or do something
#
prologic
easy
#
[snarfed]
ok sure, so you have the same kind of logic, you just do it in a different place, but it's still there
#
prologic
twtxt itself, was too simple
#
prologic
so yes we extended it a bit
#
prologic
yup
#
prologic
most of the "logic" is embedded in the content and we expect clients to know how to parse it
#
prologic
and its mostly just textual
#
prologic
whereas AP is a bunch of JSON objects and flows back 'n forth
#
prologic
mostly pushed
#
[snarfed]
right. so if your primary goal is minimizing network traffic, that's better. that's not necessarily everyone's primary goal though
#
prologic
I might have to cache actor objects I'm thinking
#
[snarfed]
absolutely, most AP implementations do
#
[snarfed]
other systems' microsyntaxes parsing more and more
#
prologic
I tend to look up activities inbound to verify the actor
#
[snarfed]
er sorry, last was a misfire
#
[snarfed]
yeah that's how everyone starts, but almost everyone quickly starts storing them and fetching only if they're not stored
#
prologic
yeah
#
[snarfed]
historically a number of apps jumped into parsing microsyntaxes for logic, but many eventually found that it got too complicated and brittle and hard to maintain, so the experience there has generally led to explicit structured data (like AS2 Mention) instead
IWSlackGateway joined the channel
#
prologic
fair enough
#
prologic
well it works đŸĨŗ
#
prologic
I literally just cheated and just translated all Twt().Mentions() to Activity Pub Note.Tag
#
prologic
And done
#
prologic
I don't even care if the mentions are valid AP actors or not đŸ¤Ŗ
#
prologic
Not my problem 😅
#
prologic
At least GTS does the right thing with the Note.Tag list and shoves them in your mentions box if the HRef matches I guess
#
prologic
So 👌
gerben and mro joined the channel
#
@leeerob
↩ī¸ Up at the top, under top paths, you can see the usage came from http://webmention.app. As you mentioned, you moved that site, so it seems like this usage happened at the beginning of the usage cycle, and you just now hit 100%. Looking...
(twitter.com/_/status/1629512670977163267)
chenghiz_ joined the channel
#
@rem
↩ī¸ Right, you see how it's unclear. webmention was moved, so was the days-to-christmas, it's unclear how I "take immediate action to avoid your account being blocked"
(twitter.com/_/status/1629513180782247942)
mro, jeremycherfas and [aciccarello] joined the channel
#
[aciccarello]
Oh good, sounds like Vercel finally might unblock webmention.app
#
[aciccarello]
I wish it didn't require publicly shaming on Twitter
#
[aciccarello]
It's been down almost a month
#
aaronpk
😮
gerben, geoffo and [snarfed] joined the channel
#
[snarfed]
reading that thread, it sounds like they didn't block it, exactly, and they're not unblocking it, exactly
#
[snarfed]
it hit the free tier quota for the month in the first couple days, and it's now rolling over to a new month
#
[snarfed]
but the same thing could easily happen again
gRegor joined the channel
#
gRegor
PHP + Composer question: anyone know how to avoid conflicts with the same dependencies in multiple autoloaders? The context is multiple plugins in a CMS.
#
Loqi
[preview] [humbug] php-scoper: 🔨 Prefixes all PHP namespaces in a file/directory to isolate the code bundled in PHARs.
[KevinMarks] joined the channel
#
prologic
correct me if I'm wrong, but in most caes most AP servers and clients expect the Note.Content to be HTML right?
#
prologic
Thanks!
#
gRegor
Arg, PHP8.1 required
geoffo and AramZS joined the channel