{"_id":"@ath0/snoflake","_rev":"5-cb5fb9d7784ed1b88c19ce49d3a359eb","name":"@ath0/snoflake","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.0":{"name":"@ath0/snoflake","version":"1.0.0","author":{"name":"Ori Livneh","email":"ori.livneh@gmail.com"},"license":"BSD-2-Clause","_id":"@ath0/snoflake@1.0.0","maintainers":[{"name":"ath0","email":"ori.livneh@gmail.com"}],"homepage":"https://github.com/atdt/snoflake#readme","bugs":{"url":"https://github.com/atdt/snoflake/issues"},"bin":{"snoflake":"bin/snoflake.js"},"dist":{"shasum":"5da2efc18e7895dd0d4a217f1c12e69280d3ebd4","tarball":"https://registry.npmjs.org/@ath0/snoflake/-/snoflake-1.0.0.tgz","fileCount":16,"integrity":"sha512-8wvnwIjzMXAmUcQzkiWwblUq/iiJQTSfhluH1tPhrVUlVKV9ccivvSvDpRyzl1tc6iL/TSmTpEAsE0CzZ1Q4Og==","signatures":[{"sig":"MEUCIQD1HOGohgUNBw9Gp617s0SmOebzSqp9HCN524KnItNsMAIgEY+CTrBnrvqfs/4BLirkkjlaJPP7RhVJedqIesi1tD0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":419626},"type":"module","exports":{".":"./src/snobol.js"},"gitHead":"5d113ee982dbc298edf805f0f22b31d3ccb923fb","scripts":{"demo":"node demo/server.js","test":"mocha"},"_npmUser":{"name":"ath0","email":"ori.livneh@gmail.com"},"repository":{"url":"git+https://github.com/atdt/snoflake.git","type":"git"},"_npmVersion":"11.12.1","description":"An implementation of the SNOBOL4 programming language","directories":{},"_nodeVersion":"25.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^12.0.0-beta-10","peggy":"^4.2.0"},"_npmOperationalInternal":{"tmp":"tmp/snoflake_1.0.0_1778434146972_0.1011834815127659","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@ath0/snoflake","version":"1.0.1","author":{"name":"Ori Livneh","email":"ori.livneh@gmail.com"},"license":"BSD-2-Clause","_id":"@ath0/snoflake@1.0.1","maintainers":[{"name":"ath0","email":"ori.livneh@gmail.com"}],"homepage":"https://github.com/atdt/snoflake#readme","bugs":{"url":"https://github.com/atdt/snoflake/issues"},"bin":{"snoflake":"bin/snoflake.js"},"dist":{"shasum":"7aaea1c7acfd9e7b8135507bac8dfa2f9dff43b0","tarball":"https://registry.npmjs.org/@ath0/snoflake/-/snoflake-1.0.1.tgz","fileCount":16,"integrity":"sha512-SgYdwUoJghC30EX9+jNssTe5hFvZOfEdBO8GwuBGRBUatvpySjkWjOdX9qmCjNXucJr0hfTMApkqiOOElghIfQ==","signatures":[{"sig":"MEUCIA5KJNXsVn+HeTsVsOrfOIinfhNaBih5lhWzTqScwUJiAiEA0Q3K+6uhSlrkQSfIP345P3bXJYfXqfVC4bKaHSL5rTI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ath0%2fsnoflake@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":419626},"type":"module","exports":{".":"./src/snobol.js"},"gitHead":"b33e307dd862031f6f41caa47cba76faed3a1b5f","scripts":{"demo":"node demo/server.js","test":"mocha"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:5b00518c-4c45-4040-894b-6777233c70d4"}},"repository":{"url":"git+https://github.com/atdt/snoflake.git","type":"git"},"_npmVersion":"11.11.0","description":"An implementation of the SNOBOL4 programming language","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^12.0.0-beta-10","peggy":"^4.2.0"},"_npmOperationalInternal":{"tmp":"tmp/snoflake_1.0.1_1778435650467_0.9699557120242639","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@ath0/snoflake","version":"1.1.0","author":{"name":"Ori Livneh","email":"ori.livneh@gmail.com"},"license":"BSD-2-Clause","_id":"@ath0/snoflake@1.1.0","maintainers":[{"name":"ath0","email":"ori.livneh@gmail.com"}],"homepage":"https://github.com/atdt/snoflake#readme","bugs":{"url":"https://github.com/atdt/snoflake/issues"},"bin":{"snoflake":"bin/snoflake.js"},"dist":{"shasum":"21f70e1b7e8d264f6267ecae96cf51ea1dd2e6ff","tarball":"https://registry.npmjs.org/@ath0/snoflake/-/snoflake-1.1.0.tgz","fileCount":16,"integrity":"sha512-XSpmkBbLRgQ1xIWqQUiLRyPeAr6aPBY79NXcorBFXe/z765wGXlBdI7kBT+Otge0/+0HQq0ArHOk4eAT0sdERw==","signatures":[{"sig":"MEUCIQC4VtYenLCT+9ChJZ0KREuCPtkTBHjtNtmCuFWW3FuTGAIgbNhW1SM3CrdV6eGxe6ijWrETP2G0e8d2HzDD3ah/lZQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ath0%2fsnoflake@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":423077},"type":"module","exports":{".":"./src/snobol.js"},"gitHead":"24cf1bdb1a20b41814f30492012e749465e1155a","scripts":{"demo":"node demo/server.js","test":"mocha"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7339a70d-ed60-44b1-9797-544174d49017"}},"repository":{"url":"git+https://github.com/atdt/snoflake.git","type":"git"},"_npmVersion":"11.12.1","description":"An implementation of the SNOBOL4 programming language","directories":{},"_nodeVersion":"24.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^12.0.0-beta-10","peggy":"^4.2.0"},"_npmOperationalInternal":{"tmp":"tmp/snoflake_1.1.0_1778855629774_0.16993481268087884","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@ath0/snoflake","version":"1.2.0","author":{"name":"Ori Livneh","email":"ori.livneh@gmail.com"},"license":"BSD-2-Clause","_id":"@ath0/snoflake@1.2.0","maintainers":[{"name":"ath0","email":"ori.livneh@gmail.com"}],"homepage":"https://github.com/atdt/snoflake#readme","bugs":{"url":"https://github.com/atdt/snoflake/issues"},"bin":{"snoflake":"bin/snoflake.js"},"dist":{"shasum":"1a7de18677e21da557df22fb91262965c2abb4d2","tarball":"https://registry.npmjs.org/@ath0/snoflake/-/snoflake-1.2.0.tgz","fileCount":17,"integrity":"sha512-AEpWC48wUcypATqwo0SxzPh+kcg+XCjAyF4A3Qq8xjFl+TeAsLzgZJT/D9WbJYVxX/+zmW5CqRfzUT2hU9XpYA==","signatures":[{"sig":"MEYCIQDjLkIbFNNiFZb4hcsXfOwRDwtYqqlwCkplZ3LpdV5jIwIhAO7zXUwM1HF7KMoINUFt54DHA6l2Ea/ChwWO1iOzNFiz","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ath0%2fsnoflake@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":431438},"type":"module","exports":{".":"./src/snobol.js"},"gitHead":"81d2c75fa01d90d1b6903ab038d703ad8a3f7ec7","scripts":{"demo":"node demo/server.js","test":"mocha"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7339a70d-ed60-44b1-9797-544174d49017"}},"repository":{"url":"git+https://github.com/atdt/snoflake.git","type":"git"},"_npmVersion":"11.12.1","description":"An implementation of the SNOBOL4 programming language","directories":{},"_nodeVersion":"24.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^12.0.0-beta-10","peggy":"^4.2.0"},"_npmOperationalInternal":{"tmp":"tmp/snoflake_1.2.0_1778994591074_0.28066730493930003","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@ath0/snoflake","description":"An implementation of the SNOBOL4 programming language","author":{"name":"Ori Livneh","email":"ori.livneh@gmail.com"},"version":"1.3.0","license":"BSD-2-Clause","type":"module","publishConfig":{"access":"public"},"exports":{".":"./src/snobol.js"},"bin":{"snoflake":"bin/snoflake.js"},"repository":{"type":"git","url":"git+https://github.com/atdt/snoflake.git"},"scripts":{"demo":"node demo/server.js","test":"node --test test/test-*.js"},"gitHead":"2c039f2a30f89e731dfe45d4188f84406c9c314e","_id":"@ath0/snoflake@1.3.0","bugs":{"url":"https://github.com/atdt/snoflake/issues"},"homepage":"https://github.com/atdt/snoflake#readme","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-TS9c58AKY9Ri4W33Ag3BR7O4PZq7zpJpoUV9HFogTCTgKji/3OHPTSlUzSosKT3CzT1GdmVoiKIuYntAZT4ffw==","shasum":"65724372394bcd4bcceb9c1680c18eef19b6a3ca","tarball":"https://registry.npmjs.org/@ath0/snoflake/-/snoflake-1.3.0.tgz","fileCount":18,"unpackedSize":437472,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ath0%2fsnoflake@1.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBTlRV8xFH4/hcghMGj5jEo35Sdbi64jwf4sY7pqef1lAiBb8LFrUMoBgb0hCKUlMzvvCGB7VkdpF/B/b6yKimv21w=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7339a70d-ed60-44b1-9797-544174d49017"}},"directories":{},"maintainers":[{"name":"ath0","email":"ori.livneh@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/snoflake_1.3.0_1779744602487_0.33557484211459543"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-10T17:29:06.849Z","modified":"2026-05-25T21:30:02.887Z","1.0.0":"2026-05-10T17:29:07.110Z","1.0.1":"2026-05-10T17:54:10.617Z","1.1.0":"2026-05-15T14:33:49.933Z","1.2.0":"2026-05-17T05:09:51.220Z","1.3.0":"2026-05-25T21:30:02.633Z"},"bugs":{"url":"https://github.com/atdt/snoflake/issues"},"author":{"name":"Ori Livneh","email":"ori.livneh@gmail.com"},"license":"BSD-2-Clause","homepage":"https://github.com/atdt/snoflake#readme","repository":{"type":"git","url":"git+https://github.com/atdt/snoflake.git"},"description":"An implementation of the SNOBOL4 programming language","maintainers":[{"name":"ath0","email":"ori.livneh@gmail.com"}],"readme":"Snoflake\n==========\n**Snoflake** is a BSD-licensed JavaScript implementation of [SNOBOL4][0]\n(_StriNg Oriented and symBOlic Language_), the string-processing language\ndeveloped between 1962 and 1967 at AT&T Bell Laboratories by David J. Farber,\nRalph E. Griswold and Ivan P. Polonsky.\n\nSNOBOL is highly distinct and excels at string manipulation and\npattern-matching. SNOBOL patterns may be recursive and are available as a\nfirst-class data type.\n\nSnoflake is a port of the macro implementation of SNOBOL4. It tracks the\nSNOBOL4 version 3.11 SIL source and is a working, usable implementation of\nthe language.\n\n> **Try it now:** [atdt.github.io/snoflake/demo/][3] — Snoflake runs in\n> your browser, no install required.\n\nUsage\n-----\nSnoflake can be used three ways: as a command-line interpreter, as a\nJavaScript library, and in the browser.\n\n### Command line\n\nInstall from npm and run a SNOBOL program:\n\n```\nnpm install -g @ath0/snoflake\nsnoflake hello.sno\n```\n\nThe CLI also accepts explicit source and input options:\n\n```\nsnoflake --file=hello.sno\nsnoflake --file=filter.sno --input=data.txt\nsnoflake --file=eliza.sno --interactive\n```\n\n`--input` supplies a finite runtime input file. `--interactive` (or `-i`)\ncontinues runtime `INPUT` reads from standard input after the source and any\n`--input` file have been exhausted.\n\n### Library\n\nSnoflake is a standard ES module:\n\n```js\nimport { run } from '@ath0/snoflake';\n\nconst result = run( { file: 'hello.sno', interactive: true } );\nprocess.exitCode = result.exitCode;\n```\n\nFor advanced embedding, `createVM(options)` returns a configured VM while\n`new VM(options)` remains the low-level, host-neutral machine. Options select\nthe source file, source text, input file, interactive stdin, output streams,\nand custom loaders. See [`demo/lib/runner.js`](demo/lib/runner.js) for an\nin-memory browser example.\n\n### Browser\n\nSnoflake runs unmodified in the browser. A hosted build of the demo is\nlive at [atdt.github.io/snoflake/demo/][3]; the demo loads `src/snobol.js`\ndirectly as an ES module and captures output through custom writers.\n\nWith no build step or install, import it straight from a CDN such as\n[esm.sh][4]:\n\n```html\n<script type=\"module\">\n  import { run } from 'https://esm.sh/@ath0/snoflake';\n  run( { source: \" OUTPUT = 'HELLO, WORLD'\\nEND\\n\" } );\n</script>\n```\n\nTo run the same demo against your local checkout:\n\n```\nnpm run demo\n```\n\nThen open the URL it prints. The demo source under [`demo/`](demo/) is the\nshortest path to embedding Snoflake in a web page.\n\nAbout\n-----\nThe goal of the project is to preserve, make accessible, and pay homage to a\nchapter of computing history; to be pleasurable and instructive to read and\nuse; and to provide a hackable basis for experimentation. It is not the\nruntime you should use for serious work, but it is a runtime you _could_ use\nfor _silly_ work. :o)\n\nThe first 90% of this project was done by hand, mostly in 2012 with brief\nbursts of activity in the decade that followed, and got as far as having\nSNOBOL4 crash early during initialization. The next 90% consisted of debugging\nand clean-ups, completed with the assistance of agentic coding tools in a\nflurry of activity in April-May 2026.\n\nDedication\n----------\nThis project is dedicated to my dad, Meir Livneh.\n\nLicense\n-------\nCopyright (c) 2012-2026 [Ori Livneh][1]\n\nSnoflake is distributed under the BSD 2-Clause License; see [LICENSE](LICENSE)\nfor the full text.\n\nAcknowledgments\n---------------\nThis project incorporates several surgical bug fixes from [CSNOBOL4][2], Phil\nBudne's free port of the original SNOBOL4 macro implementation to C. We are\ndeeply grateful to Phil Budne for his extensive work in maintaining and\nimproving the SNOBOL4 SIL source over several decades. The ported changes are\ntagged inline with their original `[PLBnn]` revision markers; see\n[LICENSE-CSNOBOL4](LICENSE-CSNOBOL4) for CSNOBOL4's BSD 2-Clause license.\n\n[0]: http://en.wikipedia.org/wiki/SNOBOL\n[1]: mailto:ori.livneh@gmail.com\n[2]: https://github.com/philbudne/csnobol4\n[3]: https://atdt.github.io/snoflake/demo/\n[4]: https://esm.sh/\n","readmeFilename":"README.md"}