🐢 LOGO graphics playground for Shrimp
Go to file
2025-12-12 08:39:35 -08:00
src pen up/pen down 2025-12-12 08:39:35 -08:00
.gitignore honu 2025-11-04 19:13:05 -08:00
bun.lock pen up/pen down 2025-12-12 08:39:35 -08:00
index.html honu 2025-11-04 19:13:05 -08:00
package.json honu 2025-11-04 19:13:05 -08:00
README.md pen up/pen down 2025-12-12 08:39:35 -08:00
tsconfig.json honu 2025-11-04 19:13:05 -08:00

🐢 Honu

LOGO-style turtle graphics powered by Shrimp.

Quickstart

bun install
bun dev

Open http://localhost:3002

This builds the app and serves the dist/ folder with Python's built-in HTTP server.

Building

bun run build

Outputs a bundled browser app to dist/. The dist/ folder contains:

  • index.html - The main page
  • app.js - Bundled JavaScript (Parser + Compiler + ReefVM + CodeMirror)

You can serve the dist/ folder with any static file server, or even open index.html directly in a browser.

LOGO Commands

Movement

  • forward n - Move forward n pixels
  • back n - Move backward n pixels
  • left n - Turn left n degrees
  • right n - Turn right n degrees

Pen Control

  • pen up - Lift pen (don't draw)
  • pen down - Lower pen (draw)
  • setcolor n - Set pen color (0-15)
  • setwidth n - Set pen width
  • clearscreen - Clear the canvas

Turtle Control

  • home - Return to center, heading up
  • setheading n - Set heading to n degrees
  • setpos x y - Set position to (x, y)
  • position - Get current position

Control Flow

  • repeat n do: ... end - Repeat commands n times

Misc

  • print value - Print to console
  • wait n - Wait n milliseconds
  • stop - Stop execution

Usage

  1. Write Shrimp/LOGO code in the editor
  2. Press Run (or Cmd+Enter) to execute
  3. Watch the turtle draw on the canvas

Example - Draw a square:

repeat 4 do:
  forward 100
  right 90
end