This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
I think that part of the problem is that guile has a "fixed" notion of path serching. When you call upon %search-path, all searching are performed through low-level C functions which you cannot control. This was a problem for me working with an embedded system where the filesystem just isn´t up to the usual UNIX standards. I have thus devised a path that allows the guts of the search mechanism to be replaced. With this path, all searching are channeled through one function, `search-path´, which you may redefine. By redefining load to accept both a string or a port, I could easily implement something that will accept tar files in the load path and load files out of these as well as if the files in question had been found directly. The patch was sent to bug-guile, but there was never any feedback. I can dig it up if anybody wants to see it. In fact I have been dreaming about reorganizing guile such that we had a core which had no concept of files or I/O or anything. There would only be a generic notion of ports, such that load would accept ports and work directly with that without caring about how it had come to be. Creation of ports would then be the domain of additional libraries, such as a posix library or a stdio library that would provide functions such as `open-input-file´. Compability with RnRS would be provided by translation functions. If `load´ was given anything other than a port, it would call a specific function, lets call it `pathname->port´, that would do the translation. The posix library would then provide a hook for pathname->port that would know how to convert a string to a port by opening the file designated by the string. ---------------------------+-------------------------------------------------- Christian Lynbech | Telebit Communications A/S Fax: +45 8628 8186 | Fabrik 11, DK-8260 Viby J Phone: +45 8628 8177 + 28 | email: chl@tbit.dk --- URL: http://www.telebit.dk ---------------------------+-------------------------------------------------- Hit the philistines three times over the head with the Elisp reference manual. - petonic@hal.com (Michael A. Petonic)