Staapl ( is a 2-stage dynamically typed metaprogramming system. It consists of a transformer system called Coma that operates on a stack machine language.

It is based on the idea that an imperative stack machine model (abstracting a processor as a Forth machine) works well for small embedded microcontrollers, and that metaprogramming and partial evaluation are almost trivially expressed for functional concatenative programming languages due to absence of problems with identifier hygiene.

Staapl is implemented as a library for PLT Scheme, and currently contains a PIC18 code generator backend.

Staapl's Scheme bridge consists of the dynamically typed functional concatenative Scat language, implemented as a hygienic Scheme macro. In its basic form, Scat is Joy with extensional compositions: code quotations are not lists, but abstract entities represented by Scheme closures. Scat compositions support quasiquotation, and use a hygienic name management system based on PLT Scheme's module system. Scat can be given different semantics. This is used to implement Coma, which is a functional concatenative language that operates on code values.

This revision created on Tue, 23 Sep 2008 06:55:17 by doelie (Staapl blurb)