News for hackers. Stuff that matters.
Re:XML is better than YAML by RGBCube on Thursday September 21, 2023 @02:15AM (#37593846)
> If you want config-as-code (and you want to!), just do it properly and use a proper programming language for it. Don't care which one, be it JavaScript, Python, Go, PDP-11 Assembly, or Rust. But please stop with these half-measure DSLs that just don't cut it.

I wish more tooling used Nix, it's a great lisp that isn't ugly.

Re:XML is better than YAML by Y_Y on Thursday September 21, 2023 @04:17AM (#37594700)
Nix, the language? It's very good for derivations (big, composed k:v maps), but it doesn't feel like a lisp, nor would I want to try using it for docker-compose or a config for pre-commit or an omega one description of an ML model parameterisation.

Then again I'd love to be shown that this partially-considered opinion is wrong.

(Also, isn't Nix's inadequacy as a lisp one of the reasons for the existence of Guix?)

Re:XML is better than YAML by otabdeveloper4 on Thursday September 21, 2023 @05:47AM (#37595401)
Nix is JSON + arrow functions + variables.

The only difference between Nix and a hypothetical JSON++ is that Nix is lazy by default.

I.e., it is nothing at all like any Lisp.

Re:XML is better than YAML by m45t3r on Thursday September 21, 2023 @07:06AM (#37595933)
I actually use Nix to generate YAML files for GitHub Actions in one of my repositories. It allows me to share code between multiple actions and be consistent with versions/formatting.
Re:XML is better than YAML by RGBCube on Thursday September 21, 2023 @09:34AM (#37597394)
That's a really nice use case! Could you provide a link?
Re:XML is better than YAML by m45t3r on Thursday September 28, 2023 @09:07AM (#37689088)
Sorry, didn't see this comment. It is here: https://github.com/thiagokokada/nix-configs

In the `actions` directory is all the Nix files. There is some glue code in `lib/flakes` to generate the YAML files from Nix.