lumbda/whitepaper
russell@unturf.com 3463fadd3f C --fast named-let bug: minimal repro + workaround, all 4 tiers pass now
Hunted the C --fast compiler bug that was hanging on the EML proof.
Narrowed to a specific pattern:

  (let loop ((t start))
    (let ((next (fn t)))
      (if next (loop next) t)))

A named-let whose body is (let ((x (...))) (if x (recurse x) base)).
The recursive call inside the inner let+if branch never reaches the
loop closure — hangs or segfaults.

Reproducible with a 4-line test case; filed as
c/TODO-named-let-bytecode.md with minimal repro, suspected cause
(env-chain mismatch between PUSH_ENV and TAIL_CALL), and a known-
good workaround.

Workaround landed in proof/eml_proof_in_lumbda.lsp's `normalize`:
replaced the named-let with an internal recursive `define`, which
compiles correctly under --fast. Same logic, different surface
syntax. All four Lumbda tiers now verify the proof.

Benchmark refreshed (make bench-proof):

                              cold     cached
  Lumbda asm                   46 ms    7 ms
  Lumbda C --fast              65 ms    9 ms
  Lumbda C (tree-walker)       87 ms   12 ms
  Lumbda Python --fast        651 ms  232 ms
  Lean 4                      722 ms    5 ms

All four tiers now green. Asm still fastest (46 ms cold vs Lean's
722 ms — ~16× faster). Cached Lumbda asm 7 ms vs Lean 5 ms (within
1.5×). The C --fast tier went from "hangs" to 65 ms cold — competitive
with asm once the compiler bug is dodged.

Whitepaper §8.6 table updated; prior "(hangs)" row is gone;
footnote on the named-let workaround links the TODO file.
2026-04-17 20:56:00 -04:00
..
diagrams whitepaper: actually use diagrams — 5 PNGs embedded, .dot sources refreshed 2026-04-17 19:09:16 -04:00
uncommonlisp-whitepaper.pdf C --fast named-let bug: minimal repro + workaround, all 4 tiers pass now 2026-04-17 20:56:00 -04:00
uncommonlisp-whitepaper.rst C --fast named-let bug: minimal repro + workaround, all 4 tiers pass now 2026-04-17 20:56:00 -04:00
WHITEPAPER.pdf Add whitepaper: Feedback Is All You Need 2026-04-14 13:32:42 -04:00
WHITEPAPER.rst Add whitepaper: Feedback Is All You Need 2026-04-14 13:32:42 -04:00
whitepaper.style Add whitepaper: Feedback Is All You Need 2026-04-14 13:32:42 -04:00