============================================================== Starting image `lisp' with no arguments in directory `/ug/acl5/' on machine `parichaalak.eas.asu.edu'. Allegro CL Enterprise Edition 5.0.1 [SPARC] (6/29/99 16:47) Copyright (C) 1985-1999, Franz Inc., Berkeley, CA, USA. All Rights Reserved. ;; Optimization settings: safety 1, space 1, speed 1, debug 2. ;; For a complete description of all compiler switches given the current ;; optimization settings evaluate (EXPLAIN-COMPILER-SETTINGS). USER(5):;Those who don't know history are condemned to repeat it ;;Santayana USER(5): ;;Those who don't know lisp are condemned to re-invent ;;it --Anonymous USER(5): 1 1 USER(6): 1 1 USER(7): 1 1 USER(8): Rao Error: Attempt to take the value of the unbound variable `RAO'. [condition type: UNBOUND-VARIABLE] Restart actions (select using :continue): 0: Try evaluating RAO again. 1: Set the symbol-value of RAO and use its value. 2: Use a value without setting RAO. 3: Return to Top Level (an "abort" restart) 4: Abort # [1] USER(9): :res USER(10): 'rao RAO USER(11): (first '(1 2 3)) 1 USER(12): (rao kate) Error: attempt to call `RAO' which is an undefined function. [condition type: UNDEFINED-FUNCTION] Restart actions (select using :continue): 0: Try calling RAO again. 1: Return a value instead of calling RAO. 2: Try calling a function other than RAO. 3: Setf the symbol-function of RAO and call it again. 4: Return to Top Level (an "abort" restart) 5: Abort # [1] USER(13): :res USER(14): (first kate) Error: Attempt to take the value of the unbound variable `KATE'. [condition type: UNBOUND-VARIABLE] Restart actions (select using :continue): 0: Try evaluating KATE again. 1: Set the symbol-value of KATE and use its value. 2: Use a value without setting KATE. 3: Return to Top Level (an "abort" restart) 4: Abort # [1] USER(15): :res USER(16): (defun rao (x) (second x)) RAO USER(17): (rao kate) Error: Attempt to take the value of the unbound variable `KATE'. [condition type: UNBOUND-VARIABLE] Restart actions (select using :continue): 0: Try evaluating KATE again. 1: Set the symbol-value of KATE and use its value. 2: Use a value without setting KATE. 3: Return to Top Level (an "abort" restart) 4: Abort # [1] USER(18): :res USER(19): (setq kate '(1 2 3)) (1 2 3) USER(20): kate (1 2 3) USER(21): (rao kate) 2 USER(22): (defun rao2 (x &optional y &key subtract-thing) (if (and (null y) (null subtract-thing) ) (* 2 x) (if (and (not(null y)) (null subtract-thing)) (+ ( * 2 x) y) (if (and (not (null y)) (not (null subtract-thing))) (- (+ (* 2 x) y) subtract-thing))))) RAO2 USER(23): (rao2 3) 6 USER(24): (rao2 3 2) 8 USER(25): (rao2 3 2 8) Error: Unpaired keyword argument passed to RAO2 [condition type: PROGRAM-ERROR] Restart actions (select using :continue): 0: Return to Top Level (an "abort" restart) 1: Abort # [1] USER(26): :res USER(27): (rao2 3 2 :subtract-thing 8) 0 USER(28): nil NIL USER(29): () NIL USER(30): (setq k nil) NIL USER(31): (if k (print 'hi)) NIL USER(32): (setq k 'rao) RAO USER(33): (if k (print 'hi)) HI HI USER(34): t T USER(35): (if k (progn (print 'hi) (print 'lo))) HI LO LO USER(36): (if k (progn (print 'hi) (print 'lo) 4)) HI LO 4 USER(37): (format t "~%Hello ~a!! How are you? I am ~a" 'Rao 'Misearable) Hello RAO!! How are you? I am MISEARABLE NIL USER(38): (/ 4 5) 4/5 USER(39): (/ 8 10) 4/5 USER(40): (float (/ 8 10)) 0.8 USER(41): 1 1 USER(42:1 Input numbered 1 is not on the history list USER(42): (load "/uy/rao/t.lisp") ; Loading /uy/rao/t.lisp T USER(43): :ld ~/t.lisp ; Loading /uc/cscfac/rao/t.lisp USER(44): :help COMMAND ABBR DESCRIPTION aliases ali print all command aliases args arg save arguments before calls arrest arr arrest a process for debugging boe Mark frame to break when exitted. bottom bo Zoom at the oldest frame on the stack. break br Add or remove instruction breakpoints bt Zoom in a very brief manner. cd change into another directory cf compile a file cload cl compile and load a file continue cont continue from a continuable error current cur return the expression given by the current stack frame dirs di print the Allegro directory stack dn move down the stack `n' frames, default 1 edit ed edit the source for the current stack frame EOF either :pop or :exit error err print the last error message evalmode eval examine or set evaluation mode exit ex exit and return to the shell find fin find the stack frame calling the function `func' focus fo focus the top level on a process frame fr print info about current frame [type return for next page or an integer to set the page length] function fun print and set * to the function object of this frame help he print this text -- use `:help cmd-name' for more info hide hid hide functions or types of stack frames history his print the most recently typed user inputs inspect i inspect a lisp object kill ki kill a process ld load one or more files ldb Turn on/off low-level debugging local loc print the value of a local (interpreted or compiled) variable macroexpand ma call macroexpand on the argument, and pretty print it optimize opt interactively set compiler optimizations package pa go into a package pop pop up `n' (default 1) break levels popd cd into the previous entry on directory stack printer-variables pri Interactively set printer control variables processes pro List all processes prt pop-and-retry the last expression which caused an error pushd pu cd to a directory, pushing the directory on to the stack pwd pw print the process current working directory reset res return to the top-most break level restart rest restart the function in the current frame return ret return values from the current frame [type return for next page or an integer to set the page length] scont sc step `n' forms before stopping set-local set-l set the value of a local variable sover so eval the current step form, with stepping turned off step st turn on or off stepping top to Zoom at the newest frame on the stack. trace tr trace the function arguments unarrest unar revoke the debugging arrest reason on a process unhide unh unhide functions or types of stack frames untrace untr stop tracing some or all functions up move up `n' (default 1) stack frames who-binds who-b find bindings of a variable who-calls who-c find callers of a function who-references who-r find references to a variable who-sets who-s find setters of a variable who-uses who-u find references, bindings and settings of a variable zoom zo print the runtime stack USER(45): ;;scoping... 1 1 USER(46): (defun rao3 (x) (let ((y 4)(z 5)) (+ x y z))) RAO3 USER(47): (setq x 15 y 16 z 17) 17 USER(48): (rao3 3) 12 USER(49): (defun rao4 (x) (let ((y 4)(z 5)) (+ x y z w))) RAO4 USER(50): (setq w 34) 34 USER(51): (rao4 1) 44 USER(52): :cl ~/t.lisp ;;; Compiling file /uc/cscfac/rao/t.lisp ;;; Writing fasl file /uc/cscfac/rao/t.fasl Warning: No IN-PACKAGE form seen in /uc/cscfac/rao/t.lisp. (Allegro Presto will be ineffective when loading a file having no IN-PACKAGE form.) ;;; Fasl write complete ; Fast loading /uc/cscfac/rao/t.fasl USER(53): ;;iteration (do ((i 1 (+ i 1)) (j 1 (* j 1)) ((= i 10) j)) (print i)) Error: Attempt to take the value of the unbound variable `J'. [condition type: UNBOUND-VARIABLE] Restart actions (select using :continue): 0: Try evaluating J again. 1: Set the symbol-value of J and use its value. 2: Use a value without setting J. 3: Return to Top Level (an "abort" restart) 4: Abort # [1] USER(54): :res USER(55): (do ((i 1 (+ i 1)) (j 1 (* j 1)) ) ((= i 10) j) (print i)) 1 2 3 4 5 6 7 8 9 1 USER(56): (dolist (x '(a b c)) (print x)) A B C NIL USER(57): (dotimes (i 10 i) (print i)) 0 1 2 3 4 5 6 7 8 9 10 USER(58): (loop for x in '(1 2 3) when (> x 1) do (print x)) 2 3 NIL USER(59):1 (loop for x in '(1 2 3) when (> x 1) do (print x)) 2 3 NIL USER(60): (loop for x from 1 to 10 collect x) (1 2 3 4 5 6 7 8 9 10) USER(61): (setq x 18) 18 USER(62): (defun rao5 (x) (setq x (+ x 1))) RAO5 USER(63): (rao5 x) 19 USER(64): x 18 USER(65): (defun rao6 (x) (first x)) RAO6 USER(66): (setq x '(1 2 3)) (1 2 3) USER(67): (defun rao7 (x y) (append x y)) RAO7 USER(68): (setq y '(4 5 6)) (4 5 6) USER(69): (rao7 x y) (1 2 3 4 5 6) USER(70): x (1 2 3) USER(71): y (4 5 6) USER(72): ;;sermon about avoiding destructive operations... ;;still to do... USER(72): ;;;Lambda functions ;;;funcalls ;;;;recursion ;;;;functions as values... ;;;Eq vs. eql vs equal ;;copying structures... ;;Differences between let vs. let* ;;Or and lazy evaulatuon of the arguments.