3 ms·
I guess this is a tangent, but Nix to me feels like the right idea with the wrong abstraction. I can't explain / it would take a serious bit of genius to come u
by mhh__ 2y ago
I guess this is a tangent, but Nix to me feels like the right idea with the wrong abstraction. I can't explain / it would take a serious bit of genius to come up with an alternative worth switching to.
Has anyone done any better?
- Ericson2314 2y agoYou can use the low level stuff without the language to forge your own journey. https://github.com/NixOS/nix/blob/master/doc/manual/source/store/drv.md https://github.com/NixOS/nix/blob/master/doc/manual/source/s... I am working on the docs for this as we speak.
- zanecodes 2y agoI agree, I feel like Nix is kind of a hack to work around the fact that many build systems (especially for C and C++) aren't pure by default, so it tries to wrap them in a sandboxed environment that eliminates as many opportunities for impurity as it reasonably can. It's not solving the underlying problem: that build systems are often impure and sometimes nondeterministic. It also tries to solve a bunch of adjacent problems, like providing a common interface for building many different types of package, providing a common configuration language for builds as well as system services and user applications in the case of NixOS and home-manager, and providing end-user CLI tools to manage the packages built with it. It's trying to be a build wrapper, a package manager, a package repository, a configuration language, and more.
- gf000 2y ago> It's not solving the underlying problem: that build systems are often impure and sometimes nondeterministic It's not Nix's job, imo. Those compilers should be fixed. And all the other "features" come for free from Nix's fundamental abstractions, I don't feel it would overstep its boundaries anywhere.
- throwawayqqq11 2y agoPurity becomes a hard goal when ever you hit the real world at build or runtime. By definition, you have to bridge 2 domains. Imagine constant time compute and constant memory constrains, required in cryptography, being applied to the nix ecosystem. Yes, this is an artifical example but it shows that purity is harder to define and come by, then some people think. Maybe someday these constraints actually do apply to nix goal of reproducibility. With ever changing hardware that purity is a moving target so nix imo will always be an approach to purity and bundling so much tooling is to be expected. Still, you can legitimately call it a hack :)
- genewitch 2y agoI have never checked if my c compilers are deterministic, but Gentoo has tinderbox, and since everything that has an emake or whatever has a sha hash; this means if I use the exact same sha hashed source as the tinderbox binary, I should get a bitwise equal binary output myself. I of course imply all of the toolchain is using sha hash verified source output. In Gentoo `emerge -e <package name>` will do it, add binpkgs if you know what you're doing (I do, and I do).