News for hackers. Stuff that matters.
Re:Data serialization by Cthulhu_ on Monday June 04, 2018 @09:27AM (#17227527)
I keep reiterating that there was nothing wrong with XML.
Re:Data serialization by jhpriestley on Monday June 04, 2018 @11:26AM (#17228649)
parsing xml can take exponential space and requires an internet connection!
Re:Data serialization by tomcatfish on Monday June 04, 2018 @11:37AM (#17228851)
>requires an internet connection Please explain this point in particular. I can't seen to imagine what this could possibly mean.
Re:Data serialization by blattimwind on Monday June 04, 2018 @12:21PM (#17229417)
In the most general sense an XML document can reference schema(s) not locally available; a client wishing to validate against those schemas has to download them.

For most use cases, this isn't relevant, because the application expects a document of schema X and will provide said schema as well.

Re:Data serialization by teddyh on Monday June 04, 2018 @10:37AM (#17228127)
Or ASN.1.
Re:Data serialization by zeveb on Monday June 04, 2018 @11:18AM (#17228560)
Or S-expressions.
Re:Data serialization by tonyg on Monday June 04, 2018 @12:02PM (#17229215)
Both ASN.1 and XML are standardized (with extensive, lengthy and detailed specifications!). The term "S-expression" covers a very broad family of vaguely related not-very-interoperable surface syntaxes.
Re:Data serialization by lisper on Monday June 04, 2018 @12:59PM (#17229797)
S-expressions are standardized in both Common Lisp and Scheme. The two standards are not identical, but are mostly compatible, with the CL standard being mostly a superset of the Scheme standard.
Re:Data serialization by tonyg on Monday June 04, 2018 @03:03PM (#17231009)
Yes, that's exactly what I mean. It's like saying "we use JSON as our file format", but worse.

> "So this program saves its data as 'S-expressions'." > "Oh, cool. Which dialect?" > "Uh, I don't know. It doesn't say in the README. It just says 'S-expressions'."

The answer can be CL, Scheme (lots of variations and dialects even here), the never-finished SPKI Sexps, OCaml sexps, something that the new dev on the team cooked up last Tuesday that vaguely resembles what they learned as "lisp" in college, or something else entirely.

On the other hand, if one were to say "this program uses R4RS S-expressions" (or, presumably, "CL S-expressions", but I haven't read the relevant bits of CLtL), you'd immediately be in a much nicer place than JSON can offer. Not only would you have a well-specified syntax for a reasonably broad range of data types, you'd have a useful equational theory as well. [ETA: Unless you want unicode. Doh. R6RS, maybe.] Ah, the impossible dream.