lumbda/www/playground
russell@unturf.com 1f2ef730a2
python tier: SAB-backed pause poll — auto-pause now works on python too
leval() in lumbda.py grows a counter-gated check (every 1024th
iteration) that calls a module-level _lumbda_pause_hook. Native
Python users leave the hook None and the check short-circuits to a
single bitwise AND. The pyodide loader installs a hook that reads
_lumbdaPyPauseRequested (a JS callback over Atomics.load on the
SAB) so the REPL's auto-pause-on-tab-switch flow drops into the
same path on python that it already uses on C.

Also adds setPauseFlag to the python tier's returned object so
runner.setPauseFlag propagates the SAB through worker config.

repl.js's autoPauseTab no longer falls back to hard-cancel when
the active tier is python — the SAB-poll path covers both. Asm
remains on hard-cancel since the WAT tier has no in-eval poll
site yet.

Test suite (tests.py, 571 tests) passes — verified the no-op
hook path doesn't change native eval semantics.
2026-06-15 11:16:50 -04:00
..
asm asm streaming: recycle the 64 KB output buffer after each flush 2026-06-15 06:36:00 -04:00
c repl: auto-pause + portal-save when leaving a tab mid-eval, resume on return 2026-06-15 09:02:53 -04:00
demos bend: handler returns formatted string + http-listener ships strings raw 2026-06-14 20:15:37 -04:00
fonts/chunkfive wasm/playground: cancel button, asm state-leak fix, restyle to match homepage 2026-06-14 12:13:20 -04:00
python python tier: SAB-backed pause poll — auto-pause now works on python too 2026-06-15 11:16:50 -04:00
app.js playground streaming: typed messages, no \n bytes on the wire 2026-06-15 06:30:10 -04:00
crypto.js playground: free-form code option + encrypted vault, single-scroll layout 2026-06-14 12:56:25 -04:00
index.html playground footer: surface what's locked + what's still WIP (call/cc, macros, portal) 2026-06-14 17:27:17 -04:00
lumbda-logo-green.png wasm/playground: cancel button, asm state-leak fix, restyle to match homepage 2026-06-14 12:13:20 -04:00
runner.js repl: auto-pause + portal-save when leaving a tab mid-eval, resume on return 2026-06-15 09:02:53 -04:00
style.css playground: split streamed chunks into per-line divs + per-program drafts 2026-06-15 06:02:37 -04:00
worker.mjs repl: auto-pause + portal-save when leaving a tab mid-eval, resume on return 2026-06-15 09:02:53 -04:00