microscheme.org
A functional programming language for the Arduino

(include "libraries/list.ms")
(include "libraries/io.ms")
(include "libraries/lcd.ms")
(lcd_init)
(for-each-vector write "Hi, from Scheme!")
Microscheme is a Scheme-like functional programming language, specifically targeting the Atmel 8-bit AVR microcontrollers, and designed to be used with the Arduino UNO and MEGA development boards. Microscheme is a ‘subset’ of Scheme in the sense that every valid microscheme program is also a valid Scheme program (with minor syntax substitutions). It can be characterised as compiled Scheme without the following features: first-class continuations, a macro system, variadic functions and full closures. These are deliberate shortcomings, and arise from the fact that the AVR-based Arduinos only have up to 8KB —Yes, Kilobytes!— of RAM. The overhead spared by leaving out those features means that the programmer is left with a useful amount of RAM to work with. The microscheme compiler is a hand-written recursive descent compiler, written in C, relying only on the C standard library. It is (slightly) novel among microcontroller-targeting Scheme implementations in that it compiles directly to assembly, rather than generating equivalent C code. Microscheme supports more than 80 fundemental forms, primitive and library functions out-of-the-box.