Updating / overwriting what has been loaded by a previous (load "shared_library.so")
I have experimenting a little with loading shared libraries using load as in, for example, (load "text.so")
If a function in the shared library is changed and the shared library is recreated, it seems that the second (load "text.so") does not overwrite the first definition of the function.
Is there a way to update what has been loaded previously by the first (load "text.so")?
Thanks.
Note in general if you reload a shared library while it's in active use (either via another thread or continuation) your application is likely to crash.
That said, it can be very convenient during development.
The second load will redefine the bindings as with define, which is equivalent to set! if the bindings are already defined (e.g. when run in the same environment). However Chibi inlines all primitives, so existing function definitions will be unaffected. The workaround for now is to also re-evaluate the existing function definitions. But there should also be more control of inlining (see https://github.com/ashinn/chibi-scheme/issues/403).