News for hackers. Stuff that matters.
Re:What Is Wrong with TOML? by incrudible on Wednesday September 13, 2023 @07:18AM (#37495220)
Exactly, so just use JSON for configuration. This will upset the people that have not yet learned to get over it, but you really need people that got over it.
Re:What Is Wrong with TOML? by BiteCode_dev on Wednesday September 13, 2023 @07:33AM (#37495337)
I do this, but regularly get annoyed with the date, comment, trailing comma, mandatory key quotes, etc
Re:What Is Wrong with TOML? by retzkek on Wednesday September 13, 2023 @12:05PM (#37498554)
Maybe you'd like jsonnet: https://jsonnet.org/

I find it particularly useful for configurations that often have repeated boilerplate, like ansible playbooks or deploying a bunch of "similar-but" services to kubernetes (with https://tanka.dev).

Dhall is also quite interesting, with some tradeoffs: https://dhall-lang.org/

A few years ago I did a small comparison by re-implementing one of my simpler ansible playbooks: https://github.com/retzkek/ansible-dhall-jsonnet

Re:What Is Wrong with TOML? by paulddraper on Wednesday September 13, 2023 @01:12PM (#37499053)
jsonnet is turing complete.

It's configuration with a build step. Which is an option, but that's pretty different than JSON, YAML, TOML, etc.

Re:What Is Wrong with TOML? by BiteCode_dev on Wednesday September 13, 2023 @02:43PM (#37500121)
If I have to use a better format, I will use toml or cue.

The whole point of the parent is that JSON is the Pareto solution, which I agree with.

But it does grind my gear.

Re:What Is Wrong with TOML? by baq on Wednesday September 13, 2023 @09:14AM (#37496309)
JSON is the runner up on the top crap list right below Windows Registry.
Re:What Is Wrong with TOML? by remram on Wednesday September 13, 2023 @09:50AM (#37496723)
No comments means it's not human friendly.
Re:What Is Wrong with TOML? by incrudible on Thursday September 14, 2023 @11:12AM (#37510091)
I would strongly advise against using JSON to configure humans.
Re:What Is Wrong with TOML? by remram on Thursday September 14, 2023 @01:16PM (#37511819)
That's a first, the ol' HN switcharoo?