Lisp Interpreter · Library
An embeddable Lisp interpreter and syntax highlighter written in C — with packages, a condition system, tail-call optimization, and a REPL.
Ditty is a Lisp dialect implemented as an embeddable C library. It follows traditional Lisp naming conventions and ships a standalone interpreter, an interactive REPL, and Flare — a built-in syntax highlighter. The core library links only against libc, Boehm GC, and PCRE2; it has no dependency on a UI toolkit.
It powers the scripting layer of mudlark, the MUD/telnet client, and the TUI REPL optionally builds on boba for an interactive terminal experience.
libditty.a) with a
pkg-config file
flare CLIditty) with a TUI modeditty-mode) with ERT testslisp-fmt)git clone https://github.com/chestso/ditty
cd ditty
./autogen.sh
mkdir -p build && cd build
../configure --prefix=$HOME/.local
make -j"$(nproc)"
make install
To embed: link against libditty.a and use the
lisp_* public API. See the
Language Guide
for the full language documentation, and the
Built-in Function Reference
for per-function details and examples.
$ ditty
ditty> (define (fact n) (if (= n 0) 1 (* n (fact (- n 1)))))
ditty> (fact 10)
3628800