With Brooke’s help, we now have a Scheme compiler that can take a small program
(for example, the Scheme program ’75′), and expand it into an executable Forth
program approximately 2.5K in size. Keep in mind, that Scheme program (the number
’75′) is CPSed in the final output; it’s tail recursive, guaranteed!
But the important thing: IT WORKS! YEAH! I had a misunderstanding about how my
interpretation of mset! should be translated to Forth. That’s all over
now, though, and even some fairly complex Scheme code compiled and ran
without any tweaking. Now I need to write a pretty-printer for our tagged Scheme
objects in Forth, and everything will be good to go.
To take the compiler from a Scheme->Forth compiler to a Scheme->pbForth compiler,
we need to
- Add symbols (and strings?)
- Add the motor/sensor primitives (trivial)
- Add a front-end suite of macros for expanding things like
condand
defineinto our Core Scheme - Tie the system into DrScheme 200 under Windows and X.
Someday, I will own the Google search for “Scheme to Forth Compiler.” Bwahahaha!
Ahem.
Time for bed.