Back

Advent of Code 2023!

It’s almost time! Just one week left to Dec 1st: adventofcode.com/2023.

My goal this year is to learn a new programming language, if not only because then I can put the blame on something else when I inevitably crash and burn somewhere around day 15 given my current track record:

2015      12
2016      10
2017      11
2018       8
2019      10
2020      22
2021      15
2022      22

You can follow me along on GitHub where I will be posting my solutions: lindskogen/advent-of-code-2023

For myself, I haven’t decided what language to use yet, but I usually go with Rust or Kotlin. But this year I might try something else, like Gleam or Roc. Both of them are functional languages and I find that the functional style of programming is well suited for AoC.

Gleam

The main selling point of Gleam — as well as Elixir — is making the Erlang VM + Ecosystem accessible to more users and without them having to learn the absolute travesty that is the Erlang syntax.

I’ve had some time to play around with Gleam and the syntax is a bit verbose but it’s not too bad. It’s also similar to Rust, which I like.

Roc

I appreciate languages that try to make them accessible for beginners. The prime example of this is Elm. Roc claims to do the same and I’m excited to try it out! It’s a bit intimidating to learn all the new syntax but I enjoy exploring new ways of thinking about programming.

Roc is more in the vein of Haskell, and like Haskell, it handles arbitrarily large integers out of the box. Sometimes that gives you an edge in the AoC puzzles.

There also seems to be a story for “async in Roc” from the start. I feel that this is almost a requirement for new languages these days, since most applications needs to call out to external systems or do some other async task.

Update: For anyone else looking to try Roc for AoC, @rtfeldman posted a guide here: Link to GitHub Gist

Johan