Scheme from Scratch - Bootstrap v0.21 - Standard Library
With I/O in place, especially the
load form, we can continue to expand our Scheme implementation by programming new compound procedures in Scheme. The standard library defines forms like
not, etc. Feel free to add whatever you think you would like to have available.
A sample REPL session:
$ ./scheme Welcome to Bootstrap Scheme. Use ctrl-c to exit. > (load "stdlib.scm") stdlib-loaded > (define (double x) (* 2 x)) ok > (map double '(0 1 2 3)) (0 2 4 6)
There is no C programming for this version. That feels like a move in the right direction given a bootstrap interpreter is to eventually allow programming in the implemented language.
Three weeks to the day and even though there isn’t garbage collection, the functionality of the language is complete. As long as programs are not too big, run too long, or process too much data, the experience of using your bootstrap interpreter is what it set out to be. Sit back and enjoy watching it run. :-)
There is a v0.21 branch on github for this version.
Have something to write? Comment on this article.