Heh, yaml haters unite! I wish yaml would go away.
YAML: Probably not so great after all
311–320 of 457 posts
Re: YAML: Probably not so great after all
#312Earlier quoted context omitted.
Wow. This looks really cool. Is there a sort of design defense on how this was designed (tree notation)?
Not sure if I’m familiar with the term “design defense”. Can you explain? Stumbled into the idea. Basically just brute forced it. Tried thousands of things, built a huge database of languages, and tried to keep it simple.
Basically, it’s a narrative discussion of how this solution came to be, the trade offs involved, and perhaps its relationships with prior art.
[0] https://docs.pylonsproject.org/projects/pyramid/en/1.10-bran...
Re: YAML: Probably not so great after all
#313Re: YAML: Probably not so great after all
#314Disclosure: I work on Tree Notation. It’s the future of file formats, IMO. The idea is to have 2 levels: a simple, minimal syntax/notation (think binary) called Tree Notation, and then have higher level grammars on top of that, called tree languages. It works for encoding data and also for programming languages, regardless of paradigm. https://github.com/treenotation/jtree
Re: YAML: Probably not so great after all
#315Earlier quoted context omitted.
What is "an encoder"? Like a function that takes the same variables as the template would but does some work itself generating things?
An encoder is anything that serializes some data. Think `JSON.stringify()`.
Re: YAML: Probably not so great after all
#316From my experience, while YAML itself is something one can learn to live with, the true horror starts when people start using text template engines to generate YAML. Like it's done in Helm charts, for example, https://github.com/helm/charts/blob/master/stable/grafana/te... Aren't these "indent" filters beautiful?
> the true horror starts when people start using text template engines to generate YAML I just had a shiver recalling a Kubernetes wrapper wrapper wapper wrapper at a former job. I think there were at least two layers of mystical YAML generation hell. I couldn't stop it, and it tanked much joy in my work. It was a factor in me moving on.
Re: YAML: Probably not so great after all
#317Re: YAML: Probably not so great after all
#318Earlier quoted context omitted.
YAML is easier to read and write. That's the benefit. It's also always going to be smaller than anything JSON or XML. Maybe it's not as correct, maybe some people don't like it, I don't really mind it. I don't see it really going anywhere soon either considering Kubernetes and the lack of alternatives in widespread usage. I've never had someone that needed extensive help understanding YAML and that's besides reviewin…
>”YAML is easier to read and write.” You may be surprised to find that there’s significant disagreement on that point.
Re: YAML: Probably not so great after all
#319Despite spending time writing and reading YAML on a daily basis for years, it still trips me up once things get non-trivial. It's definitely my least-favorite non-propritery config file format. XML might be overly verbose, but there are no surprises (unless you go bananas with schemas).
Re: YAML: Probably not so great after all
#320Earlier quoted context omitted.
My personal JSON Pet hate is: ``` x = [ "Foo", "Foo2", ] ``` Is not valid, but the following is: ``` x = [ "Foo", "Foo2" ] ``` Makes dealing with packer configs feel like punching yourself in the face. I still prefer it over YAMLs awkward initial learning curve.
At first I found it really annoying but then the more I thought about it the more I came to value the "," semantics as proper validation for a "forgot to put the last element in the list" error which would otherwise be silently hidden via the parser.