SICP OpenCourse (Structure and Interpretation of Computer Programs)
PART 1
1.POINT: IMPLEMENT META-CIRCULAR EVALUATOR BY HARDWARE
2. ESCHER PICT/DIGITAL LOGIC/QUERY<==LISP<==LISP (EVAL/APPLY), LISP<==?HARDWARE?
- Lisp is not good for solving any particular problems
- Lisp is good for is constructing within in the right language.
- That's how you should think about it.
- What is Lisp based on?
- Lisp is somehow the fixe-point equation for the funny set of things which are defined in terms of themselves(THIS IS MAGIC
- TODAY, we will reduce the magic.
- We already know how to do that. The idea is , we're going to take the register machine architecture and show how to implement LISP on terms of that.
- So, if we implement LISP in terms of a register machine, then everything ought to become, All the magic should go away.
- And, by the end of this talk, I want you get the feeling that, as opposed to this very mysterious meta-circular evaluator.
- That a LISP evaluator really is something that's concrete enough that you can hold in the palm of your hand
3.HOW-TO
- Last time Lisp procedures----hand-translate-->Register machine
- This time Meta-circular evaluator--hand-translate-->Register machine. ( No different from recursive factorial
4.REGISTER USAGE IN EVALUATOR MACHINE
- EXP expression to be evaluated
- ENV evaluation environment
- FUN procedure to be applied
- ARGL list of evaluated arguments
- CONTINUE place to go to next
- VAL result of evaluation
- UNEV temporary register for expressions.
5.NOTICE
- The reason that you need recursion in the evaluator is because the evaluation process, itself, is recursive. Right? It's not because the procedure that you might be evaluating in LISP is a recursive procedure.
- DONE
- The machine is back to its initial state.
- The evaluation process has reduced the expression (+ x y) to the value 7.
6.MY UNDERSTANDING
- MINIMUM UNIVERSAL INTELLIGENCE => SIDE EFFECT
- LISP : META-CIRCULAR EVALUATOR , LOOP
- MIND : SELF-REFER, STRANGE LOOP
- BITCOIN: NONE, IT MUST BE A LOOP BASE ON SPV/METANET/TX
网友评论