Subject: [clisp-list] 2.27?

From: Stig E Sandoe <[email-masked]>
Date: Thu, 12 Jul 2001 02:34:20 +0200

hi,

noting that many nice updates have been made in CVS lately over the
2.26.1 release.  Any plans for a 2.27 release to keep the good pace in 
releases this spring?

A slightly unrelated question though, how easy would it be to add support 
for clisp reading a system-wide config-file (e.g /etc/clisprc) on startup 
(like ~/.clisprc is read)?  I have currently used a nasty hack to make 
this work on Debian, but such functionality can be useful for others as 
well I presume. 

-- 
------------------------------------------------------------------
Stig Erik Sandoe     [email-masked]    http://www.ii.uib.no/~stig/

---

From: Sam Steingold <[email-masked]>
Date: 12 Jul 2001 10:20:31 -0400

> * In message <[email-masked]>
> * On the subject of "[clisp-list] 2.27?"
> * Sent on Thu, 12 Jul 2001 02:34:20 +0200
> * Honorable Stig E Sandoe <[email-masked]> writes:
>

yes - wonna help?
There are lots of things you could do.

> A slightly unrelated question though, how easy would it be to add
> support for clisp reading a system-wide config-file (e.g /etc/clisprc)
> on startup (like ~/.clisprc is read)?  I have currently used a nasty
> hack to make this work on Debian, but such functionality can be useful
> for others as well I presume.

Use saveinitmem instead.  The reason for /etc/profile and /etc/cshrc is
that they do not have this capability.

Put whatever you like into /etc/clisprc, then do
# clisp -i /etc/clisprc -x '(saveinitmem)'
# mv lispinit.mem /usr/local/lib/clisp/base/
# clisp -K full -i /etc/clisprc -x '(saveinitmem)'
# mv lispinit.mem /usr/local/lib/clisp/full/

Better yet, put whatever you like into config.lisp before doing make.

Implementing your proposal would require adding --no-site-init command
line option (or making -norc ignore /etc/clisprc too), it would also
require --site-init configure option.
BTW, where it /etc/clisprc on win32? atari? acorn?

I am not saying that this will not or cannot be done, but this is less
trivial and not as necessary as you appear to assume.

-- 
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/>
My other CAR is a CDR.

---

From: Stig E Sandoe <[email-masked]>
Date: Thu, 12 Jul 2001 18:42:52 +0200

Quoting Sam Steingold ([email-masked]):
| > * In message <[email-masked]>
| > * On the subject of "[clisp-list] 2.27?"
| > * Sent on Thu, 12 Jul 2001 02:34:20 +0200
| > * Honorable Stig E Sandoe <[email-masked]> writes:
| >
| > noting that many nice updates have been made in CVS lately over the
| > 2.26.1 release.  Any plans for a 2.27 release to keep the good pace in
| > releases this spring?
| 
| yes - wonna help?
| There are lots of things you could do.

what is needed?
 
| > A slightly unrelated question though, how easy would it be to add
| > support for clisp reading a system-wide config-file (e.g /etc/clisprc)
| > on startup (like ~/.clisprc is read)?  I have currently used a nasty
| > hack to make this work on Debian, but such functionality can be useful
| > for others as well I presume.
| 
| Use saveinitmem instead.  The reason for /etc/profile and /etc/cshrc is
| that they do not have this capability.
| 
| Put whatever you like into /etc/clisprc, then do
| # clisp -i /etc/clisprc -x '(saveinitmem)'
| # mv lispinit.mem /usr/local/lib/clisp/base/
| # clisp -K full -i /etc/clisprc -x '(saveinitmem)'
| # mv lispinit.mem /usr/local/lib/clisp/full/

I tried this, but it didn't save all state properly, but you might have 
fixed that when you updated the ANSI-behaviour when saving state. 
 
| Better yet, put whatever you like into config.lisp before doing make.

The /etc/clisprc should be updatable and usable imho without recompiling 
everything. 
 
| Implementing your proposal would require adding --no-site-init command
| line option (or making -norc ignore /etc/clisprc too), it would also
| require --site-init configure option.
| BTW, where it /etc/clisprc on win32? atari? acorn?

On win32 it is eithe c:\etc\clisprc or c:\windows\clisprc
On atari or acorn I don't know. 
 
| I am not saying that this will not or cannot be done, but this is less
| trivial and not as necessary as you appear to assume.

I think it will be useful for installations on multi-user systems.

