Physche: A Little Scheme in Pharo
Physche: A Little Scheme in Pharo is a booklet that guides to build a simple scheme interpreter focusing on lexical closure implementation.
About this book
The idea is to implement it as simply as possible to illustrate the key aspects and share with you the fun of building language interpreters. Doing so we will explore several concepts: limited parsing, basic interpreter, and closure concepts and implementation.
We will implement a subset of Scheme because the language is simple but not trivial, really powerful and also because I love it. And while Pharo is my favorite language, it always has the taste of a Lisp language but with lovely objects. Since I implemented several mini Schemes in Scheme, I got inspired by the (How to Write a (Lisp) Interpreter (in Python)) post of Peter Norvig to write one in Pharo for fun.
As future readings, I suggest Structure and Interpretation of Computer Programs by Abselson, Sussman and Sussman. I simply love it. There is also the excellent book of Jacques Chazarain (which is one of the persons who taught me Lisp) ”Programmer avec Scheme” by International Thomson Publishing.
Thanks to Clément Béra for feedback on the early version and special thanks for Quentin D. for his great feedback on the understandibility and the copy edit suggestions. Please contact me if you noticed I wrote something wrong or not fully precise.
An Open Book
This book is an open book:
The full book is available as a free printable PDF download (milestone version).
Latest version on our book farm is available.
Contributions are welcomed.
The content of this book is released under a Creative Commons Attribution-NoCommercial-ShareAlike license.
Authors
- Stéphane Ducasse
- With Guillermo Polito
Please contact me if you noticed I wrote something wrong or not fully precise.
You can support Stéphane Ducasse. Thanks in advance.