From: ······@my-dejanews.com
Subject: FAQ: How do I alter CLTL2 to note ANSI changes?
Date: 
Message-ID: <73rp43$8lv$1@nnrp1.dejanews.com>
FAQ: How can I alter my copy of CLTL2 (Common Lisp the Language, 2nd
edition, by G. L. Steele Jr., Digital Press, 1990) to note ANSI Common
Lisp changes since its original publication?

Version: 0

This document describes how to alter (mark up or edit) your personal
copy of CLTL2 to note new information from the ANSI Common Lisp
standard. No guarantees on the completeness or accuracy of the
information provided is expressed or implied. Use at your own risk. A
doctored CLTL2 is NOT the ANSI standard. In fact, this FAQ has many
known but minor omissions that are too awkward to add with pencil to
CLTL2. My purpose in providing this information is to help you improve
a familiar book and common source of information on Common Lisp. For
information on ANSI Common Lisp I recommend these two sources: The
Common Lisp HyperSpec at
http://www.harlequin.com/education/books/HyperSpec/, and Appendices C
and D of the book _ANSI Common Lisp_ by Paul Graham, Prentice-Hall,
1996 (a 2nd edition of this book is due out in April 1999). A third
source used in the preparation of this FAQ is Appendix A of the
_Allegro CL User Guide, Version 4.3_, March 1996. This appendix is
Franz's tally of the ANSI committee's votes. Franz also distributes an
alternate html version of the ANSI Common Lisp Standard with the ACL
5.0 product. It covers the same material as the Hyperspec.

Send all comments, corrections, additions, complaints, etc. to
···········@ieee.org.

Example of the notation used: p128,c2,ld4,lu7 translates to page 128,
column 2, go 4 lines down from top and go 7 lines up from bottom.

1) ANSI replaced function get-setf-method with get-setf-expansion. ANSI
renamed get-setf-method-multiple-value to get-setf-expansion. Note
deletion:
p144,ld9-lu8 get-setf-method definition
Replace get-setf-[method -> expansion]:
p133,ld3
p135,ld2,ld18
p137,ld1,lu2
p142,ld18,lu3
p143,ld4,ld8
p145,ld2?,ld8?
p688,lu5
Replace get-setf-[method-multiple-value -> expansion]:
p145,ld3,ld4

2) ANSI deleted the functions variable-information,
function-information, declaration-information, augment-environment,
parse-macro, and enclose as well as the macro define-declaration. This
effectively deletes section "8.5 Environments:"
p207,ld16-p214,lu1

3) ANSI deleted functions applyhook and evalhook along with the
variables *applyhook* and *evalhook*. Note deletions:
p179,lu15
p203,ld11
p490,ld9
p490,lu7
p491,ld12-p493,lu1 the definitions

4) ANSI deleted generic-flet, generic-function, generic-labels and
with-added-methods. Note deletions:
p73, Table 5-1, lu4,lu3 (in table)
p216,lu12-lu9
p787,ld20-ld21
p787,lu15-p788,ld3 four small paragraphs
p788,lu19-lu18,lu14
p844,lu5-p846,lu1 generic-flet, generic-function, generic-labels
definitions
p862,ld1-p863,ld8 with-added-methods definition

5) ANSI renamed define-setf-method to be define-setf-expander. Replace
define-setf-[method -> expander]:
p127,lu14
p128,ld6
p129,ld15,lu3
p131,ld8
p132,ld1,lu5
p133,ld8
p137,ld1
p141,lu6
p142,ld3,ld7,ld10,ld15,lu3
p143,ld5,lu15,lu10
p168,lu11,lu8
p216,ld1,ld15
p672,ld7
p688,lu11,lu8
p841,lu9

6) ANSI renamed special-form-p to special-operator-p. Replace
special-[form -> operator]-p:
p73,ld5
p119,ld18
p120,lu14,lu5,lu4
p121,ld1
p195,ld9

7) ANSI renamed simple-condition-format-string to
simple-condition-format-control along with the condition
initialization keyword :format-string to :format-control. Replace
simple-condition-format-[string -> control]:
p918,ld12,lu14,lu5
p919,ld1,lu3
Replace :format-[string -> control]:
p887,ld11,lu9
p888,ld11
p891,lu13,lu8
p912,ld18
p915,ld6
p918,ld11,lu15,lu6
p919,lu5

