Logo Programming

Flattening the AST

April 11, 2025
QLogo, Code, Compiler
LLVM, Compiler, Logo Programming, Tree-Walking Interpreter

Limitations of the Tree-Walk Interpreter # QLogo was implemented as a tree-walk interpreter. What this means is that the execution happens by traversing the AST nodes and performing the corresponding operations for each node. For example, this code: PRINT 2 + 3 * FN :A Generates this tree: So, using a tree-walk interpreter in this example would generate three nested subroutine calls from the call to PRINT to the call to FN :A. ...

Bob Ross and XKCD

August 6, 2024
QLogo, Code, Turtle
XKCD, Bob Ross, Logo Programming, Creative Coding

When XKCD Draws Bob Ross Painting Happy Trees With a Turtle # XKCD comic #2601, titled “Instructions”, takes an April Fool’s Day turn from the usual visual format. Instead of a traditional comic, author Randall Munroe provides an audio file containing a lengthy Logo program. This program, when executed, draws a detailed image filled with references to lots of things, but especially to turtles and Bob Ross. From Audio to Code # Dedicated fans took on the challenge of transcribing the audio into a working Logo program. ...