7/31/73 - GLS, JONL - LISP 523 BRIEF SYNOPSIS: 1) NEW AUTOLOAD FEATURE FOR NON-CORE-RESIDENT FUNCTIONS 2) EXTENSIONS TO SORT AND SORTCAR TO ALLOW SORTING OF LISTS WITHOUT INTERMEDIATE USE OF ARRAYS. 3) FILLARRAY SUPERSEDES INITARRAY 4) LISTIFY OPTIONS EXTENDED TO GET LAST N ARGS TO AN LEXPR AS 5) (ARG NIL) USED TO OBTAIN THE NUMBER OF ARGS PASSED TO AN LEXPR. WELL AS THE FIRST N. 6) THE ATOM "PNAME" WILL NO LONGER USED. BEGINNING WITH LISP 523, "SYMBOL" WILL BE THE RESULT OF TYPEP FOR THAT CLASS OF OBJECTS. 7) THE FILE .INFO.;LISP FCNS HAS AN ALPHABETIZED TABLE OF INITIAL LISP FUNCTIONS AND GLOBAL VARIABLES. 8) COMPLR HAS QUOTING CHAR FOR FILE NAME SPECS, AND ACCEPTS MULTIPLE INPUT FILES. THE AUTOLOAD FEATURE HAS BEEN GENERALIZED FOR USE BY LOSERS: AN "AUTOLOAD" PROPERTY ON AN ATOM IS TREATED BY THE INTERPRETER VERY MUCH LIKE A FUNCTIONAL PROPERTY. IF "AUTOLOAD" IS THE FIRST FUNCTIONAL PROPERTY ON AN ATOMS PROPERTY LIST, THEN THE INTERPRETER WILL FIRST FASLOAD IN THE FILE SPECIFIED UNDER THAT PROPERTY. THUS, IF YOU HAVE SAID (DEFPROP FOO (BAR FASL DSK QUUX) AUTOLOAD) OR THE EQUIVALENT, AND THEN TRY TO USE FOO AS A FUNCTION [AND THE AUTOLOAD PROPERTY IS FOUND BEFORE ANY OTHER KIND OF FUNCTIONAL PROPERTY]; THEN EVAL (OR WHOEVER) WILL FASLOAD IN DSK:QUUX;BAR FASL, AND TRY AGAIN TO GET A MORE STANDARD FUNCTION PROPERTY FOR FOO (WHICH HAD DARNED WELL BETTER BE REDEFINED BY THE FILE AS SOMETHING ELSE OTHER THAN "AUTOLOAD"). THE SORT FUNCTIONS HAVE BEEN EXTENDED AS FOLLOWS: IF THE FIRST ARGUMENT TO SORT OR SORTCAR IS NOT A LIST, THEN IT HAD BETTER BE AN ARRAY, AND THE CURRENT ARRAY SORT IS USED. IF IT IS A LIST, THEN A SUPER-WINNING MERGE SORT (CODED IN LISP BY MJF, THEN HAND-TRANSLATED TO MIDAS) IS USED. THE ITEMS OF THE LIST ARE ORDERED BY DOING MANY RPLACD'S ON THE LIST; THUS IF YOU DON'T WANT YOUR LIST DESTROYED, COPY IT FIRST BY SAYING (SORT (APPEND FOO NIL) 'PRED) INSTEAD OF (SORT FOO 'PRED) OR WHATEVER. IF YOU DON'T CARE, THEN YOU PROBABLY WANT TO USE IT LIKE DELQ IS USUALLY USED: SAY (SETQ FOO (SORT FOO 'PRED)). THE EXISTENCE OF THIS NEW MERGE SORT OF COURSE OBSOLETES THE EXAMPLE GIVEN PREVIOUSLY FOR SORTING A LIST. THE MERGE SORT IS GENERALLY FASTER THAN THE ARRAY SORT, AT THE EXPENSE OF THE DATA OCCUPYING TWICE AS MUCH CORE (OF COURSE, THE DATA WILL RESIDE IN DIFFERENT AREAS OF CORE ALSO: BPS FOR ARRAY SORT, LIST SPACE FOR MERGE.) THE FUNCTION INITARRAY PREVIOUSLY ADVERTISED HAS DISAPPEARED: FILLARRAY HAS BEEN GENERALIZED TO SERVE THE SAME PURPOSE. IF THE LIST GIVEN TO FILLARRAY IS TOO SHORT, THEN FILLARRAY USES THE LAST ITEM TO FILL OUT THE REST OF THE ARRAY. THUS (FILLARRAY 'BAR '(FOO)) <=> (INITARRAY 'BAR 'FOO). NO GUARANTEES ABOUT ANYTHING IF YOU HAND FILLARRAY AN ATOM INSTEAD OF A NON-NIL LIST! THE FUNCTION LISTIFY HAS BEEN GENERALIZED SO THAT IF YOU HAND IT A NEGATIVE ARG THEN THE LAST N ARGS ARE LISTIFIED UP INSTEAD OF THE FIRST N. THUS: ((LAMBDA N (LIST (LISTIFY -3) (LISTIFY 3)) 'A 'B 'C 'D 'E) EVALUATES TO ((C D E) (A B C)). (THIS IS SIMILAR TO THE CONVENTION WITH HAIPART, IF THAT'S ANY HELP...) FINALLY, IF YOU SAY (ARG NIL) INSIDE AN LSUBR/LEXPR, YOU GET BACK THE NUMBER OF ARGS SUPPLIED TO THAT LSUBR/LEXPR. SPEAKING OF TYPEP, IN NLISP (TYPEP 'FOO) RETURNS THE ATOM "SYMBOL", NOT THE ATOM "PNAME". THIS IS BECAUSE, EVENTUALLY (INDEED, ALREADY, ON MULTICS), ATOMS WILL NOT HAVE PNAME PROPERTIES ON THEIR PROPERTY LISTS, BUT WILL STORE THE PACKED-ASCII CHARACTERS OF THE PRINT-NAME IN A MORE EFFICIENT FASHION. ALSO, IN SOME PAROCHIAL PARTS OF THE LISP WORLD, THERE ARE BELIEVERS WHO BELIEVE THAT EVERY OBJECT "HAS" A PRINT-NAME AND HENCE "PNAME" DOES NOT UNIQUELY IDENTIFY THAT CLASS OF OBJECTS THAT WE HAVE ALL COME TO KNOW AND LOVE SO WELL. IN THE FUTURE, WE WILL TRY TO REFER TO MEMBERS OF THIS CLASS OF OBJECTS AS "SYMBOLS". THE FILE .INFO.;LISP FCNS HAS BEEN CLEANED UP A BIT; IT CONTAINS A TABLE OF ALL CURRENT INITIAL LISP FUNCTIONS, AND TOP-LEVEL GLOBAL VARIABLES. TAKE A LOOK. WRONG-NUMBER-OF-ARGS CHECKING IN NLISP IS SOMEWHAT IMPROVED. (TRY, FOR INSTANCE, (QUOTE A B) AND SEE WHAT YOU GET.) A REMINDER: (FIXP X) IS NON-NIL (EQUAL TO THE ARG) IFF X IS A BIGNUM OR A FIXNUM. FOR A FIXNUM-ONLY TEST, USE (EQ (TYPEP X) 'FIXNUM). SOME LOSERS WANT TO COMPILE FILES WITH ODDBALL NAMES [SUCH AS, NAMES CONTAING <SPACE>, ;, :, _ AND OTHERS]. THESE NAMES MAY BE TYPED AT COMPLR BY QUOTING THE OFFENDING CHARACTERS WITH "/". THE MAKLAP PARSER WILL NOW ACCEPT MULTIPLE INPUT FILE SPECIFICATIONS, SEPARATED BY COMMAS, AND COMPILE ALL AS IF THEY WERE CONCATENATED, LEFT TO RIGHT, IN ONE BIG INPUT FILE; SIMILARLY, FASLAP WILL ASSEMBLE MULTIPLE INPUT FILES INTO ONE FASL FILE. EXAMPLE COMMAND: _TGQ:MOBY LAP_TMQ:DECLAR 2/_1,TLQ:OLD SRC/ / @ COMPLR WILL ALSO PUT A SEMI-COLON COMMENT NEAR THE HEAD OF THE LAP FILE TELLING THE DATE AND TIME OF COMILATION. THESE FEATURES ARE IN EFFECT AS OF COMPLR 338.