[plt-scheme] dynamic require
On Jun 5, 2005, at 7:07 AM, Hans Oesterholt-Dijkema wrote:
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> L.S.,
>
> There seems to be a bug in the Windows variant of mzscheme:
>
> Welcome to MzScheme version 299.100, Copyright (c) 2004-2005 PLT
> Scheme, Inc.
> > (dynamic-require
> "devel\\mzscheme\\collects\\oodb\\backend-sqli-sqlite.scm" 'sqld-new)
> > standard-module-name-resolver: expects argument of type <module path
> (relative string form must contain only a-z, A-Z, 0-9, -, _, ., /, and
> space, with no leading or trailing /)>; given
> "devel\\mzscheme\\collects\\oodb\\backend-sqli-sqlite.scm"
>
> doesn't work, where
>
> $ mzscheme
> Welcome to MzScheme version 299.100, Copyright (c) 2004-2005 PLT
> Scheme, Inc.
> > (dynamic-require
> "devel/mzscheme/collects/oodb/backend-sqli-sqlite.scm" 'sqld-new)
> #<procedure:sqld-new>
> > (exit)
>
> does.
From section 5.4 of the MzScheme manual:
• When a module name is a string, unix-relative-path-string, it is
interpreted as a path relative to the source of the containing module
(as determined by current-load-relative-directory or
current-directory). Regardless of the platform running MzScheme, the
path is always parsed as a Unix-format path: / is the path delimiter
(multiple adjacent / are treated as a single delimiter), .. accesses
the parent directory, and . accesses the current directory. To avoid
portability problems, the path elements are further constrained to
contain only alpha-numeric characters plus -, _, ., and space, and the
path may not be empty or contain a leading or trailing slash.
If I understand your complaint correctly, you're expecting module-paths
to have a platform-specific separator character, though in MzScheme
they don't. As I understand it, this platform-insensitivity is key in
making it possible to write cross-platform code.
John
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 3743 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20050605/d40eea46/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2430 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20050605/d40eea46/attachment.p7s>