chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Noob question: (re)compile FFI-accessing code within


From: felix winkelmann
Subject: Re: [Chicken-users] Noob question: (re)compile FFI-accessing code within REPL
Date: Mon, 2 Jul 2007 05:55:36 +0200

On 6/28/07, Martin Percossi <address@hidden> wrote:

The question is: am I obliged to recompile outside of the REPL loop? In
other words, is there a `compile' command which lets me recompile
test.scm from within the REPL? This would allow me to do more
incremental development -- and would make me less likely to separate FFI
calling code from other code (whether or not that's a good idea is
another question ;)

You can recompile in the repl, as it's just a shell command away:

#;> ,s csc -s test.scm -o test2.so
#;> ,l test2

There is a small caveat, though: dlopen'd shared libraries are not automatically
unloaded, so you will add more and more code to the system (since Scheme
gets compiled to C, and C code is not garbage collected). This isn't a serious
problem, but should be kept in mind for long running sessions.
On some systems, undloading is actually supported, but somewhat
experimental.


cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]