SICP teaches computation through Scheme. Lispex provides a separate SICP profile with the Scheme-compatible surface needed for that study. The ordinary Lispex core profile remains its own runtime product.
Choose how to study
- Use sicp.io for a chapter-organized read-edit-run-see loop, Korean lessons, the coverage map, and the browser workbench.
- Use the Lispex SICP Playground for one explicit browser run. The ordinary Playground remains on the core profile.
- Use
lispex sicp runfor local.scmfiles. Native runs the Rust SICP profile built into its binary. Thelispex@1.20.0npm CLI uses its separate@lispex/sicp@1.0.0Wasm dependency. - Use
@lispex/sicpdirectly when a Node or browser application needs typed observations and exact execution traces.
Install the direct JavaScript API separately when you are not using the
lispex CLI package.
npm install @lispex/sicp@1.0.0Run one file
Select the profile in the command, whether the source comes from a file or standard input.
lispex sicp run exercise.scm
cat exercise.scm | lispex sicp run -lispex run exercise.scm is rejected. A .scm suffix never changes the
active profile by itself, and a failed SICP run never falls back to another
engine. The CLI prints the stdout and final value needed for a learning loop.
Use the JavaScript API when you need structured observations and traces.
Embed the runtime
Node can load the package directly.
const { run } = require('@lispex/sicp');
const result = run('(define (square x) (* x x)) (square 12)');
console.log(result);The browser entry point loads the same dedicated runtime.
const { createSicpRuntime } = await import('@lispex/sicp/browser');
const runtime = await createSicpRuntime();
const result = runtime.run('(define (square x) (* x x)) (square 12)');
console.log(result);The WebAssembly module has no external imports. It accepts at most 1 MiB of UTF-8 source and applies fixed logical heap, fuel, output, and trace limits. After loading, it executes entirely in memory on the selected engine. The host deployment owns process and network isolation.
The result contains a typed sicp-observation/v1 document and a
lispex-trace/v1 document with limits of 1,024 events and 1 MiB. These are
educational execution observations. Native Vouch adds producer authentication,
recipient policy, current replay, and the local gate, while the host
application owns external action.
Read the product measurement
The machine-readable SICP measurement claim binds the shipped Wasm identity to a versioned representative corpus of 26 fixtures. It separately records four pinned external Scheme-oracle measurements, their disagreements, limits, and exclusions.
The measurement unit is the shipped Wasm artifact running the named 26-fixture corpus under the recorded limits. The four oracle records preserve each producer identity and disagreement category. SICP book text and corpus source remain separately licensed content artifacts.
Keep the profiles separate
| Ordinary Lispex core | Lispex SICP profile | |
|---|---|---|
| Selection | default lispex run | explicit lispex sicp run or ?profile=sicp |
| Source suffix | .lspx | .scm |
| Purpose | general Lispex programs | SICP study and exercises |
| Runtime | Lispex core engine | built-in Rust profile in Native; @lispex/sicp Wasm in npm and JavaScript |
Keep going
Open the SICP course · Run the SICP Playground · Review Current and Deferred Scope