npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ath0/snoflake

v1.3.0

Published

An implementation of the SNOBOL4 programming language

Downloads

668

Readme

Snoflake

Snoflake is a BSD-licensed JavaScript implementation of SNOBOL4 (StriNg Oriented and symBOlic Language), the string-processing language developed between 1962 and 1967 at AT&T Bell Laboratories by David J. Farber, Ralph E. Griswold and Ivan P. Polonsky.

SNOBOL is highly distinct and excels at string manipulation and pattern-matching. SNOBOL patterns may be recursive and are available as a first-class data type.

Snoflake is a port of the macro implementation of SNOBOL4. It tracks the SNOBOL4 version 3.11 SIL source and is a working, usable implementation of the language.

Try it now: atdt.github.io/snoflake/demo/ — Snoflake runs in your browser, no install required.

Usage

Snoflake can be used three ways: as a command-line interpreter, as a JavaScript library, and in the browser.

Command line

Install from npm and run a SNOBOL program:

npm install -g @ath0/snoflake
snoflake hello.sno

The CLI also accepts explicit source and input options:

snoflake --file=hello.sno
snoflake --file=filter.sno --input=data.txt
snoflake --file=eliza.sno --interactive

--input supplies a finite runtime input file. --interactive (or -i) continues runtime INPUT reads from standard input after the source and any --input file have been exhausted.

Library

Snoflake is a standard ES module:

import { run } from '@ath0/snoflake';

const result = run( { file: 'hello.sno', interactive: true } );
process.exitCode = result.exitCode;

For advanced embedding, createVM(options) returns a configured VM while new VM(options) remains the low-level, host-neutral machine. Options select the source file, source text, input file, interactive stdin, output streams, and custom loaders. See demo/lib/runner.js for an in-memory browser example.

Browser

Snoflake runs unmodified in the browser. A hosted build of the demo is live at atdt.github.io/snoflake/demo/; the demo loads src/snobol.js directly as an ES module and captures output through custom writers.

With no build step or install, import it straight from a CDN such as esm.sh:

<script type="module">
  import { run } from 'https://esm.sh/@ath0/snoflake';
  run( { source: " OUTPUT = 'HELLO, WORLD'\nEND\n" } );
</script>

To run the same demo against your local checkout:

npm run demo

Then open the URL it prints. The demo source under demo/ is the shortest path to embedding Snoflake in a web page.

About

The goal of the project is to preserve, make accessible, and pay homage to a chapter of computing history; to be pleasurable and instructive to read and use; and to provide a hackable basis for experimentation. It is not the runtime you should use for serious work, but it is a runtime you could use for silly work. :o)

The first 90% of this project was done by hand, mostly in 2012 with brief bursts of activity in the decade that followed, and got as far as having SNOBOL4 crash early during initialization. The next 90% consisted of debugging and clean-ups, completed with the assistance of agentic coding tools in a flurry of activity in April-May 2026.

Dedication

This project is dedicated to my dad, Meir Livneh.

License

Copyright (c) 2012-2026 Ori Livneh

Snoflake is distributed under the BSD 2-Clause License; see LICENSE for the full text.

Acknowledgments

This project incorporates several surgical bug fixes from CSNOBOL4, Phil Budne's free port of the original SNOBOL4 macro implementation to C. We are deeply grateful to Phil Budne for his extensive work in maintaining and improving the SNOBOL4 SIL source over several decades. The ported changes are tagged inline with their original [PLBnn] revision markers; see LICENSE-CSNOBOL4 for CSNOBOL4's BSD 2-Clause license.