Janet

1 program Added 2025-10-22T09:57:17Z Model: anthropic/claude-3.5-sonnetTemp: 0.4 Evidence Report issue View issues
Aliases: janet-lang
Provenance: commit 9745f4b38d · authored 2025-10-22T11:57:17+02:00 · model anthropic/claude-3.5-sonnet

Sources mentioning this language

5 sources · pl_id: pl/janet
LLM (this repo) · 1PldbLinguistPygmentsRosettacode

Extensions claimed by this language

3 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.janetlinguistprimary28.4K files
.janetpygmentsprimary28.4K files
.jdnpygmentssecondary366 files

Related languages

Civet (0.40)Bait (0.29)Mint (0.29)rk (0.25)S-lang (0.25)

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Programs collected by LLM agents experimental · unverified

Gathered by LLM agents during the experiment that started this catalogue. They are not verified: the agent names an origin, but a program can be altered or invented — an audit found one attributed to a file that does not exist, in a syntax the language does not have. Prefer the programs archived by Software Heritage above. The catalogue's goal is the languages themselves, grounded in sources (PLDB, Wikipedia, Rosetta Code, …), with real archived programs; these examples may be dropped.

Conway's Game of Life in Janet

Provenance: commit 9745f4b38d · authored 2025-10-22T11:57:17+02:00 · model anthropic/claude-3.5-sonnet · Temp 0.4
code.janet · license: MIT · added: 2025-10-22T09:57:17Z
(def width 40)
(def height 20)

(defn make-world []
  (array/new-filled (* width height) false))

(defn wrap [n max]
  (if (neg? n)
    (+ max n)
    (if (>= n max)
      (- n max)
      n)))

(defn idx [row col]
  (+ (* (wrap row height) width)
     (wrap col width)))

(defn neighbors [world row col]
  (def deltas [[-1 -1] [-1 0] [-1 1]
               [0 -1]         [0 1]
               [1 -1]  [1 0]  [1 1]])
  (sum (map (fn [[dr dc]]
              (if (get world (idx (+ row dr) (+ col dc))) 1 0))
            deltas)))

(defn step [world]
  (def new-world (make-world))
  (loop [row :range [0 height]
         col :range [0 width]
         :let [i (idx row col)
               n (neighbors world row col)]]
    (put new-world i
         (if (get world i)
           (<= 2 n 3)
           (= n 3))))
  new-world)

(defn show [world]
  (print "\e[H\e[2J")
  (loop [row :range [0 height]]
    (loop [col :range [0 width]]
      (prin (if (get world (idx row col)) "O" " ")))
    (print)))

(def init-world
  (let [w (make-world)]
    (put w (idx 1 1) true)
    (put w (idx 1 2) true)
    (put w (idx 1 3) true)
    w))

(var world init-world)
(forever
  (show world)
  (set world (step world))
  (ev/sleep 0.1))

Contribute — propose a file extension

Tell us where to find evidence about Janet (mapped to pl/janet). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Janet/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Jancy Jank →