Jump to ratings and reviews
Rate this book

Lisp Interpreter In Rust

Rate this book
Find out more about this book at

In this book, you will implement an interpreter for a subset of Scheme, a Lisp dialect, using the Rust programming language. The interpreter will be implemented from scratch using standard Rust. Rust's rich programming constructs such as enum, pattern matching, and error handling, make it easy and a joy to implement a fully functional Lisp interpreter. With Rust's concise syntax, you will be amazed at how you will get an interpreter working with a few lines of code.

To ease the learning curve, the book is divided into two parts. The first part implements a fully functional interpreter and a REPL (Read-Eval-Print-Loop). However, it will support limited data types, if-else expressions, lambdas, and function calls. With the interpreter framework in place, the book's second part will extend the interpreter we will build in Part I with more advanced data types and support for functional programming constructs such as map, filter, and reduce.

This book offers a hands-on approach and does not dwell on programming language theory. The goal is to teach you how to build interpreters or Rust frameworks to add scripting or DSL (Domain Specific Language) capabilities to your future projects.

120 pages, Paperback

Published September 19, 2022

20 people are currently reading
9 people want to read

About the author

Vishal Patil

32 books

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
3 (37%)
4 stars
2 (25%)
3 stars
2 (25%)
2 stars
1 (12%)
1 star
0 (0%)
Displaying 1 of 1 review
Profile Image for Fotis Koutoulakis.
117 reviews13 followers
November 10, 2023
This is an interesting one, if you know what you're doing.

I opted to follow the book and not download the code as suggested by the author, so bear this in mind as we go forward.

The code (in the book) is presented only partially. You have to reconstruct the code based on guesses of type signatures based on some random call-sites in tests. If that wasn't enough, the code is terribly broken in multiple locations (I had to debug many things, and significantly refactor the implementation of function calls for instance).

Maybe the code in the author's repo is better (as in, passes tests...) but so far this has been a bit of a let-down as a book.

Its saving grace (for me) is that it was at least fun to try to fix the bugs and actually get the interpreter to work (though, I have a year of experience in Rust and many years writing lisp interpreters, and my main background is PLT, so I don't know if you will have the same experience as I did).
Displaying 1 of 1 review

Can't find what you're looking for?

Get help and learn more about the design.