News for hackers. Stuff that matters.
Re:Teaching Compilers Backward by peteretep on Tuesday February 23, 2021 @07:06PM (#26244800)
> Two examples: XML and JSON are bad re-inventions of S-expressions.

What? This sounds like you read something that was true but you’ve misunderstood and regurgitated.

XML is absolutely S-expressions, JSON is absolutely not. How in the heck is JSON a reinvention of an S-expression?

Re:Teaching Compilers Backward by lisper on Tuesday February 23, 2021 @08:08PM (#26245338)
How is it not? Both are serialization formats for trees with strings and numbers at the leaves.
Re:Teaching Compilers Backward by peteretep on Tuesday February 23, 2021 @09:33PM (#26245938)
Is there a serialization format you don't consider to be a bad re-invention of S-expressions?
Re:Teaching Compilers Backward by lisper on Tuesday February 23, 2021 @09:46PM (#26246029)
Of course. There are many. Any binary format. Any ASN.1 format. DEF and LEF for hardware descriptions. The output of mysqldump.

Here's another example:

https://github.com/rongarret/tweetnacl/blob/master/ratchet.l...

starting at line 82. (That's one that I designed.)

Re:Teaching Compilers Backward by konjin on Tuesday February 23, 2021 @08:32PM (#26245525)
>XML is absolutely S-expressions

You need a lot of predefined structure to capture attributes using brackets, much more than you do for dictionaries - which are just ordered pairs in a list when serialized.

Re:Teaching Compilers Backward by peteretep on Tuesday February 23, 2021 @09:35PM (#26245948)
(apologies, ninja deleted, I do not wish to continue this discussion)
Re:Teaching Compilers Backward by konjin on Tuesday February 23, 2021 @09:37PM (#26245965)
There isn't a difference when it's serialized.