On Thu, Dec 08, 2022 at 10:40:49PM -0600, Galaxy Being wrote: > This issue came up in a talk or a Reddit group. Can't remember. So let's > say you have a REPL and you've loaded code into it. Let's say you want to > add code to the running REPL, but you'd like to "deactivate," take out some > of the previously loaded running code.
It depends on what you mean with "deactivate". A 'load'ed code can do anything. It may create (i.e. "intern") new symbols, give them a value or definition, redefine other (already existing) symbols, or may even have side effects like deleting files. You can undo some of these things. New symbols may be 'zap'ped. Redefined symbols can have their original definition reloaded. To just get rid of new symbols, instead of 'zap'ping each of them, you can also put them all in a separate namespace and 'zap' only that. > Can you get a dump and actually see what's running somehow? What is meant by "running"? Currently executing? Then you might stop the running program with Ctrl-C and do a backtrace with (bt). Or just existing symbols? Then you can see them with (all) for the whole current namespace search order or only those from a given namespace with (all 'myNamespace). Does this help? Or can you elaborate a little more? ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe