| From: Brian Mastenbrook <[email protected]> | Date: Thu, 10 Sep 2009 20:12:55 -0500 | | On Sep 10, 2009, at 6:31 PM, Aubrey Jaffer wrote: | | > SLIB solved these problems years ago. The notion of file location is | > abstrcted into "vicinities", of which SRFI-59 specifies five: | > | > program-vicinity | > library-vicinity | > implementation-vicinity | > user-vicinity | > home-vicinity | > | > The procedure SUB-VICINITY can access sub-directories. | > | > SRFI-59 says: | > Vicinities need not be tied to individual files in a file system. | > The files named could be members of a zip archive, as Java does. | > Vicinities can even be used on flat file systems (which have no | > directory structure) by having the vicinity express constraints on | > the file name. On most systems a vicinity is a string. | | As a general concept, this appears to be a renaming of "directory". | There are plenty of systems which allow "directories" to be | accessed which are the members of a zip archive, remote network | shares, and other virtual resources. Is there something I'm | missing?
Yes. These values of these vicinities are typically set from generic environment variables (HOME, SCHEME_LIBRARY_PATH, CHEZ_IMPLEMENTATION_PATH, ...) so that Scheme programs can run on radically different platforms without modification. | As a specific instantiation, I have a significant problem with the | specification of `program-vicinity'. How can an ordinary procedure | like `program-vicinity' return information about where its call was | located? In R4RS and R5RS implementations, SLIB redefines LOAD to bind *LOAD-PATHNAME* to the filename LOAD was called with during the dynamic extent of the load. | This needs to be syntax in order to work properly, or the call | needs to be on the right-hand side of a let-syntax. (This is why | you see things like (LOAD-TIME-VALUE *LOAD-TRUENAME*) or | #.*COMPILE- FILE-PATHNAME* in Common Lisp.) The arrangement described above works fine in R4RS and R5RS implementations. I don't know if such functionality is possible in R6RS. _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
