I'm really passionate about Advent of Code and each year I try to do something different and/or use different language(s). Take a look:
- AoC 2015 in Nim, Python
- AoC 2016 in Python, Clojure (+ visualizations)
- AoC 2017 in Nim, OCaml, Python
- AoC 2018 in Nim, Python, Racket
- AoC 2019 in OCaml, Python
- AoC 2020 in Nim, one liner-y Python, Racket
- AoC 2021 in Python, Racket
- AoC 2022 in Python, Clojure
- AoC 2023 in Clojure
- AoC 2024 in Clojure (Clerk notebooks) (this is a link to the repo)
If you're new to Clojure, I wrote a Quick intro to Clojure notebook. It covers only the basics (otherwise it wouldn't be a quick intro, would it?), so feel free to read some other resources to get the feel for the language.
Every year I have a helper file with common functions that are usually useful for AoC tasks. This year is no exception, and now it is available as a notebook. See aoc.clj.
I wanted to test the graph traversal helper
(if it doesn't take you to the correct part of the notebook, try hitting F5
or find it in the TOC),
and also to see how to write code that's "compatible" with Clerk
notebook format, i.e. easy and interesting to follow, so I solved some
previous tasks:
- AoC 2016, Day 13 (+ visualization)
- AoC 2017, Day 12
Ok, now we're ready for...