← Back to context

Comment by sidkshatriya

3 hours ago

The nix language is maximally lazy. It does not evaluate things it does not need to. This is good because you don't want it to burn CPU building things (very expensive expressions!!) that it will ultimately not need for final derivation. I'm wondering if guix scheme is suited well for this task:

(a) evaluation is eager

(b) lots of variable mutation.

But perhaps lazy evaluation and lack of variable mutation in guix scheme is not such a problem after all for a nix _like_ system -- I don't know.

I'm still new to both Guile and Guix, but I've been reading the Guile and Guix reference manuals recently and I think some of your concerns about eager vs. lazy evaluation of packages are addressed by Guile's quoting mechanism, more specifically "quasiquote" [1]. This quoting mechanism allows passing around references to package definitions and whatnot, without actually evaluating those expressions until build time. Guix extends quasiquote to create something called "G-expressions" [2], which are even more so fitted to something like the Guix/Nix build system.

1. https://www.gnu.org/software/guile/manual/html_node/Expressi...

2. https://guix.gnu.org/manual/1.5.0/en/guix.html#G_002dExpress...

Im very familiar with Nix or the language, but why would interpreting guile scheme for package management be expensive? What are guix and nix doing that would require evaluating everything lazily for good enough performance?