lumbda/www/playground
russell@unturf.com 32d38754f8
playground streaming: appendChild(TextNode) instead of textContent +=
liveBlock.append was doing `pre.textContent += chunk` on every
streamed chunk. textContent's setter wipes all existing child
nodes and creates a single new text node from the concatenated
read+new value — perfectly correct semantically but under a fast
C-tier emit loop (one chunk per (newline) printf) the per-update
restringify was visibly dropping line breaks, rendering

  tick 0tick 10000tick 20000tick 30000…

horizontally instead of stacking vertically.

`pre.appendChild(document.createTextNode(chunk))` appends a new
text node alongside existing ones — no read-back, no restringify.
Browser renders the sequence of text nodes as concatenated text
inside the <pre> which already has `white-space: pre`, so every
embedded \n produces a real line break.

Pairs with the c-tier loader's `currentOnChunk(line + "\n")` fix:
loader adds the \n that Emscripten's Module.print convention
stripped, append preserves the \n end-to-end into the DOM.
2026-06-15 05:42:02 -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
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 playground: stream tier output line-by-line during eval 2026-06-14 20:25:47 -04:00
app.js playground streaming: appendChild(TextNode) instead of textContent += 2026-06-15 05:42:02 -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 playground: stream tier output line-by-line during eval 2026-06-14 20:25:47 -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 playground: stream tier output line-by-line during eval 2026-06-14 20:25:47 -04:00