Skip to content

termlogo v1.0.0

Choose a tag to compare

@andybateman andybateman released this 07 Oct 00:12
· 38 commits to main since this release

[2026-10-07] - Arrays, property lists, files, keys, text cursor, GOTO, round pens and textbook coordinates

  • Fixed nested FILLED: the inner shape was painted first and then cleared wherever the outer polygon overlapped it. Inner shapes are now painted again on top of the outer one, in order, and the stencil still records each once
  • Added arrays: {a b c} literals (with @origin), ARRAY MDARRAY LISTTOARRAY ARRAYTOLIST ARRAYP SETITEM MDITEM MDSETITEM, and array support in ITEM COUNT FIRST LAST PICK MEMBERP. The tokeniser now treats { and } as delimiters
  • Added property lists (PPROP GPROP REMPROP PLIST PLISTS PPS ERPS; ERALL clears them), GOTO and TAG, and .MAYBEOUTPUT
  • Added file streams: OPENREAD OPENWRITE OPENAPPEND OPENUPDATE CLOSE CLOSEALL ALLOPEN SETREAD SETWRITE READER WRITER READPOS SETREADPOS WRITEPOS SETWRITEPOS EOFP FILEP ERASEFILE. READWORD READLIST and PRINT TYPE SHOW follow SETREAD and SETWRITE. Open files are closed when Logo ends
  • Added READCHAR, READCHARS and KEYP: immediate key input in the REPL (Escape and Ctrl-C stop the program), character reads from piped input and from files
  • Added CURSOR, SETCURSOR and a working CLEARTEXT for the REPL's text area (five rows, per command). Outside the REPL SETCURSOR is accepted and does nothing
  • Braille and half-block pens are now round brushes of the true width instead of whole-pixel squares
  • PENREVERSE now XORs colours, so drawing a line twice restores what was under it, and a wide reversed stroke flips each pixel once. It used to toggle a pixel between the pen colour and empty
  • Added --fit N and FITWINDOW N: scale so an N x N Logo window (1000 for textbook programs) fits the canvas; the fit survives terminal resizing
  • Not changed: a Braille cell still shows one colour (its most common), because a Braille character has a single foreground colour
  • Added the demo screenshots under docs/images/ and a Gallery section in the README
  • Validation (as at 2026-10-07): 302 tests passing, including a live pseudo-terminal test of READCHAR and SETCURSOR; Ruff lint/format and launcher syntax checks clean. Not tried by hand in Ghostty

Single-file download: termlogo.pyz

One executable file that runs wherever Python 3.10 or later is installed. There is nothing else to install.

# download termlogo.pyz from the Assets list below, then:
chmod +x termlogo.pyz
./termlogo.pyz                       # interactive REPL
./termlogo.pyz program.logo          # run a Logo program
./termlogo.pyz -e 'repeat 36 [fd 30 rt 100]'
./termlogo.pyz program.logo -o out.png   # export .svg, .png, .txt or .stl

# optional: put it on your PATH as `termlogo`
mkdir -p ~/bin && mv termlogo.pyz ~/bin/termlogo
  • If you have no python3 on your PATH, run it as python3.11 termlogo.pyz (any version 3.10+).
  • On macOS, a downloaded file may be quarantined. If it will not run, use xattr -d com.apple.quarantine termlogo.pyz.
  • It is a Python archive, not a compiled binary. Type HELP in the REPL for every command, or see the README.