I'm reading "The Little Schemer", and implement a Scheme interpreter as I go. I'd recommend this to everyone interested in Lisp, minimalist languages, and recursive thinking! Also, I like how the first chapter ends:
"The Little Schemer" starts off light and easy, and introduces come basic Scheme concepts and functions. The middle part explains how recursive functions are evaluated in excruciating detail, and was not very interesting to me. But the last two chapters were mind-blowing:
The last chapter builds a Scheme interpreter in Scheme, which is cool. And the chapter before that explains how to do recursion with nested lambda expressions only, without access to named functions:
It builds up the strict, applicative-order Y combinator: The input is a function which takes another function, and returns a function which does some stuff and calls the provided function when it wants to recurse. The output is a recursive version of the inner function.
I read the chapter three times, and still didn't completely get it. I found this (long, but awesome) article helpful: https://mvanier.livejournal.com/2897.html After reading it two times, and deriving the Y combinator four times in two languages, I'm now starting to develop an intuition for it…
This is my idea of a fun evening! :D
Any sufficiently complicated Go program contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.
@ckeen Sounds super fun! :) But I can't find a mention of that lecture – can you?
I hope that still works.
chaos.social – a Fediverse instance for & by the Chaos community