{"slug": "show-hn-code-like-a-viking-havamal-programming-language", "title": "Show HN: Code like a Viking (Hávamál programming language)", "summary": "Developer Joisig released Hávamál, an esoteric programming language for solving Advent of Code puzzles, built in ljóðháttur form with alliteration and a required metre, inspired by APL and Joy and written with assistance from Claude. Hávamál includes a simpler internal representation called Kjarni and adds priority queues named Dísir, automatically memoized functions, and bitwise operations after Joisig verified the language against his full set of Advent of Code 2020 solutions. An online editor at joisig.com/havamal lets users write, edit, debug and run Hávamál programs without data leaving the browser.", "body_md": "# Code like a Viking (or: how AoC nerd-sniped me yet again)\n\n[Advent of Code](https://adventofcode.com/) manages to nerd-snipe me almost every year, leading me to waste/enjoy a few hours. \n\nThe 2026 edition got me thinking that solving it is way too easy now with AI, which of course also takes all the fun out of it.\n\nI’m not exactly sure where the idea came from, but my next thought was, wouldn’t it be fun if there was a brand new puzzle language to write solutions in, where it’s not only a question of correctness but also of beauty? This “logically” led to the new language [Hávamál](https://github.com/joisig/havamal), which is in ljóðháttur form (closer to modern Icelandic than to Old Norse), with alliteration (stuðlar og höfuðstafir) and a specific metre that must hold.\n\nI had made an attempt a couple of years ago to get through at least some of AoC in a concatenative language ([BQN](https://mlochbaum.github.io/BQN/)) and more or less failed, but I thought it’d be fun this time to try another concatenative stack/box processing language, so Hávamál is inspired by [APL](https://en.wikipedia.org/wiki/APL_%28programming_language%29) and by [Joy](https://en.wikipedia.org/wiki/Joy_%28programming_language%29). There is also a simpler to write (closer to Joy) internal representation called Kjarni that you can write in before transposing to Hávamál.\n\n[You can write your own Hávamál programs, edit, debug and run them, in this online editor](https://joisig.com/havamal), or by running the code from the GitHub repo. No data leaves your browser.\n\nThere is a lot of freedom to choose the way you word things in Hávamál, but you also need to fit your implementation to the metre, with correct alliteration, and to the available Heiti (commands). Thus, you end up with a puzzle language: Solve the AoC (or similar) puzzle in code, find Heiti that alliterate, make it fit the metre, try to make it sound like wisdom from up on high.\n\nI tried to ensure that most AoC style puzzles would be achievable without too much hassle in Hávamál, by verifying against my full set of solutions for [AoC 2020](https://joisig.com/coding/2020/12/27/advent-of-code-2020.html). This led to a few language additions like priority queues named Dísir (in honor of Dijkstra, whose algorithm they are typicaly needed for), automatically memoized functions (e.g. “Eikarþáttur” is a function, “Eikarþáttur Munins” is that same function memoized), and bitwise operations (e.g. *hamskipti* for xor).\n\nThis art project is brought to you by me and Claude, courtesy of nerd-sniping by the friendly Christmas elves over at AoC.", "url": "https://wpnews.pro/news/show-hn-code-like-a-viking-havamal-programming-language", "canonical_source": "https://joisig.com/code-like-a-viking", "published_at": "2026-12-02 10:27:45+00:00", "updated_at": "2026-12-02 10:46:21.792725+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["Hávamál", "Joisig", "Claude", "Advent of Code", "Kjarni", "APL", "Joy", "BQN"], "also_reported_by": [], "takeaway": "Hávamál is a concatenative stack language whose commands (Heiti) must fit a required alliterative metre, with a Joy-like internal representation called Kjarni for writing programs before transposing them to Hávamál.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-code-like-a-viking-havamal-programming-language", "markdown": "https://wpnews.pro/news/show-hn-code-like-a-viking-havamal-programming-language.md", "text": "https://wpnews.pro/news/show-hn-code-like-a-viking-havamal-programming-language.txt", "jsonld": "https://wpnews.pro/news/show-hn-code-like-a-viking-havamal-programming-language.jsonld"}}