The thing that got me interested in programming way back in 1987 was the BBC Micro that sat in my primary school classroom. One day, the teacher hooked it up to a robot "turtle", which held a pen over a large sheet of paper on the ground and could be made to move around and draw by way of writing programs on the computer.
This repository is a attempt to recreate the magical experience I had that day.
This is still unfinished, but you can draw pictures using Logo programs that you can type into the area at the bottom of the page. An example program is preloaded.
The interpreter understands the following keywords:
forward x
- Move forward x steps
right x
- Turn right x degrees
left x
- Turn left x degrees
penup
- Stop drawing lines when moving
pendown
- Start drawing lines when moving
repeat x [ instructions ]
- Repeat instructions x times
to verb parameters instructions end
- Defines the function verb, optionally taking parameters listed in the form
:x
, so that you can subsequently writeverb
and instructions will be performed - Eg:
to square :x repeat 4 right 90 forward :x end square 20
if expression [ instructions ]
- Performs instructions if expression evaluates to true
Currently, expressions are only accepted by the if
keyword, so you can't do forward 1 + 1
, for example.
Because turtles are aquatic. Artistic tortoises make more sense to me.
Yeah, I've only tested it in Chrome, Firefox 7 and Safari 5 so far. It's a work in progress.