AUG 17, 1974 LISP 893 - GLS AND JONL - [1] A NEW LAP, INCOMPATIBLE WITH OLDER LISPS, IS STANDARD [2] NEW FUNCTIONS: ^, ^$. EXPT EXTENDED. [3] NEW EDITOR COMMANDS: SS, RS, PC. [4] BOUNDP HAS BEEN CHANGED TO SAVE CONSING. [5] ERRFRAME HAS BEEN CHANGED TO GIVE OUT MORE INFO. [6] THROWING OUT OF A TTY INTERRUPT CAN LEAD TO LOSSAGE. [7] DONT USE (IOC W) IF YOU REALLY WANT (SETQ ^W T). [8] NCOMPLR RECOGNIZES "COMPLR (INIT)" FILES. [9] IN LISP, YOU CAN NOW (SETQ IBASE 'ROMAN). DITTO FOR BASE. ---------------------------------------------------------------- [1] LAP 81 IS THE STANDARD LAP NOW, AND IS WHAT YOU GET BY AUTOLOAD. SINCE IT WILL NOT WORK IN LISPS WITH VERSION NUMBERS LESS THAN 892, YOU WILL HAVE TO RETRIEVE THE OLDER LAP EXPLICITLY IF YOU NEED IT. DO (FASLOAD LAP OFASL COM) BEFORE TRYING TO USE LAP IN AN OLDER LISP. LAP NOW USES THE VALUE OF THE VARIABLE FASLOAD IN THE SAME WAY FASLOAD ITSELF DOES: IF IT IS NIL, THEN MESSAGES ABOUT FUNCTIONS REDEFINITIONS ARE SUPPRESSED. ALSO, LAP NOW TRIES TO DO PURE LOADINGS WHEN THE VALUE OF "PURE" IS NON-NIL. [2] NEW FUNCTIONS: ^ TAKES TWO FIXNUMS A AND B, AND RETURNS A TO THE B'TH POWER AS A FIXNUM (MODULO 2^35.). WILL NOT DO BIGNUM ARITHMETIC. ^$ TAKES A FLONUM AND A FIXNUM, RETURNING A FLONUM. EXPT HAS BEEN EXTENDED. IF THE EXPONENT IS A FLONUM, THEN THE BASE IS CONVERTED TO A FLONUM, AND THEN THE FORMULA B (B LOG A) A = E IS USED, USING THE LOG AND EXP FUNCTIONS. [3] NEW COMMANDS FOR THE BINFORD EDITOR: SS (SAVE SPOT) GOBBLES THE NAME OF AN ATOMIC SYMBOL, AND SETQ'S IT TO THE CURRENT EDITOR CONTEXT. RS (RESTORE SPOT) GOBBLES SUCH A SETQ'D ATOMIC SYMBOL AND MAGICALLY MOVES THE EDITOR'S CURSOR TO THE SAVED SPOT. PC (PRINT CONTEXT) GOBBLES UP TO TWO FLONUMS (TERMINATE WITH $$) AND, USING THEM FOR THE PRINLEVEL AND PRINLENGTH, PRINTS THE CURRENT LEVEL OF LIST STRUCTURE. IF YOU DON'T SUPPLY TWO ARGS, DEFAULTS OF 4 ARE USED. [4] BOUNDP IS NOW A PURE PREDICATE; IT RETURNS T OR NIL. ONE CAN GET THE OLD EFFECT OF BOUNDP BY SAYING (AND (BOUNDP X) (CONS NIL (EVAL X))). THERE WILL SOOON BE A SPECIAL FUNCTION FOR OBTAINING THE VALUE OF A SYMBOL, WHICH WILL RUN A LITTLE FASTER THAN "EVAL", AND WHICH WILL COMPILE QUITE OPTIMALLY. THUS, (AND (BOUNDP X) (SYMEVAL X)) WILL COMPILE INTO MUCH FASTER CODE THAN THE WILL THE CURRENT FORM: (AND (SETQ FOO (BOUNDP X)) (CDR FOO)) [5] ERRFRAME HAS BEEN CHANGED TO GIVE YOU MORE INFORMATION. FORMERLY THE THIRD ITEM OF THE RETURNED LIST WAS THE ERROR MESSAGE ONLY. NOW IT IS A LIST OF FROM ONE TO THREE THINGS. IF IT IS ONE THING, IT IS THE ERROR MESSAGE. YOU CAN PRINC THIS TO RE-CREATE THE ERROR PRINTOUT. IF THERE ARE TWO THINGS, THE FIRST IS THE MESSAGE AND THE SECOND IS THE LOSING ITEM. IF THERE ARE THREE THINGS, THEY ARE THE ERROR MESSAGE, THE LOSING ITEM, AND THE TYPE OF ERROR (E.G. FAIL-ACT OR UNBND-VRBL). IN SHORT, YOU GET A LIST OF THINGS SUCH THAT (APPLY 'ERROR (CADDR (ERRFRAME NIL))) WILL RE-CREATE THE SAME ERROR! [6] PEOPLE HAVE BEEN WRITING TTY INTERRUPT FUNCTION LIKE (SSTATUS INTERRUPT 15. '(LAMBDA NIL (THROW NIL TO-TOP-LEVEL))). THERE IS A DANGER IN THIS: RECALL THAT WHEN A TTY USER INTERRUPT IS RUN, THE SYSTEM DOES AN IMPLICIT (NOINTERRUPT 'TTY) FOR YOU TO PREVENT TIMING ERRORS. IF YOU EXIT THE USER INTERRUPT ABNORMALLY, YOU MUST RESET NOINTERRUPT YOURSELF. (SSTATUS INTERRUPT 15. '(LAMBDA NIL (NOINTERRUPT NIL) (THROW NIL TO-TOP-LEVEL))) ALTERNATIVELY, THE TOP LEVEL COULD SAY (NOINTERRUPT NIL) AFTER CATCHING THE THROW, POSSIBLY A SAFER ALTERNATIVE IN SOME CASES. [7] LOSERS NOTE: (IOC W) IS NOT THE SAME AS (SETQ ^W T). IN GENERAL, WHEN YOU JUST WANT TO SET AN I/O SWITCH, USE SETQ UNLESS YOU ARE AWARE OF THE SIDE EFFECTS INVOLVED. (IOC W) IN PARTICULAR PERFORMS A SYSTEM (= ITS) I/O RESET, CLEARING THE TTY OUTPUT BUFFER. IF ANY CHARS ARE PENDING IN THE BUFFER FOR OUTPUT FROM THE PREVIOUS PRINT, THEY WILL BE FLUSHED. THUS (PROG2 (PRINC 'FOOBAR) (IOC W)) IS VERY LIKELY NOT TO PRINT ANYTHING AT ALL! OR MAYBE JUST THE "F" IF YOU ARE LUCKY. (PROG2 (PRINC 'FOOBAR) (SETQ ^W T)) DOES WHAT YOU WANT AND LETS THE "FOOBAR" PRINT OUT. [8] NCOMPLR WILL LOOK FOR A "COMPLR (INIT)" FILE WHEN IT IS STARTED UP, AND IF FOUND, WILL UREAD AND READ-EVAL IT IN. YOU CAN FASLOAD OTHER FILES FROM THIS INIT FILE, BUT CURRENTLY CANNOT UREAD OTHER FILES. THE INIT FILE MAY BE EITHER ON YOUR DIRECTORY, OR ON THE "(INIT)" DIRECTORY.