11/14/72 - JONL - THE FASLAP-FASLOAD SCHEME SEEMS TO BE WORKING QUITE WELL NOW, AND IS DOCUMENTED BELOW ALONG WITH NEW INSTRUCTIONS FOR USING COMPLR. SEE SECTION 9 BELOW. 0) CERTAIN OPTIONS WITH THE FUNCTIONS STATUS ARE SELDOM USED, BECAUSE THEY EXIST AS INDEPENDENT FUNCTIONS. HENCE THESE OPTIONS HAVE BEEN FLUSHED FROM THE STATUS-SSTATUS SERIES: CRUNIT GCTWA NORET NOUUO *RSET *NOPOINT TIME RUNTIME LISTEN GCMIN 1) SOME NEW FUNCTIONS, THAT MIGHT PROVE USEFUL - A) FASLOAD, A FSUBR, EXPECTS AN ARGUMENT LIKE UREAD, AND RATHER SNAPPILY LOADS IN THE FILE, PROVIDED THAT IT IS AN FASL FILE [THE OUTPUT OF THE FASLAP ASSEMBLER, NOW A STANDARD PART OF COMPLR] B) BOUNDP PRESUMES A PNAME-TYPE ATOM AS ARGUMENT AND RETURNS A POINTER TO ATOM'S VALUE CELL, IF IT HAS A VALUE CELL, AND IF ITS VALUE CONTAINED THEREIN IS NOT THE SPECIAL SYSTEM "UNBOUND" MARKER. OTHERWISE, NIL IS RETURNED. C) MAKUNBOUND INSURES THAT AN ATOM HAS A VALUE CELL, AND THEN SETS THE ATOMS VALUE TO THE INTERNAL UNBOUND MARKER. D) FRETURN ALLOWS YOU TO RETURN FROM AN ARBITRARY EVALFRAME [OBTAINED, OF COURSE, BY THE FUNCTION EVALFRAME]. THUS, WHEN AN ERROR OCCURS, AND THE USER TRACES BACK UP THE PDL EVENTUALLY FINDING SOME EVALUATION THAT HAS A BUG IN IT, HE CAN CALL FRETURN WITH FIRST ARGUMENT THE PDL POINTER FOR THAT FRAME [SEE PRIOR NOTES ON THE USAGE OF FRAMES IN THE LISP ENVIRONMENT] AND WITH SECOND ARG THE DESIRED RETURN VALUE FOR THAT EVALUATION. E) THE NUMERICAL SUBROUTINES FORMERLY FOUND ON JONL;NUMSBR > ARE NOW PART OF THE STANDARD LISP. THE PURE PART OF THE SYSTEM CODE NOW HAS ONE WHOLE PAGE DEVOTED TO NUMERICAL ROUTINES [E.G., PLUS, EXPT, *, ETC]. THE NEW ADDITIONS ARE SQRT, ISQRT, SIN, COS, ATAN, LOG, AND EXP, WHICH ARE ALL FLOATING-POINT FUNCTIONS EXCEPT FOR ISQRT [INTENDED TO BE "INTEGER" SQUARE ROOT, BUT FOR THE TIME BEING, SIMPLY FLOATS ITS ARGUMENT, CALLS SQRT, AND FIXES THE RESULT]. SIN AND COS ASSUME THE ARGUMENT IS IN RADIANS, AND WILL GENERATE AN ERROR IF THE ARGUMENT IS TOO LARGE TO MAINTAIN AT LEAST 7 DECIMAL DIGITS OF ACCURACY IS THE ANSWER. ATAN REQUIRES TWO ARGS, THE FIRST A DELTA-Y AND THE SECOND A DELTA-X, AND RETURNS THE ANGLE BETWEEN 0 AND 2*PI WITH TANGENT (DELTA-Y/DELTA-X). LOG IS NATURAL LOGARITHM, AND EXP IS NATURAL ANTI-LOGARITHM [EXPONENTIATION BASE E]. F) A FEW FUNCTIONS NOW RESIDENT IS THE STANDARD LISP PRIMARILY FOR THE BENEFIT OF LAP, MIGHT CONCEIVABLY BE OF SOME USE TO SOMEONE. GETMIDASOP EXPECTS A PNAME-TYPE ATOM AND RETURNS EITHER NIL IF ITS ARG ISN'T A PDP10 INSTRUCTION, OR THE NUMERICAL VALUE OF THE INSTRUCTION AS A FIXNUM. IN ADDITION TO THE STANDARD PDP10 INSTRUCTION SET, THE CALL UUOS FROM LISP AND THE STRT, ERINT, AND LERR UUOS ARE DEFINED. ALSO DEFINED ARE MANY, BUT NOT ALL, OF THE ITS TIME-SHARING SYSTEM CALLS. GETDDTSYM ALSO EXPECTS A PNAME-TYPE ARGUMENT AND INTERROGATES THE JOB SYMBOL TABLE, IF THE JOB'S SUPERIOR IS A DDT WITH A SYMBOL TABLE LOADED IN; NIL IS RETURNED IN THE CONTRARY CASE, AS WELL AS IN THE CASE THAT THE SYMBOL ISN'T IN THE TABLE. PUTDDTSYM MAKES AN ENTRY INTO THE SYMBOL TABLE - SYMBOL IS FIRST ARGUMENT, VALUE IS SECOND; RETURNS T IF REQUEST SUCCEDED, AND NIL IF FAILED. 2) IN VIEW OF THE WINNITUDE OF FASLOAD ON FASL FILES, THERE APPEARS TO BE NO REASON TO CONTINUE USING E LAP OR C LAP; RATHER THE USER SHOULD SIMPLY DO (FASLOAD F LAP COM) WHICH WILL LOAD IN THE FASL VERSION OF THE LAP ASSEMBLER IN TWO JIFFYS. IF IN FACT THE USER'S LAP FILE IS SOMETHING THAT GETS ASSEMBLED IN ALMOST EVERY TIME HE LOADS UP A LISP, THEN HE SHOULD CONSIDER ASEMBLING THE FILE WITH FASLAP [SEE ITEM 8 BELOW] AND SIMPLY FASLOADING IN THE FASL VERSION OF THE FILE, RATHER THAN LAPPING IN THE LAP VERSION. 3) USER INTERRUPT NUMBER ZERO IS NOW AVAILABLE TO THE USER AS AN ORDINARY INTERRUPT FACILITY WHICH IS RUN WHENEVER CONTROL-@ IS STRUCK [OR (IOC @) EVAL'D]. THIS AUGMENTS THE FACILITY FOR INTERRUPTING ON CONTROL-H AND CONTROL-A, CURRENTLY USER INTERRUPTS NUMBERS 1 AND 2. AS NOTED PREVIOUSLY, (STATUS INTERR 1) SIMPLY ACCESSES THE VALUE CELL OF THE ATOM ^H, WHICH INITIALLY COMES SET THE THE INTERNAL-^H-BREAK FUNCTION. THERE IS, HOWEVER, NO ATOM FOR THE OTHER TWO INTERRUPTS. 4) THE SINGLE-CHARACTER-OBJECT HASH TABLE HAS BEEN MERGED INTO A PART OF THE OBARRAY, SO THAT IT WINS COMPLETELY FOR MULTIPLE OBARRAY HACKS. IF THIS DOESN'T MAKE SENSE TO YOU, DONT WORRY ABOUT IT. ALL YOU NEED TO KNOW IS THAT READCH IS NO MORE COSTLY OR TIME-CONSUMING THAN TYI. 5) DO AND IOG HAVE SLIGHTLY MORE GENERAL FORMATS NOW. (IOG C E1 E2 . . . EN) WORKS AS BEFORE, BUT ALL OF E1 TO EN ARE EVALUATED, WITH THE VALUE OF EN BEING RETURNED. (DO ((Z INITIALVALUE STEPPERFUN) . . .) (ENDTEST E1 E2 . . .EN)) WORKS LIKE THE USUAL EXTENDED DO FORMAT, EXCEPT THAT THE ENDTEST- RETURNVALUE PAIR NOW LOOKS LIKE THE GENERALIZED COND CLAUSE. *************** YET ANOTHER EXTENSION ON 10/15/73 ********* 6) PRINT OUTPUT FOR FIXNUMS HAS BEEN SLIGHTLY HACKED TO GIVE OUT STRINGS SUCH AS 244_33, OR -3_41 WHERE APPLICABLE. OF COURSE, THESE NUMBERS READ IN PROPERLY, AND SHOULD PROVE TO BE LESS OF A STRAIN ON THE EYES THAN SUCH STRINGS AS 344000000000 [OR IN BASE 10., 228._27. RATHER THAN 30601641984.] 7) GRABBING A DISPLAY SLAVE, WITH DISINI, NOW CAUSES A MESSAGE TO BE PRINTED ON THE JOB CONSOLE REGARDING WHICH COMPUTER S ACTUALLY RUNNING THE SLAVE. ORDINARILY, THE PDP6 IS PREFERRED, BUT IF IT IS UNAVAILABLE, OR IF IT IS NOT RUNNING, THE USER IS INFORMED. 8) THERE IS NO LONGER ANY DIFFICULTY WITH COMPILING AN EXPR OF MORE THAN 5 ARGUMENTS. COMPLR CURRENTLY WILL CONVERT SUCH AN EXPR INTO AN LSUBR WITH NO LOSS OF EFFICIENCY. SIMILARLY, THERE IS NO LIMITATION ON THE NUMBER OF VARIABLES IN A LAMBDA APPLICATION. 9) WHEN COMPLR IS LOADED, MAKLAP HAS BEEN ENTERED. TYPING CONTROL-G WILL GET ONE BACK TO LISP TOP LEVEL. A COMMAND TO MAKLAP IS OF THE FORM <TARGET-FILE-DESIGNATOR>_<SOURCE-FILE-DESIGNATOR><CARRIAGE-RETURN> OR OF THE FORM <SOURCE-FILE-DESIGNATOR><CARRIAGE-RETURN> IN THIS CASE THE TARGET FILE WILL BE DEFAULTED TO BE JUST LIKE THE SOURCE FILE, EXCEPT THAT THE SECOND FILE NAME WILL BE "LAP" FOR COMPLR OUTPUT, AND "FASL" FOR FASLAP OUTPUT [IF THERE IS ANY] THERE IS ALSO A NEW WAY TO SET CERTAIN COMPILE-TIME SWITCHES: IN THE COMMAND LINE TO MAKLAP, ONE CAN ENCLOSE CERTAIN SWITCH DESIGNATORS IN PARENTHESES AS FOLLOWS FOO LAP1_JONL;FOO BAR(N -M S) EACH LETTER WITHIN PARENTHESES SETS A SWITCH FROM ITS NORMAL NIL STATE TO NON-NIL; USING A "-" BEFORE THE LETTER SETS IT BACK TO NIL. FOLLOWING IS A LIST OF THE CURRENT SWITCHES AND THEIR MEANINGS: N NOARGS DONT OUTPUT THE ARGS INFORMATION X MAPEX EXPAND ALL MAPS INTO CORRESPONDING DOS M MACROS PRINT INTO THE OUTPUT FILE ANY MACRO DEFINITIONS S SYMBOLS OUTPUT SYMBOLS REQUESTS TO LAP [SO THAT THE LAP SYMBOLS ARE ENTERED IN THE DDT SYMBOL TABLE] F FASL AFTER COMPILATION, ASSEMBLE THE LAP FILE INTO A FASL FILE [AND INCIDENTALLY PRODUCING AN UNFASL FILE] K NOLAP KILL THE IMTERMEDIATE LAP FILE AFTER PRODUCTION OF THE FASL FILE A ASSEMBLE DO THE ASSEMBLE PHASE ONLY - MEANS THAT INPUT FILE IS A LAP SOURCE,, AND OUTPUT IS A FASL FILE. U UNFASLCOMMENTS PRINT FASLAP COMMENTS, WARNING MESSAGES, AND SOURCE FILE COMMENTS LIKE (COMMENT FOO BAR) AND (QUOTE (FOO BAR)) ON THE UNFASL FILE. T TTYNOTES HAVE COMPLER PRINT ON THE JOB CONSOLE AN ANNOTATION AFTER SUCCESSFUL COMPILATION OF EACH FUNCTION. LIKEWISE FOR FASLAP ASSEMBLIES. SPACES,TABS, CARRIAGE RETURNS, AND LINE FEEDS BETWEEN THE SWITCH DESIGNATORS ARE IGNORED; THE REQUEST MAY APPEAR ANYWHERE IN THE COMMAND LINE. AT TIMES, COMPLR AND FASLAP WILL WISH TO INFORM THE USER OF ERRONEOUS, OR POSSIBLY ERRONEOUS CODE IN HIS FILE [OR, HORRORS, A BUG IN COMPLR OR IN FASLAP]. THESE WARNINGS, OR ERROR MESSAGES ARE PRINTED OUT UNDER AN IOG MODIFIED BY THE REQUESTS FROM A TOP-LEVEL LIST "MESSIOC". NORMALLY MESSIOC IS NIL, SO THAT WARNING MESSAGES GO ONLY TO THE JOB CONSOLE, BUT IF THE USER DOES (MESSIOC FOO), IT WILL HAVE THE EFFECT OF CAUSING AN (IOC FOO) JUST BEFORE THE PRINTING OF THE MESSAGE. MESSIOC CAN BE CALLED EITHER FROM A ^H BREAK IN THE COMPLR, OR FROM COMPLR TOP LEVEL BEFORE ENTERING MAKLAP, OR IN A DECLARATION ON THE FILE TO BE COMPILED. LAP SOURCE CODE MAY STILL BE ASSEMBLED AND LOADED IN BY LAP, BUT IT THE ASSEMBLY IS DONE ONTO DISK [INTO A FASL FILE], THEN THE FASLOAD WILL BE MUCH QUICKER THAN A FULL ASSEMBLY AND LOAD. FOR ONE SHOT ASSEMBLY-AND-LOAD TASKS, IT IS STILL MUCH FASTER, HOWEVER, SIMPLY FASLOAD IN COM:F LAP AND ASSEMBLE THE FILE IN CORE [OR LOAD IN COM:E LAP IF FOR SOME REASON AN EXPR VERSION OF LAP IS DESIRED] - ONE GAINS IF HE INTENDS TO ASSEMBLE ONCE AND LOAD-IN MANY TIMES. ONE MAIN ADVANTAGE OF FASLOADING OVER SIMPLY UREADING THE ORIGINAL FILE AND LOADING IS THAT THE READER IS BYPASSED. THE READ PHASE OF LOADING IN AN AUXILLIARY FILE IS QUITE SLOW, AND THE FASL FILE HAS LIST STRUCTURE STORED IN IT IN A PRE-PARSED FORM THAT ALLOWS QUICK RECONSTRUCTION. SOME USERS MAY HAVE TO GIVE THIS A LITTLE THOUGHT, HOWEVER, FOR IT MEANS THAT RANDOM EVALUATIONS INITIATED DURING FASLOADING CANNOT EXPECT TO CALL THE FUNCTION READ AND GOBBLE UP THE NEXT FEW CHARACTERS FROM THE "INPUT FILE"; ALSO, THERE WILL BE NO READ-MACRO CHARACTER HAPPENINGS DURING THE FASLOADING PHASE.