Inspiration

Rob told me about the stack-based Forth programming language and was created in the 1980s and still exists today in the form of the gForth GNU project. He then motivated the idea of implementing the popular Eliza psychotherapy chatbot (which can be run from Emacs by running the M-x doctor command) from the same era in Forth, but with a graphical interface for it instead of an ASCII one. This sounded quite interesting to me, and I am always happy to take on a challenge that teaches me something new.

What it does

We unfortunately didn't get the chance to get any of the Eliza functionality working due to the time constraint and getting sidetracked at points (me in particular), so at the moment, as a proof of concept that our Forth implementation can successfully interface with the SDL 2.0 C library, the main Forth program sdl.fs, once launched with gforth sdl.fs, creates a message box with some buttons that a user can click. This is based on an implementation that we first wrote up in C, which is cointained in the sdl.c file. With just a little more time then at this point, we could potentially get the Eliza bot graphical interface up and running. The actual chatbot itself might talk a bit more effort, but at least we got graphics working with such a low-level programmimg language!

How we built it

We built this using the C-interface built into the GForth Forth implementation.

Challenges we ran into

  • Having enough time to both learn and work with graphics in a new low-level programming language
  • Getting Forth to work with the C graphics libraries

Accomplishments that we're proud of

We are proud of getting graphics to show up with Forth.

What we learned

A lot about Eliza, the stack-based Forth programming language, and how to interface with C using it.

What's next for Graphical Forth

Implementing the actual chat-bot functionality and graphical interface.

Built With

Share this project:

Updates