Subject: [clisp-list] discrepancy between clisp and #!/bin/clisp

From: Pascal Bourguignon <[email-masked]>
Date: Wed Aug 13 21:08:32 2003

Hello,

I've got  this problem with clisp-2.30:  a file loaded  thru a logical
pathname  translation is visible  and correctly  loaded by  clisp when
invoked  from the command  line, but  not when  invoked from  a script
starting with #!/.../clisp.

(directory  "DEFSYSTEM:*.*") gives NIL  from #!  script and  gives the
list of files from command-line clisp.

[pascal@thalassa pascal]$ clisp
;; Loading file /home/pascal/.clisprc.lisp ...
tr=
((#S(LOGICAL-PATHNAME :HOST "DEFSYSTEM" :DEVICE NIL
     :DIRECTORY (:ABSOLUTE :WILD-INFERIORS) :NAME :WILD :TYPE NIL :VERSION NIL)
  "/local/share/lisp/clocc/clocc/src/defsystem-3.x/**/*")
 (#S(LOGICAL-PATHNAME :HOST "DEFSYSTEM" :DEVICE NIL
     :DIRECTORY (:ABSOLUTE :WILD-INFERIORS) :NAME :WILD :TYPE NIL :VERSION NIL)
  "/local/share/lisp/clocc/clocc/src/defsystem-3.x/**/*.*")
 (#S(LOGICAL-PATHNAME :HOST "DEFSYSTEM" :DEVICE NIL
     :DIRECTORY (:ABSOLUTE :WILD-INFERIORS) :NAME :WILD :TYPE NIL :VERSION NIL)
  "/local/share/lisp/clocc/clocc/src/defsystem-3.x/**/*.*.*"))
;;  Loading file 
#S(LOGICAL-PATHNAME :HOST DEFSYSTEM :DEVICE NIL :DIRECTORY (ABSOLUTE)
   :NAME DEFSYSTEM :TYPE LISP :VERSION NIL) ...
;;  Loaded file 
#S(LOGICAL-PATHNAME :HOST DEFSYSTEM :DEVICE NIL :DIRECTORY (ABSOLUTE)
   :NAME DEFSYSTEM :TYPE LISP :VERSION NIL)
;; Loaded file /home/pascal/.clisprc.lisp
[1]> 
[pascal@thalassa pascal]$ ./essai
tr=
((#S(LOGICAL-PATHNAME :HOST "DEFSYSTEM" :DEVICE NIL
     :DIRECTORY (:ABSOLUTE :WILD-INFERIORS) :NAME :WILD :TYPE NIL :VERSION NIL)
  "/local/share/lisp/clocc/clocc/src/defsystem-3.x/**/*")
 (#S(LOGICAL-PATHNAME :HOST "DEFSYSTEM" :DEVICE NIL
     :DIRECTORY (:ABSOLUTE :WILD-INFERIORS) :NAME :WILD :TYPE NIL :VERSION NIL)
  "/local/share/lisp/clocc/clocc/src/defsystem-3.x/**/*.*")
 (#S(LOGICAL-PATHNAME :HOST "DEFSYSTEM" :DEVICE NIL
     :DIRECTORY (:ABSOLUTE :WILD-INFERIORS) :NAME :WILD :TYPE NIL :VERSION NIL)
  "/local/share/lisp/clocc/clocc/src/defsystem-3.x/**/*.*.*"))

*** - A file with name DEFSYSTEM:DEFSYSTEM.LISP does not exist
[pascal@thalassa pascal]$ ./essai-c
tr=
((#S(LOGICAL-PATHNAME :HOST "DEFSYSTEM" :DEVICE NIL
     :DIRECTORY (:ABSOLUTE :WILD-INFERIORS) :NAME :WILD :TYPE NIL :VERSION NIL)
  "/local/share/lisp/clocc/clocc/src/defsystem-3.x/**/*")
 (#S(LOGICAL-PATHNAME :HOST "DEFSYSTEM" :DEVICE NIL
     :DIRECTORY (:ABSOLUTE :WILD-INFERIORS) :NAME :WILD :TYPE NIL :VERSION NIL)
  "/local/share/lisp/clocc/clocc/src/defsystem-3.x/**/*.*")
 (#S(LOGICAL-PATHNAME :HOST "DEFSYSTEM" :DEVICE NIL
     :DIRECTORY (:ABSOLUTE :WILD-INFERIORS) :NAME :WILD :TYPE NIL :VERSION NIL)
  "/local/share/lisp/clocc/clocc/src/defsystem-3.x/**/*.*.*"))

*** - A file with name DEFSYSTEM:DEFSYSTEM.LISP does not exist
[pascal@thalassa pascal]$ cat essai
#!/usr/local/bin/clisp -q -K full 
;; -*- mode: Lisp -*-
(load "~/.clisprc.lisp")
(format t "~&running essai~%")
(ext:quit)

;;;; essai                            -- 2003-08-14 04:57:21 -- pascal   ;;;;
[pascal@thalassa pascal]$ cat essai-c
#!/usr/local/bin/clisp -q -K full -C
;; -*- mode: Lisp -*-
(load "~/.clisprc.lisp")
(format t "~&running essai~%")
(ext:quit)

;;;; essai-c                          -- 2003-08-14 04:57:09 -- pascal   ;;;;
[pascal@thalassa pascal]$ cat .clisprc.lisp

;; ------------------------------------------------------------------------
;; clocc defsystem --
;; ------------------
;; We must go thru a translation because
;; defsystem-3.x is not a valid logical name!
(SETF (LOGICAL-PATHNAME-TRANSLATIONS "DEFSYSTEM")
      '(( "**;*"  "/local/share/lisp/clocc/clocc/src/defsystem-3.x/**/*")
        ( "**;*"  "/local/share/lisp/clocc/clocc/src/defsystem-3.x/**/*.*")
        ( "**;*"  "/local/share/lisp/clocc/clocc/src/defsystem-3.x/**/*.*.*")))

(format t "~&tr=~S~%" (logical-pathname-translations "DEFSYSTEM"))

(LOAD "DEFSYSTEM:DEFSYSTEM.LISP")

;; ----------------------------------------------------------------------

;;;; .clisprc.lisp                    -- 2003-08-14 04:58:52 -- pascal   ;;;;
[pascal@thalassa pascal]$ 

-- 
__Pascal_Bourguignon__                   http://www.informatimago.com/
----------------------------------------------------------------------
Do not adjust your mind, there is a fault in reality.

---

From: Sam Steingold <[email-masked]>
Date: Thu Aug 14 07:08:10 2003

> * In message <[email-masked]>
> * On the subject of "discrepancy between clisp and #!/bin/clisp"
> * Sent on Thu, 14 Aug 2003 05:06:09 +0200 (CEST)
> * Honorable Pascal Bourguignon <[email-masked]> writes:
>

maybe you are getting different images?
(one is -ansi and the other -traditional)

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
Why use Windows, when there are Doors?

---

From: Pascal Bourguignon <[email-masked]>
Date: Thu Aug 14 10:31:02 2003

> (one is -ansi and the other -traditional)

Right, I forgot that my command-line "clisp" was an alias with -ansi.
Adding -ansi to my #! script makes it work.

Thank you.