8) ANSI renamed base-character to be base-char. Replace
base-[character -> char]:
p26,lu3
p27,ld2,ld4,ld5,ld8
p33,lu5,lu4
p39,lu5,lu4
p49,lu10
p50,ld15
p61,lu2
p62,ld2
p371,lu1
p647,lu14,lu7

9) ANSI renamed extended-character to be extended-char. Replace
extended-[character -> char]:
p27,ld1
p39,lu4
p49,lu11
p50,ld15
p371,lu1

10) ANSI deprecated the functions set and gentemp. Make note on
definitions:
p122,lu16 for set
p246,ld13 for gentemp

11) ANSI restored the module facility. It is now only deprecated. Make
note on section "11.8 Modules":
p277,ld12-ld17

12) ANSI specifies the constant array-total-size-limit to be a
fixnum. An argument to row-major-aref can therefore be declared
as such. Note so at:
p446,lu3

13) ANSI added a :print-object keyword argument to defstruct. Add to
the bottom of p479:

:print-object
This option is like the existing :print-function one and takes a
function as the keyword's argument. This function takes only the first
two arguments described in :print-function. Only one of :print-object,
:print-function, or :type can be used.

14) ANSI extends setf to take a values expression as the first
argument. CLTL2 notes that a proposal to do so was made. Note that it
was accepted on p129,ld18-ld23.

15) ANSI specifies many functions which must have proper lists
(non-dotted lists). Note that these functions must have proper lists:
p171 mapcar
p171 maplist
p171 mapc
p171 mapl
p171 mapcan
p171 mapcon
p242 get-properties
p418 append (note: ANSI allows nconc to take dotted lists)
p426 member
p426 member-if
p426 member-if-not
p427 adjoin
p428 union
p428 nunion
p429 intersection
p429 nintersection
p429 set-difference
p429 nset-difference
p430 set-exclusive-or
p430 nset-exclusive-or
p431 subsetp

16) ANSI supplies a new data type boolean with members t and nil. Note
so on bottom of p12 and p41. Add index entry:
"boolean type, 12,41"
to:
p983,c3,lu26

17) ANSI changed arguments to make-load-form and
make-load-form-saving-slots. Change p659,ld16 to:
make-load-form object &key :environment             [Generic Function]
and change p662,lu9 to:
make-load-form-saving-slots object &key :slots :environment [Function]

18) ANSI changed loop for/as - on end test from endp to atom:
p721,ld11

19) ANSI added IEEE conditions floating-point-invalid-operation and
floating-point-inexact as subconditions of arithmetic-error. Note on
bottom of p922.

20) ANSI added allocate-instance a new generic function. Add to bottom
of p848:
allocate-instance class &rest initargs              [Generic function]

This generic function is like make-instance but does not initialize
slots.

Add index entry:
"allocate-instance generic function, 848"
to:
p981,c2,ld22
p1024,c1,ld6

21) ANSI added array-displacement a new function. Add to bottom of
p448:
array-displacement array                                    [Function]

This returns two values. The first value is the array displaced to and
the second is the displacement. If array is not a displaced array then
array-displacement returns the values nil and 0.

Add index entry:
"array-displacement function, 448"
to:
p982,c1,lu1
p1019,c1,lu7

22) ANSI added constantly a new function. Add to bottom of p708:
constantly object                                           [Function]

Returns a function that will always return the object. The returned
function takes any number of arguments.

Add index entry:
"constantly function, 708"
to:
p987,c3,ld32
p1020,c2,ld10

23) ANSI added define-symbol-macro a new macro. Add to bottom of p214:
define-symbol-macro symbol {form}                              [Macro]

The symbol will act as a macro call. A single form constitutes the
body of the expansion. The symbol cannot already be a special
variable.

Add index entry:
"define-symbol-function macro, 214"
to:
p989,c3,ld20
p1026,c1,lu13

24) ANSI added ensure-directories-exist a new function. Add to bottom
of p652:
ensure-directories-exist file &key :verbose                 [Function]

