8f4e is a stack oriented programming language and live code editor that I created to perform generative music at algorave events. This monorepo contains the compiler, specialised runtimes, and the code of a browser-based visual code editor I designed specifically for the 8f4e language. The editor and runtime stack follows a REPL-style coding loop (edit, compile/evaluate, and observe output), but it is UI-driven rather than a terminal prompt workflow.
More details about the language design and documentation can be found at ./docs/README.md
The 8f4e project is organized as an Nx monorepo with the following package hierarchy:
8f4e/
└── packages/
├── compiler (The core compiler that transforms 8f4e code into WebAssembly)
├── editor (The main editor package)
│ └── packages/
│ ├── editor-state (Editor state management)
│ ├── glugglug (2D WebGL graphics utilities)
│ ├── sprite-generator (All UI graphics are generative)
│ ├── state-manager (State manager with subscriptions)
│ └── web-ui (WebGL rendering for the editor interface)
├── examples (Example modules and projects)
├── runtime-audio-worklet ┐
├── runtime-main-thread-logic │ (Various runtime environments
├── runtime-web-worker-logic │ for different execution contexts)
├── runtime-web-worker-midi ┘
├── cli (CLI for compiling 8f4e project files)
├── compiler-worker (Web Worker wrapper around the compiler for live coding)
├── pmml28f4e (tool to convert PMML neural networks to 8f4e projects)
├── stack-config-compiler (Stack-machine-inspired config language compiler)
├── config (Shared tooling and configuration helpers for the workspace)
└── website-background (Website background assets built from an editor project)
You can use npx nx graph to explore the relationship between the packages.
-
Install dependencies:
npm install
-
Build all packages:
npx nx run app:build
-
Start the development server:
npx nx run app:dev
The app will be available at http://localhost:3000