?

Log in

No account? Create an account
Prayer beads - Lindsey Kuper [entries|archive|friends|userinfo]
Lindsey Kuper

[ website | composition.al ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Prayer beads [Sep. 26th, 2008|01:55 pm]
Lindsey Kuper
[Tags|]

Lindsey: So, um, I have a confession to make.
Will: Okay.
Lindsey: Uh, I might have cheated. I was working on the "write-factorial-without-using-define-or-letrec" problem, and I thought, "Huh, maybe this is that crazy Y-combinator thing that everyone's always talking about." And I pretty much found, um, almost exactly the code we were supposed to write.
Will: You Googled for the answer?!
Lindsey: No! Give me some credit! What I did was look up 'Y operator' in the index of SICP.
Will: *shakes head sadly* Even worse.
Lindsey: Wait! Don't be mad! To atone for my sins, I did the exercise that they want you to do, which is to do the analogous thing for computing Fibonacci numbers. And I understand it, I really do!
Will: Fine. Then do it for factorial, on the board, right now.
Lindsey: *turns pale*
Will: Here's the chalk.
Lindsey: Um. Okay, so this section of board here is my scratch paper. *starts to write some stuff on the board*
Will: No, no, no. Forget you ever heard of the Y combinator. I want you to start with regular, boring, first-day-of-class factorial and derive it from that, step by step.
Lindsey: Hmm. *starts over on another section of the board*
Ramana: *walks in; notices what I had been writing earlier* Who wrote that?
Will: Nobody.
Lindsey: Nobody.
Will: Actually, Sussman and Abelson wrote it.
Lindsey: *has to forcibly restrain self from making an obscene gesture at Will*

Twenty minutes later, with lots of help, I've figured out how to derive the self-application thing, and I'm like "I should go work on the next problem." And they're like "You better not look at SICP for that one."

LinkReply

Comments:
[User Picture]From: jes5199
2008-09-26 07:18 pm (UTC)
what does "derive" mean?
(Reply) (Thread)
[User Picture]From: lindseykuper
2008-09-26 08:17 pm (UTC)
To me, it means "Show a series of steps, in which each step logically follows from the last according to some basic principles we've already decided upon."

The "basic principles" might include, say, the rules for replacing an identifier with an expression to which it is bound.
(Reply) (Parent) (Thread)