HN Debrief

Why Janet? (2023)

  • Programming
  • Developer Tools
  • Open Source

The post is a personal case for Janet, a modern Lisp with a small runtime, built-in parser tools, macros, image-based workflows, and a packaging story that can emit standalone binaries. It pitches Janet as unusually good for exploratory programming and for the class of jobs that often end up split across shell, Python, awk, and a grab bag of small tools. Several comments backed that up with concrete use. People are replacing shell scripts with Janet because it starts almost as fast as dash, has a shell DSL in the standard library, and can compile code and data into tiny self-contained executables. Others pointed to art tools, web apps, and embedded scripting use cases as evidence that Janet is not just a toy REPL language.

If you are choosing a scripting or embedded language, Janet looks strongest when startup time, tiny distribution, compile-time code generation, and a good REPL matter more than ecosystem depth. Do not treat it as a default replacement for Python or Lua without checking package availability, parser fit, and whether its threading model matches your embedding use case.

Discussion mood

Strongly positive and a little evangelical. People liked Janet as a compact, practical Lisp for scripts, CLIs, embedded tools, and small web services, while the most credible criticism focused on ecosystem gaps, package/versioning weakness, PEG limitations, and edge cases in embedding.

Key insights

  1. 01

    Babashka beats Janet for heavy data work

    Janet shines when you want a tiny runtime, shell-friendly subprocess work, or an embeddable language. It loses ground when the job is mostly data transformation. The key claim was that Clojure and Babashka bring persistent data structures like HAMTs and a standard library that already knows how to group, index, validate, serialize, and reshape collections at scale. That makes Janet feel more manual once scripts grow into serious log or CSV pipelines.

    Choose Janet for distribution, startup time, and systems scripting. Choose Babashka or Clojure when the center of gravity is large immutable data processing and you want the collection tooling to already be there.

      Attribution:
    • iLemming #1 #2
  2. 02

    Thread-local VM state narrows embedding use cases

    Janet’s embedding story is good enough for many apps, but it is not the same as having fully independent interpreter objects you can pass around freely. The comments spell out why that matters in plugin hosts like VST3, AU, AAX, CLAP, and JUCE-based systems, where many instances may live in one process and callbacks can arrive on threads the plugin does not control. In that world, thread-local VM state becomes an architectural constraint, not an implementation detail.

    If you want to embed Janet inside a host you do not control, prototype threading and lifecycle first. Do not assume that “embeddable” means it will fit browser-style or plugin-style multi-instance scheduling.

  3. 03

    PEGs are powerful but not a drop-in regex replacement

    The strongest parser discussion cut through the easy “PEG good, regex bad” pitch. PEGs buy explicit ordered choices and can make custom grammars much easier to read. They also impose rules that surprise people coming from conventional parsers, especially no left recursion and no ambiguous alternatives where one prefix shadows another. That is fine if you think in PEGs from the start. It is painful if you are trying to port an existing grammar or if you just need familiar PCRE-style text matching.

    Use Janet’s PEG tooling when you are designing a parser and want grammar-level control. If your users expect standard regex ergonomics or you need to port existing grammars, budget for friction.

      Attribution:
    • xigoi #1 #2
    • bmn__ #1
    • nrclark #1
  4. 04

    Compile-time data baking is a real advantage

    The most compelling technical example was not macros in the abstract. It was using normal top-level Janet code to ingest a TSV file at compile time and emit a binary with the final lookup tables already built. That turns a runtime parsing problem into a static artifact with almost no ceremony. A commenter compared it favorably with Go, where achieving the same outcome required code generation and a huge literal map file.

    If your tool ships with fixed datasets, lookup tables, or generated code, Janet can cut a lot of build plumbing. Try it for CLIs and offline tools where startup latency and single-binary distribution matter.

      Attribution:
    • veqq #1 #2
  5. 05

    Janet is landing as a shell replacement

    Several of the most grounded endorsements came from people using Janet instead of sh, awk, and Python for medium-sized system scripts. Fast startup keeps it viable for command-line use, while the sh-dsl avoids the quoting and subprocess awkwardness that make bigger scripts in shell brittle. This is a narrower claim than “general purpose language,” but it is exactly where Janet seems to have real pull.

    If your team has a pile of shell scripts getting too complex for bash but too operationally small for a bigger service, Janet is worth a trial. Measure cold start and subprocess ergonomics against your current shell and Python tooling.

      Attribution:
    • mackeye #1
    • veqq #1
    • 6LLvveMx2koXfwn #1
  6. 06

    The web story depends on community libraries

    Janet can do web work, but the rough edges show up quickly unless you lean on the ecosystem around it. People pointed to Joy for server-side work and jurl or churlish for HTTP and TLS, while also admitting package versioning and library depth are still weak spots. That means the language is capable, but the convenience layer is uneven and sometimes maintained by a small number of enthusiasts.

    Treat Janet web development as framework-led, not ecosystem-rich. Before committing, verify that the exact routing, TLS, client, and deployment pieces you need are maintained and work on your target platforms.

      Attribution:
    • janetacarr #1
    • ramblurr #1
    • veqq #1
    • cfiggers #1
    • smartmic #1

