5 ms·
The 5 Stages of YAML
- blt 8y ago...and yet people give me a hard time for using python dict/array literals for config.
- jasonpeacock 8y agoCheckout TOML for a standard config that does just that.
- ris 8y agoThere is nothing simple about yaml. Only things that seem simple from a first glance.
- ben509 8y agoI got somewhere between stage 2 and 3 and had to try reading the YAML spec and figuring out the YAML libraries. It's a mess... it has enough "features" it's a security hole, and you wind up porting a parser / serializer to every platform you want to use it on.
- jolmg 8y ago> 5. The declarative YAML format now supports conditional, iteration, and inheritance syntax; it is now turing complete. * glance at Ansible
- trelliscoded 8y agoOverheard: “this thing has more translation steps than C??”
- paulddraper 8y agoFor something in between 4 and 5 for JSON, see https://jsonnet.org/ https://jsonnet.org/
- BugsJustFindMe 8y agoThat's kinda funny. Once you add comments and function calls to JSON, you've basically just made a Python module.
- beaconstudios 8y agoat that point you might as well just require() a js file instead of skirting around the issue of code vs config.
- paulddraper 8y agoIt is Turning complete, but also pure (side-effect free).
- beaconstudios 8y agoYou don't need a whole new language to have that though, just don't put side effects in your config.js
- PopeDotNinja 8y agoI'm currently stuck in stage 4. shakes first at Kubernetes wrapper wrapper wrapper wrapper
- dpc_pw 8y agoThis isn't a critique of YAML itself (which , only of people using YAML for things, where they should have started with Lua/Python/Scheme. Someone already mentioned Ansible. I find it particularly terrible. And bunch of other half-assed DSLs, terrible templating languages and such.
- aijoe 8y agoIsn't this just a matter of, "Recognize when you're using config for something dynamic and refactor because config is no longer the best tool for that job"? And you can continue using yaml (or whatever config format you're using) wherever config remains the right tool for the job.
- sytelus 8y ago5th point could have read: There was no way to put breakpoints in this declarative stuff and debug things so now we just use JavaScript.