In 2024 I participated in Advent of Code (AoC) and completed 40/50 of the problems.
⭐⭐⭐⭐⬛ 80%
During this advent of code I focused on trying new languages and getting back into functional programming. It was a lot of fun and had a great time trying out Roc, Gleam, and finally getting around to trying OCaml.
"A fast, friendly, functional language." Takes after the Elm programming language, which is one of the first functional languages I ever tried way back in 2014.
It was fun to write in and I'm glad I tried it for the easier problems. It took a little time to get used to writing in the functional approach again. Roc is a very young language, and I did have issues with tooling and getting used to how errors are handled. I'm looking forward to when it has its first 0.1 release, better standard library, and better documentation.
"Gleam is a general-purpose, concurrent, functional high-level programming language that compiles to Erlang or JavaScript source code."
Gleam was nice to write in, and I want to try it out some more, although I personally don't work in areas that need what Erlang and the BEAM VM offer. I will say, the fact that lists are singly linked lists by default, and indexing is an O(n) operation seems crazy! I know there are ways to work around that, but it did stick out to me as strange.
"An industrial-strength functional programming language with an emphasis on expressiveness and safety"
OCaml, oh OCaml. I found OCaml difficult to get started with... But after 2 or 3 problems, I really liked it. Part of the reason why I was initially offput is that it isn't a simple language. There's a lot more syntax, required tooling, understanding the top-level, working modules, functors, etc.
Towards the end I felt like the language came very naturally, and the recursion, pattern matching and functional idioms of OCaml helped me map my ideas well into language. And when certain problems demanded more imperative structures, like certain graph traversals, the language was just as well equipped to handle mutability and loops.
I still have a lot to learn with OCaml, and I'm looking forward to exploring it further, although probably on a Linux machine (the Windows support is not so great).
Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. People use them as interview prep, company training, university coursework, practice problems, a speed contest, or to challenge each other.