‘The half minute which we daily devote to the winding-up of our watches is an exertion of labour almost insensible; yet, by the aid of a few wheels, its effect is spread over the whole twenty-four hours.’

Guix: You are in a maze of lispy little passages, (map equal? '('all 'alike) '('all 'alike))

Benjamin Slade

So I finally made a serious go of running GuixSD, a GNU Linux distro which is largely built on GNU Guile Scheme (a dialect of Lisp) on one of my machines (one I had actually put together with GuixSD in mind: an X200 Thinkpad, which I Libreboot‘ed and put a Atheros Wi-Fi card in), and, to increase both the quantity and variety of Lisps involved, am trying to use with StumpWM (which is written in Common Lisp).

It’s a fascinating distro, modelled on Nix, but implemented in Guile. It’s not been exactly easy to get running (one of the videos on GuixSD from Fosdem 2017 included the line “[GuixSD] is like Gentoo for grown ups”), in part because its architecture is rather different from what I’ve experienced with other Linux distros, which use different package managers perhaps and sometimes even different libc’s, but generally follow a similar design philosophy. Rather than spreading out configuration across lots of different pieces, GuixSD seems to largely try to concentrate it in specific configuration files which are transactional in that they can be rolled back (and thus the system can be rolled back to known working states).

It is a GNU-blessed distro, and does take the FSF’s hard line (and to my eyes sometimes weird line) approach to software. So no proprietary software is included in the Guix repos, including firmware (and it runs on the linux-libre kernel). That by itself is fine, but it means the state of affairs for Guix-packaged browsers is pretty poor. No Chromium, no Firefox. IceCat 52 is essentially what’s currently available (if IceCat were up to the latest Firefox ESR 60, it might be easier) in terms of browsers which might be considered secure.

This led me to try to use the Nix installer by itself* to try to install Firefox and Chromium. Sadly, I can’t get Nix’s Chromium to work at all on GuixSD, and while Firefox works fine, I can’t get it to see my locally installed fonts (or other fonts I’ve installed via Nix).

Hopefully at some point Next Browser will be packaged for Guix, to bring in another major component written in (Common) Lisp. And when (if?) IceCat 60 comes out, that will alleviate the pain somewhat. (I was a long-time Conkeror user, and I briefly tried it again in GuixSD, but I’m not certain of its security and uBlock Origin no long works with it, which I believe is why I stopped using it in the first place).

Other interesting Lispy pieces include mcron, a cron which accepts (as well as Vixie cron style, I think) Guile config files. The examples in Guix manual I couldn’t really get to work. But via the help-guix listserv I found that one can put simple guile scripts in ~/.config/cron/job.guile. Working out how to do a ‘run this every N minutes’ was not immediately obvious, but I figured out how to do it, e.g.:

; execute run_me every 5 minutes
(job '(next-minute (range 0 60 5)) "run_me")
; run execute_me every 2 hours
(job '(next-hour (range 0 24 2)) "execute_me")

One of the other great things about GuixSD is that its init manager, GNU Shepherd, is also written in Guile Scheme. I’ve only had a chance to play with it a little bit, but it seems very nice and it’s good to find other innovative init managers (I would mention here also runit and s6) which take very different approaches to systemd (another innovative init, or perhaps init+, but one that creates more problems than it solves in the end, in my experience).

On the Guix package manager itself: I learned the hard way that searching for packages in Guix is really only comfortable within Emacs: so do guix package -i guix-emacs and then do everything else from guix-emacs within Emacs ( M-x guix-search-by-name to search package names by regex; and M-x guix-search-by-regex to search names+descriptions by regex). The results returned by guix package -s .... in a terminal are not very browseable (though I tried valiantly for some time). But if you’re interested in Guix, you’ll likely interested in Emacs anyway.

What I’m trying to build on this machine is something with lots of Lisp. Of course the kernel is still a kernel written in C, as are lots of the other pieces like the terminal &c., but much of the user-facing things: the package manager, the windows manager, the init, the job scheduler (=cron), and (most importantly perhaps) the ‘text editor’ (read: document composer, email interface, irc interface, twitter interface, blog post interface, code editor …) are all largely written in and interacted with using some form of Lisp (Guile Scheme, Common Lisp, Emacs Lisp).

Guix is a bit like Emacs, I think. It’s an incredibly powerful tool with lots of interesting possibilities, but when you start using it you’re presented with an empty screen with little indication of what you can do. I’ll be sticking with it, I think. Now I’ve got to get to grips with StumpWM and figure out how to configure polybar

[And if you’re curious about why Guix is pronounced like “geeks”, have a look at this post over on my linguistics blog.]

* As well as being the package managers of both of their respective distros, both the Nix and Guix package managers can be used on top of other distros. Nix doesn’t have quite the same hard line approach to software licences as Guix.

If you have written a response to this, enter your response post's URL below.

Or, you can send a ‘comment’ webmention (it's OK if you don't know what that means:— just enter your name/email if you so choose, or click through as anonymous, and then write your comment).

Markdown Support**bold**, _italics_, ~~strikethrough~~, [descr](link), `monospace`, ```LANG\nline1\nline2\n``` (Yep, multi-line code blocks too, with syntax highlighting!), auto-hyperlinking.

Comments

(Webmentions #)
Comment by Benjamin Slade on Sun Aug 26, 2018 22:37 UTC
@ambrevar: $ guix package -i recsel guix package: error: recsel: unknown package
Comment by Ambrevar on Sun Aug 26, 2018 08:24 UTC
Regarding recsel: indeed, you need to install it in order to use helm-system-packages. guix package -i recsel and you should be good to go!
Comment by Benjamin Slade on Mon Aug 6, 2018 03:00 UTC

@Ambrevar: Thanks for the links. I wasn’t successful in getting helm-system-packages running - it complained about missing “recsel”? I can imagine eshell would be superior to a regular terminal for dealing with guix package -s, but the emacs-guix mode is really great, so I’m happy to stick with that.

@John Cowan: Thanks for the additional LISP terminology information. Yeah, getting comments set up over at the ling side is on my todo list…..

Comment by John Cowan on Sun Aug 5, 2018 17:15 UTC
Comments are apparently available on on the tech side, not the linguistics side, though this comment really belongs there rather than here. The DEC PDP-10, which was used at MIT in the Elder Days, was a 36-bit machine, so it was natural to represent short strings in a single word, 6 characters to a word and 6 bits to a character (lower case and control characters were excluded). So what was PLANNER in papers was MPLR (Micro-Planner, because it wasn’t a full implementation) on the system, and likewise for CONNIVER, which was I think CONiVR (not sure). Nobody remembers why the implementation of the third language was called SCHEME rather than SCHEMR, but it was, and then it was natural to call the language SCHEME, later Scheme.
Comment by Ambrevar on Sun Aug 5, 2018 11:24 UTC

guix package -s ... is much more usable from Emacs M-x shell or Eshell.

I wrote about it in https://www.reddit.com/r/emacs/comments/6y3q4k/yes_eshell_is_my_main_shell/.

You might also want to check out https://github.com/emacs-helm/helm-system-packages ;)

Regarding webmbrowsers, Luakit was recently packaged for Guix, maybe you’d like to give it a go. But I agree that Next looks much more promising (especially to Lispers :p).