Hy
1 program
Added 2025-10-22T10:01:43Z
Model: anthropic/claude-3.5-sonnetTemp: 0.4
Evidence
Report issue
View issues
Aliases: hylang
Provenance: commit 009a516f13 · authored 2025-10-22T12:01:43+02:00 · model anthropic/claude-3.5-sonnet
Sources mentioning this language
8 sources · pl_id:
pl/hyWikipedia infobox ↗
Pulled from the
wikimedia/structured-wikipedia
snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and
pl_fact.csv for the long-table provenance.
| Paradigms | multi-paradigm: procedural · functional · object-oriented · meta · reflective · generic |
|---|---|
| Typing | dynamic, strong |
| Designed by | Core team · Paul Tagliamonte |
| First appeared | 2013 |
| Influenced by | Kawa · Clojure · Common Lisp |
| License | MIT -style |
| Homepage | http://hylang.org |
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.| Extension | Source | Strength | SWH |
|---|---|---|---|
.hy | linguist | primary | 33.2K files |
.hy | pygments | primary | 33.2K files |
.hy | wikipedia | proposed | 33.2K files |
Related languages
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 Hy
Provenance: commit 009a516f13 · authored 2025-10-22T12:01:43+02:00 · model anthropic/claude-3.5-sonnet · Temp 0.4
(import [time [sleep]]
[random [randint]])
(defn create-board [width height]
(list-comp
(list-comp
(if (= 1 (randint 0 1)) "*" " ")
[x (range width)])
[y (range height)]))
(defn count-neighbours [board x y width height]
(setv count 0)
(for [i (range -1 2)]
(for [j (range -1 2)]
(if (and
(!= (+ i j) 0)
(< -1 (+ x i) width)
(< -1 (+ y j) height)
(= (get-in board [(+ y j) (+ x i)]) "*"))
(setv count (+ count 1)))))
count)
(defn step [board width height]
(setv new-board
(list-comp
(list-comp
(get-in board [y x])
[x (range width)])
[y (range height)]))
(for [y (range height)]
(for [x (range width)]
(setv n (count-neighbours board x y width height))
(setv cell (get-in board [y x]))
(cond [(and (= cell "*") (< n 2))
(setv (get-in new-board [y x]) " ")]
[(and (= cell "*") (> n 3))
(setv (get-in new-board [y x]) " ")]
[(and (= cell " ") (= n 3))
(setv (get-in new-board [y x]) "*")])))
new-board)
(defn print-board [board width height]
(print "\033[2J\033[H")
(for [y (range height)]
(for [x (range width)]
(print (get-in board [y x]) :end ""))
(print)))
(defmain [&rest args]
(setv width 30)
(setv height 15)
(setv board (create-board width height))
(while True
(print-board board width height)
(setv board (step board width height))
(sleep 0.1)))