An interactive playground for the experimental trace programming language, built with React and Vite.
🚀 Live site: https://bluehexagons.github.io/trace-sandbox/
- In-browser REPL — write and run trace scripts instantly, no install needed.
- Guided learning path — 29 editable lessons progress from expressions and control flow to arrays, higher-order functions, and debugging.
- Larger systems — complete examples include Euclid's algorithm, a statistics scanner, an event-driven vending machine, and a tiny factorial virtual machine.
- Live animated output — simulations call explicit setup and tick functions in persistent memory instead of repeating initialization or pre-rendering every frame.
- Memory-backed channels — waveform, cellular, and algorithm output is read directly from Trace arrays without repetitive echo loops.
- Interactive parameters — sliders and numeric inputs update live simulation variables in place when a lesson supports it, while one-shot lessons rerun normally.
- Real-time actions — inject wave pulses, perturb chaotic state, reshuffle a sort, reset an experiment, and kick a spring without resetting live memory.
- Shareable URLs — link directly to any lesson or open the current code and arguments in a prepopulated new sandbox.
- Configurable sandbox — start from a stable blank URL, then run once, repeat the full script in persistent memory, or call explicit setup/tick functions with shared streaming charts.
- Lesson notes — every example identifies its concepts, expected result, and a follow-up experiment.
- Argument support — pass space-separated numbers to scripts that use
[...]parameter lists. - Echo output —
@…@log statements show up in a console panel below the result. - Keyboard shortcut — press Ctrl+Enter (or ⌘+Enter) to run the current script.
Development requires Node.js 26.4 or newer and npm 11.18 or newer.
# Install dependencies
npm install
# Start dev server
npm run dev
# Run the complete local gate
npm run checkOn an infra-tools agent VM, run nvm use first so the project selects an
installed Node 26+ release. Keep Vite on loopback and use VM-origin Playwright
for repeatable browser testing. T3 Code's environment-port target does not
tunnel to VM loopback; use its collaborative preview only when the connected
client can already reach the application. Routine managed browser evidence
stays outside the repository; put explicitly requested captures under ignored
local-artifacts/.
The production base defaults to /trace-sandbox/ for GitHub Pages. Set
VITE_BASE=./ when building a portable static snapshot for another managed
path.
| Workflow | Trigger | What it does |
|---|---|---|
CI (.github/workflows/ci.yml) |
Push/PR to main |
Lint, type-check, build, and test |
Deploy (.github/workflows/deploy.yml) |
Push to main |
Build and deploy to GitHub Pages |
To enable GitHub Pages for this repository, go to Settings → Pages and choose GitHub Actions as the source.
Trace — An esoteric, specialized, functional programming language.
github.com/bluehexagons/trace · MIT License
The trace interpreter is imported from the trace npm package (GitHub: bluehexagons/trace).
Runs use Trace's default allocation budget of 1,048,576 numeric cells, including array headers, retained arrays, and argument stacks. Oversized allocations produce a normal playground error. This is an array budget, not a complete browser heap or untrusted-code isolation boundary.
MIT — see LICENSE.