Live data from Hacker News

My First Impressions of Nix

mtlynch.io

331–340 of 354 posts

Re: My First Impressions of Nix

#331

Now that we have another Nix post, maybe someone can enlighten me about something I've been wondering about. I'm one of the maintainers of a popular django application. Someone made a nix package of the project, but we've now twice gotten invalid bug reports from people using the package because the package depends on "django_4" and whenever someone updates that nix package, the package for our project breaks. Of cou…

for rust or haskell i point nix to my version and lock and toolchain files. and it uses exact tools and versions default build uses, but built with nix.

hope such solution exists for python.

Re: My First Impressions of Nix

#332
post #50

Earlier quoted context omitted.

Sounds like the problem is with Python maintainers who don’t understand that breaking changes should only be made between major versions. If that’s not possible though then as sibling comment said - you can override the dependencies and the nix maintainer should make sure the package works as expected

Sounds like the problem could also be with Nix maintainers who don't understand that "semver" is not a universal law of nature and that not all projects and ecosystems follow it. This kind of blanket dismissal can cut both ways. Semver (the website and "spec") was created in 2009 by some guy. It's not an RFC, a standard, or anything like that. Yes, it gained widespread adoption. Yes, the guy in question is a cofounde…

i use nix for 2 years. never was thinkin or relied on semver. exactly nix allows me not to consider semver as something realy existing or working.

Re: My First Impressions of Nix

#333

Earlier quoted context omitted.

Doesn't this auto-upgrade behavior punch straight through the reproducibility Nix is supposed to be giving you? It's not exactly a functional build system if the results you get depend on when you download the dependencies. (I mean, I guess you could say that time is an input to the function, but that seems to miss the point.)

I think there's a bit of confusion caused by equating Nix "derivations" with "packages" of traditional package managers. Nix mainly concerns itself with derivations [1]. They're build recipes for creating binary artifacts that are meant to be consumed by the Nix daemon. The Nix daemon instantiates derivations by building the artifact and storing it to a store path under /nix/store. Store paths are unique to each deri…

for 2 there is sandbox from facebook to isolate tests (and builds) from cpu non determinism. i have raised ticket on nix. so really it is just another derivation sandbox.

Re: My First Impressions of Nix

#334

Earlier quoted context omitted.

FHS makes it more similar, but not compatible. I'll quote from my blog post linked above: > Different distributions make different choices, and therefore they are closely related operating systems, but not a single OS. Even Linux syscall interface subtly changes from distribution to distribution, as they pick and choose options to build their kernels. > Every niche Linux distribution that does not follow the interfac…

That's just not true. Nixpkgs has the largest package database of any distribution. It contains many closed source application that work flawlessly. Hell I can even run Vivado or Quartus on it which are two of the worst of the worst proprietary pieces of software on it. I also have packaged proprietary libraries for hardware we use at my company with no issues.

It is answered at the end of my blog post:

> I don’t care about anything that’s not packaged by the distribution

> This is totally fine. Just note that you are using a niche OS with a limited set of applications available.

Yes, Nixpkgs is large, but it does not package every piece of software out there, and you either at mercy of distribution maintainers to keep it packaged, or do it yourself. There is no way to disintermediate you and application developers.

Re: My First Impressions of Nix

#335
post #215

Earlier quoted context omitted.

FHS makes it more similar, but not compatible. I'll quote from my blog post linked above: > Different distributions make different choices, and therefore they are closely related operating systems, but not a single OS. Even Linux syscall interface subtly changes from distribution to distribution, as they pick and choose options to build their kernels. > Every niche Linux distribution that does not follow the interfac…

Almost -- it's not quite as bad as you'd expect, because nixpkgs has packages for quite a lot of closed-source software, with whatever hacks are required to make it work.

It is answered at the end of my blog post:

> I don’t care about anything that’s not packaged by the distribution

> This is totally fine. Just note that you are using a niche OS with a limited set of applications available.

Even though in case of Nixpkgs "a limited set" is quite large, it does not include every application imaginable.

