On May 14, 2009, at 2:24 AM, Eduardo Cavazos wrote:
Hello,
Many Scheme implementations offer a way to specify a list of
locations to search for libraries. I think the rule for resolving a
library to its source should be configurable on a per location
basis. So for example you might tell the system that you have
libraries in some directories:
(set-library-locations "/usr/local/scheme-libraries"
"/home/chupacabra/scheme-libraries")
In this case, the implementation would use the default resolver
that maps as follows:
(a b c) => "a/b/c.sls"
Ikarus has a library-path parameter that can be used to set the path
at run time. There is also the IKARUS_LIBRARY_PATH environment
variable that serves the same purpose at startup time.
I prefer resolvers that work like this:
(a b c) => "a/b/c/c.sls"
And the R6RS authors think you might want to access the source from
a database!
It's possible. The file system is not the only possible location for
libraries.
So it would be nice if you could specify the resolver:
(set-library-locations
(standard-resolver "/usr/local/scheme-libraries")
(my-resolver "/home/chupacabra/scheme-libraries"
(database-resolver "/home/chupacabra/database"))
You could do stuff like this:
(http-resolver "http://crop-circles.info/libraries")
and the implementation would treat the remote list of files as a
source of libraries, downloading them as necessary.
I'd give you that if you write a good and robust http library
first. :-)
Aziz,,,