Hacker News new | ask | show | jobs
by throwaway894345 2210 days ago
Nix is also Turing complete, and Python (to my knowledge) can also run in a side-effect-free context through various methods (it’s easy enough to enforce during code review but there are technical solutions as well). There’s also Starlark which is a sealed, embedded Python-like which is NOT Turing complete and which can also avoid side effects (evaluating to a derivation, if you like).

Nix may be simple but it’s unfamiliar, and you’re already asking people to understand a novel package management system and everything about everything about their entire dependency tree, and these unknowns are collectively more confounding than the sum of their parts.

Python would help because it is familiar and gradually typed. That said, I’m open to any language that satisfies those properties (maybe also “composes nearly from expressions”).

1 comments

I don't believe Nix is Turing complete, unless you include ability of running python or bash script.

Regarding the rest of your first paragraph, that's essentially what I said, you can write side effect free code in python, but it's so easy to introduce side effects if you're not paying attention.

I'm saying though that nix language isn't the hard part about nix, but perhaps you're right and it is one extra difficulty that just makes things harder.

But take a look at most o Nix derivations, majority of them end up being just an attribute set (aka dictionary, map etc in other languages)

Take look at https://nixos.org page (they changed it after this submission was posted, and it is better than the old page at showing what Nix can do)