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

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
    if eq 0 count :cmd do
    if eq bye lowercase first :cmd do
    foreach i results parse :cmd do
        if neq :i nil do
            show :i

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!



Lunar Logo isn't really meant to be used by itself (see below). But you can get a native interpreter for your operating system to try it out:

Source code is included with all packages.


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.


Lunar Logo is mainly intended for programmers who need a scripting language for their application but don't want to bother with external libraries. Each implementation is just one file to be copied over.

That said, possible stand-alone uses are as a fancy calculator (much more powerful than expr), or for writing Awk-style filters: Lunar Logo should handle TSV files very well indeed.

As of 8 February 2017, Lunar Logo was used to drive Stereo Imagination, a command-line tool to automate the generation of 3D models; it has since been rewritten.

As of 8 February 2019, Lunar Logo is 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.

As of 2 February 2021, I replaced the long-obsolete 32-bit builds for Mac/Windows with a new one for 64-bit Linux. Source code is now included.


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.


As of 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.

To Do

Error reporting needs some way to provide better context.