LOGO is a programming language that was developed in the late 1960s.
Its main goal was to introduce beginners to the concept of algorithm or programs.
The turtle robot, which is actually an on-screen cursor, is one of the most famous features. Thanks to a very easy syntax it was possible to make the turtle move, rotate or draw figures. By providing immediate visual feedback the language was very accessible and easy to debug.
The interpreter I wrote can process a simplified version of the LOGO language.
It understands the following key-words and operators:
DEF, BEGIN, END, IF, THEN, ELSE, REPEAT, CALL, MOVE, JUMP, COLOR, FILL, NOFILL sin, cos, tan, *, +, -, /, =, <=, <, >=, >, &&, ||, not
The interpreter is written in CaML, you can find more information about it by reading the documentation (in French):
The syntax of LOGO is quite simple.
Here is the definition to draw a square:
DEF SQUARE (n) BEGIN REPEAT (4) BEGIN MOVE (n) ROTATE (90) END END
And here is the one to draw a circle:
DEF CIRCLE (r) BEGIN REPEAT (1000) BEGIN MOVE (r/1000) ROTATE (360/1000) END END
Many other much more complex algorithms can be found in the archive containing the source code.