If the directories of file do not exist then this function creates
them returning two values, file and a second value true if the
directories were created or nil if not.

Add index entry:
"ensure-directories-exist function, 652"
to:
p991,c3,ld4
p1020,c3,ld4

25) ANSI added lambda a new macro. Add to bottom of p708:
lambda lambda-list [[ {declaration}* | [doc-string]] {form}*  [Macro]

A dubious shortcut for (function (lambda ...)) or #'(lambda ...).

26) ANSI added read-sequence a new function. Add to bottom of p576:
read-sequence sequence input-stream &key :start :end      [Function]

This function reads elements from input-stream into sequence. The
position of the first unchanged element of sequence is returned.

Add index entry:
"read-sequence function, 576"
to:
p1007,c2,ld22
p1022,c2,lu7

27) ANSI added write-sequence a new function. Add to bottom of p577:
write-sequence sequence output-stream &key :start :end    [Function]

This function writes elements of sequence to output-stream.

Add index entry:
"write-sequence function, 577"
to:
p1016,c2,ld30
p1023,c3,lu6

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

From: Christopher R. Barry
Subject: Re: FAQ: How do I alter CLTL2 to note ANSI changes?
Date: 
Message-ID: <3661C59A.3AA8E7D7@2xtreme.net>
This is extremely useful and nice to have. If someone were to write a
script so that these changes could automatically be applied to a
downloaded personal copy of the HTML CLTL2, kind of like how a patch on
some source code works, could they get in trouble for distributing such
a script? (I really doubt it, but I'm no lawyer or expert).

Christopher
From: David Steuber "The Interloper
Subject: Re: FAQ: How do I alter CLTL2 to note ANSI changes?
Date: 
Message-ID: <36649db0.90619453@news.newsguy.com>
On Sun, 29 Nov 1998 22:04:10 GMT, "Christopher R. Barry"
<······@2xtreme.net> claimed or asked:

% This is extremely useful and nice to have. If someone were to write a
% script so that these changes could automatically be applied to a
% downloaded personal copy of the HTML CLTL2, kind of like how a patch on
% some source code works, could they get in trouble for distributing such
% a script? (I really doubt it, but I'm no lawyer or expert).

I may be a bit thick, but why is this better than simply using the
Hyper-Spec by Ken Pittman?

--
David Steuber (ver 1.31.3a)
http://www.david-steuber.com
To reply by e-mail, replace trashcan with david.

May the source be with you...
From: Christopher R. Barry
Subject: Re: FAQ: How do I alter CLTL2 to note ANSI changes?
Date: 
Message-ID: <3664EF12.596119DE@2xtreme.net>
The Hyperspec is great, but Steele's examples are really nice. How much
of CLOS have you learned David solely by reading the Hyperspec? It's
very difficult to use the Hyperspec as a tutorial, but Steele's work
gives you enough examples and working code to play around with to where
one can get a grasp of a few things that are conceptually new to them.
Steele uses a touch of humor in his style, and the graphs of the trig
functions are a pleasant diversion.

I think CLTL2 is the closest thing there is to Common Lisp what K&R2 is
to C (my favorite C book), unless someone begs to differ. (I haven't
seen any of Norvig's or Graham's books, and I don't want to dish out $50
to $80 at Amazon when I can't at least thumb through the thing to see
what it's all about).

Christopher

David Steuber The Interloper wrote:
> 
> On Sun, 29 Nov 1998 22:04:10 GMT, "Christopher R. Barry"
> <······@2xtreme.net> claimed or asked:
> 
> % This is extremely useful and nice to have. If someone were to write a
> % script so that these changes could automatically be applied to a
> % downloaded personal copy of the HTML CLTL2, kind of like how a patch on
> % some source code works, could they get in trouble for distributing such
> % a script? (I really doubt it, but I'm no lawyer or expert).
> 
> I may be a bit thick, but why is this better than simply using the
> Hyper-Spec by Ken Pittman?
> 
> --
> David Steuber (ver 1.31.3a)
> http://www.david-steuber.com
> To reply by e-mail, replace trashcan with david.
> 
> May the source be with you...
From: Reini Urban
Subject: Re: FAQ: How do I alter CLTL2 to note ANSI changes?
Date: 
Message-ID: <3665261b.3154235@judy>
"Christopher R. Barry" <······@2xtreme.net> wrote:
>I haven't seen any of Norvig's or Graham's books, and I don't want to dish out $50
>to $80 at Amazon when I can't at least thumb through the thing to see
>what it's all about.

you can simply trust all lisp people and buy both graham's and norvig's
first book. david lamkins has a great book critics page.

http://www.teleport.com/~dlamkins/computer-books.html
http://www.elwoodcorp.com/alu/table/books.htm
---
Reini Urban
http://xarch.tu-graz.ac.at/autocad/news/faq/autolisp.html
From: Reini Urban
Subject: Re: FAQ: How do I alter CLTL2 to note ANSI changes?
Date: 
Message-ID: <3665335f.6551009@judy>
"Christopher R. Barry" <······@2xtreme.net> wrote:
>I haven't seen any of Norvig's or Graham's books, and I don't want to dish out $50
>to $80 at Amazon when I can't at least thumb through the thing to see
>what it's all about.

you can simply trust all lisp people and buy both graham's and norvig's
first book. david lamkins has a great book critics page.

http://www.teleport.com/~dlamkins/computer-books.html
http://www.elwoodcorp.com/alu/table/books.htm
---
Reini Urban
http://xarch.tu-graz.ac.at/autocad/news/faq/autolisp.html
From: Erik Naggum
Subject: Re: FAQ: How do I alter CLTL2 to note ANSI changes?
Date: 
Message-ID: <3121646806536281@naggum.no>
* "Christopher R. Barry" <······@2xtreme.net> -> David Steuber
| The Hyperspec is great, but Steele's examples are really nice.  How much
| of CLOS have you learned David solely by reading the Hyperspec?

  well, I didn't "get" much out of the chapter on CLOS in CLtL2 on first
  pass -- I actually found the whole of CLOS to be hopelessly muddled and
  over-generalized.  after I had quickly read Keene's tutorial and read the
  HyperSpec, however, it all made sense and became readable.  I'd say Keene
  got me past all the obstacles, and the HyperSpec taught me the details.
  Chapter 28 in CLtL2 is quite nice after you already know how things work.

| It's very difficult to use the Hyperspec as a tutorial,

  I disagree.  but then again, I tend to learn better from standards and
  specifications than from "tutorials".  I positively hate books by authors
  who attempt to assume to know� how much I understand at any given point.
  however, there's something to be said for logical order of presentation,
  which is not at all the same as a _supposedly_ "pedagogical" order of
  presentation, which assumes way too much knowledge about the reader.

| Steele uses a touch of humor in his style...

  yup, and the best part is that all the great names of the examples are so
  much easy to remember than the subject covered, but the index actually
  caters to that, too, and has a wonderful sense of humor of its own:

Michaelangelo (turle), 440
Michelangelo (artist), 1475-1564

  I especially found the index entry on "kludges" riotiously funny.

#:Erik
-------
� the futility of the undertaking should be indicated by the weak wording
-- 
  The Microsoft Dating Program -- where do you want to crash tonight?
From: Barry Margolin
Subject: Re: FAQ: How do I alter CLTL2 to note ANSI changes?
Date: 
Message-ID: <fzA92.110$5M.21657@burlma1-snr1.gtei.net>
In article <················@naggum.no>, Erik Naggum  <····@naggum.no> wrote:
>* "Christopher R. Barry" <······@2xtreme.net> -> David Steuber
>| The Hyperspec is great, but Steele's examples are really nice.  How much
>| of CLOS have you learned David solely by reading the Hyperspec?
>
>  well, I didn't "get" much out of the chapter on CLOS in CLtL2 on first
>  pass -- I actually found the whole of CLOS to be hopelessly muddled and
>  over-generalized.  

It should be noted that the CLOS chapter of CLTL2 was mostly not written by
Steele.  It was taken almost verbatim from the proposal that was written by
the OO subcommittee of X3J13.

The same goes for the Conditions chapter (which came mostly from Kent's
paper) and the appendix on Series (from Dick Waters's LETS specification).

-- 
Barry Margolin, ······@bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Don't bother cc'ing followups to me.