Advent of Code 2025

It’s everybody’s favourite time of year! :christmas_tree: Share solutions and discuss puzzles for this year’s Advent of Code (spoiler etiquette please!) Note that this is the first 12 day advent instead of the erstwhile 25 days (see the FAQ).

I’m using this year’s to finally learn OCaml! (After starting off on my FP journey with Elm for AoC 2019, and continuing through Haskell and Purescript…) Using a starter pack called Tanenbaum (though it’s gotten in the way a couple of times—more on that below)

I should also highlight the OCaml leaderboard: code 3236051-3f7ecc0b (set up by Sabine)

6 Likes

First year for me using a FP, so dont judge my solutions too harshly!

Really enjoying using OCaml for AoC

3 Likes

: )

2 Likes

Reposting, accidentally created a spoiler the first time around…

I only just did day 1 today, $WORK is keeping me busy. :frowning: I decided to keep it simple:

Link to gist so it won’t auto-expand again

1 Like
2 Likes
2 Likes

Here is mine https://github.com/Tchou/aoc. I started in 2022 and also walked my way back down to 2016 (not finished). Happy AoC ! :technologist: :christmas_tree:

3 Likes

My solutions are on github: GitHub - dlesbre/advent-of-code: Puzzle solutions for advent of code 2022, 2023 and 2024 , I’m trying to go for short solutions, even though these may no be the fastest. I’ve also got a small custom library from previous years (included in the repo) for common patterns that crop up in these puzzle (grid functions, count and sum iterators, etc).

1 Like

Yesterday was all about dragging my parser combinators through the dirt, but I clung on AoCaml/lib/problems/2025/problem_2025_06.ml at main · baffalop/AoCaml · GitHub

Despite them being mostly useless in the end (going character by character) I still kinda think List.length <$> many1 (char ‘ ‘) was quite handy

1 Like

Oh man i had a lot of fun with day 6. Used a lot of things ive never gotten to use that i learned in my ocaml book

@baffalop that spoiler code is a neat way of going about that

AOC-2025/6/day6.ml at master · hunterkepley/AOC-2025 · GitHub < dont judge me too harshly im new to ocaml

1 Like

As promised in the OP, I was going to talk about the Tanenbaum framework.

Over the course of AoC I had to fix a few things, and also thought of some improvements. So now, I’ve created my own fork of Tanenbaum!

Fixes and features:

Hope this helps some of you next year!

I’d be happy to upstream these changes, but I haven’t had any response from the upstream maintainers.