Tag: Structure and Interpretation of Computer Programs
-
Programmatic adventures in the hyperbolic plane
Recursion is dangerous. So dangerous that in my professional life I’m explicitly banned from using it in code. After all who would want their aeroplane to stall, their car to crash or their fridge to defrost because of a stack overflow. But it is also, most (but not all) programmers would agree, beautiful and more…
-
Who has been given the cash changing problem?
Some class, somewhere, has obviously been given the recursive money changing problemĀ as a piece of work, because I have had several hundred visits in the last week from people seeking to get a grip on it. Here’s the best solution, either buy Structure and Interpretation of Computer Programs or simply read it for free online.…
-
An idea I saw on normblog
Norman Geras is a great man. He’s a social, not a computer, scientist, and this year I have been mainly reading computer books. Still, here’s an idea I have pinched off his website (he got it from here). Match the prompts to books you have read in the last year – in my case mainly…
-
My first R program
Having used Groovy (which makes the scripting environment feel familiar) and some Scheme (via Structure and Interpretation of Computer Programs), R does feel completely alien, but it still feels like a steep learning curve. But here’s my short script – And here’s the graph (of Linux kernel compile times) it generates – the blue line…
-
Something more on Fibonacci numbers
My earlier blog about the Fibonacci series gets a lot of hits, so I thought I would write something more, as clearly there is interest. Once again this is from “Structure and Interpretation of Computer Programs” (available for free here electronically): Let and . Then . So . (1) (2) Then (3) Simplifying (2) (4)…
-
The lambda calculus and closures in Groovy
No sooner had I written about the lambda calculus and Structure and Interpretation of Computer Programs than I sat in a lecture on closures in Groovy and was presented with a structure like this (which multiplies two numbers, in this case 3 and 4): Which immediately reminded me of one of Alonzo Church‘s formulations of…
-
Coming up… the lambda calculus
Another thing that The Annotated Turing taught me is what all those lambdas that I have seen over the last 25 years were about, or at least it introduced me to what they were about. So I have just ordered a copy of Structure and Interpretation of Computer Programs: and I can guess that some…