- bend URL and vault password now share a single config-bar row, split
via a 2-column grid (1fr 1fr). Vault still hidden when free-form
isn't selected; just collapses its column.
- Every flexbox removed. Every multi-child container uses CSS grid:
.controls, .config-bar, .bend-bar, .vault-bar, .panes, .pane,
.brand, .tabbar, .tabs, .tab, .transcript, .entry, .tier-output,
.prompt-bar, .lock-screen, .lock-card, .lock-row.
- Added `[hidden] { display: none !important; }` so the ephemeral
button on the REPL lock screen actually hides the modal. Without
this, .lock-screen's `display: grid` overrode the hidden attribute's
UA-default display: none.
102 lines
4.2 KiB
HTML
102 lines
4.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>lumbda playground — lisp in your browser, three tiers</title>
|
|
<link rel="stylesheet" href="style.css">
|
|
<script type="importmap">
|
|
{
|
|
"imports": {
|
|
"@codemirror/state": "https://esm.sh/*@codemirror/state@6.4.1",
|
|
"@codemirror/view": "https://esm.sh/*@codemirror/view@6.34.1",
|
|
"@codemirror/commands": "https://esm.sh/*@codemirror/commands@6.6.2",
|
|
"@codemirror/language": "https://esm.sh/*@codemirror/language@6.10.3",
|
|
"@codemirror/legacy-modes/mode/scheme": "https://esm.sh/*@codemirror/legacy-modes@6.4.1/mode/scheme",
|
|
"@codemirror/theme-one-dark": "https://esm.sh/*@codemirror/theme-one-dark@6.1.2",
|
|
"@lezer/highlight": "https://esm.sh/*@lezer/highlight@1.2.1",
|
|
"@lezer/common": "https://esm.sh/*@lezer/common@1.2.3",
|
|
"style-mod": "https://esm.sh/*style-mod@4.1.2",
|
|
"crelt": "https://esm.sh/*crelt@1.0.6",
|
|
"w3c-keyname": "https://esm.sh/*w3c-keyname@2.2.8"
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<a class="brand" href="../" aria-label="lumbda home">
|
|
<img class="logo" src="lumbda-logo-green.png" alt="" aria-hidden="true">
|
|
<h1 aria-label="lumbda.">lumbda<span class="period" aria-hidden="true">.</span></h1>
|
|
</a>
|
|
<p class="tagline">lisp/scheme in your browser, three tiers in parallel</p>
|
|
<p class="lede">
|
|
same lisp source. three implementations compiled to webassembly:
|
|
<strong>python</strong> (cpython via pyodide hosting <code>lumbda.py</code>),
|
|
<strong>c</strong> (emscripten build of the tree-walker + bytecode vm),
|
|
<strong>asm</strong> (hand-written webassembly text format — parallel to <code>asm/lumbda.s</code>).
|
|
</p>
|
|
</header>
|
|
|
|
<section class="controls">
|
|
<fieldset class="program">
|
|
<legend>demo program</legend>
|
|
<label><input type="radio" name="program" value="mandelbrot" checked> mandelbrot</label>
|
|
<label><input type="radio" name="program" value="fib-ack"> fib + ackermann</label>
|
|
<label><input type="radio" name="program" value="sieve"> sieve of eratosthenes</label>
|
|
<label><input type="radio" name="program" value="self-interp"> lisp-in-lisp meta-eval</label>
|
|
<label><input type="radio" name="program" value="free-form"> free form (encrypted)</label>
|
|
</fieldset>
|
|
<fieldset class="tier">
|
|
<legend>tier</legend>
|
|
<label><input type="radio" name="tier" value="python"> python (pyodide)</label>
|
|
<label><input type="radio" name="tier" value="c" checked> c (emcc)</label>
|
|
<label><input type="radio" name="tier" value="asm"> asm (wat)</label>
|
|
<label><input type="radio" name="tier" value="all"> all three</label>
|
|
</fieldset>
|
|
<button id="run" class="primary">run</button>
|
|
<button id="cancel" class="secondary">cancel</button>
|
|
<span id="status" class="status"></span>
|
|
</section>
|
|
|
|
<section class="config-bar">
|
|
<div class="bend-bar">
|
|
<span class="bend-icon" title="gpu-worker bend URL">⚡</span>
|
|
<input id="bend-url" type="url" placeholder="https://your-gpu-worker.example/bend (sets (bend!-call ...) destination)">
|
|
<button id="bend-save" class="secondary">save</button>
|
|
<span id="bend-state" class="bend-state"></span>
|
|
</div>
|
|
<div class="vault-bar" id="vault-bar" hidden>
|
|
<span class="vault-icon" title="local vault">🔒</span>
|
|
<span id="vault-state" class="vault-state">locked</span>
|
|
<input id="vault-pw" type="password" autocomplete="off" placeholder="vault password">
|
|
<button id="vault-unlock" class="secondary">unlock</button>
|
|
<button id="vault-lock" class="secondary" hidden>lock</button>
|
|
<span id="vault-note" class="vault-note"></span>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="panes">
|
|
<div class="pane code-pane">
|
|
<h2>code</h2>
|
|
<div id="editor"></div>
|
|
</div>
|
|
<div class="pane output-pane">
|
|
<h2>output</h2>
|
|
<div id="output"></div>
|
|
</div>
|
|
</section>
|
|
|
|
<footer>
|
|
<p>
|
|
same lisp source, three implementations — verify yourself by
|
|
eyeballing each tier's output, or by running
|
|
<code>make wasm-test</code> against the cross-tier suite.
|
|
asm tier (<code>asm/lumbda.wat</code>) is growing toward feature parity
|
|
with <code>asm/lumbda.s</code>; see <a href="../">lumbda.</a>
|
|
</p>
|
|
</footer>
|
|
|
|
<script type="module" src="app.js"></script>
|
|
</body>
|
|
</html>
|