Remix.run Logo
dissent 6 hours ago

Write it in a higher level language and generate the YAML from that. See the YAML as a wire protocol, not something you author things in.

verdverm 5 hours ago | parent [-]

exactly, why interop with everything that exists today is important

however, you don't want config being turing complete, that creates a host of other problems at a layer you don't want them

dissent 5 hours ago | parent [-]

I know what you mean, but there seems to be some kind of misplaced fear about this which has led us down the garden path of unmaintainable config (or even trying to jinja template it!)

If your config is turing complete and consumed as-is, then without a lot of discipline you can dig yourself into a hole, sure.

If you're producing YAML that is not turing complete, that constraint means you have to code in a way that produces deterministic output. It's actually very safe, and YAML maps 1:1 to types in something like Python.

My favourite go-to example is for AWS Cloudformation:

https://github.com/cloudtools/troposphere