Subject: New version of CLISP

From: Bruno Haible <[email-masked]>
Date: Wed, 21 Jul 1999 22:47:37 +0200 (MET DST)

A new release of CLISP is on the ftp server. The source of version
1999-07-22 is at

         ftp://clisp.cons.org/pub/lisp/clisp/source/

Also available are new binary packages for the following platforms:

         alpha-dec-osf4.0d
         hppa2.0-hp-hpux10.20
         i386-pc-solaris2.6
         i586-pc-linuxlibc5 (built with SuSE Linux 5.3)
         i586-pc-linuxlibc6 (built with SuSE Linux 6.0)
         rs6000-ibm-aix3.2.5
         sparc-sun-solaris2.4
         sparc-sun-sunos4.1.3_U1
         sparc-linuxlibc6
         win32

in the corresponding subdirectories of

         ftp://clisp.cons.org/pub/lisp/clisp/binaries/

Highlights of this release:

  * Unicode support.
  * Interface to PostgreSQL.
  * Implements the Gray proposal for user-defined streams.
  * Better ANSI CL compliance.

Here are the changes in detail, from the NEWS file:

User visible changes
--------------------

* Added a new module - "postgresql": interface to the PostgreSQL ODBMS.

* Implemented ANSI CL macro WITH-PACKAGE-ITERATOR.

* Conforming to ANSI CL issue <ALLOCATE-INSTANCE:ADD>: New function
  ALLOCATE-INSTANCE.

* Conforming to ANSI CL issue <GENERIC-FLET-POORLY-DESIGNED:DELETE>: The
  symbols GENERIC-FLET and GENERIC-LABELS are not exported from the
  COMMON-LISP package any more.

* Conforming to ANSI CL issues <KEYWORD-ARGUMENT-NAME-PACKAGE:ANY> and
  <MULTIPLE-VALUE-SETQ-ORDER:LIKE-SETF-OF-VALUES>.

* Conforming to ANSI CL Issue <MACRO-FUNCTION-ENVIRONMENT:YES>
  MACRO-FUNCTION now takes an optional second argument ENV.

* When CLISP is invoked with an "-a" option, *features* contain :ANSI-CL.

* Weak pointers are implemented. New functions MAKE-WEAK-POINTER,
  WEAK-POINTER-P, WEAK-POINTER-VALUE.

* The function OPEN, when creating unbuffered file streams, now supports any
  of the following :ELEMENT-TYPEs: CHARACTER and ([UN]SIGNED-BYTE n), where n
  is a multiple of 8.

* The functions
    MAKE-PIPE-INPUT-STREAM, MAKE-PIPE-OUTPUT-STREAM, MAKE-PIPE-IO-STREAM,
    SOCKET-ACCEPT, SOCKET-CONNECT
  accept a keyword argument :ELEMENT-TYPE. Possible values are types
  equivalent to CHARACTER or (UNSIGNED-BYTE n), (SIGNED-BYTE n), where n is
  a positive multiple of 8. Previously these functions returned streams whose
  element-type was (OR CHARACTER (UNSIGNED-BYTE 8)).

* STREAM-ELEMENT-TYPE is SETFable. The element type of streams created by the
  functions MAKE-PIPE-INPUT-STREAM, MAKE-PIPE-OUTPUT-STREAM,
  MAKE-PIPE-IO-STREAM, SOCKET-ACCEPT, SOCKET-CONNECT can be modified, if the
  old and the new element type are compatible.
  (UNSIGNED-BYTE n) and (SIGNED-BYTE n) are compatible, and CHARACTER is
  compatible with ([UN]SIGNED-BYTE 8).

