3 ms·
For me it's a total lack of any description of the nix language. I just have no idea what I'm looking at, and nowhere (last time I looked, which I admit was so
by Izkata 5y ago
For me it's a total lack of any description of the nix language. I just have no idea what I'm looking at, and nowhere (last time I looked, which I admit was some time ago) explained what tokens make up the language. Some showed that parts of the syntax were optional, but not what they meant.
Occasionally I'd find a guide that describes in English what a given example file is doing, and it kind-of made sense, but wasn't clear how it mapped to the file shown. There was a lot of magic going on with no explanation how it was getting there, so I could only assume there were semantics tied to some of the syntax that the writer assumed you'd eventually figure out... But they were just abstract enough that it didn't make sense in a way I could duplicate.
- viraptor 5y agoFortunately this is now in a much better state - have a look at https://nixos.org/guides/nix-pills/basics-of-language.html https://nixos.org/guides/nix-pills/basics-of-language.html It's not perfect and I raised some issues about fragments being written from the perspective of someone who knows the system - but it's definitely good enough for learning the language.
- tazjin 5y agoI wrote a Nix language tutorial a while ago and people keep telling me it works for them: https://github.com/tazjin/nix-1p https://github.com/tazjin/nix-1p
- kaba0 5y agoThe problem is not the language but the “standard library” used by it, which is quite ad hoc and organically built. The language may not be the most intuitive at parts, but I feel that it is not the actual problem people have - I think what trips up people (me included) is that one pretty much grep for a similar package to be able to start doing the work. Why does a python derivation require this function instead of the generic one, what are the package names, etc. Some stricter structure would be welcome, in my opinion.
- ris 5y ago> For me it's a total lack of any description of the nix language. I just have no idea what I'm looking at, and nowhere (last time I looked, which I admit was some time ago) explained what tokens make up the language. Some showed that parts of the syntax were optional, but not what they meant. Huh? https://nixos.org/manual/nix/stable/expressions/expression-language.html https://nixos.org/manual/nix/stable/expressions/expression-l... Thing is, the language itself is really very simple. If there's something missing, it's a guide to the contents of `lib` and how they should be used. Though there is a terse reference: https://nixos.org/manual/nixpkgs/stable/#sec-functions-library https://nixos.org/manual/nixpkgs/stable/#sec-functions-libra...