3 ms·
> templated YAML based DSL are just insanity The truest statement of all of HN It started off with configuration files, but then we needed logic, control flow
by sdflhasjd 3y ago
> templated YAML based DSL are just insanity
The truest statement of all of HN
It started off with configuration files, but then we needed logic, control flow, or variables; and for some reason nobody goes "ok, maybe we need an actual progamming language now" and instead we've created horrors beyond our comprehension.
Azure Pipelines is the worst I've used: three types of variables, conditional statements return string "True" and "False", and of course it's mostly undebuggable.
- BiteCode_dev 3y agoI have hopes that one day something like CUElang (https://cuelang.org https://cuelang.org) will become popular to be the configuration language of everything. Just enough logic to get by, but not turing complete, plus strong typing and embedded schemas. However, for now there is just a single implementation in GO.
- gavinhoward 3y agoOh interesting. I came up with basically the same thing as CUE (as described in [1]) on my own, except for the heavy schema stuff. I think the schema stuff is unfortunately what's going to keep it from adoption. I mean, I didn't add schema stuff explicitly in, but you can define schemas in mine, which makes it easier. But making it explicit raises the bar for an implementation and may scare people away from writing one. [1]: https://cuelang.org/docs/tutorials/tour/intro/json/ https://cuelang.org/docs/tutorials/tour/intro/json/
- hitchstory 3y agoTemplated YAML just means that something somebody thought was configuration either wasn't or wasnt under every circumstance. It's not really a problem with YAML. In most cases I think it's the fault of the creators of the YAML DSL (e.g. ansible) but with CI pipelines people really just should be writing scripts 100% in other languages and wiring them up to events with YAML. I dont have any sympathy for people using them as programming languages. I'm sure Microsoft is happy to indulge it though because hey, vendor lock-in.
- BiteCode_dev 3y agoThat's pretty much my strat: put everything in doit, and call doit from the yml file. Anything else is shenanigans.
- trallnag 3y agoAnd yet you are here complaining about Taskfile and YAML overall. Nobody forces you to write full scripts in the YAML file. Just call scripts places somewhere next to it from it
- BiteCode_dev 3y agoJust because you have strats to minimize your exposure to something terrible doesn't mean the thing is less terrible.
- trallnag 3y agoBut I'd do exactly the same with .phony targets in a Makefile. Keep the targets short and move larger chunks of code to individual script files that are just called from the Makefile
- BiteCode_dev 3y agoI don't disagree with any of that. I just prefer Python to make, it's easier for me and most colleagues I met to write and to debug. And making a custom Python function when I need more than bash inside the dodo file is great. But for someone used to make, why not used it?