Earlier quoted context omitted.
JSON alternative with lighter syntax and comments is basically what I tried to make StrictYAML. I made it largely because I saw a disconnect with what YAML was, and what people - including me - thought it was (which is what it should be). Don't agree with non-string map keys though... they're a complication I never saw a use for.
They’re fairly useful in applications that use numeric IDs. For example, if I’m using SQL, and I have a table with an AUTOINCREMENT primary key, I’m going to have a lot of numeric IDs. If I want to reference these in a config file of some kind, I don’t want to have to read them as strings and handle the parsing on my end. Even if you’re of the opinion that IDs shouldn’t be numeric, there are a lot of cases where you’…
YAML: Probably not so great after all
251–260 of 457 posts
Re: YAML: Probably not so great after all
#252From 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?
k8s and helm is where I learned to dislike yaml. I now want a compiled and type safe language that generates whatever config a system needs. I'm pretty much thinking I want Go as a pre-config where I can set variables, loops, and conditionals and that my editor can help with auto-complete. Maybe I can "import github.com/$org/helmconfig" and in the end write one or more files for config.
Re: YAML: Probably not so great after all
#253Re: YAML: Probably not so great after all
#254Re: YAML: Probably not so great after all
#255From 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?
Re: YAML: Probably not so great after all
#256Earlier quoted context omitted.
Your editor makes a world of difference here. Since you shouldn't be writing brace-language code without indents anyways, the biggest issue remaining is mixing tabs and spaces. Gedit makes this a big pain with it's default config (it doesn't even auto-indent) but Atom and IDLE handle it well.
Code you write yourself is not usually the source of problems with significant whitespace; it's situations like posting code on websites and discussing it where code in a whitespace-significant language becomes next-to-useless when leading whitespace is stripped, whereas code in any other language will still survive and then easily be autoformatted without changing its meaning.
Re: YAML: Probably not so great after all
#257As much as I am an old-school Unix zealot, I think it is time to move towards a well standardised binary config format with non-trivial types (i.e a schema). There still has to be a standard text format, but only for the source from which the live configs have to be built. Done right, this has several advantages: 1. Built-time validation (or at least type checking). 2. Built configs can be easy to parse but (potentia…
Re: YAML: Probably not so great after all
#258However at the time, a tree data format that deserialized into native types was quite useful. The alternative was writing event based SAX parsers, or incredibly verbose XML object apis.
Re: YAML: Probably not so great after all
#259Earlier quoted context omitted.
> 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.
Oh my god! I'm working on the same wrapper wrapper wrapper
Re: YAML: Probably not so great after all
#260Earlier quoted context omitted.
> 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.
Oh my god! I'm working on the same wrapper wrapper wrapper