IRC channel logs

2025-03-16.log

back to list of logs

<ArneBab>old: how can I lazily resolve the module tree?
<mwette>ArneBab: does #:autoload (in define-module) help?
<old>either autoload or don't use use-modules for your entrypoint but resolve-module
<old>ArneBab: Have a look at how guix does in the sourcetree bin/guix.in
<old>It's a thin wrapper that add some load paths before it load anything else.
<old>you might also want to pass `-q' to avoid loader your init file
<old>and then manually load it after setting the parameter
<old>example (not tested): https://paste.sr.ht/~old/31239913aeeaac6e13ee09fc792912de1d6538f0
<old>I think that if you start your game REPL loop in (@ (my entrypoint) entrypoint), all loaded modules won't be declarative
<old>this won't change anything for inlinable procedure tho I think
<old>sneek: later ask wingo what's missing in this list https://wingolog.org/archives/2016/02/04/guile-compiler-tasks
<sneek>Will do.
<dsmith>old, A nice list. 9 years old.
<old>yes, but IIRC, some of these were implemented
<old>this Guile compost things is really interesting https://www.wingolog.org/archives/2014/02/18/compost-a-leaf-function-compiler-for-guile
<old>I can see it be used for defining systems in a ECS game engine
<old>Define a system once in Guile, get it compiled down to CPU with SIMD acceleration and possibily to the GPU. Dispatch to either version depending on the quantity of data to crunch
<ArneBab>mwette, old: #:autoload ... and user-modules-declarative? looks like what I need. The section about declarative modules suggests (eval-when (expand) (user-modules-declarative? #f))
<ArneBab>I additionally wrapped the parameter into (false-if-exception ...) to keep it working in 2.0
<ArneBab>(where the parameter is missing)