Working notes: 2026-11-16: report 54, build 48, and the oracles compiled for an old phone
Claude, written on 11-19 from the session's transcript, the dashboard and the repositories' logs. Monday's work ran from 07:37 to 20:24 MST, in the session that began on 11-15. Before: the 11-15 afternoon note; next: 11-17's.
In short
Two threads. hazel-jit's changes from the 11-13 meeting went onto the prototype branch as builds 47 and 48. Matthew asked for a write-up: ^report(54), "Same Answers as the Interpreter", published at 09:01 and republished 17 times that day. At 10:50 he found the oracles painfully slow on his old Android phone. By 12:53 both oracles ran rules compiled ahead of time by hazel-jit, by default, and on the phone the I Ching was ready in 0.8 s instead of 3.7 s.
- Build 48: of the evaluator's 313 test programs, 257 compile, and none differ from the interpreter.
- SInt is 32 bits everywhere, overflow an error (Matthew's decision); the interpreter's half is PR #2828 to dev.
- Beyond livelit views, Matthew picked mixed mode: the interpreter calls compiled functions as it calls builtins.
- hazeljs 0.0.7 is on npm, published by Matthew.
Matthew, today
[...] please draft a WIP report for me, and publish it, with the changes we've planned for hazel-jit, and our status on those changes thus far.
What if we wanted to generalize hazel-jit into something that applies to any fragment of elaborated Hazel that we want to run within JS? Not just livelit views. [...]
I like the mixed mode idea a lot. number 3 in your list of paths
please revise and extend 54 until further noticeI tested our oracle apps on my old Android phone, in Firefox.
It was painfully slow. To draw each card, or line. [...]Maybe one thing to try: [...] -- only run the pre-compiled JS code for the Hazel code (running hazel jit for it during the packaging step for the HTML/JS, for a short load?)
Is there a way we can apply hazel-jit within the context of hazeljs?
Yes, 32 bits
What was done
^ticket(760), a type hole is a hole. The merged branch's CI found one parting: a list of Floats passed through a written?to a function on[Int]. The interpreter stops at the failed cast, while compiled code runs on, since both are JS numbers. Now?in a type is left to the interpreter (f4f969588b). That is build 47: 243 compiled, none differed, and the Witch's view took 7.2 ms a frame (about 139 fps) in the jit check (Firefox, in CI).^ticket(761), the limits, a branch each, all green.undefinednow stops the compiled run for the interpreter, which lets programs callingList.headcompile. Also added: tuple extension and the label builtins, and reverse applicationx |> f. Strings are now counted in graphemes, as Hazel counts them; an emoji had been 2 long compiled and 1 in Hazel, which the ASCII-only tests could not see.^ticket(765), a label namedlength, found by the I Ching prototype. Labels are properties of a JS array, so this one threw "Invalid array length"; such labels now get their own key.- Build 48 (
30a131a046): all of the above, after all of CI and the all-slides check passed. The sweep: 257 of 313 compiled, 230 agreed, none differed, 27 known ill-typed, 8 at a limit. The Witch's view took 6.1 ms a frame (about 164 fps). ^ticket(758), SInt at 32 bits. Every SInt operation that can overflow is checked, in the interpreter and in hazel-jit, and overflow stops the run with a new error,IntegerOverflow. The browser's build and a native one now agree. The interpreter's half went to dev as #2828, with Auto-fix on. Tests for the lines Codecov found unrun took its patch coverage from 56.5% to 95.7%, and all checks were green at 20:24. (On 11-19 the width became 64 bits.)^report(54): the plan by ticket, the sweep, SInt's widths and the builds table. A section beyond livelits answers Matthew's question on generalizing: seven assumptions, eight new problems, three paths, and mixed mode sketched. A compiled function can be a builtin made at run time; when its call stops, the interpreter applies the original.^ticket(765), the oracles on an old phone (Firefox 160 on Android; laptop numbers in Node):- 0.0.8 opens Hazel's editor only when asked for (the I Ching's page had five), and 0.0.9 adds ⚙️ Advanced with a 🧪 speed run.
- The phone's first line: ready at 3.7 s, a reading 113 ms, drawing it 149 ms, about five times the laptop. In 0.0.10 the I Ching declares its functions' whole types, and drawing a reading takes one frame.
- 0.0.11 to 0.0.12:
i-ching/compiled.js(33 kB, against hazeljs's 2.8 MB), matching hazeljs on all 8,102 answers. On the phone: ready at 0.8 s, a reading under 1 ms. - 0.0.13: both oracles compiled by default, the Tarot too, matching hazeljs on 6,400 deals; a Celtic Cross 0.008 ms against 45.8 ms.
^ticket(736), hazeljs 0.0.7, published by Matthew at 11:35 with his security key, and closed. It also carries the editors-on-request mode and a README section on older devices. One gap found: a module member typed only by its binding still takes an array as a list.
Where things are
- hazel:
trial/694-view-jitis build 48, under the draft #2817 (intointegration/livelits-modular-editors, not dev). The oracles' compile tests stay ontrial/765-iching-aot. - To dev, waiting on a review: #2828 and #2825.
- hazeljs 0.0.7. hazeljs-oracles 0.0.13 (
a9e72e0); since 11-19 it is hazeljs-examples.
Next
- Mixed mode, step one: functions with their whole types declared, run compiled, and a third mode in the sweep (
^ticket(766)). ^ticket(761)'s last limits:from_lvs, labels that are not names, a module member that is an expression.- The compiler inside hazeljs, so a site compiles in its own build (
^ticket(765)). - A reviewer for #2828 and #2825.