2025-07-24 –, Main Room 5
I will discuss using Julia during Advent of Code to earn 50 stars each in 2020, 2022, and 2024. Advent of Code consists of twenty-five days of programming puzzles during the holiday season. Julia is well suited to solve these puzzles due to its ergonomic syntax, fast execution via just-in-time compilation, interactive read-evaluate-print-loop (REPL), and fantastic visualization capabilities. The triumphs and challenges of using Julia for competitive and recreational programming will be reviewed.
Using Julia to complete twenty-five days of Advent of Code programming puzzles is a fantastic experience given the nature of the Julia language and the Julia community. The Julia Programming Language provides an interactive read-evaluate-print-loop (REPL) interface while also being fast to execute using just-in-time (JIT) compilation based on LLVM. This allows Advent of Code participants to quickly experiment, interactively see partial results, and rapidly execute brute force solutions when needed. The language is backed by a vibrant community interested in both succinct and efficient solutions to these puzzles.
Julia's wide array of features offers many benefits when solving Advent of Code puzzles. For example, operator overloading allows for the easy expression of unusual binary operators. Julia's metaprogramming capabilities allow for the representation of puzzles as domain-specific languages. The Julia standard library offers built-in linear algebra and mathematical capabilities when needed.
Meanwhile, some of Julia's conventions add complexity to the puzzles. Julia is column-major and its standard Array type is one-based leading to potential transposition and off-by-one errors. Additionally, the standard library lacks facilities for certain kinds of common collections and functional tools. However, these difficulties can be overcome by judicious use of abstract arrays and the wide variety of available packages from the community.
The Julia community is also highly competitive and eager to demonstrate both concise solutions and fast solutions. Many participants will discuss how to optimize solutions via community Zulip and Slack channels. The resulting solutions are often among the most succinct while the performance is competitive with the fastest programming languages. In the rare circumstance where this is not the case, the Julia community will often strive to understand why and seek improvements to the languages.
I will share my experience of using Julia to solve all twenty-five days of Advent of Code puzzles over three of the last five years. I will highlight where Julia has shined, where Julia has stumbled, and how Julia has evolved over many years to improve the experience. Along the way, I will also highlight how Julia's technical features interact with competitve and recreational coding. For example, I will touch upon how the module namespace system can help the Advent of Code user stay organized while allowing reuse of code while needed.
I am a Software Engineer at the Howard Hughes Medical Institute Janelia Research Campus.