Created: 2012-03-22 22:27
Updated: 2018-06-05 13:34


Logo Tortoise

What is this?

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.

What can I do with it?

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
Stop drawing lines when moving
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 write verb and instructions will be performed
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.

Why are you calling it a tortoise?

Because turtles are aquatic. Artistic tortoises make more sense to me.

It doesn't work

Yeah, I've only tested it in Chrome, Firefox 7 and Safari 5 so far. It's a work in progress.

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more