lumbda/www/repl
russell@unturf.com cf7ff2219f
c-tier streaming: re-add the trailing newline emcc strips before postMessage
Emscripten's Module.print fires once per line and hands the loader
just the line content — no trailing newline; the caller is expected
to add it back when joining (outBuf.join('\n') does that for the
final return). Streaming path was forwarding the line straight to
onChunk without the newline, so successive chunks concatenated
horizontally in the playground panel — the loop

  (let loop ((i 0))
    (cond ((= (modulo i 10000) 0) (display \"tick \") (display i) (newline)))
    (loop (+ i 1)))

was running fine on c tier (each (newline) ended a printf line) but
arriving in the UI as 'tick 0tick 10000tick 20000...' with no
breaks.

Loader's print/printErr callbacks now pass `line + \"\\n\"` to
currentOnChunk. Final buffered join (which already adds the \\n)
is untouched, so the post-eval output string keeps the same shape.
Pyodide _StreamingStdout sees Python's raw write() bytes including
the \\n already; asm's emit_chunk fires AFTER output_len was
incremented past the \\n, so the slice [flush_start, output_len)
includes it. Neither needed a change.
2026-06-15 05:38:03 -04:00
..
asm wasm asm: stream output line-by-line via new emit_chunk env import 2026-06-14 20:35:13 -04:00
c c-tier streaming: re-add the trailing newline emcc strips before postMessage 2026-06-15 05:38:03 -04:00
fonts/chunkfive repl: /repl/ page with encrypted multi-tab sessions 2026-06-14 12:50:35 -04:00
python bend: wire bend!-call into the pyodide tier — playground python 2026-06-14 18:25:46 -04:00
crypto.js repl: /repl/ page with encrypted multi-tab sessions 2026-06-14 12:50:35 -04:00
index.html repl: single page scroller — header pinned, everything else flows 2026-06-14 13:21:02 -04:00
lumbda-logo-green.png repl: /repl/ page with encrypted multi-tab sessions 2026-06-14 12:50:35 -04:00
repl.css gc diagnostics: per-tier heap pressure surfaced in repl tabbar 2026-06-14 17:32:48 -04:00
repl.js gc diagnostics: per-tier heap pressure surfaced in repl tabbar 2026-06-14 17:32:48 -04:00
runner.js gc diagnostics: per-tier heap pressure surfaced in repl tabbar 2026-06-14 17:32:48 -04:00
style.css playground: status counter sits under run+cancel instead of far right 2026-06-14 16:27:05 -04:00
worker.mjs gc diagnostics: per-tier heap pressure surfaced in repl tabbar 2026-06-14 17:32:48 -04:00