Logo Interpreters

Lunar Logo

Welcome to Lunar Logo, an experimental scripting language based on Logo and Lua, with a tiny core and clean, minimal syntax. Example usage:

$ ./lunar sqrt add mul 3 3 mul 4 4
5.0

That's right, you can type Lunar Logo code at a Bash prompt without escaping it (within reason). For a bigger sample, put this code in a file, say repl.lulz:

print [Welcome to Lunar Logo. Enter your commands, or BYE to quit.]
while [true] do
    type >
    type space
    make cmd readlist
    if eq nil :cmd do
        break
    end
    if eq 0 count :cmd do
        continue
    end
    if eq bye lowercase first :cmd do
        break
    end
    foreach i results parse :cmd do
        if neq :i nil do
            show :i
        end
    end
end

Now you can load it as follows:

$ ./lunar load repl.lulz

Indeed, Lunar Logo doesn't need a built-in interactive mode because you can code one yourself in just a few lines!

Features

Download

Lunar Logo is abandoned as of 15 March 2022. Source code (in Python and Go) is preserved because why not. You can have it under the MIT License.

Documentation

You can learn more about Lunar Logo from the tutorial and frequently asked questions; people familiar with older Logo dialects might want to beware of differences.

Uses

History and status

This is the second time I do a Logo dialect. The first time around I kept much closer to the original language, but the result was a messy implementation that left much of the heavy lifting to individual procedures, and still didn't have much in the way of speed or capabilities.

31 January 2017
Lunar Logo has two implementations that can run all the examples correctly. The language supports over 100 procedures. See the tutorial for an overview.
The software is considered beta quality. More real-world testing is needed, and the feature set may still change. Anything mentioned in the tutorial and examples should stay put from now on, though.
8 February 2019
Lunar Logo is now shelved. I'm still proud of the language design and consider it my best yet, but the implementation is a Rube Goldberg machine that takes too much effort to port and maintain. See Lispy Logo instead.
2 February 2021
I replaced the long-obsolete 32-bit builds for Mac/Windows with a new one for 64-bit Linux. Source code (in Python and Go) is now included.

To do: Error reporting needs some way to provide better context.