Live data from Hacker News

Build Your Own Lisp

buildyourownlisp.com

11–13 of 13 posts

Re: Build Your Own Lisp

#11

When I was an undergrad, having newly read SICP, I start to write my own lisp in.... drumroll... matlab!!! I actually made quite a bit of progress before giving up. Ah, to be young again!

Here is one implementation of a lisp (mal specifically) in matlab: https://github.com/kanaka/mal/blob/dcf8f4d7b9cf7b858850a04a0...

Only 260 lines of code, pretty concise :)

Re: Build Your Own Lisp

#12

When I was an undergrad, having newly read SICP, I start to write my own lisp in.... drumroll... matlab!!! I actually made quite a bit of progress before giving up. Ah, to be young again!

Here is one implementation of a lisp (mal specifically) in matlab: https://github.com/kanaka/mal/blob/dcf8f4d7b9cf7b858850a04a0... Only 260 lines of code, pretty concise :)

Beautiful

Re: Build Your Own Lisp

#13

If you want to learn languages, implementing a lisp interpreter is a great exercise, and lots of fun too. Every time I come across a new language I want to give a try, creating a lisp interpreter is one of the first things I do. If you're curious but want a more language-agnostic guide, mal (Make a lisp) is a language+project that has a guide you can follow along with basically any language, and if you get stuck, you…

I agree about MAL (which I also came across thanks to HN). I've seen comments on HN to the effect that you are better off looking at the source code of an open lisp to understand how to do it properly, but I found working through MAL really educational and motivating. I was really pleased when I got my MAL implementation (in C#) to self-host. I only really cheated once (by looking at an existing implementation) and t…

I think MAL is rather demanding. Each step wants you to write specific functionalities which may not be absolutely crucial. Sometimes it's hard to assemble pieces in coherent enough MAL-satisfying whole. I guess MAL wants to be able to test automatically everything, but it still feels more problematic than it should.
Post reply on HN