Live data from Hacker News

What is Nix and why you should try it

yakking.branchable.com

161–170 of 201 posts

Re: What is Nix and why you should try it

#161

That article on "What is Nix and .. " does not contain the words "Nix is a..." A quick read gave a vague sense that it was about installs and file paths so maybe something package-related? Nothing definite. If you click through to https://nixos.org/nixos/nix-pills/why-you-should-give-it-a-t... you will see "Nix is a purely functional package manager and deployment system for POSIX"

I get the feel that Nix does something like what virtualenv does for python, but more generalized to make that work for other software. Is that approximately right?

Re: What is Nix and why you should try it

#162
post #82
post #54

Earlier quoted context omitted.

When will the redesign be merged? It's over a year that I first read about Nix and they talked about the redesign.

The redesign is merged and available via `nix-shell -p nixUnstable`. It isn't so much an issue of merging, but calling the new version stable. We're working on it. No definite timetable though.

Ah, cool!

Are there docs for the usage after "nix-shell -p nixUnstable"?

Re: What is Nix and why you should try it

#163
post #29

Earlier quoted context omitted.

Nice. I started using macOS 5 months ago and it felt a bit as a step back coming from Linux. Does Nix work good with macOS?

get brew, iterm2, and zsh.

Already got zsh and brew.

Will look into iterm2, thx :)

Re: What is Nix and why you should try it

#164

I'm a big fan of Nix, but I really with there was a declarative way to define a user's environment similar to what NixOS has with /etc/nixos/configuration.nix. It seems a little strange to me to have a functional package manager, but an imperative package install process. I think there are a few projects like NixUP and home-manager that are looking to address this, but I'm hoping Nix will provide an official way to d…

I do this without needing any extra tool[0].

I basically define a custom meta-package with all the packages I want as dependencies and install it with `nix-env -iA`.

[0]: https://github.com/asymmetric/dotfiles/blob/master/config.ni...

Re: What is Nix and why you should try it

#165
what would happen if we want to install, for example, two different versions of ruby at the same time?

This is treating the symptom instead of the root cause, that being ineptitude to design backward-compatible software. We as an industry should fight such band aids and take a stand. Yes, designing backwards compatible software is hard, but exactly that is the difference between engineering and amateurism. And if one is getting paid to program, I’m going so far as to argue that it’s one’s job to have their head hurt solving such difficult problems so that users of computers don’t have to.

Re: What is Nix and why you should try it

#166
post #43

That article on "What is Nix and .. " does not contain the words "Nix is a..." A quick read gave a vague sense that it was about installs and file paths so maybe something package-related? Nothing definite. If you click through to https://nixos.org/nixos/nix-pills/why-you-should-give-it-a-t... you will see "Nix is a purely functional package manager and deployment system for POSIX"

Yes I recommend the nix pills they are really awesome and how I learned Nix!

Links?

Re: What is Nix and why you should try it

#167
post #71

Earlier quoted context omitted.

Some Smalltalks (Squeak and Pharo) have a wonderful tool called a "Method Finder". The way it works is you write a sequence of arguments and an expected result , and it suggests a method to call. For example, I just now tried it, entering 3. 4. 7 in the input. It suggested the following methods: 3 + 4 --> 7 3 bitOr: 4 --> 7 3 bitXor: 4 --> 7 Clicking on any of these opens a browser on the class and method concerned.…

That's pretty cool. Is the technique for this documented somewhere, or do I have to read the Squeak or Pharo source?

I don't recall reading about it anywhere, but I did once look at the implementation (it's wonderful having a reflective system where a single click gets you source of anything onscreen), and it's very straightforward but also kind of gross.

One neat trick I'd forgotten is that if it doesn't find anything interesting with the inputs in the order written, it permutes them and tries again!

Re: What is Nix and why you should try it

#168
For those new to NixOS, the default package installation method is through a concept called channels. It can be a bit confusing reconciling the nature of channels and the real strength of NixOS which is functional reproducibility. I wrote a blog post explaining what channels really are and an alternative which is to use Git commit hashes instead https://matrix.ai/2017/03/13/intro-to-nix-channels-and-repro...

Re: What is Nix and why you should try it

#169

I have recently started looking into Nix to solve the problem of dotfile deployment to new OSX workstations. When you get a new laptop, you clone your dotfiles, maybe symlink them to your home directory -- and then what? Nix solves this problem for me by coupling my dotfile deployment with the installation of the related software. The learning curve has been absolutely tremendous, however. That said, the support on F…

Can you elaborate a bit on how Nix helps you set up your user space?

Do you install software with "nix-env -i package" or do you have a declarative way of doing it? If you use nix-env, how is that better than "brew install package"?

I'm not doubting your setup, I'm just trying to use nix for the same thing and am having a hard time finding the canonical way of doing a declarative user setup.

Re: What is Nix and why you should try it

#170

I'm a big fan of Nix, but I really with there was a declarative way to define a user's environment similar to what NixOS has with /etc/nixos/configuration.nix. It seems a little strange to me to have a functional package manager, but an imperative package install process. I think there are a few projects like NixUP and home-manager that are looking to address this, but I'm hoping Nix will provide an official way to d…

I do this without needing any extra tool[0]. I basically define a custom meta-package with all the packages I want as dependencies and install it with `nix-env -iA`. [0]: https://github.com/asymmetric/dotfiles/blob/master/config.ni...

Thanks for linking to this! Do you know of a way to get a list of installed packages then? "nix-env -q" lists the meta-package but not the packages installed within. Also, when you update packages, does the update propagate to the sub-packages?
Post reply on HN