Here is a nice post about generic data types in 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 :).
Those who favor analysis eat in a spiral.
Those who favor algebra eat row-wise.
More data is required for the remaining styles.
Let us change our traditional attitude to the construction of programs: Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do.
-– Donald Knuth
To create an environment where learning happens.
Last semester (Fall 2011) I taught “ENTERPRISE DATA MODELING” at Carroll University. Carroll is a great school and teaching the class was a lot of fun.
A mentor of mine shared that “A teacher’s job is to create an environment in which learning is likely to occur.”. Thank you for sharing that.
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.
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.
I’m going to work through
SLOWLY over MANY MONTHS.
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.
- Proven, excellent pedagogical language with great resources.
- Smaller than OCaml, F#, and Haskell; so I won’t get distracted with tons of “stuff”
- 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.