* Character I/O can now be customized via encodings. A stream's external
  format is an encoding, and the symbol macros
    *DEFAULT-FILE-ENCODING*, *PATHNAME-ENCODING*, *TERMINAL-ENCODING*,
    *MISC-ENCODING*, FFI:*FOREIGN-ENCODING*, AFFI:*FOREIGN-ENCODING*
  contain user-settable encodings.
  Encodings can be obtained through the function MAKE-ENCODING, and as values
  of the constants
    CHARSET:UCS-2, CHARSET:UNICODE-16, CHARSET:UNICODE-16-BIG-ENDIAN,
    CHARSET:UNICODE-16-LITTLE-ENDIAN, CHARSET:UCS-4, CHARSET:UNICODE-32,
    CHARSET:UNICODE-32-BIG-ENDIAN, CHARSET:UNICODE-32-LITTLE-ENDIAN,
    CHARSET:UTF-8, CHARSET:JAVA, CHARSET:ASCII, CHARSET:ISO-8859-1,
    CHARSET:ISO-8859-2, CHARSET:ISO-8859-3, CHARSET:ISO-8859-4,
    CHARSET:ISO-8859-5, CHARSET:ISO-8859-6, CHARSET:ISO-8859-7,
    CHARSET:ISO-8859-8, CHARSET:ISO-8859-9, CHARSET:ISO-8859-10,
    CHARSET:ISO-8859-13, CHARSET:ISO-8859-14, CHARSET:ISO-8859-15,
    CHARSET:KOI8-R, CHARSET:MAC-ARABIC, CHARSET:MAC-CENTRAL-EUROPE,
    CHARSET:MAC-CROATIAN, CHARSET:MAC-CYRILLIC, CHARSET:MAC-DINGBAT,
    CHARSET:MAC-GREEK, CHARSET:MAC-HEBREW, CHARSET:MAC-ICELAND,
    CHARSET:MAC-ROMAN, CHARSET:MAC-ROMANIA, CHARSET:MAC-SYMBOL,
    CHARSET:MAC-THAI, CHARSET:MAC-TURKISH, CHARSET:MAC-UKRAINE,
    CHARSET:CP437, CHARSET:CP737, CHARSET:CP775, CHARSET:CP850, CHARSET:CP852,
    CHARSET:CP855, CHARSET:CP857, CHARSET:CP860, CHARSET:CP861, CHARSET:CP862,
    CHARSET:CP863, CHARSET:CP864, CHARSET:CP865, CHARSET:CP866, CHARSET:CP869,
    CHARSET:CP874, CHARSET:WINDOWS-1250, CHARSET:WINDOWS-1251,
    CHARSET:WINDOWS-1252, CHARSET:WINDOWS-1253, CHARSET:WINDOWS-1254,
    CHARSET:WINDOWS-1255, CHARSET:WINDOWS-1256, CHARSET:WINDOWS-1257,
    CHARSET:WINDOWS-1258, CHARSET:HP-ROMAN8, CHARSET:NEXTSTEP.

* The functions
    OPEN, MAKE-PIPE-INPUT-STREAM, MAKE-PIPE-OUTPUT-STREAM, MAKE-PIPE-IO-STREAM,
    SOCKET-ACCEPT, SOCKET-CONNECT
  and the macro
    WITH-OUTPUT-TO-PRINTER
  accept a keyword argument :EXTERNAL-FORMAT. Possible values are encodings,
  such as returned by the function MAKE-ENCODING, the line terminator keywords
  :UNIX, :MAC, :DOS, and :DEFAULT.

* STREAM-EXTERNAL-FORMAT is SETFable. The external format of streams created
  by the functions OPEN, MAKE-PIPE-INPUT-STREAM, MAKE-PIPE-OUTPUT-STREAM,
  MAKE-PIPE-IO-STREAM, SOCKET-ACCEPT, SOCKET-CONNECT can be modified.

* OPEN has a new keyword argument :BUFFERED. It determines whether the file
  stream returned is buffered or not. Possible values for it are NIL, T, or
  :DEFAULT. If it is :DEFAULT, buffered file streams will be returned for
  regular files and (on Unix) block-devices, and unbuffered file streams for
  special files.

* The functions MAKE-PIPE-INPUT-STREAM, MAKE-PIPE-OUTPUT-STREAM,
  MAKE-PIPE-IO-STREAM, SOCKET-ACCEPT, SOCKET-CONNECT have a new keyword
  argument :BUFFERED. It determines whether the stream returned is buffered or
  not. Possible values for it are NIL, T, or :DEFAULT. :DEFAULT is equivalent
  to NIL.

* New functions READ-INTEGER, WRITE-INTEGER which can be used to do binary I/O
  on streams with element-type (UNSIGNED-BYTE 8).

* The Gray proposal <STREAM-DEFINITION-BY-USER> is implemented:
  New classes
    FUNDAMENTAL-STREAM,
    FUNDAMENTAL-INPUT-STREAM, FUNDAMENTAL-OUTPUT-STREAM,
    FUNDAMENTAL-CHARACTER-STREAM, FUNDAMENTAL-BINARY-STREAM,
    FUNDAMENTAL-CHARACTER-INPUT-STREAM, FUNDAMENTAL-CHARACTER-OUTPUT-STREAM,
    FUNDAMENTAL-BINARY-INPUT-STREAM, FUNDAMENTAL-BINARY-OUTPUT-STREAM.
  New generic functions
    STREAM-READ-CHAR, STREAM-UNREAD-CHAR, STREAM-READ-CHAR-NO-HANG,
    STREAM-PEEK-CHAR, STREAM-LISTEN, STREAM-READ-CHAR-WILL-HANG-P,
    STREAM-READ-CHAR-SEQUENCE, STREAM-READ-LINE, STREAM-CLEAR-INPUT,
    STREAM-WRITE-CHAR, STREAM-LINE-COLUMN, STREAM-START-LINE-P,
    STREAM-WRITE-CHAR-SEQUENCE, STREAM-WRITE-STRING, STREAM-TERPRI,
    STREAM-FRESH-LINE, STREAM-FINISH-OUTPUT, STREAM-FORCE-OUTPUT,
    STREAM-CLEAR-OUTPUT, STREAM-ADVANCE-TO-COLUMN,
    STREAM-READ-BYTE, STREAM-READ-BYTE-SEQUENCE,
    STREAM-WRITE-BYTE, STREAM-WRITE-BYTE-SEQUENCE.
  The functions CLOSE, OPEN-STREAM-P, STREAM-ELEMENT-TYPE are now generic
  functions.

