It would, except that the JVM is short a stack -- Forth really likes having two. A Toy Forth is a great next step after writing a Toy Lisp. It's like exploring an alternate universe, where any sort of abstraction between you and the hardware should be knocked down in the name of simplicity.
A few great places to get started:
- Forth Warrior, a programming game using a java-based Forth machine with 2d sprites.
- Jones Forth, a literate x86 forth implementation (great for learning plumbing)
- Retro Forth, a minimalist little virtual machine and Forth image that targets it.
None of these are ANS Forth / FIG Forth / etc compatible, which I think is in keeping with Moore's tradition of just whipping up a new dialect whenever he has a new problem domain.
A Forth Haiku is an attempt to mix mathematics, art, and the
Forth programming language. It resembles a texture shader,
however, the emphasis is on direct expression in the
resulting image.
The Forth program describing each Haiku is run once per pixel
over a square image. Forth cells are floating point.
Conditions return 1 instead of -1. The position is available
from the words x and y, which range from 0 to 1, which the
origin in the lower left hand corner. The haiku returns the
desired color in (red, green, blue, alpha), with alpha being
topmost on the stack. If the stack has less than 4 items
default values are assumed: red:0, green:0, blue:0, alpha:1.
Like a traditional haiku, an ideal Forth Haiku has 3 lines
of 5, 7, 5 words. Compositions which don't fit the haiku form
are either 'short' (less than 140), or 'long'.
A few great places to get started:
- Forth Warrior, a programming game using a java-based Forth machine with 2d sprites.
- Jones Forth, a literate x86 forth implementation (great for learning plumbing)
- Retro Forth, a minimalist little virtual machine and Forth image that targets it.
None of these are ANS Forth / FIG Forth / etc compatible, which I think is in keeping with Moore's tradition of just whipping up a new dialect whenever he has a new problem domain.
[1]: https://github.com/JohnEarnest/Mako/tree/master/games/Warrio...
[2]: http://git.annexia.org/?p=jonesforth.git;a=blob_plain;f=jone...
[3]: http://retroforth.org