From 8a430bb50cd86d9beaf9f7ff34c4db9b47c83f89 Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Thu, 17 Sep 2026 21:43:58 +0700 Subject: [PATCH] The review has four lanes, and the JS backend has its references --- FIX.org | 25 +++++++++++++++++++++++-- docs/REFERENCES.md | 14 ++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/FIX.org b/FIX.org index 6012c98..1f0aaa4 100644 --- a/FIX.org +++ b/FIX.org @@ -133,9 +133,9 @@ Six of seven items are merged on dev-loop and green (dune build, dune test | 1 | re-runnable main after the window closes | merged | | 2 | C-x C-e installs a top-level form | merged | | 3 | move-only globals, borrowed never moved | merged | -| 4 | edn dynamic value | arena route, IN FLIGHT | +| 4 | edn dynamic value | merged (arena route) | | 5 | defenum autoincrement | merged | -| 6 | javascript backend | held, not started | +| 6 | javascript backend | first lane IN FLIGHT, 2026-09-17 evening | | 7 | defdata rename + C-style defunion | merged | Also merged, not from the list: macro-module symbol visibility, which @@ -189,3 +189,24 @@ and xdotool found a live window from the second run. The earlier claim that [flan dev sand.flan] failed with "unknown function begin-drawing" was true only on the stale base the work started from, and was retracted after a re-test. Nothing to chase. + +* Evening of 2026-09-17 — the review, and four lanes off it + +docs/REVIEW-production-readiness.md is the production-readiness review, written to be +implemented from. Item 4 (arena EDN) merged green before it was written, so the FIX list +proper is six of seven done and one in flight. + +Four agent lanes are running off the review, each in its own worktree: +- Tier 1 + the runtime half of Tier 4: overflow guards, map removal (Odin's + backward-shift), the registry race, the scratch buffer, Addr-on-Option, the dev-runtime + aborts. One lane because they share runtime/*.c. +- Tier 3: clock, math, getenv, basic file ops. Appends to flan_rt.c in its own section so + the merge with the lane above stays clean. +- Tier 4 without the runtime: CLI error arms, flan run flags and -O, CI, the stale + DISCUSS.md x86 table, README's missing subcommands and env-var table. +- The JS backend's first slice, per docs/DISCUSS.md §5's settled decisions: #_ first, then + one function under node, then the corpus with a MATCH/DIFFER/REFUSED survey. New + reference clones for it are recorded in docs/REFERENCES.md ("Compiling to JavaScript"). + +Tier 2 (install and shipping) was explicitly passed over. Package visibility is skipped in +every lane — it needs a syntax decision from the author. diff --git a/docs/REFERENCES.md b/docs/REFERENCES.md index 6beb029..adf50fb 100644 --- a/docs/REFERENCES.md +++ b/docs/REFERENCES.md @@ -62,6 +62,20 @@ one borrows its memory model from. `Carp` deserves the note it has: statically typed, no GC, Lisp syntax, borrow-checked. Whatever it got right or wrong is the nearest prior art to what is being built here. +## Compiling to JavaScript + +Cloned 2026-09-17, for the JS backend (FIX.org item 6, docs/DISCUSS.md §5). + +| Clone | What it answers | +|---|---| +| `Fable` | **The best semantic match**: statically typed F# to readable JS, value-semantics structs, real i64/u64. `src/fable-library-ts/Long.ts`, `Int32.ts`, `BigInt.ts` for how .NET integer semantics live on JS numbers; `src/Fable.Transforms/` for how a typed AST lowers, including where structs get cloned at assignment and call sites. Large — read it for specific answers, not through. | +| `squint` | A small Clojure-syntax-to-JS compiler. `src/squint/compiler.cljc` is the emitter to read for output style and structure. | +| `clojurescript` | The full-size version of the same problem, including host interop. Consult, don't read through. | + +The Lisp-to-JS pair never faces the two hard questions here — integer width and struct copy +semantics — because they are dynamic. Fable does, which is why it is on this list despite being +neither a Lisp nor small. + ## Graphics and the C boundary `raylib`, `raygui`, `glfw`, `SDL`, `freetype-gl`, `TIC-80`, `aseprite`, `macroquad`, `godot`, `bevy`.