5 ms·
Worse yet, in some places (CI/CD) YAML becomes nearly a programming language. A very verbose, unintuitive, badly specified and vendor-specific one as well.
by ManBeardPc 3y ago
Worse yet, in some places (CI/CD) YAML becomes nearly a programming language. A very verbose, unintuitive, badly specified and vendor-specific one as well.
- sspiff 3y agoIn some places working with Kubernetes, people unironically use the term "YAML engineer".
- donalhunt 3y agoI've seen memes where SREs complain they have just become YAML engineers. :(
- switch007 3y agoI mean...building a data centre / PaaS with YAML is pretty cool We used to have to shove servers in to racks ! Kids these days :D
- ManBeardPc 3y agoI've been there. Not YAML specifically, but basically just configuration (XML, JSON, properties, ...) for some proprietary systems without any good documentation or support available. "It's easy, just do/insert X", half a year and dozens of meetings and experts later, it was indeed not just X. Meanwhile I could've build everything myself from scratch or with common open-source solutions.
- _ea1k 3y agoyamlops is a real thing :)
- zelphirkalt 3y agoIn such places one frequently has to remind oneself and others to not start programming in that configuration language, if avoidable, to not create tons of headache and pain.
- XorNot 3y agoThis criticism doesn't pass the sniff test though: your average Haskeller loves to extoll the virtues of using Haskell to implement a DSL for some system which is ultimately just doing the same thing in practice (because they're still not going to write documentation for it, but hey, how hard can it be to figure out it's just...) YAML becomes a programming language because vendors need a DSL for their system, and they need to present it in a form which every other language can mostly handle the AST for, which means it's easiest if it just lives atop a data transfer format.
- baq 3y agomaybe yaml should standardise hygienic macros. and a repl.
- TeMPOraL 3y agoThe lengths people go to avoid using s-expressions never ceases to amaze me. We're talking countless centuries and great many minds pushed to brink of madness, just to keep the configs looking like Python or JavaScript.
- baq 3y agoI'd say it's even worse: it's a collective hallucination that complex configs are not code.
- hiAndrewQuinn 3y agoHey now. Your average Haskeller would simply recommend you replace YAML with Dhall. https://dhall-lang.org/ https://dhall-lang.org/
- worldsayshi 3y agoWhy not "just" use an embedded DSL?
- ManBeardPc 3y agoI don't know what this has to do with Haskell. I understand that they need a DSL for their system. I just don't agree that it is a good idea to use some general purpose serialization format. In the end they always evolve to a nearly full programming language with conditions and loops. Using a full programming language makes much more sense IMHO, for example like Zig build files or how we use Python to build neural networks. That way I can actually use existing tools to do what I need.
- MrBuddyCasino 3y agoEven worse, every generation repeats this mistake. I‘m not sure S-Expressions are the answer, but Terraform HCL should never have been invented.
- SOLAR_FIELDS 3y agoI was just telling a colleague today that HCL is great until you need to do a loop. A lot of parallels to this YAML discussion
- quchen 3y agoMy favorite pattern in HCL is the if-loop. Since there is no »only do this resource if P« in Terraform, the solution is »run this loop not at all or once«.
- kevincox 3y agoI'll take HCL over YAML templating any day. At least it is working with real data structures not bashing strings together. That being said, yes, it is also an awful language.
- dygd 3y agoSpot on. We use ytt[0], "a slightly modified version of the Starlark programming language which is a dialect of Python". Burying logic somewhere in a yaml template is one thing I dislike with passion. [0] https://tanzu.vmware.com/developer/guides/ytt-gs/ https://tanzu.vmware.com/developer/guides/ytt-gs/
- _ea1k 3y agoTBH, ytt is the only yaml templating approach that I actually like. The downside is that it is easy to do dumb things and put a lot of loops in your yaml. The positive is that it is pretty easy to use it like an actual templating language with business logic in starlark files that look almost just like Python. In practice this works pretty well. The syntax is still fairly clumsy, but I like it more than helm.
- indymike 3y agoYAML is the Bradford Pear of serialization formats. It looks good at first, but as your project ages, and the YAML grows it collapses under the weight of it's own branches.
- Y_Y 3y agoI had to look up that tree. Invasive, offensive odour, cynaide-rich fruit. That's a a good insult!
- DonHopkins 3y agoYAML is also just as bad as the Linden tree. https://www.youtube.com/watch?v=aoqlYGuZGVM https://www.youtube.com/watch?v=aoqlYGuZGVM
- indymike 3y agoYou should see what they look like after a 25kph breeze. Which isn't too far off from what templated YAML generates after someone commits a bad template.
- marginalia_nu 3y agoIt's pretty much repeating the mistake of early 2010s Java, where the entire application frequently was glued together by enormous ball of XML that configured all the dependency injection. It had the familiar properties of (despite DTDs and XML validation) often blowing up late, and providing error messages that were difficult to interpret. At the time a lot of the frustration was aimed at XML, but the mid 2020s YAML hell shows us that the problem was never the markup language.
- epistasis 3y agoYou have a loosely coupled bundle of modules that you need to glue together with some configuration language. So you decide to use X. Now you have two problems.
- deathanatos 3y agoYeah … for CI files (like Github workflows & such), one of the best things I think I've done is just to immediately exec out to a script or program. That is, most of our CI steps look like this: run: 'exec ci/some-program' … and that's it. It really aids being able to run the (failing) CI step offline, too, since it's a single script. Stuff like Ansible is another matter altogether. That really is programming in YAML, and it hurts.