
Compiling Lambda Calculus - nils-m-holm
http://t3x.org/clc/index.html
======
craigsmansion
Seeing how Scheme is enjoying a temporary HN frontpage resurgence:

This is from the same author as the more popular:

"Scheme 9 from Empty Space" "A Guide to Implementing Scheme in C"

which walks you through the design and implementation of a portable Scheme in
C89, with awesome cover art to match the name.

([http://t3x.org/s9book/index.html](http://t3x.org/s9book/index.html))

------
js8
How does this relate to [https://www.microsoft.com/en-
us/research/publication/the-imp...](https://www.microsoft.com/en-
us/research/publication/the-implementation-of-functional-programming-
languages/) or [https://www.microsoft.com/en-
us/research/publication/impleme...](https://www.microsoft.com/en-
us/research/publication/implementing-functional-languages-a-tutorial/) ?

~~~
nils-m-holm
The book by Peyton Jones et al is certainly broader, covering denotational
semantics, pattern matching, polymorphism, list comprehension, type-checking,
laziness, garbage collection, etc. It has also quite a few chapters on
Miranda, Wadler's (one of the co-authors) favorite language.

Compiling Lambda Calculus (CLC) concentrates on one thing: compiling untyped
lambda calculus (or its incarnation, Scheme) to abstract machine code and then
to C. It goes more into the depths of lambda calculus and has more examples
(like Church numerals, etc). It also contains the _complete_ source code to
all compilers described in the text.

I would argue that CLC would be the better choice for a beginner.

------
huntie
Looking at the table of contents, it seems like an implementation oriented
version of part 1 of "Semantics Engineering with PLT Redex" by Felleisen et
al. Anyone know what abstract machine it uses? I'm guessing Landin's SECD
machine since that seems to be the most common.

~~~
nils-m-holm
The book uses a virtual stack machine that may be thought of as an ad-hoc
implementation of the SECD machine.

------
tempodox
I find larger text bodies in a grotesque font hard to read. A serif font would
be friendlier.

~~~
nils-m-holm
I think it is excusable in this case, because there is a lot of leading space
between the lines and most paragraphs are short.

Have you tried reading a few pages? It grotesque really distracting in this
particular case or is it just your general experience?

~~~
insertcredit
If you're not making any money from selling your books, why not make them
available for free? They will reach a much wider audience.

~~~
nils-m-holm
(1) People do not value free stuff.

(2) To some people (like me), a few 100 EUR per month can make a huge
difference.

~~~
GeoffKnauth
I do value free stuff, but I also value you as an author. Happy to pay for my
PDFs of your work.

~~~
nils-m-holm
Good to hear, thank you!

And I agree, the generalization above was too broad -- I also value free
stuff!

~~~
pc86
But as a generalization I think it holds true. On average, free stuff is not
valued very highly by the general public. Or rather, a person selected at
random will not perceive much of any value is something given away for free.

~~~
manuform
Bought a copy, into chapter 2,good read so far, font is readable too as far as
I can tell

