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

From: Noel Welsh (noelwelsh at yahoo.com)
Date: Wed Apr 20 09:35:32 EDT 2005

--- Keith Frost <keithf at amnis.com> wrote:
> 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?

I don't know if 299 has changed how things work, but I
asked the same question in the 20x days and IIRC the answer
was it isn't supported as not all platforms provide a way
to unload libraries.

At least in my case there was a shortcut to tediously
stopping and starting DrScheme: running the program after
I'd changed the shared library would crash DrScheme,
meaning I only had to start DrScheme, not stop it. ;-)

Using the FFI it should be possible to do something more
dynamic.  If you take a u32 vector (SRFI-4) and tell that
FFI it is actually a function pointer the FFI will happily
execute it.  I haven't worked out the details of the
casting yet, but I'm told it can be done.  You could. for
example, compile your code and read it into a u32 vector,
and then get the FFI to run it.  This way you avoid the
unloading problem.  There might be some issues with the
format of shared objects; you could get around this by
using appropriate compiler switches or generating your own


Email: noelwelsh <at> yahoo <dot> com
AIM: noelhwelsh

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

Posted on the users mailing list.