The current hack does this to make this possible now:
-x "(progn (ext:saveinitmem \"/usr/lib/clisp/base/lispinit.mem\" :quiet nil
 :init-function #'(lambda () (load \"/etc/clisprc\"))) (quit))"

Which is just a hack.

---

From: Sam Steingold <[email-masked]>
Date: 12 Jul 2001 16:16:14 -0400

> * In message <[email-masked]>
> * On the subject of "Re: [clisp-list] 2.27?"
> * Sent on Thu, 12 Jul 2001 18:42:52 +0200

1. get the current CVS CLISP and thoroughly test it.

2. try to reproduce the "help is not working" bug reported recently and
   try to track it down.

3. http://sourceforge.net/tracker/index.php?func=detail&aid=429129&group_id=1355&atid=101355

> fixed that when you updated the ANSI-behaviour when saving state. 

this should be fixed in the CVS

> The /etc/clisprc should be updatable and usable imho without
> recompiling everything.

just dump an image.

> On win32 it is eithe c:\etc\clisprc or c:\windows\clisprc

yuck! I don't have either!

> On atari or acorn I don't know. 

so, where should we look on those platforms?

it this (dubious) feature will be implemented, we will probably be
loading a file in the lib-directory
(see http://clisp.cons.org/clisp.html#opt-libdir) 

>  :init-function #'(lambda () (load \"/etc/clisprc\"))) (quit))"

looks fine to me, although I would recommend

clisp -x '(saveinitmem "foo" :init-function (lambda () (load "/etc/clisprc" :if-does-not-exist nil)))'

-- 
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/>
Daddy, why doesn't this magnet pick up this floppy disk?

---

From: Stig E Sandoe <[email-masked]>
Date: Thu, 19 Jul 2001 15:05:43 +0200

Quoting Sam Steingold ([email-masked]):
| > * In message <[email-masked]>
| > * On the subject of "Re: [clisp-list] 2.27?"
| > * Sent on Thu, 12 Jul 2001 18:42:52 +0200
| > * Honorable Stig E Sandoe <[email-masked]> writes:
| >
| > | yes - wonna help?
| > | There are lots of things you could do.
| > what is needed?
| 
| 1. get the current CVS CLISP and thoroughly test it.

I've been delayed by a report that had to be written.  Something did however
change from the CVS I used to the released 2.27 that I don't think is
100% right.

(All examples are initiated by 
  (setf (logical-pathname-translations "CL-LIBRARY") nil) )

2.26-cvs:
[2]> (make-pathname :defaults (make-pathname :directory '(:relative :wild-inferiors) 
:type "C" :case :common) :host "CL-LIBRARY" :case :common)
#S(LOGICAL-PATHNAME :HOST "CL-LIBRARY" :DEVICE NIL
   :DIRECTORY (:ABSOLUTE :WILD-INFERIORS) :NAME NIL :TYPE "C" :VERSION NIL)
[3]> (make-pathname :defaults (make-pathname :directory '(:relative :wild-inferiors) 
:type "c" :case :common) :host "CL-LIBRARY" :case :common)
#S(LOGICAL-PATHNAME :HOST "CL-LIBRARY" :DEVICE NIL
   :DIRECTORY (:ABSOLUTE :WILD-INFERIORS) :NAME NIL :TYPE "C" :VERSION NIL)

[the directory in this example is obviously wrong, but that was fixed, the TYPE is 
 the baffling part.]

2.27:
[2]> (make-pathname :defaults (make-pathname :directory '(:relative :wild-inferiors) 
:type "C" :case :common) :host "CL-LIBRARY" :case :common)
#S(LOGICAL-PATHNAME :HOST "CL-LIBRARY" :DEVICE NIL
   :DIRECTORY (:RELATIVE :WILD-INFERIORS) :NAME NIL :TYPE "c" :VERSION NIL)
[3]> (make-pathname :defaults (make-pathname :directory '(:relative :wild-inferiors) 
:type "c" :case :common) :host "CL-LIBRARY" :case :common)
#S(LOGICAL-PATHNAME :HOST "CL-LIBRARY" :DEVICE NIL
   :DIRECTORY (:RELATIVE :WILD-INFERIORS) :NAME NIL :TYPE "C" :VERSION NIL)

[Directory is apparently fixed, but it seems as if TYPE changes case.]

To compare with two other implementations:

