- I use logical pathnames and they make my life easier. Here's how...
- I used logical pathnames and they made my life miserable. Here's
how...
- I never tried logical pathnames. Here's why...
http://xach.livejournal.com/242280.html has some of the responses when I
posed this question on my blog.
A few of the responses there are something like "Oh, I had a terrible
time with logical pathnames!" without details. If you had a terrible
time, I'd love to know specific details about why.
Zach
> How would you describe your relationship with Common Lisp's logical
> pathname facility?
>
> - I use logical pathnames and they make my life easier. Here's how...
They made my life easier by providing a portable interface for letting
me specify the layout of the sources of my system in a way which
depended only minimally on the underlying platform and also stitched
together parts which were not close to each other in the namespace of
the underlying filesystem.
In particular I did not use them as a general interface to the underlying FS.
Yes, that's the key: DO NOT use them as a general interface to the underlying FS.
--
__Pascal Bourguignon__ http://www.informatimago.com/
They were also never intended to be a general interface.
Logical pathnames were mostly invented for dealing with Lisp software
files
on networks of very different machines or delivery of software to
very different networks of machines (one uses a Unix machine as a file
server,
another one has a Lispm file server and yet another one has
a large VAX running VMS as a file server). Using centralized
file servers helped with two things: the software could be
used on different machines and the centralized file server
usually had a working backup system. We are talking
about the 80s. Disk space was expensive, so it was
useful to store the source files once in the network
and not on every node. The early Lisp Machines were
happy in those days if they had enough disk
to store the image and had a useful amount of swap space.
If that was not enough, the image had to be netbooted.
See the discussion of logical pathnames in CLtL2:
http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node213.html#SECTION002715500000000000000
Issue PATHNAME-LOGICAL Writeup for ANSI Common Lisp
http://www.lispworks.com/documentation/HyperSpec/Issues/iss259_w.htm
From the Lisp Machine Manual, 1984
---
The reason for having logical pathnames is to make it easy to keep
bodies of software on more than one file system. An important example
is the body of software that constitutes the Lisp Machine system.
Every site has a copy of all of the sources of the programs that are
loaded into the initial Lisp environment. Some sites may store the
sources on an ITS file system, while others may store them on a
TOPS-20. However, system software (including make-system) wishes to be
able to find a particular file independent of the name of the host a
particular site stores it on, or even the kind of host it is. This is
done by means of the logical host SYS; all pathnames for system files
are actually logical pathnames with host SYS. At each site, SYS is
defined as a logical host, but translations are different at each
site. For example, at MIT the source files are stored on the TOPS-20
system named OZ, so MIT's site file says that SYS should translate to
the host OZ.
---
> From the Lisp Machine Manual, 1984
>
> ---
> The reason for having logical pathnames is to make it easy to keep
> bodies of software on more than one file system. An important example
> is the body of software that constitutes the Lisp Machine system.
> Every site has a copy of all of the sources of the programs that are
> loaded into the initial Lisp environment. Some sites may store the
> sources on an ITS file system, while others may store them on a
> TOPS-20. However, system software (including make-system) wishes to be
> able to find a particular file independent of the name of the host a
> particular site stores it on, or even the kind of host it is. This is
> done by means of the logical host SYS; all pathnames for system files
> are actually logical pathnames with host SYS. At each site, SYS is
> defined as a logical host, but translations are different at each
> site. For example, at MIT the source files are stored on the TOPS-20
> system named OZ, so MIT's site file says that SYS should translate to
> the host OZ.
> ---
Actually it is some kind of early poor mans URN (Uniform Resource
Name)
with a mechanism to resolve the logical host and a mechanism
to transform the logical resource location into a physical one
(via the logical pathname translation rules).
> Actually it is some kind of early poor mans URN (Uniform Resource
> Name)
> with a mechanism to resolve the logical host and a mechanism
> to transform the logical resource location into a physical one
> (via the logical pathname translation rules).
Do you mean "poor man's" in a pejorative sense, and if so, why?
Zach
In a sense that it tries to solve the tiny problem it was thought
for: simplifying naming/finding files in a local heterogenous network
of machines. URNs are much more complicated (note, I'm not talking
about URLs).
A logical pathname is kind of a portable ID for a file, and a
resolving mechanism
to find a real file for that (if possible).
> Yes, that's the key: DO NOT use them as a general interface to the
> underlying FS.
Precisely so: use them for what they were intended for and they will
serve you well.