Working notes: 2026-11-23, from the morning to 13:55: hazeljs on Core, hazel-jit's own PR, lists measured, Gnome dig glides
Claude, 13:55 MST on 11-23, at Matthew's ask to bring the work notes and the gallery up to date. Picks up from this morning's note.
In short
- The hazeljs branch on Jane Street Core (^ticket(795); Matthew: "Yes, port now").
devmerged at 21da4ae66b and the branch's own files ported in the same commit (32057a15df), with a rewriter for Stdlib call shapes (~/.cache/hazel-core-port/). One trap no type error showed: Core'sList.initcalls its function from the last index down, which permuted a compiled tuple's labels coming back to the page; fixed in 98c482395d, with a test. hazeljs 0.0.11 built from it (b149ed5 oneditor-in-package), byte for byte the deploy'shazel-lib.js; not on npm. - ^report(63), Hazel as an npm Package: What to Decide Next, for Matthew and Cyrus: the PRs, the branch against
dev, every game in hazeljs-examples timed four ways (interpreter, jit, ahead of time, plain JS; hazeljs-examplesbench/package-0.0.11), ten decisions beforedev, and what next for speed. The jit was 317 times the interpreter (geometric mean), and on 34 of 45 operations most of its time went to converting values through Hazel's own. - hazel-jit's own PR (Matthew: the jit in at most two active PRs, its own and its integration into the package branch):
hazel-jitfromdev, draft #2859: the compiler, its value boundary, mixed mode, and the agreement tests with the evaluator tests' sweep. Static and quick checks green (af7aabc15f). #2857 merges it (3f1d825455). Moving the jit todevfound three differences: a repeated label (left to the interpreter), SInt overflow (#2828's semantics, tests held back), and modules lowered to lets whose patterns lose their annotations (mixed mode runs module members interpreted, for now). #2817 and #2819 kept for now (Matthew). - Lists as JavaScript arrays, in ^report(54) (
#lists): plain arrays copy their tails in patterns (20 to 70 times slower in recursion); a hybrid, cells plus array segments, prototyped onhazel-jit-listsand measured on the seventeen games (hazeljs-examplesbench/lists-hybrid): about 8% slower ahead of time, 4% through the jit. Then, at Matthew's ask, a page's list into compiled code and back at sizes 1 to 1,000,000, plotted log and linear: arrays and the hybrid flat at 4 to 7 ns; cells 62 ms and today's jit 4.4 s at a million Ints; records cost their length whatever the list's shape, as compiled code holds a record as an array carrying its labels. - Gnome dig 0.0.75 (^ticket(845)): the gnome and the ghosts glide from cell to cell at their old rate (1f1870f, live).
- Two explorations queued: records held the page's way, in compiled code and the interpreter (^ticket(847)); a sequence type, Seq, a balanced tree with JS arrays at its leaves, from fumola's level tree, balance without rebalancing the point (^ticket(846)).
- In progress: converters by declared type for
Hazel.jit(284a219b84 onhazeljs, #2857): a page's values straight into compiled code's shapes and back, with the old way as the fallback. Waiting on its CI; then the crossing and the games timed with it.
Where things are
| what | where | state |
|---|---|---|
| the package's branch | hazeljs, #2857, worktree ~/hazel-hazeljs | 284a219b84, converters by type, CI running |
| hazel-jit alone | hazel-jit, #2859 | af7aabc15f, static and quick green, full tests running |
| the hybrid lists | hazel-jit-lists, hazeljs-lists | measured, not merged |
| hazeljs 0.0.11 | hazelgrove/hazeljs editor-in-package | b149ed5, checks green, not on npm |
| benchmarks | hazeljs-examples bench/package-0.0.11, bench/lists-hybrid; ~/.cache/hazel-core-port/ | results in ^report(63) and ^report(54) |
Next
- The converters' CI; then the crossing at every size and the games, with them against without (^report(54)).
- Records held the page's way (^ticket(847)), then Seq (^ticket(846)).
- Waiting on Matthew: npm publish of 0.0.11, and the Noun Project icons in the package.