

7 lines of code, 3 minutes: Implement a programming language from scratch - adg001
http://matt.might.net/articles/implementing-a-programming-language/

======
ramchip
For a fairly liberal definition of "from scratch", of course...

~~~
Hoff
Obligatory Sagan quote: “If you want to make an apple pie from scratch, you
must first create the universe.”

------
johkra
Does (((λ f . (λ x . (f x))) (λ a . a)) (λ b . b))) reduce into the identity
function?

~~~
fadmmatt
Yes.

------
inquisitor20
this looks suspiciously similar to my analysis of programing languages class

~~~
jorgeortiz85
If you went to the University of Utah, he probably taught it
(<http://matt.might.net/#teaching>).

~~~
messel
epic sms (small world syndrome) if this was his teacher

~~~
raghus
sws?

~~~
petercooper
Unless you live in Australia.

------
akkartik
I wonder: What's a minimal language in this vein with lisp-style macros?

~~~
fadmmatt
That's a good question, actually.

Lisp macros need knowledge of the structure of the s-expression.

Certainly one can Church encode s-expressions and provide defmacro.

Gensym is trickier. Hygiene might be really challenging.

I might actually try that out.

(/article author)

~~~
akkartik
_"Lisp macros need knowledge of the structure of the s-expression."_

I recently rediscovered this for myself:
<http://arclanguage.org/item?id=11880>

------
brianobush
How about a C version? Always feel that using scheme/lisp/etc is cheating a
bit :)

