News for hackers. Stuff that matters.
Re:I Love Arch, but GNU Guix Is My New Distro by srvmshr on Thursday November 18, 2021 @12:53PM (#29268331)
> In short, GNU Guix is both a package manager you can use in any distro and a full-fledged GNU/Linux distribution, that is modern and advanced

Why not just use Nix, which is more battle tested?

Re:I Love Arch, but GNU Guix Is My New Distro by pxc on Saturday November 20, 2021 @02:20AM (#29286219)
As a NixOS user who has (recently!) played with Guix, I don't think ‘battle testing’ is a great reason to prefer Nix.

Guix has an excellent CLI and awesome docs. It's stable and plenty usable. All being in one, high-level language like Scheme makes it seem really easy to hack on, and I think that's part of why its CLI is so good already.

Nix is faster, it supports macOS, and its package collection is much bigger because it's older. But Guix seems great to me, too! If you think you might like it, try it.

Re:I Love Arch, but GNU Guix Is My New Distro by kohlerm on Saturday November 20, 2021 @03:44AM (#29286555)
What about number of packages available? Does guix have something comparable to Nix Flakes?
Re:I Love Arch, but GNU Guix Is My New Distro by pxc on Saturday November 20, 2021 @10:19AM (#29288817)
I think Guix has like 1/3 the total number of packages available, probably less. This may not be a huge deal— when I started using NixOS, Nixpkgs was much smaller than it is now, too, but it still felt worth it for me. As another user pointed out, packaging in Nix and Guix is pretty easy for anything that doesn't have a bespoke or ill-behaved (requiring network access, trying to write to the directories of other packages, etc.) build system. But it can make a big difference for usability if packaging work is cumbersome for you, or something very large or complex that you want is missing. (I think KDE is still missing, for example.)

Nix flakes are kind of a lot of things: a version pinning system, the switch to pure evaluation mode by default (which impacts caching in a good way but makes configuration slightly more annoying), a distribution mechanism for code written in Nixlang, and a collection of Nixlang schemas which enable a richer command line experience (that, e.g., power the new `nix run` command). It's not clear how many of those functions Nix flakes will retain in its final form.

There's no singular feature that attempts all that in Guix as far as I know, and I don't know the general technical story for evaluation caching with Guix. But Guix does have an integrated, first-party form of package pinning. Where Nix flakes replaces the old 'channel' system, Guix has a richer notion of channels which support pinning in normal Guix expressions.

(In Nix, channels are an output that have a certain structure and get managed in a certain way via fhe nix-channel command to manage them— they're like another type of Nix profile. In Guix, channels are defined by the user directly in Scheme code, just like the rest of their configuratiom, which is more similar to how Nix flake inputs are defined than to Nix channels.)

I've never used Guix channels in anger, so I can't tell you how nice that notion of version pinning is to use.

Re:I Love Arch, but GNU Guix Is My New Distro by civodul on Saturday November 20, 2021 @01:12PM (#29290402)
"guix describe" and "guix time-machine" make it rather easy to pin a Guix revision (and thus the whole package set) and to restore it anytime:

https://guix.gnu.org/manual/en/html_node/Replicating-Guix.ht...

Re:I Love Arch, but GNU Guix Is My New Distro by pxc on Saturday November 20, 2021 @01:21PM (#29290486)
I really like the design of `guix time-machine`. It's pretty cool how it just reuses the existing syntax for other subcommands, instead of modifying them.
Re:I Love Arch, but GNU Guix Is My New Distro by rekado on Saturday November 20, 2021 @10:12AM (#29288754)
Guix has lots of packages in the default channel, and you can add any odd git repo as another channel providing extra software.

There are quite a few popular channels, such as non-guix (with things like vanilla Linux), guix-science, guix-past, etc.

As a maintainer of R packages in Guix I'd also like to point out that many R packages in Nix actually need more work to build them, so the number of packages in Nix is rather inflated. Guix also goes to great lengths to actually build things completely from source, such as Java packages, or to minify JavaScript from source files.

Re:I Love Arch, but GNU Guix Is My New Distro by vk3wtf on Saturday November 20, 2021 @06:45PM (#29292849)
Currently in nixpkgs ~3% of rPackages fail to build.
Re:I Love Arch, but GNU Guix Is My New Distro by angio on Saturday November 20, 2021 @08:20AM (#29287819)
To be fair, the appeal of Nix (and Guix) to me is that it's very easy to create binary packages of applications I use. Coming from Fedora, it takes minutes to create new packages compared to hours with RPM.
Re:I Love Arch, but GNU Guix Is My New Distro by masklinn on Saturday November 20, 2021 @03:17AM (#29286453)
Author is a lisper, is a good reason.

And while nix may be battle tested that doesn’t translate to a good experience, the learning curve is high and the documentation while plentiful is not really good or helpful to beginners. Plus the entire thing is in flux right now between flakes, home-manager, and a desire to kill nix-env.

Re:I Love Arch, but GNU Guix Is My New Distro by pxc on Saturday November 20, 2021 @02:37PM (#29291158)
> Plus the entire thing is in flux right now between flakes, home-manager, and a desire to kill nix-env.

This is my big gripe with Nix. There are so many things that are almost ready, or almost integrated, and advanced users are typically already using them. It makes it feel like next year will always be a better time to recommend Nix to newbies.

And a lot of the more ambitious contributions to Nix and Nixpkgs that are really, really exciting as a user tend to sit in pull request limbo for a very long time, sometimes dying on the vine. Guix doesn't seem to have that problem yet, but I don't follow it as closely.

It's painful to feel sort of totally married to it but also like I can't whole-heartedly recommend picking it up to most people I know who might enjoy it once they got going.

Re:I Love Arch, but GNU Guix Is My New Distro by zelphirkalt on Saturday November 20, 2021 @06:27AM (#29287135)
Not sure what level exactly a beginner is, but I have my problems with Guix docs too. Try making a package for example. Took me a long time and multiple questions on mailing list and irc to get it done. People also recommend more than 1 different strategies. Then try upgrading a package, when there are some files you want to exclude. How to do that? Seems I can not find answers for my questions in the docs and always find myself asking on mailing list or irc. There people are helpful and mostly you get an answer. I like Guix as package manager, but their docs can definitely be improved with loads of examples and tutorials.
Re:I Love Arch, but GNU Guix Is My New Distro by masklinn on Saturday November 20, 2021 @06:42AM (#29287223)
> Not sure what level exactly a beginner is, but I have my problems with Guix docs too.

Oh don't get me wrong, I'm not saying guix is better (I have absolutely no idea), just that the experience with nix is extremely rough so nix being a bit more popular is not necessarily that much of an edge (or one at all).

> I like Guix as package manager, but their docs can definitely be improved with loads of examples and tutorials.

In fairness I'll say that especially if you're a long term user it is very easy to be blind to the early user experience. Sadly most projects don't push new users towards really reporting their experience or even contributing to the docs, but if you have the time and inclination to do so I'm quite convinced your experience would be extremely valuable to those who'll come after you, even if the project doesn't necessarily value them that much (but even then it can be useful as evidence of issues with the early experience / uptake, and possibly efforts to rectify them later on).

It's also useful on a personal level, because memory is a fickle thing and a year from now you may not even remember your struggles.

Re:I Love Arch, but GNU Guix Is My New Distro by zelphirkalt on Saturday November 20, 2021 @08:21AM (#29287832)
I wrote down all I learned here: https://notabug.org/ZelphirKaltstahl/gnu-guile-gnu-guix-pack... (or use org-mode file in same repo)

I've not yet had the energy or patience to learn the TexInfo format, which is a standard for GNU projects. But if anyone wants to put what I have in the Guix docs, even as merely an example or tutorial, I wont mind.

Re:I Love Arch, but GNU Guix Is My New Distro by pama on Saturday November 20, 2021 @11:00AM (#29289186)
Out of curiosity, did you try exporting from org mode? https://orgmode.org/manual/Texinfo-export-commands.html
Re:I Love Arch, but GNU Guix Is My New Distro by zelphirkalt on Saturday November 20, 2021 @12:15PM (#29289898)
I know that is possible, but I did not try, because I do not know, whether such an export would be a "drop-in-and-done" for the structure or nesting depth, if such things exist, in the actual documentation, or would have to be modified a lot to put in the docs.
Re:I Love Arch, but GNU Guix Is My New Distro by grumbel on Saturday November 20, 2021 @09:20AM (#29288282)
I found the easiest way to answer those questions is to look at how other packages do it.

The issue here isn't just that the documentation is lacking, but that Guix wants to have everything done in Scheme, so you often run into the issue of having to translate code you already have running in Bash into whatever Scheme equivalent Guix wants.

Re:I Love Arch, but GNU Guix Is My New Distro by NavinF on Saturday November 20, 2021 @04:21AM (#29286659)
> Author is a lisper, is a good reason.

If I read this on any other website I’d assume it’s sarcasm. Only on HN, folks.

Re:I Love Arch, but GNU Guix Is My New Distro by masklinn on Saturday November 20, 2021 @04:57AM (#29286780)
I don't understand why it would be sarcasm on any site. That is the original divergence, Guix was a version of Nix built on Guile instead of Nix.

If you're a long-time lisper interested in the ideas embodied by nix/guix, that alone is a lot of points for guix.

Re:I Love Arch, but GNU Guix Is My New Distro by agumonkey on Saturday November 20, 2021 @04:38AM (#29286718)
It's curious how the world rejects lisp so fast, I guess they have a lot of energy to waste.
Re:I Love Arch, but GNU Guix Is My New Distro by detaro on Saturday November 20, 2021 @04:25AM (#29286667)
... why would other sites not count "Guix uses a language the author might already be more comfortable with" as an argument for why the author might prefer Guix?
Re:I Love Arch, but GNU Guix Is My New Distro by podiki on Thursday November 18, 2021 @02:27PM (#29269342)
Short answer: I prefer Lisp (Guile Scheme in this case) to anything else really. Maybe the Nix language is fine, but I can already read Guix code and prefer working in the land of parens.
Re:I Love Arch, but GNU Guix Is My New Distro by acomjean on Saturday November 20, 2021 @08:38AM (#29287950)
Nix is another Linux package manager.

https://nixos.org/

Re:I Love Arch, but GNU Guix Is My New Distro by kdtsh on Saturday November 20, 2021 @09:47PM (#29293749)
For my part, I think Guix has a much nicer CLI experience, and I find the documentation easier to comprehend. I also prefer the Guix DSL in Scheme to the Nix expression language.

I haven’t used NixOS though, which could make things a bit different.