Schemix - Scheme Kernel Hacking

by Charles Miller on May 4, 2003

Link stolen from JWZ

Schemix is a Scheme system, implemented as a patch to the Linux kernel. It aims to attain R5RS compliance while remaining small, fast and easy to understand.

The intended use of Schemix is for exploration of the Linux kernel and for rapid, interactive prototyping of Linux drivers and other new kernel features. To achieve this, Schemix will attempt to make a large subset of the kernel functionality available to Scheme programs. Interactivity is via a character device, /dev/schemix which presents a REPL (Read, Eval, Print Loop) to anyone having access to the device.

 $ echo "(display (+ 1 2 3))" > /dev/schemix
 $ cat /dev/schemix
 6
 $ cat > /dev/schemix
 (define foo (kernel-lambda (char*) printk))
 (foo "Blah, blah, blah")
 ^D
 $ dmesg | tail -n 1
 Blah, blah, blah

I'll probably never use it, but that just has such a high nerd-cool factor. I also like the quote from lower down on the page: “...prototyping is basically the act of making lots of mistakes until, eventually, you make the right mistake and call it a finished product.”

Previously: Movie Review: X-Men 2 (no spoilers)

Next: Dear XML Programmers...