Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is an annoyingly ignorant comment.

Nix, unlike say docker, actually solves a problem correctly in a principled way: reliably and reproducibly going from source artefacts and their dependencies to installed binaries/libraries/etc and without conflicts or undesired interactions between other installed binaries/libraries/etc, even different versions of the same thing.

It represents a major innovation and step forward in the depressingly dysfunctional mainstream OS landscape, that still is stuck with all the abstractive power of 80's BASIC but with concurrency and several orders of magnitude more state to PEEK and POKE.



It doesn't solve it, because it is confined to a relatively niche GNU/Linux distribution, unlike Docker.


Nonsense. You can run nix on basically any linux system (not just NixOS) and macOS. Not just theoretically, I'm doing both and am not running NixOS itself at all ATM. It's also the only sane way to build docker images. Since nix itself of course runs fine inside docker, I suspect you should be able to build a docker image on Windows that way, too, but I haven't tried.

Also, even if you come up with a forward facing solution and demonstrate it only on a particular domain you still, IMO, deserve most of the credit for solving the problem even if it takes others to translate it straightforwardly to other domains.


Nix only "works" in macOS, in the context of pretty UNIX, software development on macOS is usually something else.


I'm not sure I'm following. Isn't this argument applicable against Docker as well?


No, Docker on Windows can make use of Windows containers, and also interoperates with any kind of Windows or macOS application.


In what way does docker on macOS interoperate better with the rest of the system than a nix package? I'm pretty sure the answer is going to be "none" – you can build native, including UI apps with nix (not that I recommend throwing away xcode for your app store development and switching to nix). How do you do that with docker?

I'm less sure about windows, can you explain a bit more how you use docker containers for providing "native" windows stuff (as opposed to as a more lightweight linux VM replacement when developing something that you really want to deploy on linux)?


For example deploying IIS based applications, including some Windows services and COM libraries.


Thanks, I wasn't aware of this.


Out of curiosity, why are you using docker containers on windows? For emulate static linking or to provide network/process isolation (and does docker under windows provide "proper" i.e. secure isolation?) or something else entirely?


Configure a couple of application servers from scratch and manually configuring the services starts to get tiring.

Usually the traditional option would be to snapshot the VM right after the first successful install.

However stuff like Windows Nano now makes it interesting to start playing with containers on Windows.


> It's also the only sane way to build docker images.

That is definitely an exaggeration, considering the utility the industry leverages with plain Dockerfile's.

However, I am curious about the specifics that you are probably thinking of, if you'll elaborate.


Nix, the language, is not tied to any platform. Anyone willing to make it run in a new platform, can make the appropriate pull request(s) to make it happen.


Nix, the package manager, can be installed on any Linux distribution or on macOs. It's not confined to NixOS. It runs pretty much anywhere Docker does.


Docker also runs on Windows....


So why not run nix in docker till Windows gets first class support?


Will it? Nix solves a unixy problem in a unixy way. The Nix/WSL story might get happier at some point to solve a problem for Windows based developers of Linux based servers, but that's effectively just "running nix in docker", except that the interface is WSL instead of Docker.

I know some people write Windows software from Nix, but this is a way for Linux developers to make desktop apps for Windows users, not a solution to any problem Windows developers have.


I can see three broad reasons people develop on Windows:

1. They want to create a Game or Windows end user UI App (e.g. Overwatch or Photoshop)

2. They write some internal corp tooling or B2B software for windows shops (e.g. gluing some SAP or Oracle garbage together)

3. They want to write a server application (which means deploying on linux, which is basically the only server OS left). But they do not want to run linux as their desktop OS for corp or private reasons.

The 1st category probably has limited use for either docker or nix (in the absence of first class windows support). Might still be useful for tooling though.

The second category probably has use for docker mostly as a shitty linker, maybe also for isolation/security (I don't know the windows docker ecosystem).

The 3rd category can and totally should be using nix and I'd guess is at least double digit market share (so not insignificant; e.g. before Google banned them, a large fraction of Googlers had windows notebooks).


Because it is a kludge without support for Windows development workflows?


That's an excellent reason not to -- I wasn't previously aware that docker had native windows application support on windows.


Nix can run on WSL though. So it indirectly runs on Windows just like Docker run on Windows...


Docker makes use of Windows containers....

I don't use Windows as pretty UNIX, rather for its own capabilities.


Did anyone try running Nix in WSL?


Yes. If you're trying to develop Linux software from Windows, Nix works to the extent that the rest of your software works. But the experience of working on WSL is not the experience of working on Linux. And it isn't likely to help you build your Windows based programs.


How do you make Dockerfiles reproducible?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: