lumbda/wasm
russell@unturf.com f528d6df43
repl: stream tier output line-by-line (same pattern as playground)
evalInTier picks up onChunkText + onChunkEol callback parameters
and routes the new typed-event chunks from worker.mjs (already
posting chunk-text + chunk-eol per 25d2765 / 89d4877) to per-tier
streaming sinks. The REPL's own worker.mjs was already the same
build as the playground's (md5-matched) so no worker changes.

sendInput pre-populates entry.results with one placeholder per tier
(output:"", streaming:true), runs the initial renderAll, then walks
the freshly-rendered DOM rows and attaches streaming refs (one per
tier) directly to each tier-result span. Chunks land in per-line
<div display:block> children inside that span — same shape the
playground uses. metaSpan flips to "<tier> · running…" until done.

On each tier's promise resolve, the placeholder gets mutated in
place (NOT push'd a second time) and the corresponding liveRow's
finalize() reconciles the streamed divs against the full output
(rebuilds from canonical text only if they diverge or there was
an error) and stamps the elapsed-ms meta. renderAll is NOT called
between tier completions any more — that was clobbering sibling
tiers still streaming in 'all three' mode.

Net effect: paste (let loop ((i 0)) (display i) (newline) (loop
(+ i 1))) in the REPL, hit run on 'all three', and you see each
tier's count tick up in its own row in real time — not a frozen
panel followed by a wall of output at the end.
2026-06-15 07:09:33 -04:00
..
app playground streaming: typed messages, no \n bytes on the wire 2026-06-15 06:30:10 -04:00
asm asm streaming: recycle the 64 KB output buffer after each flush 2026-06-15 06:36:00 -04:00
c playground: split streamed chunks into per-line divs + per-program drafts 2026-06-15 06:02:37 -04:00
dist-repl asm streaming: recycle the 64 KB output buffer after each flush 2026-06-15 06:36:00 -04:00
python playground: stream tier output line-by-line during eval 2026-06-14 20:25:47 -04:00
repl repl: stream tier output line-by-line (same pattern as playground) 2026-06-15 07:09:33 -04:00
tests wasm asm: stream output line-by-line via new emit_chunk env import 2026-06-14 20:35:13 -04:00
Makefile bend: fix C tier LinkError — switch EM_JS to --js-library mergeInto 2026-06-14 19:33:07 -04:00