lumbda/www/playground/python
russell@unturf.com 11470a5fba
bend: wire bend!-call into the pyodide tier — playground python
lumbda-py.js (and the three deployed mirrors) now expose setBendUrl
and register a bend!-call primitive in the pyodide-hosted lumbda
environment.

Implementation:
  - JS loader stashes a `globalThis._lumbdaPyBendCall` function that
    does sync XHR POST to the configured bend URL (legal in Web
    Workers, where the pyodide tier runs in this playground)
  - Python bootstrap imports `_lumbdaPyBendCall` from `js` and binds
    it as a builtin under the symbol `bend!-call`, accepting any
    value and stringifying via lumbda.show before sending
  - setBendUrl(url) on the tier object updates the JS closure; the
    runner.js plumbing already calls it on every tier when the user
    saves a bend URL in the  bar

This brings the pyodide tier to parity with the asm (WAT) tier for
HTTP-mode bend. The emcc C tier still lacks the bind — wiring it
needs a new wasm primitive built via emcc; lands in the next commit.

Tested: bend!-call "(ping)" against the same gpu-worker endpoint
returns the same (ok pong) S-expression the asm tier sees.
2026-06-14 18:25:46 -04:00
..
lumbda-py.js bend: wire bend!-call into the pyodide tier — playground python 2026-06-14 18:25:46 -04:00
lumbda.py parity probe: cross-tier corpus + fix python remainder + asm modulo 2026-06-14 15:21:19 -04:00
stdlib.lsp wasm: three-tier Lumbda to WebAssembly + browser playground 2026-06-14 11:40:34 -04:00