Ant
Jump to navigation
Jump to search
- Not to be confused with Langton's ant.
Ant is an esoteric language, which uses the metaphor of ants walking on a one-dimensional piece of land. Every ant is a thread, with the queen as main thread. A thread ends execution when the command "die" is given. When the queen dies, program execution is stopped.
No interpreter has been written yet, and the syntax is not completely finished.
Syntax
In Ant, all whitespace is insignificant, i.e. everywhere a whitespace is allowed, it can be omitted, and vice versa.
A better description of the language features will be given when I figured it out.
Example
The following example is an infinite loop, forever printing "Hello world!"
queen [ spawn (reaper) go right ] class (reaper) [ take eat die ] ground [ 72 101 108 108 111 32 119 111 114 108 100 33 10 ]