☀️
the story of Fedi's handling of JSON-LD really is a story 'people forgetting to do their homework', huh
☀️
TFW you realise JSON-LD actually has some thought behind it and then mastodon isn't at all interacting with that one thought
and then fedi followed that
crazy
☀️
@kopper well the thing im realising here is that JSON-LD is kinda goated if you actually wanna throw RDF around, but then fedi (mastodon) went and neuron-activated on it being JSON-shaped, and just took that, and didn't properly conceive of a thought that it might even represent a deeper data structure
idk, im still In Progress with that idea, but yeah
(also, was that the C# library for iceshrimp?)
☀️
@kopper ? (elaborate?)
oh, maybe i know what you mean, but yeah, thats kinda the thing, link traversal and the likes is one way to get data, but i guess then what AP is doing is exposing the (very messy) semantic way to not "pull" data, but to "push" it, and then what applications do with that kinda data is entirely up to them.
☀️
@charlotte @kopper i mean, i dont know if you want to have AP software's required dependencies be a turtle parser
that one would be funky
☀️
@kopper also tbh; im currently thinking of a case where Yes Actually, You Do Want To Throw RDF Data around
which is why i started looking at how fedi does JSON-LD at all, and the first thing i saw was pain and horrors
which uh, yeah
/Cinny
@ShadowJonathan @kopper turtle imo has the same issues
json-ld however just has way too many different forms that all mean the same thing instead of having one consistent interchange format
at the same time you can make it look like a slightly funky json object and treat it as such. and that’s what implementations choose because nobody wants to deal with semantic web stuff unless it’s for SEO
/Cinny
@ShadowJonathan @kopper in an ideal world json-ld would have leaned into this a lot more and went like
“Oh what if we named the object keys after the IRI of their definition” which they Did Not Do. instead you get a gigantic mess
/Cinny
@ShadowJonathan @kopper (so like basically json-ld should exclusively be the compacted form and the @context be abolished. mastodon federation protocol™ messages are not that)
☀️
@charlotte @kopper they do, but only in the expanded form, you can do "https://toot.beep#boop" as a key
Or is that not what you meant? (Sorry)
/Cinny
@kopper @ShadowJonathan yeah
basically instead of
{
"@context": "https://www.w3.org/ns/activitystreams",
"@type": "Create",
"actor": {
"@type": "Person",
"@id": "acct:sally@example.org",
"name": "Sally"
},
"object": {
"@type": "Note",
"content": "This is a simple note"
},
"published": "2015-01-25T12:34:56Z"
}
it’s
{
"@type": "https://www.w3.org/ns/activitystreams#Create",
"https://www.w3.org/ns/activitystreams#actor": {
"@id": "acct:sally@example.org",
"@type": "https://www.w3.org/ns/activitystreams#Person",
"https://www.w3.org/ns/activitystreams#name": "Sally"
},
"https://www.w3.org/ns/activitystreams#object": {
"@type": "https://www.w3.org/ns/activitystreams#Note",
"https://www.w3.org/ns/activitystreams#content": "This is a simple note"
},
"https://www.w3.org/ns/activitystreams#published": {
"@type": "http://www.w3.org/2001/XMLSchema#dateTime",
"@value": "2015-01-25T12:34:56Z"
}
}
/Cinny
@kopper @ShadowJonathan although actually remove the whole @type thing when the schema says it’s a specific type
{
"@type": "https://www.w3.org/ns/activitystreams#Create",
"https://www.w3.org/ns/activitystreams#actor": {
"@id": "acct:sally@example.org",
"@type": "https://www.w3.org/ns/activitystreams#Person",
"https://www.w3.org/ns/activitystreams#name": "Sally"
},
"https://www.w3.org/ns/activitystreams#object": {
"@type": "https://www.w3.org/ns/activitystreams#Note",
"https://www.w3.org/ns/activitystreams#content": "This is a simple note"
},
"https://www.w3.org/ns/activitystreams#published": "2015-01-25T12:34:56Z"
}
☀️
@charlotte @kopper that part still requires a network fetch (or a cache lookup) of the original schema tho
Or you'd need the schema compiled into your software, which is also A Choice
as:published will have a date in it
/Cinny
@ShadowJonathan @kopper I don’t think for practical applications that it’s possible to not hard code a schema
/Cinny
@ShadowJonathan @kopper the schema IRIs are also not usually fetchable URLs
you might be able to fetch them and they might lead somewhere but they also often don’t contain schema definitions in a readable format
/Cinny
@ShadowJonathan @kopper even if it was possible to fetch the schema in run time in some way, your application, unless it’s hooked up into an LLM i suppose, cannot make use of the data unless you very explicitly write code for handling it
which is also why i think the semantic web is mainly just inventing a problem to solve
/Cinny
@ShadowJonathan @kopper like you still have a schema that you still need to explicitly write code for. which is no better than having it in a format that is extensible but not massively overcomplicated for no good reason
☀️
@charlotte @kopper ...my head says that if they're not fetchable, then they're almost not valid, because I feel like the whole reason why you have URLs in there is that they can be fetched and dereferenced
I mean, that's basically what the whole semantic web is built on
@charlotte @ShadowJonathan @kopper I believe that if you use something like that you should always rehost a copy of the schema along with the application so that you won’t end up with a lost media schema like the fucking eduroam XML files
/Cinny
@ShadowJonathan @kopper they are IRIs though and not URLs
unlike URLs they do not locate resources, just identify them
unlike URIs they support unicode characters
☀️
@charlotte @kopper I mean, a large part of OWL is also that those schemas can be self-executing, but then you're working beyond anything AP and are going into general computing, which AP authors explicitly aren't going into, lmao, they wanna make a fast Twitter lookalike
@charlotte @kopper @ShadowJonathan
we do cache it and have some hardcoded urls because “GOD WHYTHE FUCK IS THAT ONE DOWN” and shit.
you dont want to do a full petition each time you get a post
/Cinny
@ShadowJonathan @kopper i don’t think there is much difference for a program between a “displayName” property and a “https://schema.org/Person#name” property. you still have to hook it up into your application logic manually unless you are showing a property dump or sth
☀️
@charlotte @kopper I mean
RDF triples literally don't "mean" anything until you start adding meaning to them, having processors fire on the absence or presence of data
They also aren't even properly defined structures until you parse for them (SHACL, and that one even requires a closed world of data)
like, yeah
/Cinny
@ShadowJonathan @kopper that’s like broadly the disconnect i find with this entire sphere
sure it is marked up in a manner that a machine can parse. but it can’t interpret it without a human telling it what to do. now you moved the problem one step back for no reason
which is also my issue with HATEOAS (REST maturity level 4). hypertext is Useful for sentient creatures. not for machines. for machines you have to write code to hook up a REST API anyways. at which point you can specify “Oh you can access the second page of results by requesting the same API endpoint but with an &after= property set to the last element in the results” instead of Having A Link in the response for no particularly good reason
☀️
@dragonarchitect nothing, just doing some research on JSON-LD outta nowhere and a lot of things are clicking