home .. forth .. colorforth mail list archive ..

[colorforth] What I'm doing with a colorforth


Well the question was asked, what am I doing with Forth.

The short answer is I'm writing a MMORPG platform for mobile phones, laptops, & desktops, and also building robots.

The long answer is I have been writing my own implementation of a colorforth, and will release it into the wild as soon as it is done.  This "colorforth" has several implementations so far, as it needs to run on a variety of processors.  The core idea behind it was a simplification of Chuck's idea of spaces:

* a newline followed by a word creates a red defining word
* a newline followed by a tab  creates a new gray comment
* a newline followed by a word followed by a tab creates a purple "multivariable"
* a tab separated list of words creates a blue "table" of values to populate a multivariable

A few other things break with Forth tradition, but owe their roots to colorforth optimizations.  I've also integrated a look ahead optimizer, that uses the punctuation marks . , ; : ! to perform various stack and flow control options.  Code that is run at compile time is contained in parenthetical phrases ( ) which get colored in yellow.  All of the punctuation marks can be attached to the end of the word,  but floating is also fine.

I also have a very simple "object system" which is merely tables of key : value pairs that allows you to write label methods for the elements in a multivariable. 

The resulting language is easy to read, has a bit more punctuation than Chuck's colorforth, but tends to look a lot like plain english with fancy colors.  And the importance of white space works a bit like Python, making the code very consistent.

Right now I have a C implementation, and an Intel assembler implementation.  I am working on ARM and AVR32 compilers.  The editor is written in OpenGL + GLUT and edits 4096 character pages, and uses two different font faces for code and comments.  I'm currently in the process of getting the code to run on iPhone as well.

Dave



---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com