From 06cd2371d5ef5264847b69ee10b1557f114907c6 Mon Sep 17 00:00:00 2001 From: enzotar Date: Wed, 25 Feb 2026 01:39:05 -0800 Subject: [PATCH] docs: add implementation status, benchmarks, and React comparison to DREAMSTACK.md --- DREAMSTACK.md | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/DREAMSTACK.md b/DREAMSTACK.md index f7399a4..2950a3b 100644 --- a/DREAMSTACK.md +++ b/DREAMSTACK.md @@ -4,6 +4,68 @@ --- +## Implementation Status ✅ + +DreamStack is **real and running** — 6 Rust crates, 34 tests, 8 examples, ~7KB output. + +``` +.ds source → ds-parser → ds-analyzer → ds-codegen → JavaScript + ↓ ↓ + ds-types ds-layout + (type checker) (Cassowary solver) +``` + +### What Works Today + +| Feature | Syntax | Status | +|---------|--------|--------| +| Signals | `let count = 0` | ✅ Fine-grained, auto-tracked | +| Derived | `let doubled = count * 2` | ✅ Lazy | +| Interpolation | `"Count: {count}"` | ✅ Reactive | +| Conditional | `when count > 5 -> text "hi"` | ✅ Mount/unmount | +| If/else | `if x then a else b` | ✅ | +| Match | `match state \| Loading -> ...` | ✅ | +| List rendering | `for item in items -> text item` | ✅ Reactive | +| Components | `component Card(title) = ...` | ✅ Props | +| Effects | `effect fetch(id): Result` / `perform` | ✅ Algebraic | +| Streams | `debounce`, `throttle`, `distinct` | ✅ | +| Springs | `spring(target: 0, stiffness: 300)` | ✅ Physics | +| Layout | Cassowary constraint solver | ✅ | +| Types | `Signal`, `Derived` | ✅ Hindley-Milner | +| Dev server | `dreamstack dev app.ds` | ✅ HMR | + +### DreamStack vs React + +| | **DreamStack** | **React** | +|---|---|---| +| Reactivity | Fine-grained signals, surgical DOM | VDOM diff, re-render subtrees | +| State | `count += 1` direct | `setState(c => c+1)` immutable | +| Derived | `let d = count * 2` auto | `useMemo(() => ..., [deps])` manual | +| Effects | Auto-tracked, algebraic | `useEffect(..., [deps])` manual | +| Conditional | `when x -> text "y"` | `{x && y}` | +| Lists | `for item in items -> ...` | `{items.map(i => ...)}` | +| Animation | Built-in springs | framer-motion (external) | +| Layout | Built-in Cassowary | CSS only | +| Types | Native HM, `Signal` | TypeScript (external) | +| Bundle | **~7KB** | **~175KB** | +| Ecosystem | New | Massive | + +### Benchmarks (signal propagation) + +| Benchmark | Ops/sec | Signals | +|-----------|---------|---------| +| Wide Fan-Out (1→1000) | 46K | 1,001 | +| Deep Chain (100 deep) | 399K | 100 | +| Diamond Dependency | 189K | 4 | +| Batch Update (50) | 61K | 50 | +| Mixed Read/Write | 242K | 10 | + +### Examples + +`counter.ds` · `list.ds` · `todomvc.html` · `search.html` · `dashboard.html` · `playground.html` · `showcase.html` · `benchmarks.html` + +--- + ## Vision React was revolutionary in 2013. But it carries a decade of compromises: the virtual DOM, hooks with manual dependency arrays, re-rendering entire subtrees, CSS from 1996, animations bolted on as an afterthought. DreamStack asks: **what would we build today if none of that existed?**