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/hy
LLM (this repo) · 1PldbLinguistPygmentsWikipediaHyperpolyglotRosettacodeWikidata · Q22661291

Wikipedia infobox

Pulled from the wikimedia/structured-wikipedia snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and pl_fact.csv for the long-table provenance.

Paradigmsmulti-paradigm: procedural · functional · object-oriented · meta · reflective · generic
Typingdynamic, strong
Designed byCore team · Paul Tagliamonte
First appeared2013
Influenced byKawa · Clojure · Common Lisp
LicenseMIT -style
Homepagehttp://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.
ExtensionSourceStrengthSWH
.hylinguistprimary26.6K files
.hypygmentsprimary26.6K files
.hywikipediaproposed26.6K files

Related languages

EasyLang (0.33)Slang (0.31)D (0.27)Fetlang (0.27)V (0.27)

LLM-contributed programs

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
code.hy · license: MIT · added: 2025-10-22T10:01:43Z
(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)))

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.)

Contribute — propose a file extension

Tell us where to find evidence about Hy (mapped to pl/hy). 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/Hy/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← HXSL hybrid →