top | item 5235589

Write Yourself a Haskell in Lisp

129 points| malloc47 | 13 years ago |gergo.erdi.hu | reply

13 comments

order
[+] tikhonj|13 years ago|reply
If you're interested in something similar but a little more theoretical, take a look at "Simply Easy"[1], a little paper on implementing a couple of variations on the lambda calculus. The main idea is to demonstrate how to evaluate a dependently typed language.

It starts by looking at how to evaluate the simply typed lambda calculus and then going from that to a dependently typed lambda calculus. Surprisingly, the transformation is not all that complicated!

The actual code is in Haskell.

[1]: http://strictlypositive.org/Easy.pdf

[+] Quiark|13 years ago|reply
Hehe, I love this. I have been doing something similar, writing a compiler of Scheme-like language to x86 in Haskell.

https://bitbucket.org/quiark/hsc

The whole purpose of that mental gymnastics was to learn x86 assembly while practicing my Haskell ;)

[+] huhsamovar|13 years ago|reply
Another 'X written in Y' post. Awesome.

I think I'll save myself the wasted time and just use X from the get-go.

[+] cdmoyer|13 years ago|reply
The point isn't to replace X. It's to learn more about X and Y.
[+] emillon|13 years ago|reply
Well, the semantics of a lazy language are a bit different than usual. While I agree that pages of s-expressions are hard to feel, seeing the graph reduction algorithm on a few examples was quite refreshing.
[+] Raphael|13 years ago|reply
Make the Yule-tide gay.