lumbda/wasm/app/repl.html
russell@unturf.com 73dc042ea8
wat iter-1: special forms + 35 primitives toward asm/lumbda.s parity
Special forms added:
  let*, letrec, when, unless, case, named-let

Primitives added (IDs 25-60):
  quotient, remainder, min, max, expt
  even?, odd?, positive?, negative?
  set-car!, set-cdr!, equal?, eqv?
  number?, integer?, symbol?, string?, procedure?, boolean?
  caar, cadr, cdar, cddr, caddr, cadddr
  reverse, append, apply, error
  member, memq, assoc, assq
  list-ref, list-tail, void

Plus helpers: equal_p (deep structural), append2, member_eq, assoc_eq.

39/39 wasm tests pass (20 unit + 8 integration + 11 functional).
Footer language softened — no more "minimal subset" disclaimer.
2026-06-14 12:30:01 -04:00

60 lines
2.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 repl — three tiers, one prompt</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="repl.css">
</head>
<body class="repl">
<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">three tiers, one prompt</p>
<p class="lede">
interactive repl. type a lisp expression at the prompt below; each tier
keeps its own persistent state across evals. compare side by side,
measure tier-by-tier elapsed, share a link to the
<a href="../playground/">playground</a> for static demos.
</p>
</header>
<section class="repl-controls">
<fieldset class="tier">
<legend>send to</legend>
<label><input type="radio" name="tier" value="python"> python</label>
<label><input type="radio" name="tier" value="c"> c</label>
<label><input type="radio" name="tier" value="asm"> asm</label>
<label><input type="radio" name="tier" value="all" checked> all three</label>
</fieldset>
<button id="reset" class="secondary" title="clear tier state — next eval reboots each tier from scratch">reset state</button>
<button id="clear" class="secondary" title="clear the transcript">clear log</button>
<button id="cancel" class="secondary" disabled>cancel</button>
<span id="status" class="status"></span>
</section>
<main class="transcript-wrap">
<div id="transcript" class="transcript"></div>
</main>
<section class="prompt-bar">
<span class="prompt-sigil">λ&gt;</span>
<textarea id="input" rows="1" spellcheck="false"
placeholder="(+ 1 2) — enter to send, shift-enter for newline"></textarea>
<button id="send" class="primary">send</button>
</section>
<footer>
<p>
<strong>note:</strong> tier state is persistent within a session — defines stick
across evals. cancel terminates the worker; on the next send each tier
reboots from scratch. <a href="../">lumbda.</a>
</p>
</footer>
<script type="module" src="repl.js"></script>
</body>
</html>