[plt-scheme] Transition from 3.x to 4.x (I'm late, I know...)
Erich Rast wrote:
> [...]
> 1.) I replaced (module name mzscheme ...) with #lang scheme and it seems
> that reverse! is no longer available. Is there a way to require an
> external package with reverse! from srfi 1 in its namespace without
> modifying the source code? Or is it up to the package maintainer to
> require srfi/1?
Hello,
if you want to use reverse! in your code, do a (require srfi/1), or
maybe a more specific (require (only-in srfi/1 reverse!)).
However, since PLT Scheme 4.x uses immutable pairs by default, reverse!
really is an alias for reverse, which is probably the reason why it is
no longer exported by the standard language module.
As modules don't share a global namespace, whatever you require has no
impact on the availability of reverse! in other code you access. If some
external module uses reverse! but doesn't import it, that's not your
fault, but that of the external module's author.
> [...]
> 3.) Does anyone know how to make the FFI find zlib on Leopard? Shouldn't
> it be installed on vanilla OS X 10.5.x anyway?
I think the zlib installed by default on MacOS X is called
/usr/lib/libz.dylib (which is, of course, a symbolic link to a similarly
named file, but with the full version number in its name).
If the module you require insists on looking for a differently named
library, placing another symbolic link with a matching name in
/usr/local/lib or, if absolutely necessary, in /usr/lib can't hurt and
should remedy the problem.
> [...]
> 5.) What's the difference between using #lang scheme followed by
> 'top-level' module source code and the old embedded (module name
> mzscheme ...)?
Using #lang scheme is equivalent to using (module name scheme ...).
Maybe you want #lang mzscheme instead to use the legacy MzScheme language?
cu,
Thomas
--
When C++ is your hammer, every problem looks like your thumb.