Excel meets JSON, but a graph, and it's projected. Progred is a pre-alpha programming environment. Your program is a document, and everything you see, including the code, is a projection of it drawn by some library. Working in it feels more like a spreadsheet than a text file: change a value, and whatever depends on it updates. Progred is a minimal prototype that demonstrates these ideas, not a finished product.
It's public early to get feedback: share on Zulip what clicks, what doesn't, and where you get lost.
Try it in your browser at prog.red · Chat about it on Zulip
Like a JSON object, a record maps keys to values. But a key isn't a string: it's an identity with a name attached as a label, so renaming a key never breaks anything that uses it. A value can also live in a cell, which has its own identity, so any number of places can point to it; that's what makes a document a graph. There are no built-in strings or numbers either, just records, lists, blobs of raw bytes, and cells. Libraries decide what data means and how it's drawn, so one document can be edited as code, editable numbers, color pickers, drawings, or 3D geometry, with no canonical source text to keep in sync.
The aim is an Inventing on Principle-style loop: change the program, see the result, and work directly with both. CAD/CAM is the demanding example it's being pushed on right now, not a limit on what it's for.
The CAM prototype during a tilted cutting pass, after the progressive implicit renderer has finished its final refinement.
A recreation of the tree demo from Bret Victor's Inventing on Principle. The original demo and the inspiration for this live-editing loop are his. Both screenshots are headless editor captures, without operating-system window chrome.
This is a pre-alpha prototype, not a finished CAD package. The editor, language, and document conventions are evolving together. CAM currently means toolpath generation and stock-removal visualization—not machine-ready G-code, verified clearance, or a safe machining plan.
- Structural editing: context-specific completions, editable names and literals, color swatches and pickers, two-dimensional number scrubbing, multiple panes and windows, and undo/redo.
- Live drawings: an editable recreation of the tree scene from Bret Victor's Inventing on Principle, with links between source code and drawing output.
- Implicit CAD: editable Fidget fields, colored scenes, orbit/zoom controls, and mesh or implicit rendering. Examples range from a torus and a gyroid to a parameterized, chamfered fidget cube.
- Early CAM: Grap-generated toolpaths, a playback slider, revolved cutter profiles, and stock subtraction using continuous fixed-orientation sweeps. The cube example separates top-and-side machining from a bottom operation; chamfer machining, tool changes, and machine output are still ahead.
- Responsive expensive views: explicit dependency-tracked computations, cancellable background work, and progressive rendering. The combined CAM viewport uses a mesh while implicit images refine in the background.
macOS is the primary development platform, and the only one tested recently. There are also Linux and browser hosts. They do not yet have feature or performance parity: in particular, the browser currently runs expensive jobs synchronously.
- A type system. Nothing checks that a value fits where it goes before the program runs; a mismatch becomes an absent when it does. Completions can't tell what a slot expects either, beyond an operation's own number type.
- A robust set of libraries. The built-in libraries cover the examples and
little else: there's no
and,or,not, orif, comparisons stop at<and==, and text has no operations. - Fluent input. Code is mostly entered a piece at a time through pickers rather than typed left to right; typing an operator after a number is the first exception.
- Complete libraries in documents. A document can declare a library that draws its own records, but the library can't offer completions yet, and other documents can't load it.
- A full browser version. The web editor can't open or save documents, so edits are lost on reload. Its copy and paste stay inside the page, and IME and dictation don't work in it.
- Accessibility. The editor draws to a canvas without an accessibility tree, so screen readers can't read it.
- A stable format. The document format, Grap, and the libraries are all still changing.
Install stable Rust through rustup and Apple's command-line developer tools
(xcode-select --install), then:
git clone https://github.com/jbrownson/progred.git
cd progred
make sandbox-fetch
make runThe fetch step downloads the locked dependencies into an isolated Cargo home.
make run builds an optimized executable, packages and ad-hoc signs a macOS
App Sandbox bundle, and launches it. No paid Apple developer account is needed
for this local desktop build.
Use the supplied build commands rather than ordinary cargo build or
cargo run. Cargo dependencies can execute code during compilation; this
repository deliberately blocks accidental unsandboxed builds. See
build security for the boundary and dependency-update
workflow.
For repeated editing and testing, use make dev. Ctrl+C rebuilds and restarts;
quitting the app also restarts it. Ctrl+\ ends the session. A failed build waits
for another Ctrl+C. Restarting this development loop discards unsaved changes.
Use the Examples menu to open a fresh example. On native macOS its shortcuts are Command+1…5; the drawn menu on other hosts uses Ctrl+1…5.
| Start with | Shortcut | What to try |
|---|---|---|
| Inventing on Principle Tree | 1 | Change a number and watch the drawing update |
| Implicit CAD Shapes | 2 | Orbit the shapes and edit their parameters, including the cube |
| CAM Toolpaths | 3 | Move the slider to inspect cuts into the stock |
| Grap Language | 4 | Explore the data model and language constructs |
| Document Libraries | 5 | See fractions and angle dials drawn by projections written in the document |
- Click numbers to edit them, or Command-drag to scrub: horizontal movement changes the value; moving upward makes adjustments coarser, downward finer. Use Ctrl instead outside native macOS.
- Drag a 3D view to orbit; scroll or pinch to zoom.
- In the tree drawing, Command-hover highlights linked source and can reveal it; Command-click selects it. Hovering the drawing calls in the source highlights their output without the modifier.
- Click an empty location to choose a completion.
…expands the suggestions to the full vocabulary. The Raw view exposes the underlying structure. - The Projections menu switches one library's projection off or back on in the selected pane or the document, the way the home page peels its forest; its last entry does the same for the libraries the document declares. The library stays loaded, so code still runs and keys keep their names.
- Zoom In, Zoom Out, and Actual Size in the View menu (Command-+, Command-−, Command-0) scale everything in the window, as the browser's zoom does on the web.
Examples replace the current document after the desktop's unsaved-changes confirmation. New Document does the same; New Window opens another window. These replace-in-place shortcuts are development conveniences.
See the example guide for the five menu examples, rendering options, and the geometry behind them. Heavy CAM views are best tried natively; high-quality implicit refinement can take time and still has rendering artifacts.
To build the browser version on macOS, set up the pinned nightly toolchain
described in web/README.md. Then run:
make run-webIt builds any editor changes, then serves http://127.0.0.1:8080/editor/ on
this machine only; the server does not listen on other network interfaces.
On Linux, make run uses the native launcher and performs a regular locked
Cargo build; the Linux build is not sandboxed. The macOS sandbox-* commands
do not apply there.
An earlier iPad feasibility port has been removed; see the platform notes. visionOS is deferred, not an implemented port.
The design favors small constructs and reusable combinators: a composition should remain an ordinary input to further composition. Native implementations can lower those abstractions without changing the data or language semantics.
- GID is the data substrate: cell references, blobs, lists, and records. Cell identity is independent of names. Libraries add open conventions for text, numbers, colors, geometry, and other domains.
- Grap is a small language embedded in GID. Functions consume and produce GID values, with Rust functions providing primitive operations. Grap can generate Fidget geometry or emit toolpaths; neither domain is built into its evaluator.
- Projections compose partial views above one total structural fallback. They choose how to present and edit a value in context. Unexpected data can fall back to structural editing instead of disappearing.
- Puri and layout separate pure widget descriptions from box placement. Settled geometry feeds hover, then independent painting and input handlers. Drawing targets Vello or Canvas2D directly; the same interface can record output for tests and headless screenshots.
- Incremental computations retain explicitly selected expensive work, tracking reads and nested computations. Background jobs and progressive results use that graph; the UI does not maintain a second retained widget tree.
The checked-in .gid files use a temporary text bridge for Git, debugging, and
tooling. The logical data model is already structural; its native binary storage
format is future work. See GID and the text bridge.
gid/— values, cells, documents, and positionsgrap/— evaluatorincremental/— dependency graph and background computationsprogred/— editor application; libraries and projections live inprogred/src/libraries/, layout inprogred/src/display/ui/— Puri, reusable widgets, measurement, and drawing backendsexamples/— bundled documentsdocs/— current references, experiments, and deferred work
Questions, ideas, and criticism are welcome on the Progred Zulip.
On macOS:
make sandbox-check
make sandbox-testStart with the motivation, then the documentation index. More focused references cover the editor model, Grap and projections, Puri, incremental work, and toolpaths. Review the release checklist before distributing builds.
Earlier TypeScript, Swift, egui, Haskell, and nested Linebender prototypes are
preserved at archive/pre-root-promotion; archive/multi-prototype retains an
earlier milestone. Their design notes are in history.
Progred is licensed under the MIT license.
Some files keep their own licenses: the vendored Fidget crates and the patches
against them are MPL-2.0, the Noto Sans fonts use the
SIL Open Font License, and the website's GitHub and
Zulip icons carry their notices in website/public/. reference/iop-tree.js
transcribes the code shown in Bret Victor's Inventing on Principle talk; it's
kept for reference and isn't covered by this license.

