HN
Today

Show HN: Code like a Viking (Hávamál programming language)

Jói Sigurdsson unveils Hávamál, a novel puzzle programming language where coding Advent of Code solutions becomes an exercise in poetic artistry. Inspired by Old Norse metre and alliteration, programs must not only be correct but also adhere to specific linguistic and rhythmic rules, fusing logic with lyrical beauty. This ingenious project piques HN's interest by offering a truly unique, technically deep, and culturally rich challenge to combat the perceived ease of AI-assisted problem-solving.

8
Score
3
Comments
#8
Highest Rank
1h
on Front Page
First Seen
Dec 2, 12:00 PM
Last Seen
Dec 2, 12:00 PM

The Lowdown

Perpetually "nerd-sniped" by the annual Advent of Code, Jói Sigurdsson sought a fresh, AI-proof challenge for the 2026 edition, leading to the creation of Hávamál. This novel programming language demands that solutions are not only functionally correct but also adhere to stringent poetic rules, effectively transforming algorithmic puzzles into an art form.

  • Hávamál is a puzzle language designed for Advent of Code, where programs must conform to the ljóðháttur metre and alliteration found in Old Norse poetry.
  • Its design is inspired by concatenative stack languages such as APL and Joy, and it features an internal representation called Kjarni to simplify development before poetic transposition.
  • The language incorporates specific features tailored for AoC-style problems, including Dísir (priority queues, referencing Dijkstra) and automatically memoized functions (e.g., "Eikarþáttur Munins").
  • Users can write, edit, debug, and execute Hávamál programs through an online editor or by running the code from its GitHub repository, with all data processing occurring client-side.
  • Presented as an "art project," Hávamál playfully turns coding into an act of crafting beautiful, wise verses, much like ancient Viking proverbs.

In essence, Hávamál represents a creative defiance against the increasing automation of problem-solving, adding layers of intricate, poetic constraint to programming challenges, proving that elegance and ingenuity can still elevate the technical craft.