I got very into CUE for a bit but... My hot take after all this is that it doesn't actually matter if your config language is Turing complete. Just use your regular programming language for config, I use typescript, it's great. If for some reason you write an infinite loop in your config... you'll find out really quickly and fix it. Non-turing completeness doesn't actually solve any problems you care about, but using…
An infinite loop is not the most frequent type of non-termination. Crashing is. When your "config" fails to load halfway through its interpretation because of a KeyError, ValueError, NullPointerException, "null has no method ", you see some of the downsides of Turing-completeness.
How CUE Wins (2021)
31–40 of 44 posts
Re: How CUE Wins (2021)
#32I was an evangelist for Jsonnet but somehow it didn't get enough traction over time. I blame the lack of type support and integrations with the IDEs such as VSCode. I regularly check the VSCode & Intellij support for CUE as well but the support is still at the level of syntax highlighing, not more than that, which is sad.
Nowadays, I use VSCode with YML extensions (anchor, etc.) and use JSON Schema to validate the YML in the IDE with its language server. It's far from perfect but easy to iterate and portable.
Re: How CUE Wins (2021)
#33Earlier quoted context omitted.
An infinite loop is not the most frequent type of non-termination. Crashing is. When your "config" fails to load halfway through its interpretation because of a KeyError, ValueError, NullPointerException, "null has no method ", you see some of the downsides of Turing-completeness.
given your argument, it seems your gripe is with object orientation rather than with turing-completeness.
Re: How CUE Wins (2021)
#34The friction is still too much IMO. While I love the configuration languages, I still find myself writing YAML because it's much simpler. The tooling support is getting there but I don't understand why these tools introduce their own syntax and type system rather than being a superset of YML or JSON and using JSON Schema as the type system. I was an evangelist for Jsonnet but somehow it didn't get enough traction ove…
CUE is a superset of JSON.
Re: How CUE Wins (2021)
#35The friction is still too much IMO. While I love the configuration languages, I still find myself writing YAML because it's much simpler. The tooling support is getting there but I don't understand why these tools introduce their own syntax and type system rather than being a superset of YML or JSON and using JSON Schema as the type system. I was an evangelist for Jsonnet but somehow it didn't get enough traction ove…
> I don't understand why these tools introduce their own syntax and type system rather than being a superset of YML or JSON CUE is a superset of JSON.
Re: How CUE Wins (2021)
#36I think CUE looks great, but right now it's losing because it can only be installed as a package for Go, MacOS and Arch.
Re: How CUE Wins (2021)
#37I think CUE looks great, but right now it's losing because it can only be installed as a package for Go, MacOS and Arch.
The CUE command line tool is written in Go, and works on pretty much any operating system and architecture supported by Go, which now includes almost everything[0], so I am not sure how you came to that conclusion. If you want to use CUE as a library, you can only do it from Go at the moment. We are acutely aware of this limitation and we are investigating possible solutions. [0] https://go.dev/doc/install/source#env…
Re: How CUE Wins (2021)
#381. CUE is a configuration language the author is promoting.
2. Author says CUE wins by becoming ubiquitous. :-(
Re: How CUE Wins (2021)
#39I got very into CUE for a bit but... My hot take after all this is that it doesn't actually matter if your config language is Turing complete. Just use your regular programming language for config, I use typescript, it's great. If for some reason you write an infinite loop in your config... you'll find out really quickly and fix it. Non-turing completeness doesn't actually solve any problems you care about, but using…
Engineering is about keeping it simple. So I agree; we can avoid dozens of flavors of structured text (using up worker time to learn, compute cycles to use) and stick to general programming languages rather than prove how clever we can be by creating yet another tokenizer, parser, writer with some hand wavy, tangential connection to mathematical concepts.
Re: How CUE Wins (2021)
#40Main takeaway for me: CUE is not just a configuration language (I knew that). CUE has an ecosystem built around it, with verification tools, translators to other config languages , and conveniences like a language server and a formatter. Also, the language is built to be modular, and many ready-made reusable parts are available, so you don't start from scratch when migrating. Indeed it's set to win.
AWS SDK for Go has snippets that just work right in the docs. Writing some logic like “if attempting to use AWS types a, b, c, or send values outside this regex, error” is not that hard.
Having learned Puppet, Chef, Ansible, and having zero use for them day-to-day in the current reality of “beam API params”, a problem specific DSL seems like a dubious proposition.