1 07/30/2018 MR12.6g lisp changes
  2 
  3 The lisp interpreter was changed in MR12.6g in the return values of two
  4 functions:
  5 
  6 (status date) now return the year represented as a 4-digit year. With the
  7 default value of the output base of 8, this will result in the value 3742,
  8 which is 2018 in decimal. For example:
  9 
 10 (status date)
 11 (3742 7 36)
 12 
 13 (status lispversion) was updated to return the fixnum 4, rather than 3.
 14 This incremented version number can be used to distinguish the new
 15 behavior of (status date) from the old (version 3) behavior.
 16 
 17 
 18 09/24/83  MR10.2 lisp changes
 19 
 20 Several extensions were made to Multics Maclisp in Multics
 21 Release 10.2.  These mostly involve the release of several
 22 packages that define functions used in PDP-10 Maclisp, allowing
 23 greater compatibility between the dialects.  No Multics
 24 documentation is currently provided for the individual functions
 25 and macros defined in these packages (other than what little
 26 documentation is provided here).  However, they are all
 27 documented in "The Revised Maclisp Manual" (aka the "Pitmanual")
 28 available from the Massachussetts Institute of Technology
 29 Laboratory for Computer Science as MIT/LCS/TR-295, or other
 30 MIT/LCS documents as noted below.  Most of these extensions are
 31 also compatible with Zetalisp, the Lisp Machine dialect of
 32 Maclisp, and are therefore documented in "The Lisp Machine
 33 Manual", which is available from the MIT Artificial Intelligence
 34 Laboratory, Lisp Machines, Inc., and Symbolics, Inc.
 35 
 36 
 37 New builtins: The following functions were added to the
 38 interpreter and compiler:
 39 
 40 first, second, third, fourth: equivalent to car, cadr, caadr, and
 41 caaadr, respectively, but which have more mnemonic names.
 42 
 43 rest1, rest2, rest3, and rest4: equivalent to cdr, cddr, cdddr,
 44 cddddr.
 45 
 46 
 47 (nthcdr N LIST): takes the cdr of LIST N times, i.e.
 48           (nthcdr 0 LIST) = LIST
 49           (nthcdr 2 LIST) = (cddr LIST)
 50           (nthcdr 8 LIST) = (rest4 (rest4 LIST))
 51 
 52 (nth N LIST): equivalent to (car (nthcdr N LIST)), i.e.
 53           (nth 0 LIST) = (car LIST)
 54           (nth 3 LIST) = (cadddr LIST)
 55           (nth 7 LIST) = (cadddr (cddddr LIST))
 56 
 57 Note that (nth 1 LIST) is not the same as (first LIST), since nth
 58 is 0-based.
 59 
 60 (displace OLD-CONS NEW): if NEW is a list, rplaca's OLD-CONS with
 61 (car NEW) and rplacd's it with (cdr NEW), thus making OLD-CONS
 62 "look like" NEW.  If NEW is an atom, (progn NEW) is used as the
 63 patter to displace into OLD-CONS.  OLD-CONS is returned.
 64 
 65 
 66 includef: like include and %include, except that it evaluates its
 67 argument.  In the compiler it is interpreted in the compiler's
 68 environment.
 69 
 70 cursorpos: an interface to video terminals (it only works when
 71 the video system has been invoked).  See the Revised Maclisp
 72 Manual for the complete description.
 73 
 74 
 75 Non-default extensions:
 76 The rest of these extensions are not loaded or autoloaded into
 77 the default Lisp environment.  To use them you should %include
 78 the module in which the extension is defined.  You may also do
 79 (%include library) in order to load in all the extensions.
 80 
 81 
 82 Module: defmacro:
 83 This module defines the two special forms "macro" and "defmacro",
 84 which make macro writing easier.
 85 
 86 
 87 Module: defstruct:
 88 This module defines the special forms "defstruct" and
 89 "defstruct-define-type".  These are documented in detail in
 90 MIT/LCS/TM-203, "Maclisp Extensions," but there is ample
 91 documentation for defstruct in The Revised Maclisp Manual.
 92 
 93 
 94 Module: defun:
 95 This module defines an extended version of the special form
 96 "defun", which provides a simple interface to optional arguments,
 97 default values, and local variables.  See one of the manuals for
 98 details.
 99 
