Re:GNU Shepherd 1.0.0 Released
by skulk on Wednesday January 15, 2025 @09:37AM
(#42711229)
(I know I could just RTFM but since you offered!) Does it do something like NixOS for declaring modules as functions and resolving the configuration as a fixed point of all module function applications (roughly, I don't think I'm describing it well)? This is a beautifully elegant way of defining configuration-with-options using lazy evaluation but it often leads to headaches like infinite recursion. Since Guile is not a lazy language I wonder how it achieves this.
[ Parent
| on HN ]
I don’t know how Guile does this, but note that finding a fixed point does not generally require a lazy language; you just can’t do it naively — you can still take a bunch of functions that act on a config and ‘while (changing) keep applying’ — equivalently, the Y combinator can’t be evaluated strictly to get your fixed points, but the Z combinator can.
In all honesty, I don't know what that means, but the way Guix does configuration is with the Lisp equivalent of a builder pattern, which ends up looking quite like a key-value store.
(foo-configuration (bar-property baz-value) ...)