Re: My First Impressions of Nix

#336
post #215

Earlier quoted context omitted.

FHS makes it more similar, but not compatible. I'll quote from my blog post linked above: > Different distributions make different choices, and therefore they are closely related operating systems, but not a single OS. Even Linux syscall interface subtly changes from distribution to distribution, as they pick and choose options to build their kernels. > Every niche Linux distribution that does not follow the interfac…

Almost -- it's not quite as bad as you'd expect, because nixpkgs has packages for quite a lot of closed-source software, with whatever hacks are required to make it work.

I tried NixOS and dropped it after spending several hours trying to make an experimental FPGA compiler work. The instructions were reasonable, but they expected to have a classic Linux distro: Fedora or Debian-like.

I don't remember the exact set of errors (there was more than one), but NixOS+FHS failed so many times I gave up, and wrote that blog post.

This is the essence: you can't expect application developers to target your niche distro.

Re: My First Impressions of Nix

#337

> Nix optimizes for local configuration yes yes yes yes yes. nix makes deployment feel bottom-up, not top-down. you understand how a system is constructed locally before you (optionally, if it's in your job description) graduate to doing devops stuff with it. that was the singular thing that hooked me; the functional reproducible stateless referentially-transparent cacheable stuff was just what kept me on board.

I'm not sure. Well, I mean, there are weird folks out there who may start doing large-scale things without understanding what they're building upon (Kubernetes is not exactly an OS, but is a notorious example), but they could make the same mess with any technology. They're just unlikely to pick Nix, NixOS or NixOps (or any alternative to it), because mainstream tutorials won't cover it [yet]. The deployment and learn…

nix rebuild does ssh on remote machines all possible ways, why colmena? if you need cloud infra, can use terranix. base image from nixos generators. reconfiguration nix remote rebuild.

Re: My First Impressions of Nix

#338

Earlier quoted context omitted.

Pure functions are just a concept that is used in FP world Yet, pure functions can "stand alone". You do not need FP to use pure functions. They are independent from FP. You can be OOP maniac and still use them. So unless you want to sound fancy and trendy then why call Nix functional instead of side-effects free?

> You do not need FP to use pure functions. They are independent from FP. You can be OOP maniac and still use them. This is not true. OOP is fundamentally built around impure operations. Objects are persistent references that you send messages to or that you call methods on (depending on your OOP language of choice). A persistent reference that is stable across different invocations (as opposed to a new reference bei…

[deleted]

Re: My First Impressions of Nix

#339

Earlier quoted context omitted.

Pure functions are just a concept that is used in FP world Yet, pure functions can "stand alone". You do not need FP to use pure functions. They are independent from FP. You can be OOP maniac and still use them. So unless you want to sound fancy and trendy then why call Nix functional instead of side-effects free?

> You do not need FP to use pure functions. They are independent from FP. You can be OOP maniac and still use them. This is not true. OOP is fundamentally built around impure operations. Objects are persistent references that you send messages to or that you call methods on (depending on your OOP language of choice). A persistent reference that is stable across different invocations (as opposed to a new reference bei…

You definitely can write method CalculateSomething which is both: pure and oop viable

Re: My First Impressions of Nix

#340
post #215

Earlier quoted context omitted.

Almost -- it's not quite as bad as you'd expect, because nixpkgs has packages for quite a lot of closed-source software, with whatever hacks are required to make it work.

I tried NixOS and dropped it after spending several hours trying to make an experimental FPGA compiler work. The instructions were reasonable, but they expected to have a classic Linux distro: Fedora or Debian-like. I don't remember the exact set of errors (there was more than one), but NixOS+FHS failed so many times I gave up, and wrote that blog post. This is the essence: you can't expect application developers to…

Yeah, I get your point, but was responding to this:

> Basically, NixOS = zero QA effort from application developer -> nothing works.

"zero QA effort from application developer" does not imply that "nothing works" if the distro and community put in the effort instead.

Post reply on HN