Logo 2

Usage

  • For those on MacOS, use the Option key to open the menus.

About

I always wanted to develop a programming language. I still do. Any opportunity to come up with a DSL for something is one I take with both hands (I am getting better and resisting this temptation though).

We were learning using Logo at school at the time. I think we asked to write some Logo programs at home to come up with some basic shapes (circle, hexagon). All elementary stuff.

At the same time my Dad showed me how to build a simple string tokeniser: a bit of code to split a string into tokens on the space character. Also pretty basic stuff, but being shown how to manipulate strings like this made me drunk with power and it felt like the seeds for coming up with a Logo language and interpreter of my own. So that’s what I did.

Not that this was anywhere close to a real implementation of Logo, which is a dialect of Lisp. I had no idea of tree structures or proper parsing implementations: stuff one would find in a “real” programming language. Instead, this is probably closer to assembly code. Fancy things like recursion, expressions, etc. did not exist. But I did add conditionals and subroutines — with some pretty weird names I might add — and I managed to get something that if you squint and turned your head, looked a bit like a language that can push a turtle around.

The first version of this involved a line editor which invoked the commands directly. But I was also obsessed with making a text editor that looked like QBasic. I can’t remember how I learnt to build one like this, but build one I did, and I used it as the code editor for this silly little Logo language. They say that one of the first thing new programmers do is make their own text editor. I guess, in a way, this one was mine.