I think the biggest challenge people are having with ActivityPub is that they are, for the first time, generally encountering a "structured open world system" for the first time.
Closed world systems let you control (and prove) a lot, but you can only do the things your own "world" has built an idea up about. Also "easier" to build DB schemas for, etc. But hopeless for extensibility when talking with the rest of the world.
Meanwhile, completely free-for-all-json, coordinating on meaning is nigh impossible.
So if you just use ActivityStreams' default stuff, it's easier, because you have just a smaller set of vocab to deal with. Suddenly you want or encounter extensions and oh shit, you hit the -LD side of JSON-LD, and that stuff is there for a reason
One thing we need to do is better document how to fold open world systems into closed world systems (eg people using highly structured DBs). Totally doable, but underdocumented.
The main thing you can and should do: compact incoming json-ld to your local world knowledge with your local json-ld context. (This is a one-line operation with any json-ld library.) Then you can treat it as "just json" and all the fields will be things you know. Store the fields you don't know about somewhere so you can get to them if you need them but they can be off to the side a bit.
@cwebber well, if they're *not*, then you usually won't get all the information you need right away to see what an unfamiliar extension contains. that could be okayish but you'll be getting random bits of extension forever and have to figure out how to handle that.
all because somebody was too careless to throw a json-ld static file somewhere
@KitRedgrave generally I agree. I think the current state of URI terminology and contexts is fairly imperfect, and there's interest in some things that I think will improve stuff... but that's a conversation about making things better that's a bit too complicated to go into in this thread
But every computer program is, until we have human equivalent AI, a closed world. You can provide all the metadata you want about the open world, but if my program doesn't already have an idea about it, it can't do anything smarter with it than either ignore it or pretty print it.
I'm not trying to be argumentative as such; I *know* you've put a ton of thought into it. But I absolutely can't grasp where the LD community is coming from.
@gcupc *your* closed world may not have all the things in *my* closed world, and yet there are a lot of things we can communicate about.
Say you are a game developer and I am a vegan chef. You say "My boss was really bugging me that I need to improve my A* pathfinding algorithm." Well I don't know what a pathfinding algorithm is, but I can empathize about your boss situation. If I told you I made a good BBQ tempeh and you don't know what tempeh is, you at least might know BBQ.
I haven't officially changed my name yet, but for the sake of paperwork minimization and local friend confusion maximization, I will be switching my middle name to my spouse's last name rather than hyphenating.
@gcupc I can at least operate on the things I know about, in my mind, and you can in yours.
The context bit comes in because our conversations are usually in contexts. Programs need that too, so we can know that "run" a program is not "run" a mile.
Even if the world is wide and open, within our closed minds, we can do a lot to understand and interact with each other. Indeed, we must, or we will only talk to ourselves.
@banjofox @gcupc Sure. Why don't we talk about @lain talking about building IM room streams? https://pleroma.soykaf.com/objects/8c371806-8754-478e-8a35-ef97b56481a6
What's a Room? We could imagine many "Room"s. A json-ld context could help map to a specific URI where we say, "ah, that's the Room IM concept that Pleroma innovated, as opposed to say, a Room in the federated MUD system."
@gcupc And that's fine. Your program doesn't know about it, so now your program can ignore that thing for its own logic, but shove it somewhere so that when sharing it or etc, it can present it as part of the whole artifact in case another entity does.
Maybe you don't know what Tempeh is, but my friend Alice does, and now she can understand more when you relay it to her.
@gcupc Do you consider it a good idea that at standards-writing time we assume that we can write all possible behavior for all time? I'm not so smug as to believe I can anticipate all needs of the fediverse.
We didn't define a document type for VirtualRealityRoom, for instance, but maybe in the future that's the most popular object type.
Should we say, "AP/AS2 didn't define it, thus it can't exist"?
@gcupc Sorry but upgrading between standards revisions that don't build in support for extensibility barely happens. At my time in standards the most frequent regret I hear people say is "Well we thought people would be able to upgrade to API X.2, but it never happened... it turns out we were stuck on API X.1 forever."
(I'm not totally clear on how inference works here, but in more conventional inference systems you have the concept of inference libraries with publicly exported predicate names whose actual implementation might change.)
Being able to merge inaccessible and contradictory logical rules is straightforward when names are canonical, so long as your operations also assume open world.
(In other words, while we can expand possibilities, we can't operate based on the assumption that we have expanded all possibilities. Prolog's '/+' operator can't be treated as a 'not' operator, in other words, because 'impossible to prove' is concretely different from 'untrue' rather than more abstractly.)
@cwebber this is my life right now, but not activityPub - trying to get a bunch of disparate reporting subsystems all into a single warehouse. I have slogged through more weirdass nested json, this one has this key that one doesn’t, or worse: these two both have the key but they log totally different things.
I have arrived at the belief that json is a thing that shifts the burden of data structuring and storage completely out of development, but that burden still lands somewhere (in my lap)
@cwebber another thing that happens more than I’d like is the opposite case when two keys are different but are meant to be the same. Unfortunately common when, for instance, iOS and android apps are devved by separate teams with separate codebase but expected to use similar reporting; like maybe the iOS team sends something like ‘Team’ but the android devs code it like ‘teams’ - and then you gotta catch it before it goes live or do extra work to rectify it at loading / parsing / querying.
@cwebber the answer to all of it might be more stringent control, spec, qa, but that is hard to advocate for when there are schedules to keep, goals to meet, and dev sprints that are already full.
... Or, as I imagine in the case of ActivityPub, when there is not a central authority dictating spec...
If you have a solution to the logical problems inherent in this, point me at it. I’d be more interested in that even than in any one implementation or technical solution.
@cwebber nesting also makes a mess out of it; when ‘user_guid’ is a key in the array “root” does it mean the same thing when it’s inside ‘payload’? Because almost every flattener is gonna wind up making those into different keys, one called ‘user_guid’ and the other called ‘payload.user_guid’ ...
Heh sorry, I have lots to say about this bc I’ve been down in the muck with it for a while now...