News for hackers. Stuff that matters.
Re:The YAML Document from Hell by int_19h on Thursday January 12, 2023 @04:17PM (#34360368)
Writing documents with S-exprs will get very tedious once you have to deal with stuff like whitespace and such that will inevitably show up when you're dealing with text documents. SGML is specifically optimized for those use cases, which is why it is so much more awkward to use when all you want is serializing some random structured data.
Re:The YAML Document from Hell by wyuenho on Friday January 13, 2023 @10:48AM (#34369372)
All you need is some sort of Python’s raw string or triple quote or HEREDOC. What’s so hard about that?
Re:The YAML Document from Hell by int_19h on Friday January 13, 2023 @07:02PM (#34375644)
Try writing a document that's mostly text, but with plenty of markup interspersed in the middle, in this manner.
Re:The YAML Document from Hell by wyuenho on Saturday January 14, 2023 @02:01AM (#34377961)
We are talking about a configuration language here, which is never about markups. Also, most of the so-called whitespace problem in Ansible or k8 configs comes from embedding config that's not YAML. In these cases you need a path or URI for the processor to resolve before applying, not inverting the entire configuration language to cater to 1 uncommon use case.
Re:The YAML Document from Hell by int_19h on Saturday January 14, 2023 @05:25PM (#34384742)
The point of my original comment was precisely that SGML was optimized for text documents. I agree that adopting it for configs was a mistake, but the complaint that "IBM lawyer who invented the SGML syntax had never heard of S-expression" doesn't make any sense in that context.