CSE 341 Spring 96 -- 3/27/96 ======================================================= Readings: Touretsky (hereafter "T"), Chapter 1 All of it. Short, easy, important. Last time: -- Lisp, Smalltalk, Prolog * imperative, object-oriented, logic programming * interactive, interpreted, symbolic Summary for today: Problem set questions problems or questions how does FORMAT work? what is NIL? LISP introduction -- the read-eval-print loop -- primitive data types numbers, characters, strings, booleans -- NIL and "the non-value" ======================================================== Administrative stuff: Correction in the problem set (not 473) Notes will be available: ~c341/daily/<> => for each day, notes.txt, code.??, transcript.txt This information also available on the Web. ======================================================== Basic interaction with LISP: the Read, Eval, PRint loop (REPL) 1. The Reader reads in some characters, and produces an "S-expression" 2. The Evaluator evaluates that S-expression, producing a new S-expression. 3. The Printer produces and outputs a printed depiction of the S-expression Distinction: -- the characters read in -- the S-expression itself -- the S-expression's printed representation How to understand the language: -- learn what the basic data types are -- ask the question "what does this form evaluate to" ======================================================== Basic data types: numbers -- integers -- floating point -- ratios characters -- printing -- non-printing boolean T and NIL strings ======================================================== Summary: Primitive data types are (among others) numbers of various sorts, strings, characters, symbols Numbers, characters, and strings are "self evaluating" (e.g. the number 3 evaluates to the number 3)