; All this quotation is not *directly* possible in .rot ; if you can't imagine it with direct ember; ; you can't it! ; PUT IN ANOTHER WAY: ; if you do it, ; you can it. ; if you take it, ; you can it. ; if you only request of it, (own it) ; you cannot one single bit of it! ; Jay tries to again bring fear to his audience... ; "What we actually want, is to confuse the idea of ; procedures and data very badly -not just badly." ; Can we make programs, that do not just manipulate "data" (pictures), ; but also other algebraic expressions? ; Derivatives: make a complex problem into many, simpler problems. ; Integrals: make many, simpler problems into one complex problem. ; They both follow specific rules. ; -to represent them is the difficulty. ; To begin with complex case-analysis; we begin with (cond ... (DEFINE (DERIV EXPR VAR) (COND ((CONSTANT? EXPR VAR) 0) ((SAME-VAR? EXPR VAR) 1) ((SUM? EXPR) (MAKE-SUM (DERIV (A1 EXPR) VAR) (DERIV (A2 EXPR) VAR))) ((PRODUCT? EXPR) (MAKE-SUM (MAKE-PRODUCT (M1 EXPR) (DERIV (M2 EXPR) VAR)) (MAKE-PRODUCT (DERIV (M1 EXPR) VAR) (M2 EXPR)))) ;.... )) (DEFINE (CONSTANT? EXPR VAR) (AND (ATOM? EXPR) (NOT (EQ? EXPR VAR)))) (DEFINE (SAME-VAR? EXPR VAR) (AND (ATOM? EXPR) (EQ? EXPR VAR))) (DEFINE (SUM? EXPR) (AND (NOT (ATOM? EXPR)) (EQ (CAR EXPR) '+))) ; 3B:(18m17s) Quotation (QUOTE) (') (DEFINE (MAKE-SUM A1 A2) (LIST '+ A1 A2 )) (DEFINE A1 CADR) (DEFINE A2 CADDR) ; 3B:(22m32s) The history of CAR and CDR and (CADR -> CAR of CDR of some value) (DEFINE (PRODUCT? EXPR) (AND (NOT (ATOM? EXPR) (EQ? (CAR EXPR) '*))) (DEFINE (MAKE-PRODUCT M1 M2) (LIST '* M1 M2)) (DEFINE M1 CADR) (DEFINE M2 CADDR) ; QUESTIONS 3B:(27m33s) BREAK ; Trying to produce simplified/normalized output. (DEFINE (MAKE-SUM A1 A2) (COND ((AND (NUMBER? A1) (NUMBER? A2)) (+ A1 A2)) ((AND (NUMBER? A1) (= A1 0)) A2) ((AND (NUMBER? A2) (= A2 0)) A1) (ELSE (LIST '+ A1 A2)))) ; 3B:(41m33s) Jay explaining the pun he made. And talking about the ; necessity of quotation in Lisp. (END)