About this reconstruction

Two preserved CAL SNOBOL compiler/runtimes execute locally in your browser. This is not a new implementation of the language.

Two implementations

Charles Simonyi and Paul McJones developed CAL SNOBOL at UC Berkeley beginning in 1968. The earlier choice uses the monolithic source preserved in the 2007 CAL-SNOBOL.job, freshly assembled under COMPASS on NOS 1.4-552 and exported without changing its executable instructions. The revised choice retains the modular SNOFIX/SNOJOB images previously reconstructed from the recovered Texas source lineage. Neither choice claims to reproduce every intermediate release or establish that all surviving source witnesses are identical.

Both run their original CDC instructions on the pinned GPL DtCyber CPU compiled to WebAssembly. Independently authored monitor services supply CIO, loader and timing operations. A small earlier-version adapter supplies synchronous OPE and its older TIM date format. There is no resident NOS, PPU operating-system implementation or complete CDC installation in the browser.

Differences remain visible. The earlier version does not provide PROTOTYPE. Its TIME() returns time of day, CLOCK() returns CPU milliseconds and DATE() uses an English month abbreviation; the revised version uses TIME() for CPU milliseconds and CLOCK() for time of day, with DATE() in YY/MM/DD. form. Both use your browser’s live local calendar and daylight-saving rules. Switching implementations preserves the editor; examples do not silently switch implementations.

Input and memory

The compiler interprets source columns 1–72; card columns 73–80 remain visible in listings but are ignored as source. The editor’s faint rule is measured from the actual font and follows horizontal scrolling. Source and data still travel as 80-column cards, with eight-column tab stops and uppercase folding, including literals. The 63-character Display Code alphabet reserves code 00, puts colon at octal 63 and has no %. Unsupported characters are rejected.

END is optional in the revised version. Include it for the earlier version: that compiler can compile at EOF, but execution falling off the end reports its original lexical end-of-program error.

Both implementations receive an initial field of 160000 octal: 57,344 60-bit words for code, buffers, compiled program and heap together. This is a historically informed 56K job field, not a universal SCOPE/NOS maximum. Dynamic RFL remains unsupported. The engine has no instruction-word cutoff by default; an optional cutoff can be enabled under settings. Original guest statement limits and storage limits still apply. Stop remains available.

Interactive reads suspend the CPU without advancing guest ticks or acknowledging an absent input. A blank submitted line is an 80-space card, not EOF. Revised interactive records retain the existing stream convention; the earlier reader needs a complete NOS record per submitted line. End input supplies explicit EOF in either version. Up to 13 named read-only inputs/write-only outputs can be mounted, not a general filesystem. Earlier OPE rejects reopening an already-used file instead of guessing the semantics.

Output, diagnostics and Stop

Ordinary output buffering is unchanged. Short output and prompts can remain buffered; status still indicates when input is requested. Diagnostics shows the guest compiler/runtime diagnostic once. The original monitor dayfile and browser-engine messages remain separately available under logs and in session JSON; they can contain another copy of the guest error. The full listing is retained.

Stop lets the worker finish its current 5,000-instruction-word slice, then attempts read-only recovery of committed output-buffer words. Both recognized executable layouts have separate validated recovery paths. Recovery changes no guest memory, pointer, register or instruction/tick counter, runs no guest cleanup, does not acknowledge pending input, and invents no missing text or newline. It is used only for an acknowledged Stop or an optional instruction-limit stop, not ordinary execution or unrelated errors.

Recovery is best effort: unpublished words or register-held text are unavailable; inconsistent chains, unknown layouts or quotas can prevent recovery. A tail may be partial. If the worker does not acknowledge within three seconds, it is forcibly terminated and only the last received snapshot survives, with an explicit warning.

WebAssembly is instantiated from fetched bytes, without a speculative streaming attempt. Correct application/wasm server MIME is welcome but not required. Load failures remain visible errors; successful loading does not generate a fallback warning in SNOBOL Diagnostics.

Drafts, examples and privacy

The current source/input/version/file settings and up to 12 recent nonempty drafts are stored locally in this browser, scoped to this origin and page path. Example/file replacement and editing preserve recoverable snapshots. Recover an earlier draft restores one explicitly. Late example downloads cannot replace intervening edits. Storage quotas can reduce history; unavailable storage is reported and leaves only in-tab recovery. Clearing browser data, private browsing or moving to a different URL can lose drafts. Save source is the durable backup.

Examples are ordinary .sno files in examples/. Run python3 update_examples.py after adding/removing files or changing metadata; upload the regenerated directory. Optional source comments or JSON sidecars give titles, descriptions, version advice and input/file settings. No WebAssembly rebuild is needed. See the maintenance guide.

Source and data are not uploaded. Network access is limited to static assets and navigation to external documentation. Download outputs and session JSON before closing if you want to retain results: draft recovery does not persist running CPU state or completed outputs. Session JSON is not a resumable snapshot.

Provenance and limits

The CPU is pinned to revision ccc50858b98bd5cc26bf05108609ab1787de9534. Emulator/adapter/page sources are GPL-3.0-only. Historical executable/overlay exports retain separate copyright and provenance; the GPL does not grant rights to redistribute those images. Source manifests, runtime hashes, native comparisons and validation evidence accompany the packages.

Timing is a nominal CDC 6400 instruction-based model, not cycle-accurate, hardware-calibrated or browser elapsed time. Tests cover bounded program corpora, clocks, files, draft recovery, layouts and Stop safety—not all programs, instructions or monitor calls. The new release is automated in Chromium; please report differences in other browsers.

Serve the extracted site over HTTP(S), not file://. No account, execution server, CDN, pthreads, SharedArrayBuffer or cross-origin-isolation headers are needed. Versioned asset URLs and no-store runtime fetches reduce stale-release mixing; replace the site files together when updating.