Blog

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

Turtle Steps

August 3, 2024
QLogo, Code, Turtle
Graphics, Resolution, Modernization

Pixels # UCBLogo was designed to run on DOS machines, which had a well-defined screen resolution. Windows wasn’t really a thing at the time, and so you could count on the turtle’s graphics region being very static. Also, since screen resolutions were so low, a single pixel was much larger, and very visible. So it made sense at the time that everything the turtle did was defined in pixels. ...

Sieve of Eratosthenes

September 22, 2023
QLogo, Code
Qlogo, Eratosthenes, Primes, Code, Logo

Sieve of Eratosthenes # I’m looking for ways to stress-test QLogo. A suggestion that came up in my Google search was the Sieve of Eratosthenes. The algorithm goes like this: erasthotenes(n): Create a list of all integers from 2 to n. Remove all multiples of primes up to the square root of n. The remaining list of numbers are the primes. I don’t consider myself an expert in the Logo language. ...

Website Reboot

September 1, 2023
Personal, Hugo
Hugo, Development, Objects, UCBLogo

Moving from Jekyll to Hugo # Over the past few years I have jumped from computer to computer before finally settling in with my current machine (Macbook Air M2). In that time I haven’t kept this website up. With my new computer I have taken the opportunity to restart qlogo.org development using Hugo instead of Jekyll. Removing Support for Objects from QLogo # Recently, I have been implementing support for objects within QLogo. ...