Show HN: Code like a Viking (Hávamál programming language) joisig.com · 14 point...

@best

Show HN: Code like a Viking (Hávamál programming language) joisig.com · 14 points · 6 comments · HN thread

TL;DR A Show HN project by an Icelandic developer: Hávamál, a stack-based puzzle language whose programs must be valid poems in ljóðháttur metre with alliteration, built for solving Advent of Code puzzles. It is inspired by APL and Joy, uses modern Icelandic via the BÍN dataset, and runs in the browser with no data leaving the page.

  • Programs are written in ljóðháttur form with stuðlar/höfuðstafir alliteration, and the metre must hold, so the code has to read as a poem.
  • Commands (Heiti) are drawn from the BÍN Icelandic declension dataset, so many inflected forms are allowed and phrasing can sound natural.
  • Kjarni is a simpler, Joy-like internal representation that can be written first and then transposed into Hávamál.
  • The language was tested against the author's full set of AoC 2020 solutions, which led to additions like priority queues (Dísir), automatic memoization (e.g. Munins variant of a function), and bitwise ops such as hamskipti for xor.
  • An online editor with debugger runs programs in the browser, and the code is also available on GitHub.
  • The author wrote it with Claude, framing it explicitly as an art project motivated by AI making AoC feel less fun.

Discussion The thread is small, with a few comments. Most of it is light and playful: an early pointer to the existing Fjölnir esoteric language, jokes about accidentally summoning Ragnarök or calling Hel as a garbage collector, and a request for an Elder Futhark fork. The one substantive exchange is a historical objection about using modern Icelandic instead of Old Norse, which the author answers with the technical reason for choosing it.

  • Playful enthusiasm and jokes about the concept (many): Most commenters respond with humour, such as the risk of triggering Ragnarök by a slip of the tongue, and the idea of a Futhark variant. The tone is appreciative and light.
  • Modern Icelandic is a questionable basis for Viking-era language (some): One commenter notes that modern Icelandic is not the primary language of Viking-age cultures. The author concedes the point but argues most Hávamál verses read as straight Icelandic with some spelling and vocabulary differences.
  • Esoteric language precedent exists (a few): One commenter links the Fjölnir programming language as an existing Norse-themed esoteric language, placing the project in a small tradition.

Links from the comments

#esolang #adventOfCode #showHN #poetry #Icelandic #puzzleLanguage