ACL6:
CL-USER(2): (describe (make-pathname :defaults (make-pathname :directory '(:relative 
:wild-inferiors) :type "c" :case :common) :host "CL-LIBRARY" :case :common))
#p"CL-LIBRARY:;**;.c" is a structure of type LOGICAL-PATHNAME.  It has
these slots:
 HOST               "CL-LIBRARY"
 DEVICE             NIL
 DIRECTORY          (:RELATIVE :WILD-INFERIORS)
 NAME               NIL
 TYPE               "c"
 VERSION            NIL
 NAMESTRING         NIL
 HASH               NIL
 DIR-NAMESTRING     "**/"
CL-USER(3): (describe (make-pathname :defaults (make-pathname :directory '(:relative 
:wild-inferiors) :type "C" :case :common) :host "CL-LIBRARY" :case :common))
#p"CL-LIBRARY:;**;.C" is a structure of type LOGICAL-PATHNAME.  It has
these slots:
 HOST               "CL-LIBRARY"
 DEVICE             NIL
 DIRECTORY          (:RELATIVE :WILD-INFERIORS)
 NAME               NIL
 TYPE               "C"
 VERSION            NIL
 NAMESTRING         NIL
 HASH               NIL
 DIR-NAMESTRING     "**/"

CMUCL:
USER> (describe (make-pathname :defaults (make-pathname :directory '(:relative 
:wild-inferiors) :type "c" :case
 :common) :host "CL-LIBRARY" :case :common))

#<Unprintable pathname, Host=#<COMMON-LISP::LOGICAL-HOST>,  Directory=(:RELATIVE
                                                                       
:WILD-INFERIORS), File=NIL, Name="c", Version=NIL> is a structure of type 
LOGICAL-PATHNAME.
HOST: #<COMMON-LISP::LOGICAL-HOST>.
DEVICE: :UNSPECIFIC.
DIRECTORY: (:RELATIVE :WILD-INFERIORS).
NAME: NIL.
TYPE: "c".
VERSION: NIL.
USER> (describe (make-pathname :defaults (make-pathname :directory '(:relative 
:wild-inferiors) :type "C" :case
 :common) :host "CL-LIBRARY" :case :common))

#<Unprintable pathname, Host=#<COMMON-LISP::LOGICAL-HOST>,  Directory=(:RELATIVE
                                                                       
:WILD-INFERIORS), File=NIL, Name="C", Ve
rsion=NIL> is a structure of type LOGICAL-PATHNAME.
HOST: #<COMMON-LISP::LOGICAL-HOST>.
DEVICE: :UNSPECIFIC.
DIRECTORY: (:RELATIVE :WILD-INFERIORS).
NAME: NIL.
TYPE: "C".
VERSION: NIL.

[So apparently type-case is kept.. ]

Any ideas on this change?

---

From: Sam Steingold <[email-masked]>
Date: 19 Jul 2001 16:10:42 -0400

> * In message <[email-masked]>
> * Sent on Thu, 19 Jul 2001 15:05:43 +0200

I cannot reproduce this either on Solaris or on  NT.
both produce the correct case.

-- 
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/>
Failure is not an option. It comes bundled with your Microsoft product.

---

From: Stig E Sandoe <[email-masked]>
Date: Thu, 19 Jul 2001 22:22:34 +0200

Quoting Sam Steingold ([email-masked]):
| > * In message <[email-masked]>
| > * On the subject of "Re: [clisp-list] 2.27?"
| > * Sent on Thu, 19 Jul 2001 15:05:43 +0200
| > * Honorable Stig E Sandoe <[email-masked]> writes:
| >
| > (All examples are initiated by 
| >   (setf (logical-pathname-translations "CL-LIBRARY") nil) )
| > 
| > 2.27:
| > [2]> (make-pathname :defaults (make-pathname :directory '(:relative :wild-inferiors) 
| > :type "C" :case :common) :host "CL-LIBRARY" :case :common)
| > #S(LOGICAL-PATHNAME :HOST "CL-LIBRARY" :DEVICE NIL
| >    :DIRECTORY (:RELATIVE :WILD-INFERIORS) :NAME NIL :TYPE "c" :VERSION NIL)
| > [3]> (make-pathname :defaults (make-pathname :directory '(:relative :wild-inferiors) 
| > :type "c" :case :common) :host "CL-LIBRARY" :case :common)
| > #S(LOGICAL-PATHNAME :HOST "CL-LIBRARY" :DEVICE NIL
| >    :DIRECTORY (:RELATIVE :WILD-INFERIORS) :NAME NIL :TYPE "C" :VERSION NIL)
| 
| I cannot reproduce this either on Solaris or on  NT.
| both produce the correct case.

