4 ms·
I think a lot of YAML hate comes from the systems that use YAML (all those things that configure virtual machines, containers, cloud assets, etc.) that have bad
by PaulHoule 3y ago
I think a lot of YAML hate comes from the systems that use YAML (all those things that configure virtual machines, containers, cloud assets, etc.) that have bad data models to begin with and are part of bad architectures. (e.g. Hashicorp seems to come out with a new product every week to fix the problems with their old products)
- geodel 3y agoWell that seems to be The tools we make makes us type of situation.
- politelemon 3y agoWhile we're on spicy takes, k8s use of Yaml is an abomination and should have been vetoed early on. The data model they're using is too hierarchical and might have been better off in XML or Json
- PaulHoule 3y agoThat's exactly what I am talking about. K8S is a disaster. It makes Parallel Sysplex for IBM Z look positively simple in comparison.
- jdougan 3y agoTIL about Parallel Sysplex. What a great name.
- dpkirchner 3y agoI think helm's use of YAML makes it worse because it uses a text template library to manipulate structured data, and thus requires annoying stuff like {{indent}} and {{nindent}} when you want to insert objects. To me, whenever I find myself using one of these indent functions I'm reminded of the well known pitfalls of using regex to parse HTML. I don't know what I'd prefer, exactly. Probably JSON, or better yet JSON5.
- fireflash38 3y agoYou could just use JSON tho? Since valid JSON is valid YAML.
- dpkirchner 3y agoYeah, I often go that route when embedding objects in YAML. I haven't gone full JSON yet, but it's very tempting. A downside to that is having to convert back to YAML if you need support or want to easily diff against configs other folks have shared.
- bigstrat2003 3y agoI totally agree. I've used YAML for small config files on various projects I've written over the years. Stuff where it's maybe 50 lines on the extreme end, with a very simple data layout that doesn't get more than 2-3 levels deep. And for years and years I never understood WTF people were on about when they said how awful YAML is. Then I used k8s for the first time. And after that, I understood, because k8s manifests are an abomination. Super error prone and hard to read. And I think that this has a whole lot more to do with the data model than the markup format. YAML isn't perfect (in particular, the way you specify an array of dicts is hot garbage and confusing), but it's not the main problem. The way the data is laid out in k8s would be awful to work with in any format.
- MrPatan 3y agoNo, it's the syntax. It's bad.