|
From: | Felix Winkelmann |
Subject: | Re: [Chicken-users] OpenGL library |
Date: | Mon, 19 May 2003 08:55:20 +0200 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.0) Gecko/20020530 |
John Pallister wrote:
Basically, csi is "just" an interpreter, right? So you can prototype your functions from the REPL (executed as interpreted byte-code of some sort?) and then go away and compile the Scheme & C code and link it into the application, or load the object code (once) from the REPL using LOAD. But after that, if you go back to the REPL, you can presumably enter a redefinition of a function to produce some new interpreted code, but youcan't, say, repeatedly recompile the Scheme->C->machine code and re-load itinto your REPL-running process.
With ELF shared objects it's not possible to reload the same shared library a second time. You can load one with a different name, though. But interpreted and compiled code share the same namespace, so you can (as Chris has described) load compiled code and redefine toplevel bindings repeatedly in the interpreter. You could also load another compiled file (via `load') and have that redefine any toplevel bindings as well.
So, if you want to be developing and running compiled, native code, yourREPL becomes a run-evaluate-print-save-compile-run-load loop, or something.
Yes, basically that's it. But you could compile code to a differently named ".so" file, and repeatedly reload every new instance. That should work. cheers, felix
[Prev in Thread] | Current Thread | [Next in Thread] |