jennifer programming language

projects

Featured projects

Tools written in Jennifer and used for real work. Each one is plain .j source you can read, run and fork.

  1. A Grimoire page in the default theme, in light and dark mode side by side

    grimoire.jennifer-lang.dev

    Grimoire

    Build a documentation site - and a printable PDF or an EPUB - from a directory of Markdown.

    What mdBook and MkDocs do, written in Jennifer. Point it at a directory of Markdown: a SUMMARY.md becomes the outline, or the directory tree does. The result is a self-contained static site - themed, searchable, with a dark mode - that works from a web root, a subdirectory or straight off the disk. Jennifer's own documentation is built with it.

    • Ten themes, each with a light and a dark palette
    • Full-text search that works over file://
    • A printable PDF and an EPUB of the whole book
    • Interface words in English and ten more languages
    grimoire init my-book
    grimoire build --pdf
    grimoire serve
  2. github.com/jennifer-language/demo-jsnake

    jsnake

    Multiplayer snake for the Linux console - over TCP or UDP, with nobody typing an address.

    Players find each other by UDP broadcast; the game itself runs over either TCP or UDP, and empty seats fill with computer players at four levels, from easy to expert. The field sizes itself to the smallest terminal at the table, the host changes the settings on a title screen while players arrive, and Escape is the only key besides the arrows.

    • Up to eight players, on one network
    • Computer opponents at four skill levels
    • Candy, vegetables, a toadstool and a ghost spell
    • A plain-text protocol - every decoder is total
    jvc app install \
      https://github.com/jennifer-language/demo-jsnake
    jsnake solo
    jsnake host --bots 3
  3. Two slides from Cantrip's example deck: one in the light plain theme, one in the dark midnight theme

    cantrip.jennifer-lang.dev

    Cantrip

    Turn a Markdown file into a self-contained HTML slideshow - and a PDF.

    The input is ordinary Markdown: slides separated by a line of three dashes, front matter at the top, speaker notes in HTML comments - so a deck still reads as a document and diffs like prose. The slideshow is one file with nothing fetched at view time, so it works on a conference laptop with no connection. The PDF is one page per slide at the deck's own ratio, and stays white for a legible handout whatever the theme.

    • 13 themes, each light and dark, including all of Grimoire's
    • Keyboard navigation, an overview and presenter notes
    • Three ratios and four slide transitions
    • No network, exec or sql - it runs on jennifer-tiny too
    jvc app install \
      https://github.com/jennifer-language/cantrip
    cantrip build talk.md
  4. github.com/jennifer-language/demo-microgpt

    microGPT

    A GPT written from scratch - attention, training and sampling - on a scalar autodiff engine.

    A port of Andrej Karpathy's microGPT: a character-level transformer with the shape of GPT-2 that learns to invent names. Every number in it is a node on one tape, differentiated by the engine from demo-micrograd, which builds it in eight editions you read as diffs. Training runs across every core with spawn, each worker on its own copy of the tape, and a trained model is saved as a checkpoint to sample from later.

    • Multi-head causal attention, an MLP, RMSNorm and Adam
    • 1328 parameters, trained on 32,033 names
    • Data-parallel training, safe by value semantics
    • Checkpoints in JSON or plain text
    git clone \
      https://github.com/jennifer-language/demo-microgpt
    cd demo-microgpt
    jennifer run sample.j --load 32k1000.json
  5. github.com/jennifer-language/demo-distributed

    distributed

    Distributed computing on your own machines - a master, workers that find it on the network, and jobs cut into tasks.

    A master schedules prioritised jobs; workers discover it by UDP broadcast, pull tasks for the queues they serve and send the results back, and the master combines them. Jobs of equal priority share the slots, tasks are sized by measurement to about two seconds each, a lost task is leased again, and the master keeps its state across restarts. A new kind of computation is one file of six functions; four come with it: word counts, digits of pi, sleep and running programs.

    • Discovery by UDP broadcast, no address to type
    • Leases, heartbeats and retries for lost workers
    • Snapshots: a restarted master carries on
    • A live terminal screen of jobs and nodes
    git clone \
      https://github.com/jennifer-language/demo-distributed
    cd demo-distributed
    ./bin/distributed master
    ./bin/distributed worker --slots 2
  6. github.com/jennifer-language/rosetta

    Rosetta Code

    Jennifer solutions to Rosetta Code tasks - each one run and checked again on every release.

    Rosetta Code solves the same programming tasks in hundreds of languages, side by side. This repository is the master copy of the Jennifer solutions: 51 tasks so far, from FizzBuzz to the N-queens problem and a Mandelbrot set. Each one is formatted, linted, run and compared with its expected output before it goes on the wiki, and again on every release and every week against the interpreter's main branch, so a solution never goes stale unnoticed.

    • 51 tasks, two of them over the network
    • Checked on the release and on main, weekly
    • MIT-0: copy a solution anywhere
    • One script prints a task's wiki section
    git clone \
      https://github.com/jennifer-language/rosetta
    cd rosetta
    tools/check.sh FizzBuzz

Built something in Jennifer?

A tool people use, written in the language - tell us about it and it may be featured here.

Open an issue