# Advent of Code 2025

**URL:** <https://discuss.ocaml.org/t/advent-of-code-2025/17564>\
**Category:** Community\
**Tags:** event\
**Created:** [December 3, 2025, 9:31pm UTC](https://discuss.ocaml.org/t/advent-of-code-2025/17564 "2025-12-03T21:31:11Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![baffalop](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/baffalop/32/6294_2.png) [@baffalop](https://discuss.ocaml.org/u/baffalop)\
**Post date:** [December 3, 2025, 9:31pm UTC](https://discuss.ocaml.org/t/advent-of-code-2025/17564/1 "2025-12-03T21:31:12Z")

</div>

It’s everybody’s favourite time of year! 🎄 Share solutions and discuss puzzles for this year’s [Advent of Code](https://adventofcode.com/2025) (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)

> **[GitHub - baffalop/AoCaml: Advent of Code in OCaml](https://github.com/baffalop/AoCaml)**
>
> Advent of Code in OCaml

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

---

<div class="post-metadata">

**Author:** ![variant](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/variant/32/6306_2.png) [@variant](https://discuss.ocaml.org/u/variant)\
**Post date:** [December 3, 2025, 9:35pm UTC](https://discuss.ocaml.org/t/advent-of-code-2025/17564/2 "2025-12-03T21:35:29Z")

</div>

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

> **[GitHub - hunterkepley/AOC-2025: Advent of Code 2025](https://github.com/hunterkepley/AOC-2025)**
>
> Advent of Code 2025

Really enjoying using OCaml for AoC

---

<div class="post-metadata">

**Author:** ![citizen428](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/citizen428/32/6277_2.png) [@citizen428](https://discuss.ocaml.org/u/citizen428)\
**Post date:** [December 4, 2025, 10:10am UTC](https://discuss.ocaml.org/t/advent-of-code-2025/17564/5 "2025-12-04T10:10:40Z")

</div>

Reposting, accidentally created a spoiler the first time around…

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

[Link to gist so it won’t auto-expand again](https://gist.github.com/citizen428/45cda2753e9414dcd83149a616d3029d)

---

<div class="post-metadata">

**Author:** ![cod1r](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/cod1r/32/5827_2.png) [@cod1r](https://discuss.ocaml.org/u/cod1r)\
**Post date:** [December 4, 2025, 11:07am UTC](https://discuss.ocaml.org/t/advent-of-code-2025/17564/6 "2025-12-04T11:07:51Z")

</div>

> **[aoc/2025 at main · cod1r/aoc](https://github.com/cod1r/aoc/tree/main/2025)**
>
> Contribute to cod1r/aoc development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![aguluman](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/aguluman/32/5709_2.png) [@aguluman](https://discuss.ocaml.org/u/aguluman)\
**Post date:** [December 4, 2025, 12:21pm UTC](https://discuss.ocaml.org/t/advent-of-code-2025/17564/7 "2025-12-04T12:21:52Z")

</div>

> **[advent-of-code-ocaml/2025 at main · aguluman/advent-of-code-ocaml](https://github.com/aguluman/advent-of-code-ocaml/tree/main/2025)**
>
> Advent of Code Solutions In OCaml. Contribute to aguluman/advent-of-code-ocaml development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![avsm](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/avsm/32/6_2.png) [@avsm](https://discuss.ocaml.org/u/avsm)\
**Post date:** [December 4, 2025, 12:36pm UTC](https://discuss.ocaml.org/t/advent-of-code-2025/17564/8 "2025-12-04T12:36:19Z")

</div>



---

<div class="post-metadata">

**Author:** ![K\_N](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/k_n/32/2793_2.png) [@K\_N](https://discuss.ocaml.org/u/K_N)\
**Post date:** [December 5, 2025, 7:30am UTC](https://discuss.ocaml.org/t/advent-of-code-2025/17564/9 "2025-12-05T07:30:21Z")

</div>

Here is mine [https://github.com/Tchou/aoc](https://github.com/Tchou/aoc). I started in 2022 and also walked my way back down to 2016 (not finished). Happy AoC ! 🧑‍💻 🎄

---

<div class="post-metadata">

**Author:** ![dlesbre](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@dlesbre](https://discuss.ocaml.org/u/dlesbre)\
**Post date:** [December 5, 2025, 4:26pm UTC](https://discuss.ocaml.org/t/advent-of-code-2025/17564/10 "2025-12-05T16:26:29Z")

</div>

My solutions are on github: [GitHub - dlesbre/advent-of-code: Puzzle solutions for advent of code 2022, 2023 and 2024](https://github.com/dlesbre/advent-of-code) , 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).

---

<div class="post-metadata">

**Author:** ![baffalop](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/baffalop/32/6294_2.png) [@baffalop](https://discuss.ocaml.org/u/baffalop)\
**Post date:** [December 7, 2025, 8:39am UTC](https://discuss.ocaml.org/t/advent-of-code-2025/17564/11 "2025-12-07T08:39:48Z")

</div>

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](https://github.com/baffalop/AoCaml/blob/main/lib/problems/2025/problem_2025_06.ml)

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

---

<div class="post-metadata">

**Author:** ![variant](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/variant/32/6306_2.png) [@variant](https://discuss.ocaml.org/u/variant)\
**Post date:** [December 9, 2025, 6:18am UTC](https://discuss.ocaml.org/t/advent-of-code-2025/17564/12 "2025-12-09T06:18:56Z")

</div>

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](https://github.com/hunterkepley/AOC-2025/blob/master/6/day6.ml) \< dont judge me too harshly im new to ocaml

---

<div class="post-metadata">

**Author:** ![baffalop](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/baffalop/32/6294_2.png) [@baffalop](https://discuss.ocaml.org/u/baffalop)\
**Post date:** [January 11, 2026, 1:29pm UTC](https://discuss.ocaml.org/t/advent-of-code-2025/17564/13 "2026-01-11T13:29:08Z")

</div>

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](https://github.com/baffalop/tanenbaum)!

Fixes and features:

- I couldn’t get it to compile with `piaf`, [so swapped out for `ezcurl`](https://github.com/baffalop/tanenbaum/pull/2)
- [Fixed ppx compatibility](https://github.com/baffalop/tanenbaum/pull/1)
- [A fair few CLI improvements](https://github.com/baffalop/tanenbaum/pull/3)

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.
