lumbda/wasm
russell@unturf.com 8edb752382
bend demo: pretty-format the 100M secp result instead of raw S-exp dump
Fox said 'doesn't dazzle me' on the previous run. The math is real
(160x GPU win, ~33 minutes of CPU compute in 13 seconds of GPU
kernel) but the output panel showed a wall of S-expression atoms
that buries the headline.

Worker now builds a multi-line summary string inside the response
under a new (summary "...") field:

  ✦ GPU just batched 100,000,000 secp256k1 public-key computations.

    scalar gen      : 5130 ms (random.urandom)
    GPU kernel      : 13028 ms (RTX 3090, --window-w 4)
    GPU throughput  : 7.67 million keys / second

    CPU baseline ref: 0.050 Mkeys/s (libsecp256k1 single core)
    CPU would need  : 33.3 minutes (2000 sec)
    GPU finished in : 13.0 sec
    speedup         : ~153× faster on GPU

Two new portable helpers — with-commas (recursive thousand
separator) and format-float (truncate decimals + drop trailing
dot when n=0) — work on all three tiers because they only use
string-append, substring, char=?, and number->string.

Demo now reads the response with read-from-string, assoc-extracts
the summary string, and displays it raw. Same source compiles
identically under asm / c / python. Existing structured fields
(n, gen-ms, gpu-ms, etc.) stay untouched for callers who want
the numbers as data.
2026-06-14 20:11:38 -04:00
..
app bend demo: pretty-format the 100M secp result instead of raw S-exp dump 2026-06-14 20:11:38 -04:00
asm wasm asm: read_string handles \" \\ \n \t escapes — bend payload works 2026-06-14 19:00:17 -04:00
c bend: fix C tier LinkError — switch EM_JS to --js-library mergeInto 2026-06-14 19:33:07 -04:00
dist-repl bend: fix C tier LinkError — switch EM_JS to --js-library mergeInto 2026-06-14 19:33:07 -04:00
python bend: wire bend!-call into the pyodide tier — playground python 2026-06-14 18:25:46 -04:00
repl gc diagnostics: per-tier heap pressure surfaced in repl tabbar 2026-06-14 17:32:48 -04:00
tests wat: internal-define scoping (R7RS letrec*) + c-wasm gc gap documented 2026-06-14 17:54:33 -04:00
Makefile bend: fix C tier LinkError — switch EM_JS to --js-library mergeInto 2026-06-14 19:33:07 -04:00