[plt-scheme] Re: Experience Using Mz(Dr)Scheme for Numerical Work

From: Keith Frost (keithf at amnis.com)
Date: Tue Apr 19 15:04:26 EDT 2005

I wanted to second Noel Welsh's suggestion about implementing a Domain 
Specific Language
which compiles to efficient C/assembler, as this is how I have addressed 
this particular issue
(how to get good numerical performance, while retaining the flexibility 
of using a dynamic
language like scheme for prototyping).

Noel pointed out that with the FFI one can compile and load code on the 
fly, so that even
compiling/linking the dynamic library can be automated. 

This raised the following question for me.  I have always used the 
(require "mylib.ss") syntax,
counting on the fact that it will load the compiled module from
"compiled/native/{platform-name}/mylib.{so/dll}", if it exists.  But if 
I change the code and
re-compile the library, it will not get unloaded and reloaded when the 
require is executed again,
in the DrScheme interface.  The only way I have found to load the newly 
compiled library is to
quit DrScheme and start it again.  This goes against the grain of how 
DrScheme is supposed to
work, so I wanted to ask, is this issue addressed in 299?  That is, is 
there now an easy way to unload
and reload native-compiled modules, preferably automatically, if they 
change?  If not, please
consider this a feature request.  (Under Windows, of course, the library 
would have to be unloaded
before its file would be allowed to change, but one could provide a hook 
to program the unloading
of a native module library, I hope...)

-- Keith Frost.

Posted on the users mailing list.