IRC channel logs
2023-08-03.log
back to list of logs
<janneke>is it still possible with 3.0 to override a procedure in a library module (without editing the library module and adding #:declarative #f)? <janneke>this only seems to work for modules that have #:declarative? #f: <janneke>(module-define! (resolve-module '(some library module)) 'procedure local-override) <ArneBab>janneke: I’m not sure — it’s something I’m missing dearly, because it’s super useful in the REPL. <janneke>hmm, that sounds like: no, or use guile-2? <ArneBab>I’m not sure whether there’s a commandline option. <ArneBab>wingo: can we disable declarative modules without editing source files? <dthompson>the geiser-eval-buffer trick works because the evaluation doesn't do the optimizations that inlined/etc. things, so from there you *can* modify the top-level and things work as expected, generally. <dthompson>automatically monkey patching modules at runtime isn't feasible, though, for better or worse. <janneke>dthompson: okay thanks, maybe that's a feature... <janneke>you can probably do all kinds of ugly things, like filling your own new module using (define thing (@@ (some library module) thing)) and go from there... <dthompson>having the fancy compiler is a double edged sword. more efficient bytecode, more difficult to modify at runtime. <ArneBab>You can do cool things at the REPL like ,m (chickadee something) and then debug procedures by replacing them until you get the bug ironed out. <dthompson>sure, I do that all the time, but there are some pitfalls to be aware of. <ArneBab>Requiring #:declarative? #f for that was extremely suprising to me — took me hours to find that and making something compatible to both 2.x and 3.0 is pretty hard <ArneBab>But I guess that would need a topological sort of procedure-dependencies to know all the procs that need to be recompiled after a change. <janneke>yeah, it would be nice (TM) if (module-define! would throw if it has no effect <ArneBab>That would also already help a lot, yes. Ideally with an error message that says how to work around that by temporarily giving up some efficiency. <bjoli>tekakutl`: is that an aztek name? My son just got a book about mythologies around the world, and he forces me to read the aztek part at least once a day. Trying to pronounce the names of the gods makes me feel like I have had a stroke after about halv a page.