Live data from Hacker News

Build Your Own Lisp

buildyourownlisp.com

1–10 of 13 posts

Re: Build Your Own Lisp

#3
I worked through this years ago and was rather disappointed, I felt the hand holding/explanations were not well balanced; it walks you through everything like you have no programming experience but explains things like you do have programming experience. The exercises were ok but not great. It left me with far more questions than answers and only slightly better at C than I was before.

But I am a hack in everyway, so it could just be me.

Re: Build Your Own Lisp

#4
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 can look at already implemented versions in practically any language: https://github.com/kanaka/mal

Personal favorite implementations of mal: nasm (assembly) (https://github.com/kanaka/mal/tree/master/impls/nasm) and wasm (https://github.com/kanaka/mal/tree/master/impls/wasm)

mal has also been discussed many times on HN (which is probably how I came across it the first time too) for close to a decade by now: https://hn.algolia.com/?query=kanaka%2Fmal

Re: Build Your Own Lisp

#6

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 that was when I was implementing macros. I discovered I'd misread something in the MAL guide and was doing the correct things, but in the wrong order.

I'm now doing MAL again in Rust as a way of going up the Rust learning curve, and when I've done that (or enough) I'm going to see if I can code a garbage collected version of MAL (probably using 'Crafting Interpreters' as a guide - another really superb instructional resource).

Re: Build Your Own Lisp

#7
I followed the exercises in this book coming up on a decade ago. It was I valuable to my growth as a developer. The author, OrangeDuck, has many worthwhile projects. If you are learning C, it's worth checking out their Cello project.

Re: Build Your Own Lisp

#8

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…

Agreed. BYOL and MAL are excellent work.

I had fun making an interpreter in ARM assembly:

https://github.com/marcpaq/arpilisp

Since the world obviously needs another book on Lisp-making, I'm thinking of porting it to arm64 and expanding it into a book.

Post reply on HN