SICP OpenCourse (Structure and Interpretation of Computer Programs)
PART 1
1.POINT
2.PURPOSE: PUT A TREE STRUCTOR INTO MEMERY
((1 2) 3 4) --> Memory
- In general we want to have an illusion of infinity. All we need to do is arrange it so that whenever you look, the thing is there. That's really important idea.
- A very clever technique where by a lisp system can prove a small theorem every so often on the form the following piece of junk will never be accessed again
- Looking for things that are not marked.
3.Garbage collectors have to be small. Not because they have to be fast, but because no one can debug a complicated garbage collector.
- A garbage collector, if it doesn't work, will trash your memory is such a way that you cannot figure out what the hell happened. You need an audit trail
- Because it rearrange everything, and how do you know what happened there?
- So, this is the only kind of program that it really, seriously matters if you stare at it long enough so you believe that it works, That means prove it to yourself no way to debug it. that takes small enough, so you can hold it in your head.
4.SOMETHING CANNOT BE COMPUTED
- If you're writing a compiler you'd like a program that would check that the thing you're going to do will work. Wouldn't that be nice?
- You'd like something that would catch infinite loops, for example in programs that were written by users
- But in general you can't write such a program and determine whether or not it's an infinite loop
- CALLED "HALTING THEOREM"
网友评论