News for hackers. Stuff that matters.
Re:The YAML Document from Hell by jerf on Thursday January 12, 2023 @10:35AM (#34355057)
I know what s-expressions are, vaguely. Vaguely in terms of "I couldn't write a grammar for them off the top of my head.", that is, not "what are they".

Is there a single agreed-upon defined grammar that everyone can use? Preferably one simple enough that like JSON's it is at least capable of being used as a graphic on the home page for the format? https://www.json.org/json-en.html

This is an honest question, because there may well be and I don't know it.

However, I will put this marker down in advance: If multiple people jump up to say "oh, yes, of course, it's right here", and their answers are not 100% compatible with each other, then the answer is no.

The other marker I'll put down is "just use common lisp", I want verification that it really is 100% standardized, no question what any construct means, ever, and I still bet we get people who would rather see Scheme or Clojure, and I bet there's some sort of difference.

Neither of these objections is fatal to the idea. JSON is technically not just "javascript objects", so if someone carved out a defined format from s-expressions, then held it up as a standard, that would be as valid as what Crockford did. But at least as of right now, I'm not aware of anyone having done that standardization work. Replies welcome.

Re:The YAML Document from Hell by lapinot on Thursday January 12, 2023 @11:18AM (#34355821)

  SEXPR := YOUR-CUSTOM-LITERALS
         | "(" SEXPR* ")"
Re:The YAML Document from Hell by jerf on Thursday January 12, 2023 @11:25AM (#34355955)
Along with the many other issues that would have for just straight-up not being a usable grammar, the word "CUSTOM" appearing in a nominal cross language standard is a non-starter.
Re:The YAML Document from Hell by lapinot on Thursday January 12, 2023 @11:39AM (#34356277)
Oh come on. Did you think anybody would write an RFC in the comments? Add arbitrary list of whitespace tokens everywhere and pick whatever favorite grammar you have for literals. Json strings and numbers since you seem to like them.
Re:The YAML Document from Hell by jerf on Thursday January 12, 2023 @02:21PM (#34358957)
Of course not. But you are at least semi-seriously trying to propose something. I promise you it won't be that easy to get any sort of agreement.

This is a classic "oh come on how hard can it be" that, once you get into it, it turns out the answer is very. Arbitrarily so. Agreement is hard. Details are hard. A standard with no details is not terribly different from "just give us some text".

Re:The YAML Document from Hell by zvr on Sunday January 15, 2023 @06:52AM (#34388736)
Ah, no types, no NIL. Every user has to specify how their usage expresses strings, integers, booleans, etc.

Maybe start from one of the already existing standards https://en.wikipedia.org/wiki/S-expression#Standardization ?

Re:The YAML Document from Hell by mirekrusin on Thursday January 12, 2023 @01:17PM (#34358023)
Re:The YAML Document from Hell by jerf on Thursday January 12, 2023 @02:24PM (#34358998)
I don't see a grammar I could use for an external standard there. I could be missing it. And I assume there must be one implied, since it appears to be a read-write format. However such things have a nasty habit of turning out upon further inspection to not be as generic as supposed and have local idioms buried in them, often in surprising places. Even JSON, simple as it is, had that problem, and it is after all a subset in an attempt to squeeze out those localisms.

Is it compatible with Common Lisp, such that all such s-expressions will be compatible with it in some natural way?

Re:The YAML Document from Hell by mirekrusin on Friday January 13, 2023 @01:09AM (#34364487)
Re:The YAML Document from Hell by eru on Thursday January 12, 2023 @09:49PM (#34363389)
Well, I would have suggested Racket. Common Lisp is a bit ugly, both conceptually and syntax-wise.