* The macros FFI:DEF-C-CALL-OUT and FFI:DEF-C-CALL-IN now add an argument
  :LANGUAGE :STDC (means ANSI C) instead of :LANGUAGE :C (means old K&R C).

* Conforming with ANSI CL, SIMPLE-CONDITION now has the initarg
  :FORMAT-CONTROL instead of :FORMAT-STRING. New function
  SIMPLE-CONDITION-FORMAT-CONTROL.

* Conforming with ANSI CL, FILE-LENGTH and FILE-POSITION, when called on
  an unbuffered file stream, now return NIL instead of signalling an error.

* Conforming with ANSI CL, MACROEXPAND and MACROEXPAND-1 now accept NIL as
  second argument, denoting the global environment.

* Conforming with ANSI CL, the reader now signals an error of type
  READER-ERROR when trying to parse tokens like 35/000 or 1.5e1000,
  instead of DIVISION-BY-ZERO and FLOATING-POINT-OVERFLOW, respectively.

* On Unix, calling OPEN on a block device now returns a buffered stream
  instead of an unbuffered stream.

* On Unix, writing to a pipe created by MAKE-PIPE-OUTPUT-STREAM or
  MAKE-PIPE-IO-STREAM after the corresponding child process has exited
  now leads to an error message instead of terminating the CLISP process.

* The generic function GENERIC-STREAM-LISTEN is replaced with
  GENERIC-STREAM-READ-CHAR-WILL-HANG-P.

* The function XGCD now really always returns coefficients of smallest
  possible absolute value.

* Fixed an interpreter bug: (let (x) (declare (special x)) ...) did not change
  the global value of x in interpreted mode.

* Fixed a bug: On Win32, Ctrl-Z sometimes caused two levels of the read-eval-
  print loop to be aborted instead of just one.

* Fixed a bug: READ-CHAR-SEQUENCE, when called on a string input stream,
  forgot to advance the pointer into the string.

* Fixed a bug: WRITE-CHAR-SEQUENCE on Win32 failed to convert NL to CR/LF.

* Fixed a bug: Calling (GET-DISPATCH-MACRO-CHARACTER disp-char sub-char) would
  crash, instead of returning NIL, if there is no macro-character function
  associated with sub-char after disp-char.

* Fixed a bug: (CHECK-TYPE place typespec string) did not evaluate `string'.

* Fixed a bug: Calling the function FINALIZE caused a crash during the next GC
  on many platforms.

* Fixed a bug: Calling a generic function without any installed method
  resulted in an inappropriate error message, not a call to
  NO-APPLICABLE-METHOD.

* Fixed a bug: Closing a SOCKET-SERVER twice, or using a closed SOCKET-SERVER
  could result in inappropriate error messages.

* Fixed a bug: (format nil "~@D" 0) ==> "+0" now.

Portability
-----------

* Added support for SPARC running Linux.

* Added support for Apple PowerPC running MacOS X Server (a.k.a. Rhapsody).

Other modifications
-------------------

* On Linux 2.2.x with glibc-2.1, Solaris, OSF/1 and Irix, stack overflow is
  now caught reliably. Previously, endless recursion in interpreted code could
  cause a crash in some cases.

Enjoy!
                   Bruno

---

From: Erik Arneson <[email-masked]>
Date: Fri, 23 Jul 1999 09:03:46 -0700 (PDT)

> A new release of CLISP is on the ftp server. The source of version
...
>   * Better ANSI CL compliance.

Thank you thank you thank you thank you thank you!!!

I love CLISP!

-- 
# Erik Arneson    [email-masked]   Webring Software Engineer #
# Yahoo! Inc.     PGP ID: 1024/6EE28A05      (541) 482-3000x105 #
# "If we couldn't laugh we would all go insane." - Jimmy Buffet #

---

From: Sam Steingold <[email-masked]>
Date: Fri, 23 Jul 1999 12:57:29 -0400

the latest win32 binary breaks on nt4sp4 like this:

C:\gnu\clisp\lisp.exe -a -m10M -M C:\gnu\clisp\lispinit.mem -i
C:\sds\lisp\base

;; Loading file C:\sds\lisp\base.fas ...
;; Loading of file C:\sds\lisp\base.fas is finished.
cl-user[1]: > (sysinfo)

[misc.d:142]
*** - Win32 error 122 (ERROR_INSUFFICIENT_BUFFER): The data area passed
to a system call is too small.
1. Break cl-user[2]: >

cl-user[4]: > (machine-version)

[misc.d:142]
*** - Win32 error 122 (ERROR_INSUFFICIENT_BUFFER): The data area passed
to a system call is too small.
1. Break cl-user[5]: >

---

From: Russell Senior <[email-masked]>
Date: 23 Jul 1999 12:05:57 -0700

Just compiled up the new CLISP version (1999-07-22) and found that
*load-paths* doesn't seem to be working for me.  *load-paths* looks
identical to the 1999-01-08 version, but when I try to rely on it to
find a file in my ~/lisp directory, CLISP fails to find it.

   [3]> *load-paths*
   (#P"./" "~/lisp/**/")
   [4]> (load "io-tools")
   
   *** - A file with name io-tools does not exist
   [5]> (load "~/lisp/io-tools")
   
   *** - nonexistent directory: #P"/lisp/"

Hmm.  Looks like a problem with tilde-expansion.

-- 
Russell Senior         ``The two chiefs turned to each other.        
[email-masked]     Bellison uncorked a flood of horrible       
                         profanity, which, translated meant, `This is
                         extremely unusual.' ''

