Subject: [clisp-list] Pathnames...

From: Christophe Rhodes <[email-masked]>
Date: Tue, 29 May 2001 15:39:14 +0100

Dear all,

I think we're getting closer on the common-lisp-controller
front... (see clisp-devel passim); the next complaint I have (sorry)
is with compile-file-pathname (and compile-file).

The Hyperspec says:

 compile-file-pathname input-file &key output-file &allow-other-keys
 => pathname

 If input-file is a logical pathname and output-file is unsupplied,
 the result is a logical pathname.

However, clisp -ansi as of this morning gives:

[23]> (compile-file-pathname #p"cl-library:;metering;metering.lisp")

*** - PARSE-NAMESTRING: argument should be a string, symbol, file
      stream or pathname, not #<UNBOUND>

This seems to be somewhere in sys::search-file, which I confess I
don't understand; however, the call to directory in search-file looks
suspicious, as it's likely to destroy logical pathname information,
though this doesn't seem likely to cause the above error.

I also think that the call 

(merge-pathnames '#".fas" input-file) 

in compile-file-pathname-helper is likely to cause problems; I get

[30]> (merge-pathnames #".fas" #p"cl-library:metering;metering.lisp")
#P"/usr/share/common-lisp/source/metering/metering.fas"

Where the hyperspec for merge-pathnames says:

 merge-pathnames pathname &optional default-pathname default-version

 If pathname does not specify a host, device, directory, name, or
 type, each such component is copied from default-pathname.

and

(pathname-host #p"/usr/share/common-lisp/source/metering/metering.fas")
=> NIL

I think that instead you want something semantically like

(make-pathname :defaults input-file :type "fas")

Except that this currently fails for exactly the same reason as above
(returning a physical rather than a logical pathname)

The point of this is that I believe that logical pathnames support
compiling "foo:bar;baz.lisp" to "foo:bar;baz.fas", where the
translations for "**;*.lisp" and "**;*.fas" point to completely
different physical directories or filesystems.

I apologize for the slightly dense message and that I'm not really
providing solutions; please let me know if there's any clarification I
can provide.

Cheers,

Christophe
-- 
Jesus College, Cambridge, CB5 8BL                           +44 1223 524 842
http://www-jcsu.jesus.cam.ac.uk/~csr21/                  (defun pling-dollar 
(str schar arg) (first (last +))) (make-dispatch-macro-character #\! t)
(set-dispatch-macro-character #\! #\$ #'pling-dollar)

---

From: Sam Steingold <[email-masked]>
Date: 30 May 2001 13:48:19 -0400

> * In message <[email-masked]>
> * On the subject of "[clisp-list] Pathnames..."
> * Sent on Tue, 29 May 2001 15:39:14 +0100
> * Honorable Christophe Rhodes <[email-masked]> writes:
>

if you live on the bleeding edge, you should subscribe to clisp-devel.

>       stream or pathname, not #<UNBOUND>

I do not observe this.  Moreover, #p"cl-library:;metering;metering.lisp"
is not a logical pathname.

(compile-file-pathname (logical-pathname "clocc:clocc.lisp"))
is buggy, and, hopefully, will be fixed shortly.

-- 
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
Never trust a man who can count to 1024 on his fingers.

---

From: Christophe Rhodes <[email-masked]>
Date: Thu, 31 May 2001 09:41:11 +0100

> if you live on the bleeding edge, you should subscribe to clisp-devel.

In that case, please change your moderation message, which quite
clearly told me to send this mail to clisp-list, or else allow
messages through from non-subscribers. I have no particular desire to
receive CVS commit mails, though I do follow them on geocrawler.
 
> I do not observe this.  

In clisp -ansi?

> Moreover, #p"cl-library:;metering;metering.lisp"

It is if -ansi is enabled (I believe correctly):

clisp -ansi
[1]> (setf (logical-pathname-translations "CL-LIBRARY") 
           (list '(";**;*.*.*" "/tmp/clisp/**/*.*")))
((#S(LOGICAL-PATHNAME :HOST "CL-LIBRARY" :DEVICE NIL
     :DIRECTORY (:RELATIVE :WILD-INFERIORS) :NAME :WILD :TYPE :WILD
     :VERSION :WILD)
  "/tmp/clisp/**/*.*"))
[2]> #p"CL-LIBRARY:;foo;bar.lisp"
#S(LOGICAL-PATHNAME :HOST "CL-LIBRARY" :DEVICE NIL :DIRECTORY (:RELATIVE "FOO")
   :NAME "BAR" :TYPE "LISP" :VERSION NIL)

Are you claiming that this should not be the case?

> is buggy, and, hopefully, will be fixed shortly.

Great, thanks.

Cheers,

Christophe

---

From: Sam Steingold <[email-masked]>
Date: 31 May 2001 10:00:04 -0400

> * In message <[email-masked]>
> * On the subject of "Re: [clisp-list] Pathnames..."
> * Sent on Thu, 31 May 2001 09:41:11 +0100

I repeat: if you live on the bleeding edge, you should subscribe to
clisp-devel, and _read_ it, including all the CVS commit messages.
clisp-devel does not allow messages from non-subscribers - it is a
closed mailing list for developers and pretesters (which includes those
using CVS clisp).

> > is buggy, and, hopefully, will be fixed shortly.

done - you knew that already if you read clisp-devel.

-- 
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
I want Tamagochi! -- What for?  Your pet hamster is still alive!