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 🙏

© 2025 – Pkg Stats / Ryan Hefner

willet

v0.0.1-alpha20

Published

Willet Programming Language

Readme

Willet

The Willet Programming Language

Willet is an experimental functional programming language that compiles to JavaScript. Willet is heavily inspired by Clojure and tries to bridge the gap between JavaScript and Lisp without going all the way to a full Lisp syntax. Willet provides easy use persistent immutable data structures, a macro system, and a full featured standard library.

Try Willet in your browser

Install and Use

npm install willet
echo 'console.log("Hello Willet!")' > index.wlt
willet-compile index.wlt .
node index.js

Features

  • A fast and extensible* compiler written in JavaScript
  • Embraces JavaScript as a platform and leverages modern JS features
    • Async/await
    • Destructuring assignment, Rest and Spread
    • First class functions with default values
    • Easy integration with existing JavaScript code or libraries
    • Avoids some JS downsides such as the overly broad definition of false.
      • In Willet "false" is only literal false, null, and undefined
  • Persistent immutable data structures natively supported by language
    • Powered by Immutable
    • Literal syntax for maps, sets, and lists
    • Works with standard library functions
    • Equality by value*
  • Macro System allowing language level extensions
    • Helpful Built in macros
      • Chaining expressions - chain
      • Switching style - cond
      • List comprehensions - for
    • Major language features are written as macros
      • if and try catch
  • Standard Library with full set of functions/macros
    • Map, reduce, filter
    • Data structure walking*
    • Get, set, update deeply nested structures.
    • Partition, slice, and group data
    • And more

(* future feature)

Why Willet?

Modern JavaScript has a lot of great things like first class functions, promises and async/await, destructuring and a huge, well supported ecosystem. But its still got oddities from its past and is missing features that other modern functional programming languages have like macros and built-in immutable types.

Willet is an experiment.

If we start with JavaScript, its syntax, features, runtime, and libraries, and push it towards a Clojure-like Lisp how far do we have to go before we can get the same benefits? Can we get the same benefits of a homoiconic language and macros without going all the way to a Lisp syntax?

Other languages have done this like Elixir and there are other well supported languages that have these features in a JavaScript runtime such as ClojureScript. Willet is a chance to learn these things first hand and have fun building something.

What does Willet Look Like?

const quicksort = #([pivot ...others]) => {
  if (pivot) {
    concat(
      quicksort(filter(others #(v) => pivot >= v ))
      [pivot]
      quicksort(filter(others #(v) => pivot < v ))
    )
  }
}

Things to note:

  • No commas or semicolons needed.
    • Optional for readability or to remove ambiguity in certain situations.
  • No return statement necessary. Blocks always return the last result.
  • Data structures are immutable records automatically.
  • A built in standard library provides many functions like concat

More Information

Syntax Highlighting in Editors

Syntax highlighting is available for the Atom editor using the atom-language-willet package.

Setting Jupyter Notebook and Hydrogen in Atom Editor

Setting up jp-willet.

# Install willet lang globally
npm install -g willet-lang

# Install jupyter package
cd jp-willet
npm install
npm install -g
# Reference willet lang through symlink to global package which points to willet in this project
npm link willet
# Install the Jupyter Kernel
jp-willet-install