Hacker News new | ask | show | jobs
by jest3r1337 339 days ago
I have prepared my popcorn. Now go, YAML vs. XML vs. JASON vs. TOML vs. ??ML
3 comments

EDN format is best format: https://github.com/edn-format/edn
That’s close enough to sexprs, the One True Format, that I’ll allow it.
IMO, it’s sexprs on steroids. All the goodness of Lisp sexprs with terse (!) support of useful concepts like vectors, maps, and sets.
In a parallel universe the web was built on sexprs and Lisp instead of HTML/XML and JavaScript.

That civilization ascended but we did not.

in the early 90s i was interested in a better webserver than the ones from ncsa or cern. i read something about a webserver written in common lisp and acquired a common lisp implementation for linux from franz inc.

then i started this server and discovered that it could not serve files out of the box like ncsa and cern did. it expected me to write code to serve (dynamically generated) pages.

i kept looking and then discovered spinner/roxen, which did serve static files and had a different approach to dynamic pages which was more similar to server side includes and thus easier to approach than the common lisp server.

if that common lisp server would have been able to serve the static files that i already had out of the box, allowing a slow transition to more dynamic pages, i might have stuck with it...

yeah just some explicit allowance for associative data (maps)
That's a worthy addition that covers pretty much any use case I'd have.
I'm willing to forgive all these format's sins simply because I spent so much time in the eighties and early nineties dealing with all the retched and poorly documented bespoke formats people came up with before these existed. It was a breath of fresh air to be able to tell customers their XML file doesn't validate hence it is their problem not mine.
Akchually YAML is a superset of JASON
Akchually only the YAML JSON (and therefore also the Core) Schema (https://yaml.org/spec/1.2.2/#102-json-schema) is a superset of JSON. The Failsafe Schema is not.