---

From: Bruno Haible <[email-masked]>
Date: Mon, 26 Jul 1999 17:22:56 +0200 (MET DST)

> to a system call is too small.

Thanks for the report. Will be fixed in the next release. For the moment,
work around using
    (defun machine-instance () "PC/586")

Bruno

---

From: Russell Senior <[email-masked]>
Date: 26 Jul 1999 09:44:11 -0700

>>>>> "Russell" == Russell Senior <[email-masked]> writes:

Russell> Just compiled up the new CLISP version (1999-07-22) and found
Russell> that *load-paths* doesn't seem to be working for me.
Russell> *load-paths* looks identical to the 1999-01-08 version, but
Russell> when I try to rely on it to find a file in my ~/lisp
Russell> directory, CLISP fails to find it.

Russell>    [3]> *load-paths* 
Russell>    (#P"./" "~/lisp/**/") 
Russell>    [4]> (load "io-tools")
Russell>    *** - A file with name io-tools does not exist 
Russell>    [5]> (load "~/lisp/io-tools")
Russell>    *** - nonexistent directory: #P"/lisp/"

Russell> Hmm.  Looks like a problem with tilde-expansion.

A few more details.  I am seeing this problem on Linux 2.2.8 w/
glibc-2.0.7 and Linux 2.2.10 w/ glibc-2.1.1, in both cases compiled
with gcc-2.8.1.  Are others seeing this problem also?

I tried to start tracking down the problem over the weekend, but not
being a clisp hacker and unfamiliar with its internal idioms, my
progress in understanding the source code was slowed.  Also,
curiously, when I tried to run lisp.run under gdb (v4.18), it
segfaulted fairly early on.

How would one print out the contents of, say, the variable
`userhomedir' from pathname.d around line 2125?

Thanks!

---

From: Bruno Haible <[email-masked]>
Date: Mon, 26 Jul 1999 19:39:44 +0200 (MET DST)

>  Hmm.  Looks like a problem with tilde-expansion.

Tilde expands to the value of (user-homedir-pathname). On Unix, this
is normally the value of the environment variable HOME.

> I tried to start tracking down the problem over the weekend, ...

That's normal. You are seeing generational GC in action. To switch it
off, do
(gdb) handle 11 noprint nostop

> `userhomedir' from pathname.d around line 2125?

Set a breakpoint there. When it is reached, type

(gdb) call object_out(userhomedir)

Bruno

---

From: Russell Senior <[email-masked]>
Date: 26 Jul 1999 11:35:49 -0700

>>>>> "Bruno" == Bruno Haible <[email-masked]> writes:

Bruno> Tilde expands to the value of (user-homedir-pathname). On Unix,
Bruno> this is normally the value of the environment variable HOME.

Russell> I tried to start tracking down the problem over the weekend,
Russell> ...  curiously, when I tried to run lisp.run under gdb
Russell> (v4.18), it segfaulted fairly early on.

Bruno> That's normal. You are seeing generational GC in action. To
Bruno> switch it off, do (gdb) handle 11 noprint nostop

Excellent.  Thanks!

Russell> How would one print out the contents of, say, the variable
Russell> `userhomedir' from pathname.d around line 2125?

Bruno> Set a breakpoint there. When it is reached, type

Bruno> (gdb) call object_out(userhomedir)

Okay.  It says 

   #P"/home/russell/"

which appears to be correct (it's my home directory).

Now, how do I look at things like TheSstring(STACK_2)->data[z.index]?