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!

:P

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 cond

    and define into 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.

4 Responses to “Phase I Complete”

  1. Peter DePasquale says:

    You need to start working in languages that people use and can follow you in. Scheme, Forth. Geessh. Cmon man, we’re in 2002 now!
    ;-)

  2. Matt says:

    Yes, that’s true. But after I get a BNF for your language, I’ll reimplement your environment in 6 lines of Scheme…

    Think about it.
    ;)

    M

  3. PeterDePasquale says:

    A BNF is available for what we implemented. I have it linked on my first web site for the project, which is somehting I need to migrate this weekend.

    And yeah, you likely could reimplement it in Scheme, but I like the portability of Java. Aint never heard of no plugin for scheme in a browser!

  4. Matt says:

    I was just trying to see if I could get you wound up. Guess I missed.

    But in all seriousness, being able to implement other languages on top of the compiler is the goal. It’ll be a slow compilation process I think, though.