lumbda/www/index.html
russell@unturf.com 3d6d5d1010
playground: free-form code option + encrypted vault, single-scroll layout
Free-form radio adds a 5th demo slot. When selected, a vault bar appears
under the controls: enter a password, "unlock" derives a per-device
vault and decrypts (or creates fresh). Edits in the editor auto-save
350ms after typing stops. Reload + same password restores the code.

Same Web Crypto stack as /repl/ (PBKDF2 + AES-GCM, vault id =
SHA-256(password || device-salt)).

Layout: one shared vertical scroller — code pane and output pane both
grow with content, the body scrolls. No more independent in-pane
scrollers fighting the page.

Home page split into "Demo" and "REPL" sections with their own CTAs.
2026-06-14 12:56:25 -04:00

121 lines
6.7 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Lumbda — feedback as a primitive</title>
<meta name="description" content="Lumbda — a Lisp/Scheme-derived language with four execution backends (Python, Python bytecode VM, C + x86_64 JIT, pure x86_64 GNU asm), full first-class continuations, portal-based state migration, and a formally verified universality proof.">
<link rel="stylesheet" href="style.css">
<script src="https://uncloseai.com/uncloseai.js" type="module"></script>
</head>
<body>
<header>
<h1 aria-label="lumbda.">lumbda<span class="period" aria-hidden="true">.</span></h1>
<img class="lambda-mark" src="lumbda-logo-green.png?v=2" alt="" aria-hidden="true">
<p class="tagline">feedback as a primitive</p>
</header>
<main>
<section id="what">
<p class="lead">
Lumbda names a Lisp/Scheme-derived language carrying four independently implemented execution backends — one surface syntax, one test suite. A Python tree-walker with an optional bytecode VM, a C implementation that adds an x86_64 JIT, and a pure x86_64 GNU asm interpreter (~6,600 lines, ~23 KB stripped, zero external dependencies). Every backend runs a shared <code>.lsp</code> source byte-identically, with full first-class continuations, exact rationals, records, and hygienic macros.
</p>
</section>
<section id="quick">
<h2>Get it</h2>
<pre><code>git clone https://git.unturf.com/engineering/unturf/lumbda.git
cd lumbda
make test-all</code></pre>
<p>Run a program in any tier:</p>
<pre><code>python3 lumbda.py --fast examples/fibonacci.lsp
./c/lumbda examples/fibonacci.lsp
./asm/lumbda &lt; examples/fibonacci.lsp</code></pre>
</section>
<section id="tiers">
<h2>Four tiers, one language</h2>
<table>
<thead><tr><th>Tier</th><th>Lines</th><th>Binary</th><th>What a tier buys</th></tr></thead>
<tbody>
<tr><td>Python interpreter + bytecode VM</td><td>3,743</td><td>&mdash;</td><td>REPL hackability, debugging, reference</td></tr>
<tr><td>C tree-walker + bytecode VM</td><td>9,164</td><td>~215 KB</td><td>deep recursion, production workloads</td></tr>
<tr><td>C + x86_64 JIT</td><td>+patches</td><td>~215 KB</td><td>7&ndash;10&times; faster than CPython on recursive workloads</td></tr>
<tr><td>Pure x86_64 GNU asm</td><td>6,645</td><td>~23 KB</td><td>zero-dependency boot, auditability, embedded</td></tr>
<tr><td>GNU asm + naive mark-sweep GC + meta-GC arena</td><td>(same source, <code>GC_NAIVE=1</code>)</td><td>~27 KB</td><td>bounded memory without manual arena discipline</td></tr>
</tbody>
</table>
</section>
<section id="portal">
<h2>Portal: feedback across time</h2>
<p>A continuation carries feedback within a process. A portal carries feedback across processes. Same primitive, different scope: capture machine state, serialize, reload elsewhere, resume. Lumbda ships three portal formats with distinct trade-offs:</p>
<ul>
<li><strong>S-expression portal</strong> &mdash; Scheme source as a wire protocol. 16 of 16 producer&times;consumer cells green across Python, C, asm no-GC, and asm GC.</li>
<li><strong>JSON portal</strong> &mdash; graph-aware, preserves closures and live continuations (Python, C).</li>
<li><strong>Binary heap dump</strong> &mdash; asm only. 1.5 ms save+resume between two processes.</li>
</ul>
</section>
<section id="bend">
<h2>bend: dispatch to a GPU without rewriting your code</h2>
<p>Wrap any registered GPU-able form in <code>(bend …)</code> and lumbda decides per call whether to run it locally or ship it to a CUDA worker over our wire protocol. Tiny inputs stay local; heavy inputs bend to a worker that holds a warm CUDA context across requests.</p>
<pre><code>(bend (cuda-shake-fanout one-million-inputs 32)) ; → 157 ms on a 3090
; 12× faster than host hashlib</code></pre>
<p>Real workloads from the catalog: SHAKE256 fan-out (12&times; over host hashlib at 1 M inputs), secp256k1 batched point-mul (13.6 Mkeys/s on a 3090, ~309&times; coincurve CPU), tableau stabilizer sim (186&times; over Stim CPU, surveyed), and a quantum-reversible circuit simulator wired live to internal ECDSA research.</p>
<p><a class="cta" href="bend.html">Read the full bend page &mdash; protocol, benchmarks, form catalog</a></p>
</section>
<section id="proof">
<h2>EML universality proof</h2>
<p>A single operator <code>eml(x, y) = exp(x) &minus; ln(y)</code> with a constant 1 generates all elementary functions: <code>exp</code>, <code>ln</code>, arithmetic, negation, complex-plane access, trigonometry. Verified numerically in Python, verified in Lumbda's own bytecode, proven formally in Lean 4 with zero <code>sorry</code>. Lumbda's native symbolic-rewrite checker runs five theorems in 46 ms cold or 7 ms cached &mdash; roughly 16&times; faster than Lean's cold rebuild on identical hardware.</p>
</section>
<section id="doc">
<h2>Whitepaper</h2>
<p>Full language reference, tier-by-tier architecture, benchmarks, meta-GC design, universality proof.</p>
<p>
<a class="cta" href="lumbda-whitepaper.html">Read in browser (HTML)</a>
<a class="cta" href="lumbda-whitepaper.pdf">Download PDF (~2.7 MB)</a>
</p>
</section>
<section id="license">
<h2>License</h2>
<p>AGPL-3.0-only. Public domain for whitepapers, proofs, and disclosures through <a href="https://undefect.com">undefect.com</a>. Companion to <a href="https://unturf.com">unturf.com</a>&rsquo;s permacomputer project.</p>
</section>
<section id="playground">
<h2>Demo &mdash; play with the language</h2>
<p>All three tiers compiled to WebAssembly &mdash; Python (Pyodide hosting <code>lumbda.py</code>), C (Emscripten), and a hand-written WAT parallel to <code>asm/lumbda.s</code>. Pick a demo, pick a tier (or race all three at once), and watch the same Lisp source evaluate three different ways. Free-form mode saves your custom code to an encrypted local vault.</p>
<p><a class="cta" href="playground/">Open the playground &rarr;</a></p>
</section>
<section id="repl">
<h2>REPL &mdash; persistent interactive sessions</h2>
<p>Multi-tab REPL with one worker per tier per tab. Defines, set!, hash-table mutations stick across evals within a session. Transcripts persist in encrypted localStorage &mdash; supply a password, reload, same password unlocks the same vault. Each input can race all three tiers at once.</p>
<p><a class="cta" href="repl/">Open the REPL &rarr;</a></p>
</section>
</main>
<footer>
<p>
<a href="https://git.unturf.com/engineering/unturf/lumbda">source</a>
&middot;
<a href="playground/">playground</a>
&middot;
<a href="repl/">repl</a>
&middot;
<a href="lumbda-whitepaper.html">whitepaper (HTML)</a>
&middot;
<a href="lumbda-whitepaper.pdf">whitepaper (PDF)</a>
&middot;
<a href="https://unturf.com">unturf.com</a>
</p>
</footer>
</body>
</html>