Understanding the Y-Combinator with Racket

Understanding the Y-Combinator seems to be one of the functional programming right-of-passage things, and for good reason, it is fun. Not all of the articles out there spoke to me, so I took notes while coding it up in a way that I understood it.
My notes are attached in the form of a Scribble here How the Y Works, viewable here, and the source code version here y.
It is Racket, but it is really close to Scheme and if you wrote a couple of macros it would probably run on Clojure pretty easily.
The goal is for there to be no gaps in the code, it should be pretty obvious how each step was taken. Hand-coding it made it clear what was happening. This is what worked for me :).

How one class brought SICP back at MIT

Zombie-like, 6.001 rises from the dead to threaten students again. Unlike a zombie, though, it’s moving quite a bit faster than it did the first time. Like the original, don’t walk into the class expecting that it will teach you Scheme; instead, it attempts to teach thought patterns for computer science, and the structure and interpretation of computer programs. Three projects will be assigned and graded. Prereq: some programming experience; high confusion threshold.

(via MIT via keegan via planethaskell)

How to Take a Calculus Test

Show what you know.
Don’t invent new math.
Don’t contradict yourself.
Do the easy questions first.
If you don’t know how to do a problem, start by writing down relevant things that you know are true in general.
Break difficult problems into manageable pieces.
Know what a function is, and know what things are functions.
If you aren’t taking a derivative, it’s probably wrong. (see the explanation below)
If you’re doing obscene amounts of computation, it’s probably wrong.
Don’t care about the final answer.

(via Jeremy)

A Slow Study Group for ML

I’m going to work through
The reason is that I’ve never learned a statically typed functional programming language, I feel weak on recursive data type definitions, and I am curious about compiler and interpreter construction. So, I’m looking for a way to learn about all 3 at once.
Why ML?

  1. Proven, excellent pedagogical language with great resources.
  2. Smaller than OCaml, F#, and Haskell; so I won’t get distracted with tons of “stuff”
  3. Puts me in a good position if I wanted to use it “for real” that OCaml, F#, Haskell, or even Scala and some other ML in Java languages would be a good follow up path in terms of leveraging the investment.

Basically when I sit down to learn the basics of anything from #2 I feel like they assume you know the basics of ML, and well, I don’t!
Let me know if you want to review problems together.