3 ms·
My issue with Nix-lang is that it's somewhere between declarative and uhm…not declarative? Certain sections of nix files have special meaning (config), certain
by 0x457 4y ago
My issue with Nix-lang is that it's somewhere between declarative and uhm…not declarative?
Certain sections of nix files have special meaning (config), certain functions only work in those sections. Nice features like `//` for merging dicts goes out of the window as soon as you have nested dict, which is nearly every time.
It's poorly documented, “standard library” documentation is even worse. It's impossible to navigate because everything is mashed together in `nixpkgs`. Often show no examples on how to use a function and just say `it takes blahblah`, but what is blahblah?
- ParetoOptimal 4y ago> Nice features like `//` for merging dicts goes out of the window as soon as you have nested dict, which is nearly every time. Ah, so Nix needs lenses. Edit: On the NixOS matrix I was told "there is lib.recursiveUpdate" when I mentioned your comment. Does that fix this problem for you or improve things?
- 0x457 4y agoWell, yes, it fixed it when I've discovered this function a while ago. That's just an example. That's what I'm bitching about - discovering documentation sucks because nix-lang is a very niche language and `nixpkgs.lib` is mostly undocumented. That makes finding how to do something in it is harder compared if to any other language. With homebrew, it's just ruby scripts. You write ruby, you can ask some ruby question from someone who never wrote a formula and get an answer because that's a general purpose language. With guix, it's not the best, but it's still just GNU Guile, it's been around for almost 30 years. Yeah, it's probably not very popular, but it's still a general purpose language that has uses outside Guix.