100 
101 Module: destructuring_let:
102 This module defines an extended form of the special form "let",
103 which provides "destructuring".  This means that the VAR in each
104 (VAR VALUE) pair may be replaced with an s-expression pattern,
105 and the symbols in the pattern will be bound to the matching
106 elements of the VALUE structure.  This module also defines
107 "let*", a sequential version of "let", and "desetq", a
108 destructuring version of "setq".
109 
110 
111 Module: loop:
112 This module defines the "loop" special form and a number of
113 functions and special forms for writing loop extensions.  Loop is
114 an English-style language for writing iterative forms.  It is
115 summarized in the Revised Maclisp Manual, and described fully in
116 MIT/LCS/TM-169, "LOOP Iteration Macro."
117 
118 
119 Module: macro_macros:
120 This module defines macros that are useful when writing macros.
121 Currently, only "once-only" is defined.  Since this does not seem
122 to be documented anyplace but the Lisp Machine Manual, I will
123 reproduce its documentation here:
124 
125 A once-only form looks like
126           (once-only VAR-LIST
127             FORM1
128             FORM2
129             ...)
130 
131 
132 VAR-LIST is a list of variables.  The FORMs are a Lisp Program
133 that presumably uses the values of those variables.  When the
134 form resulting from the expansion of the once-only is evaluated,
135 the first thing it does is to inspect the values of each of the
136 variables in VAR-LIST: these values are assumed to be Lisp forms.
137 For each of the variables, it binds that variable either to its
138 current value, if the current value is a trivial form, or to a
139 generated symbol.  Next, once-only evaluates the FORMs in this
140 new binding environment and, when they have been evaluated, it
141 undoes the bindings.  The result of the evaluation of the last
142 FORM is presumed to be a Lisp form, typically the expansion of a
143 macro.  If all the variables have been bound to trivial forms,
144 then once-only just returns that result.  Otherwise, once-only
145 returns the result wrapped in a lambda-combination that binds the
146 generated symbols to the result of evaluating the respective
147 non-trivial forms.
148 
149 
150 The effect is that the program produced by evaluating the
151 once-only form is coded in such a way that each of the forms
152 which was the value of one of the variables in VAR-LIST will be
153 evaluated only once, unless the form is such as to have no side
154 effects.  At the same time, no unnecessary temporary variables
155 appear in the generated code, but the body of the once-only is
156 not cluttered up with extraneous code to decide whether temporary
157 variables are needed.
158 
159 
160 Module: other_other:
161 This module defines a number of random special forms for
162 compatibility with other Maclisp dialects.  The following is a
163 summary of the functions provided:
164 
165 logand, logior, logxor, lognot, bit-test, bit-set, bit-clear: these
166 perform bitwise logical operations on fixnums (a la "boole").
167 
168 fifth, sixth, seventh, eighth, rest5, rest6, rest7, rest8: these
169 extend the range of the primitive list examining functions.
170 
171 evenp, neq, nequal, fixnump, flonump, listp, <=, >=: some
172 predicates with obvious functions.
173 
174 copylist: returns a list whose elements are the elements of a
175 given list.
176 
177 
178 aref, aset: the modern array referencing functions.
179 
180 ITS-if, ITS-ifn: the standard Maclisp "if" form.  These will be
181 on "if" and "ifn" unless you have previously loaded in the
182 Multics Emacs "if" (defined in e-macros.incl.lisp), as they are
183 incompatible.
184 
185 when, unless: simple conditionals.
186 
187 push, pop: for using lists as stacks, supporting the generalized
188 variable feature (see "setf", below).
189 
190 incf, decf, negf, notf: for incrementing, decrementing,
191 arithmetically and logically negating generalized variables.
192 
193 
194 case, caseq, select, selectq, select-equal, selectq-equal:
195 dispatching functions.  Selectq is documented in the Revised
196 Maclisp Manual.  Caseq is also documented there, but on Multics
197 it is equivalent to selectq.  Select and case are like selectq,
198 except that the elements of the tests are evaluated; see the Lisp
199 Machine Manual for documentation of select.  The -equal forms are
200 similar, but use an equal comparison instead of eq; these only
201 exist on Multics, and are therefore not documented in any of the
202 MIT manuals.
203 
204 dotimes, dolist: macros for common iterations.
205 
206 defconst, ITS-defvar: for declaring special variables with
207 optional initializations.  The latter will be defined as "defvar"
208 only if e-macros-.incl.lisp has not been loaded, as they are
209 incompatible.
210 
211 
212 *catch, *throw: versions of catch and throw in which the tag is
213 evaluated.
214 
215 psetq: parallel setq.
216 
217 lexpr-funcall: like funcall, except that the last argument must
218 be a list and it is spread in the call.
219 
220 without-interrupts, without-tty-interrupts: execute code with
221 interrupts disabled.  The second is not documented in any of the
222 manuals.
223 
224 with-open-file: execute code with a specified variable bound to a
225 file object, which is automatically opened and closed.
226 Documented in the Lisp Machine Manual.
227 
228 
229 circular-list: constructs a circular list with the given
230 arguments as the elements, repeated infinitely.  Documented in
231 the Lisp Machine Manual.
232 
233 
234 Module: runtime:
235 This module defines a number of random special forms for
236 compatibility with other Maclisp dialects.  The following is a
237 summary of the functions provided:
238 
239 fboundp, fmakunbound, fsymeval, fset: for manipulating and
240 examining the functional value of a symbol in a
241 dialect-independent manner (some dialects do not use the property
242 list).  Documented in the Lisp Machine Manual, and fboundp is
243 documented in MIT/LCS/TM-203.
244 
245 ldb, dpb: byte manipulation.
246 
247 firstn, butlast, nbutlast: return pieces of a list.  Documented
248 in the Lisp Machine Manual.
249 
250 make-list: creates a list of a given length.
251 
252 
253 mem, find-position-in-list: for searching lists.  Documented in
254 the Lisp Machine Manual.
255 
256 ass, rassq, rassoc: for searching association lists.  Documented
257 in the Lisp Machine Manual.
258 
259 del, rem, remq, remove: for deleting elements from lists.  The
260 "rem" versions are non-destructive.  Documented in the Lisp
261 Machine Manual.
262 
263 circular-list-last: rotates a circular list backwards.  Not
264 documented anywhere.
265 
266 symbolconc: returns a symbol whose pname is the concatenation of
267 the pnames of the arguments.
268 
269 
270 bignum-ash, fixnum-ash, ash: arithmetic shift.  By default "ash"
271 is equivalent to "bignum-ash", which is compatible with the Lisp
272 Machine; on the PDP-10 it is equivalent to "fixnum-ash".
273 
274 
275 Module: setf:
276 This module defines the "setf" generalized variable facility,
277 which allows the use of any accessor to specify a cell which is
278 to be given a new value.  It also defines the "defsetf" special
279 form, which allows the user to extend "setf".
280 
281 
282 Module: sharpsign:
283 This module defines the sharpsign (#) reader macro, whose
284 function depends upon the following character.  Also defines the
285 "sharpsign-set-syntax" function, which is like
286 "setsyntax-sharp-macro" (documented in the Revised Maclisp
287 Manual) except that it does not take the optional readtable
288 argument, and "defsharp", a special form for defining a sharpsign
289 character.
290 
291 
292 Module: format:
293 This module defines "format", a function for producing formatted
294 output (similar to the Multics ioa_ subroutine).  Also defines
295 the function "?format" and the special form "define-format-op"
296 for extending the format facility.