DZMLang, a Scheme interpreter

Months ago I’ve started looking into functional languages. I’ve tried out The Common Lisp, Clojure, even some Scheme interpreters. Such programming design gave me an idea, to bring my own little interpreter based on SICP book.

What is it?

DZMLang is a dialect of Scheme written in C++ (or, let’s say, C++ without classes) which implements R5RS language specification and supports many lightweight scripts from various third-party Scheme interpreters. It supports basic primitives such as numbers, characters, strings, pairs and file descriptors, symbols and so on. Thanks to the Scheme’s design, you can build complex data types without a hassle and quickly evaluate your ideas.

What it isn’t?

DZMLang isn’t an interpreter for production use. It’s slow, unmanaged and faulty. This interpreter rather takes place as a training ground. Interpreter still has no garbage collector, that means, you can run out of memory quickly if you won’t manage your evaluations well. It is faulty, because there might be an exceptions that could occur in your scripts, leading to segfaults. It is slow, because it searches for variables in linear way, resulting in O(n) time, but not only there, it can be slow anywhere else. It is unmanaged, from the start, the code was written as a proof of work. Since it works now, the code requires refactor, that’s still in progress till now.

But why?

This project is a good way for me to improve my coding abilities, learn new concepts and designs and also learn functional programming. Are you like-minded? Then hop over here, or just use stable third-party interpreter otherwise.

What can you do there?

You can do anything you could in SICP-esque interpreters. Please note, there is yet no macro support, nor advanced types or natives. Variadic arguments are also implicit. I recommend checking out the standard library files and as soon as I start writing wiki, you could find additional info there.

DZMLang also supports sets, queues, multi-dimensional tables (associative arrays), mathematical functions, essential functions such as for-each or map, trees, … and more.

How can I contribute?

Do whatever you want to help out with the project, I’d appreciate it. For design changes, file an issue and we can discuss it.

That’s it for today!

Written on August 24, 2016