S9fES is a mature, portable, and comprehensible interpreter for R4RS Scheme. The core interpreter is written in pure ANSI C (C89), so it runs on all (32-bit or larger) platforms offering a C compiler. It can even be compiled natively on Plan 9. On Unix-based systems (or MinGW), it also offers an interface to common Unix system calls and Curses routines.
The current version of the S9 interpreter uses the LISP9 bytecode compiler and VM, while the first versions used a tree walker and later versions (S9fES Reimagined) used a slightly different bytecode compiler and interpreter. Here is a short summary of the differences between the bytecode interpreter and the tree-walker.
Here are some versions of the S9fES system. When in doubt get the current or the Reimagined version. Future work (if any) will be done on the current version.
The later S9fES interpreters are built around the S9core toolkit (download), which contains some basic building blocks for dynamic languages, such as a garbage collected heap, bignum arithmetics, etc. The toolkit is included in the S9fES tarball.
S9fES has been developed using EDOC, a literate programming tool. The rendered EDOC source code to a previous version is available in print and PDF form. The C and Scheme code stripped from the EDOC files is in the public domain, though, and can be downloaded here (~500KB).
Bakul Shah maintains a downstream repository with extended Plan 9 support, like access to system functions and an FFI. Please send any feedback regarding the Plan 9 extension directly to him.
The original S9fES interpreter (3rd edition, above) is explained in detail in the Scheme 9 Book!
total 1192 -rw-r--r-- 1 nmh nmh 12026 Aug 12 11:25 HISTORY -rw-r--r-- 1 nmh nmh 706 Aug 10 19:29 LICENSE -rw-r--r-- 1 nmh nmh 8659 Jul 14 2015 MASCOT.png -rw-r--r-- 1 nmh nmh 7747 Aug 12 11:37 Makefile -rw-r--r-- 1 nmh nmh 83103 Oct 24 2018 PREHISTORY -rw-r--r-- 1 nmh nmh 7743 Aug 10 20:16 README -rw-r--r-- 1 nmh nmh 1594 Aug 10 20:17 README.s9core -rw-r--r-- 1 nmh nmh 135 Nov 8 2018 TODO -rw-r--r-- 1 nmh nmh 17860 Aug 20 17:56 _csums drwxr-xr-x 3 nmh nmh 512 Jan 4 2023 attic -rw-r--r-- 1 nmh nmh 662 Aug 10 20:08 config.scm -rwxr-xr-x 1 nmh nmh 497 Oct 22 2018 configure drwxr-xr-x 2 nmh nmh 512 Jan 4 2023 contrib drwxr-xr-x 5 nmh nmh 512 Oct 30 2018 ext drwxr-xr-x 5 nmh nmh 6144 Jan 4 2023 help drwxr-xr-x 2 nmh nmh 4096 Apr 17 2023 lib -rw-r--r-- 1 nmh nmh 1222 Nov 13 2018 mkfile drwxr-xr-x 2 nmh nmh 512 Jan 4 2023 prog -rw-r--r-- 1 nmh nmh 17849 Aug 12 12:11 s9.1 -rw-r--r-- 1 nmh nmh 20930 Aug 12 12:21 s9.1.txt -rw-r--r-- 1 nmh nmh 122260 Aug 12 11:57 s9.c -rw-r--r-- 1 nmh nmh 43728 Aug 10 19:31 s9.scm -rw-r--r-- 1 nmh nmh 48503 Aug 20 17:56 s9core-20250812.tgz -rw-r--r-- 1 nmh nmh 74314 Aug 12 11:56 s9core.c -rw-r--r-- 1 nmh nmh 15043 Aug 12 11:59 s9core.h -rw-r--r-- 1 nmh nmh 77869 Aug 12 12:20 s9core.txt -rw-r--r-- 1 nmh nmh 803 Aug 10 19:33 s9ext.h -rw-r--r-- 1 nmh nmh 518241 Aug 20 17:56 s9fes-20250812.tgz -rw-r--r-- 1 nmh nmh 8700 Aug 12 11:58 s9import.h drwxr-xr-x 2 nmh nmh 1024 Jan 18 2025 util