News for hackers. Stuff that matters.
Re:ATProto for Distributed System Engineers by apitman on Monday September 09, 2024 @11:15AM (#41489302)
I'm sorry but JSON-LD is a massive pain to work with in statically typed languages. Certainly is in Go at least. The flexibility is the problem, ie you never know if something is going to be an object or an IRI (did we really need a 3rd name for URIs?) to an object. I think you could get most of the benefit while still requiring specific types.
Re:ATProto for Distributed System Engineers by Diti on Monday September 09, 2024 @12:58PM (#41490585)
You shouldn’t be having this problem if you use a library which offers normalization (like github.com:piprate/json-gold) so that you get objects when there’s an IRI context, and a simple string when there’s a regular IRI.
Re:ATProto for Distributed System Engineers by apitman on Monday September 09, 2024 @02:35PM (#41491850)
I'm not aware of any such libary for Go. Besides, I prefer protocols that are simple enough to implement myself. That's not feasible in every case, but it certainly is for the social media use case.