Hello Ludovic, [...]
>> What is the difference between delayed and thunked? Would a thunked >> capture the closure of its environment while delayed not? Is the >> closure useful to access record-bound values such as the version field >> of a package? > > ‘Thunk’ uses an actual thunk (zero-argument procedure) that’s called > each time the field is accessed; ‘delayed’ uses a promise, which is > similar except that the result is memoized (info "(guile) Delayed > Evaluation"). Thanks for the explanation! Now I wonder why delayed should not always be preferable to thunks? Is there a reason to offer thunked as well? [...] > What would be interesting is a comparison of the performance of > ‘package-derivation’, which can be done with something like: > > time guix build -d --no-grafts libreoffice pandoc > > For memory consumption, try: > > GUIX_PROFILING=gc guix build -d --no-grafts libreoffice pandoc Thanks for these "benchmarking" tips :-). Unfortunately, making the 'snippet' field either thunked or delayed causes 'guix build' to stop working entirely, peaking the CPU and slowy eating RAM away (looks like a typical dependency cycle). I'm at a lost as to how this can be debugged. That's unfortunate, because as it stands, Gexp-based snippets don't seem very usable. Thank you, Maxim