The above behaviour is produced with a straight compile on Debian
Linux with the image directly from the compile using ANSI-mode.  The
above behaviour is a show-stopper for using CLISP 2.27 with
the packages in cCLan.  Do you have a Linux-box to be able to
reproduce this or any hints to track down the bug?

---

From: Sam Steingold <[email-masked]>
Date: 19 Jul 2001 17:48:23 -0400

> * In message <[email-masked]>
> * Sent on Thu, 19 Jul 2001 22:22:34 +0200
> above behaviour is a show-stopper for using CLISP 2.27 with the
> packages in cCLan.  Do you have a Linux-box to be able to reproduce
> this or any hints to track down the bug?

I confirm this both on FreeBSD 3.3-RELEASE i386
and Linux 2.2.19 i686.
I wonder...
(ANSI mode, of course, has nothing to do with this).

I see no reason to use :case :common here, BTW.
I bet it is the cause of the problem!

-- 
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/>
All generalizations are wrong.  Including this.

---

From: Stig E Sandoe <[email-masked]>
Date: Fri, 20 Jul 2001 00:35:13 +0200

Quoting Sam Steingold ([email-masked]):
| > * In message <[email-masked]>
| > * On the subject of "Re: [clisp-list] 2.27?"
| > * Sent on Thu, 19 Jul 2001 22:22:34 +0200
| > * Honorable Stig E Sandoe <[email-masked]> writes:
| >
| > | > (All examples are initiated by 
| > | >   (setf (logical-pathname-translations "CL-LIBRARY") nil) )
| > | > 
| > | > 2.27:
| > | > [2]> (make-pathname :defaults (make-pathname :directory '(:relative :wild-inferiors) 
| > | > :type "C" :case :common) :host "CL-LIBRARY" :case :common)
| > | > #S(LOGICAL-PATHNAME :HOST "CL-LIBRARY" :DEVICE NIL
| > | >    :DIRECTORY (:RELATIVE :WILD-INFERIORS) :NAME NIL :TYPE "c" :VERSION NIL)
| > | > [3]> (make-pathname :defaults (make-pathname :directory '(:relative :wild-inferiors) 
| > | > :type "c" :case :common) :host "CL-LIBRARY" :case :common)
| > | > #S(LOGICAL-PATHNAME :HOST "CL-LIBRARY" :DEVICE NIL
| > | >    :DIRECTORY (:RELATIVE :WILD-INFERIORS) :NAME NIL :TYPE "C" :VERSION NIL)
| > | 
| > | I cannot reproduce this either on Solaris or on  NT.
| > | both produce the correct case.
| > 
| > The above behaviour is produced with a straight compile on Debian
| > Linux with the image directly from the compile using ANSI-mode.  The
| > above behaviour is a show-stopper for using CLISP 2.27 with the
| > packages in cCLan.  Do you have a Linux-box to be able to reproduce
| > this or any hints to track down the bug?
| 
| I confirm this both on FreeBSD 3.3-RELEASE i386
| and Linux 2.2.19 i686.
| I wonder...

My parser is a bit off on a late night, does this mean you were able 
to reproduce it?

| (ANSI mode, of course, has nothing to do with this).
| 
| I see no reason to use :case :common here, BTW.
| I bet it is the cause of the problem!

When removing :case :common I get:

[2]> (make-pathname :defaults (make-pathname :directory '(:relative :wild-inferiors) 
:type "C") :host "CL-LIBRARY")
#S(LOGICAL-PATHNAME :HOST "CL-LIBRARY" :DEVICE NIL
   :DIRECTORY (:RELATIVE :WILD-INFERIORS) :NAME NIL :TYPE "C" :VERSION NIL)
[3]> (make-pathname :defaults (make-pathname :directory '(:relative :wild-inferiors) 
:type "c") :host "CL-LIBRARY")
#S(LOGICAL-PATHNAME :HOST "CL-LIBRARY" :DEVICE NIL
   :DIRECTORY (:RELATIVE :WILD-INFERIORS) :NAME NIL :TYPE "c" :VERSION NIL)

Which seems right to me.  The :case :common code can probably
be removed, but I still think the behaviour is dubious in the
presence of :case :common.