Monday, May 15,1978 FQ+18H.41M.47S. LISP 1578 --GLS, HIC, JONL-- Changes that affect all LISP's: [A] The result of (STATUS SYSTEM foo) contains SYMBOL if foo is a system symbol [B] FLONUM's are allowed in the ALLOC function but not in the INIT file [C] Changes to purification in general (**PURE SYSTEMS BUILDERS TAKE NOTE**) [D] New version of the TRACE package [E] GETDDTSYM checks LISP's built-in table before looking at the symbol table [F] Two hooks into toplevel/break READ-EVAL-PRINT loop [G] More information on the LENGTHF function (NEWIO only) [H] CNAMEF: semi-new undocumented function now being documented Changes that affect ITS LISP's: [1] FLUSH status option allows removal of LISP's pure pages on a suspend [2] Changes to UUOLINKS segments allows them to be extendable [3] .XUNAME now used to find INIT file An inquiry: [!] Which is more useful: (STATUS SEGLOG) or (STATUS SEGSIZE) Items of interest to LISP internals hackers: [{] More symbolic definitions [|] New SY.OTC bit in SY2 [}] Internal purification changes ------------------------------------------------------------------------- Changes affecting all LISP's: [A] The result of (STATUS SYSTEM foo) contains SYMBOL if foo is a system symbol. Previously, (STATUS SYSTEM 'LAMBDA) would return nil, and this was clearly wrong. Therefore, in addition to anything else that was previously returned by this STATUS function, SYMBOL will be returned for all symbols in the initial system. [B] FLONUM's are allowed in the ALLOC function but not in the INIT file. Previously FLONUM's were allowed only as the last of the set of three args for each space. The restriction of not allowing flonums in the INIT file is that at the time the INIT file is read, no FLONUM consing is allowed. If you do use FLONUM's in the INIT file comment, you will find that the LISP will get a fatal error. [C] Changes to purification in general (**PURE SYSTEMS BUILDERS TAKE NOTE**): There have been several changes to the purification scheme that make it more consistent, and apparently more correct. Previously, COPYSYMBOL would return a pure symbol if *PURE was non-nil, now COPYSYMBOL always returns an impure symbol. In earlier LISP's, all symbols consed while *PURE was non-nil would go into pure space. This included things like GENSYM's. Now, only INTERN'ed symbols (such as produced by READ) will be purified. PURCOPY on a symbol now purifies as much of the symbol as possible, whereas previously only the PNAME was purified. These changes, along with the corresponding internal changes, seem to be effective in producing more correct purification actions. For example, MACSYMA and NCOMPLR have been observed to get smaller due to less garbage collectable stuff being consed in pure space. [D] A new version of the TRACE package has been installed. The fasl for old Trace is Comlap;Trace Ofasl. In new Trace, there is a way to trace a macro as if it were a function: (Trace (Macr Macroval)) will give the same Entry print, but on Exit prints the final result (after Eval) of the Macro-call. You can also trace the old way with a regular Trace call without interfering with this (misfeature?). Currently, Macroval doesn't do error-checking, so (Trace (Cons Macroval)) will screw up. [E] GETDDTSYM checks LISP's built-in table before looking at the symbol table. This should allow people building systems that GETDDTSYM common symbols to not have to load all the symbols into their DDT, and should also allow Tops-10 GETDDTSYM to win in more cases. [F] Two hooks into toplevel/break READ-EVAL-PRINT loop: The two symbols READ-*-EVAL-PRINT and READ-EVAL-*-PRINT allow intercepting the read-eval-print loop in the position indicated by the *. The symbols should be bound to the name of the function to be invoked. Each is a function of one argument, and the value returned is used in lieu of the function's argument (which would normally be passed on to the next function in the loop). The functions are run both at top level and at break level. [G] More information on the LENGTHF function (NEWIO only) It has been brought to our attention that the description of the LENGTHF function was lacking. The value returned by the LENGTHF function applied to a file-object is the length in 'bytes' of the file. The byte size is determined by the mode the file was opened in. For ASCII mode, the byte size is 7, and for FIXNUM mode the byte size is 36. Therefore, for FIXNUM files, the value returned is the size of the file in words, which is 5 times less then the size of the file in characters. Note that this value is also the highest value that may be used as an argument to FILEPOS for an input file. [H] CNAMEF: semi-new undocumented function now being documented (CNAMEF <closed-file-object> <filename>) replaces the filename in the closed file-object by the filename specified in the second argument. This is useful if the creation of extra file arrays is either not desirable or possible. Changes that affect ITS LISP's: [1] The FLUSH status option allows removal of LISP's pure pages on a suspend. If a (SSTATUS FLUSH T) is done before a SUSPEND, LISP will flush its pure pages from its page map before returning to DDT. This saves about 28 pages in a PDUMP'ed file. NOTE THAT USING THIS OPTION REMOVES SOME ROBUSTNESS FROM YOUR SAVED SYSTEM!!! [2] Internal changes to the UUOLINKS segments allow them to be extendable. In older LISP's, the value of PURE was taken to be the number of pages to be allocated to the UUOLINKS area. Now, the value of PURE is ignored and as long as it is a FIXNUM, UUOLINKS are allocated segment by segment when new segments are required. Note that UUOLINKS segments may now be added even after a system has been purified thus allowing multi-level pure systems to be built up. [3] The XUNAME is now used to find the default INIT file. Formerly, the SNAME was used, but this was inconsistent with the function of other programs. Now, $$^S will affect the place that files are defaultly read from, but NOT from where INIT files are read from, whereas $^S can be used to change the source of INIT files, but not the default directory. An inquiry: [!] Which is more useful: (STATUS SEGLOG) or (STATUS SEGSIZE)? Currently, (STATUS SEGLOG) returns the log base 2 of the segment size. We postulate that the actual segment size is more useful, and therefore are considering removing SEGLOG in favor of SEGSIZE. Are there any opinions on this matter? Items of interest to LISP internals hackers: [{] More symbolic definitions have been introduced. There are now symbolic definitions for the bits in the first word of an SY2 block. To use '?' typeout mode use the prefix 'SY.'. The ST (segment) table bits have also been defined under the prefix of 'ST.'. [|] There is a new bit in the first word of SY2. The SY.OTC bit is set when SY.CCN (compiled code needs me) is on and the referencer is other then a CALL uuo (hence the name, Other Then Call, or OTC). [}] In order to impliment the new purification scheme, there have been some changes to the internal purification routines. The symbol conser (SYCONS) has been split into two consers: SYCONS for impure symbols and PSYCONS for pure symbols. Note that this is consistent with the other pure/impure consers.