Against the grain

  1. 01

    Built-in networking is rarer than the post suggests

    A useful pushback on the ecosystem complaints was that Janet ships with networking in the language itself. For tiny interpreters, that is not normal. It means some “missing library” complaints are really about higher-level frameworks and wrappers, not about the runtime being unable to speak to the network.

    Separate core capability from ecosystem maturity when you evaluate Janet. If your needs are low-level sockets and simple protocols, the built-in runtime may already cover more than the package count implies.

      Attribution:
    • 1vuio0pswjnm7 #1
  2. 02

    Namespaces are weaker than prefixed imports

    The namespace argument did not end with a clean win for Janet. Critics said import-based symbol prefixing is not the same thing as first-class namespaces, even if environments are first-class under the hood. That matters if you want module structure itself to be an explicit programmable object rather than a macro convention over renamed symbols.

    If you care deeply about module systems and namespace manipulation, read Janet’s require and import semantics before adopting it. The language may have enough machinery for your needs, but it does not match everyone’s expectations of a namespace system.

      Attribution:
    • bjourne #1
    • ianthehenry #1
  3. 03

    Ordered parsing fights human intuition

    Not everyone bought the idea that PEGs match how people naturally reason about syntax. The objection was that ordered alternatives bake precedence into rule order in a way that often feels invisible until it breaks. That makes PEGs elegant for experts and brittle for everyone else, especially on grammars that are expected to be read and maintained by ordinary developers rather than parser enthusiasts.

    If non-specialists will maintain your grammar, favor the most familiar parsing model they already understand. Janet’s PEG tools may still be the right engine, but they need documentation and discipline around rule ordering.

      Attribution:
    • layer8 #1 #2

In plain english

AAX
Avid Audio eXtension, the plugin format used by Pro Tools.
AU
Astronomical unit, the average distance from Earth to the Sun.
CLAP
CLever Audio Plugin, an open audio plugin standard designed as an alternative to proprietary plugin formats.
DSL
Domain-specific language, a small language designed for one narrow problem area rather than general programming.
HTTP
Hypertext Transfer Protocol, the standard protocol browsers and many software services use to communicate over the web.
JUCE
A C++ framework widely used to build audio plugins and audio applications across plugin standards.
PCRE
Perl Compatible Regular Expressions, a popular regex flavor that follows many Perl-style features and semantics.
PEG
Parsing Expression Grammar, a way to define parsers using ordered matching rules instead of traditional regular expressions or context-free grammars.
REPL
Read-Eval-Print Loop, an interactive programming session where you enter code, the system runs it, and immediately shows the result.
TLS
Transport Layer Security, the standard protocol used to encrypt network connections such as web traffic or mail transport.
VST3
The current major version of Steinberg’s Virtual Studio Technology audio plugin format.

Reference links

Janet docs and learning resources

Frameworks and libraries

  • Joy web framework
    Main community framework mentioned for Janet web development
  • jeep
    Suggested as a way to vendor dependencies and install bundles without JPM
  • jurl
    Recommended HTTP and TLS wrapper for Janet
  • churlish
    Another recommended HTTP client wrapper for Janet

Related languages and tools

  • Fennel
    Raised as a closely related Lisp that targets Lua
  • Hy
    Mentioned as another Lisp-flavored language, this time for Python
  • LuaJIT issue 1457
    Referenced in the debugging and instrumentation discussion around Fennel and LuaJIT

Parser and syntax references

Projects built with Janet

  • bauble.studio
    Named as an art tool built in Janet that made the language feel more tangible
  • toodle.studio
    Another Janet-built art tool cited as a compelling example

Broader references from the side discussions