Conversation
Edited 4 days ago

the story of Fedi's handling of JSON-LD really is a story 'people forgetting to do their homework', huh

1
0
1

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

2
0
1
@ShadowJonathan a someone who wrote an implementation of expansion and compaction, i happen to disagree
1
0
0

@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?)

1
0
0
@ShadowJonathan one of the problems are you don't actually want to throw rdf around in the first place

(yeah im talking about ldnet)
3
0
0

@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.

0
0
0
@kopper @ShadowJonathan
it's also way more complex than it ought to be for throwing around rdf data
2
0
3

@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

1
0
0

@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

0
0
0

@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

1
0
4

@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

2
0
5

Charlotte lotteheartplural/Cinny cinny_heart_plural thetadelta ursaminor treblesand

Edited 4 days ago

@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)

0
0
1

@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)

1
0
0
@ShadowJonathan @charlotte no you can do that in compacted form as well if you just don't include it in the context
2
0
0
@ShadowJonathan @charlotte compacted jsonld also does the "one item removes the wrapping array" thing which i don't like. items capable of multiple values should always have the array imo
1
0
0

@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"
  }
}
1
0
2
@ShadowJonathan @charlotte like all you need to get the benefits of json-ld is namespaces on the IDs and asking the http stack to compress your responses (which mastodon's nginx config flat out forgot to do for the activity+json content-type)
0
0
0

@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"
}
1
0
2

@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

2
0
0
@ShadowJonathan @charlotte i mean, if you want to make meaning out of the data you do need to know the schema. or at the very least know that as:published will have a date in it
1
0
0

@ShadowJonathan @kopper I don’t think for practical applications that it’s possible to not hard code a schema

1
0
5
@ShadowJonathan @charlotte nearly all AP software already effectively compiles in the schema
1
0
1

@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

2
0
3

@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

2
0
4

@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

1
0
1

@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

1
0
0

@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

1
0
0

@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

1
0
1

@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

1
0
0

@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

0
0
0

@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

2
0
1

@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

0
0
0

@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

1
0
2
@charlotte @ShadowJonathan to be fair to HATEOAS pretty much all current use of it is for rendering a server-rendered "SPA" for humans to interact with in their browsers, which i do think makes plenty of sense
0
0
0

@dragonarchitect nothing, just doing some research on JSON-LD outta nowhere and a lot of things are clicking

0
0
0