SICP teaches computation through Scheme. Lispex provides a separate SICP profile with the Scheme-compatible surface needed for that study. It does not change the ordinary Lispex core profile.
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.18.0npm CLI uses its separate@lispex/sicp@1.0.0Wasm dependency. - Use
@lispex/sicpdirectly when a Node or browser application needs typed observations and bounded 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 the selected Wasm is loaded, execution uses no network, discovers no other engine, and never falls back. These are explicit educational runtime limits, not a security sandbox.
The result contains a typed sicp-observation/v1 document and a bounded
lispex-trace/v1 document. The runtime grants no execution or Vouch authority
and authenticates no evidence.
Read the measurement honestly
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.
That measurement does not claim whole-book coverage, a performance ranking, comparative superiority, or independent verification. SICP book text and corpus source are separate licensed content and are not bundled with the runtime.
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