Live data from Hacker News

What Is Nix?

engineering.shopify.com

311–320 of 344 posts

Re: What Is Nix?

#311

Earlier quoted context omitted.

I haven't used Nix, but I would have thought that builds would be fast, due to how cache-able the dependencies should be.

While this is true if you are building new versions of dependencies on an existing system, in many cases in high security environments you want to start with a clean build environment every time. Cached dependencies might be considered to be a security risk. Bootstrapping an entire Nix environment can take a lot of time.

Sure, but in most systems you wouldn’t have much of a choice; if you’re using Debian or Ubuntu, you’re probably using binary packages built by someone else. It takes a lot more work to build everything you want from source in a traditional distro.

It seems like a pretty straightforward tradeoff: do you want to rely on prebuilt packages for speed, or do you want to rebuild it all (and accept the extra time that takes)? Nix and Guix at least make the latter pretty straightforward to do.

Re: What Is Nix?

#312
post #227

Earlier quoted context omitted.

As an example, what's minimally required to run two different versions of program-x from the command line. Can I do something like this easily? cat-8.22 /etc/passwd | cat-8.3 -A

tomberek gave you example how to do it, although I think in real life you probably won't need to do something like this. Much more common situation is having two programs that depend on conflicting version of a library. You get this often if you start including custom repos into your system, because you need specific version of something. Sometimes you make that application work, but then you break something else. Do…

Yes, that's probably the more typical case. Thanks!

Re: What Is Nix?

#313
post #258

Earlier quoted context omitted.

But what if they're using different versions of OpenSSL?

It'll only rebuild the packages that depended on that particular openssl. This is an area where Nix shines, because all packages are explicitly bound to their dependencies, it means it's no longer relevant what one file happens to be occupying `/usr/lib/libssl.so`, or even `/lib/x86_64-linux-gnu/libc.so.6`, so you can be running different apps that rely on totally different glibc versions alongside each other with no…

Oh, that sounds like it could solve my issue. E.g. I compiled my program against my glibc which is 2.24, but target was running 2.23. I didn't even use any "new" 2.24 features, but it was missing a symbol, so it wouldn't run. But then to compile against 2.23 locally, I had to get an older version of GCC (not sure why, but), and everything needed to build the older GCC, and so on. But then I got some old versions of libraries on my system, so I had to delete them. I ended up compiling it all inside a docker container because I didn't want to pollute my env with older versions.

Re: What Is Nix?

#314

Earlier quoted context omitted.

What I'd really like to see is a realistic, end-to-end tutorial for either 1) deploying a relatively straightforward web application (like Dokuwiki or ZNC), or 2) setting up a basic desktop for day-to-day use. I feel like I've seen a lot of "snippets", I feel like I understand how Nix works and what it's supposed to be good for, but I don't have a coherent sense of the steps involved in actually using it for mundane…

Look for nix users' "this is not a dotfiles repo" repo on GitHub.

Care to clarify and/or add a link? I'm not sure what this means. (Edit: I did not downvote you)

Re: What Is Nix?

#315
post #133

Earlier quoted context omitted.

If you're applying idiomatic Nix to modern JS, I wouldn't be surprised - modern JS tends to involve installing thousands of packages by just combining them into a directory, but Nix doesn't want you to edit existing directories. So your dependency graph turns into a build-dependency graph, with each JS package requiring a full build of everything it depends on, and the Nix build system is presumably not optimized for…

The term “modern JS” should be used only as a pejorative.

Would you please not post in the flamewar style to HN? It damages the container here (i.e. the capacity of this place to sustain curious conversation), and you unfortunately did it repeatedly in this thread.

https://news.ycombinator.com/newsguidelines.html

Re: What Is Nix?

#316

Earlier quoted context omitted.

The mean, median, and modal web “application” depends on several thousand packages comprising dozens of layers of dependencies deep. The mystery code that is downloaded and executed when a developer runs `npm install` is orders of magnitude larger than functional operating systems. There is absolutely no quality assurance: these packages are published by literally-no-one-knows with no oversight whatsoever. `npm` suff…

Seriously, piss off. You clearly don't understand the tools you're loudly complaining about, and it's interfering with what was otherwise a productive discussion about Nix and build times.

Please don't break the site guidelines yourself, regardless of how wrong or annoying other comments are or you feel they are. It only makes the thread even worse.

I've responded to the other user elsewhere, but actually your replies were worse than what you were replying to, even if you're right on the fundamentals. "Please take your badly-informed $thing elsewhere" and "Seriously, piss off" are well out of bounds here.

If you feel like another user is derailing the discussion, flag the comments (https://news.ycombinator.com/newsfaq.html). If you feel like more is needed, email hn@ycombinator.com so we can take a look. We frequently moderate off-topic subthreads.

Re: What Is Nix?

#317

Earlier quoted context omitted.

Look for nix users' "this is not a dotfiles repo" repo on GitHub.

Care to clarify and/or add a link? I'm not sure what this means. (Edit: I did not downvote you)

https://github.com/ihebchagra/dotfiles I guess sometimes they are called dotfiles haha.

https://www.google.com/search?q=personal+config+github+nix seem to be a good search

Perhaps I misremembered how many of them make throw shade on dotfiles repos, or perhaps it is just that google isn't good at finding such things ("not dotfiles" won't work).

Re: What Is Nix?

#318
post #25

Earlier quoted context omitted.

If you install python through nix, you get the nix version. If you install python through apt, you get the ubuntu version.

I get that part. I'm asking what the Nix version is like. Is it like the Ubuntu version with all the patches and backports and everything, or is it like the Arch (i.e. basically original unmodified) version?

Ah I see. yes as someone who contributes to nixpkgs, there are patches to use the /nix paths rather than the standard posix layout.

NixOS is not POSIX compliant and does not try to be.

Re: What Is Nix?

#320
Nix seems wonderful, but I have one question: If nixos.org and github.com disappeared tomorrow, are users sufficiently enabled to keep the project going, or are those two single points of failure?
Post reply on HN