# Advent of Code 2025

**URL:** https://discourse.haskell.org/t/advent-of-code-2025/13350
**Category:** Learn
**Created:** [December 2, 2025, 8:00am UTC](https://discourse.haskell.org/t/advent-of-code-2025/13350 "2025-12-02T08:00:57Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![benjamin-thomas](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/benjamin-thomas/32/2454_2.png) [@benjamin-thomas](https://discourse.haskell.org/u/benjamin-thomas)
#### Post date: [December 2, 2025, 8:00am UTC](https://discourse.haskell.org/t/advent-of-code-2025/13350/1 "2025-12-02T08:00:57Z")

</div>

Please post your repo here if you’re doing it.

I tend do enjoy reading other people’s solutions, usually I always learn from it.

Here’s my day 1 solution: [multi-playground/aoc/2025/haskell/Day01.hs at 36057441c62acbf42b6b382465886141ba165eb1 · benjamin-thomas/multi-playground · GitHub](https://github.com/benjamin-thomas/multi-playground/blob/36057441c62acbf42b6b382465886141ba165eb1/aoc/2025/haskell/Day01.hs)

I had a hunch I could use mod, but I wanted to try something different and represent a “ring” instead and try to have “inspectable” output at each step.

I learned about `scanl` and `mapAccumL`, pretty cool.

---

<div class="post-metadata">

### Author: ![iteratee](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/iteratee/32/4332_2.png) [@iteratee](https://discourse.haskell.org/u/iteratee)
#### Post date: [December 2, 2025, 9:52am UTC](https://discourse.haskell.org/t/advent-of-code-2025/13350/2 "2025-12-02T09:52:39Z")

</div>

Mine will be [here](https://forgejo.iteratee.net/iteratee/advent2025) as I complete them

---

<div class="post-metadata">

### Author: ![VegOwOtenks](https://avatars.discourse-cdn.com/v4/letter/v/a87d85/32.png) [@VegOwOtenks](https://discourse.haskell.org/u/VegOwOtenks)
#### Post date: [December 2, 2025, 10:19am UTC](https://discourse.haskell.org/t/advent-of-code-2025/13350/3 "2025-12-02T10:19:55Z")

</div>

I’m active on lemmy: [https://programming.dev/c/advent\_of\_code](https://programming.dev/c/advent_of_code) and am posting my solutions in the daily solution threads.  
There are also some other Haskell solutions, for Day 1, I think there were three or four.

[Direct-Link to my Solution in the Day 1 Megathread](https://lemmy.world/post/39560781/20783008)

---

<div class="post-metadata">

### Author: ![george.fst](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/george.fst/32/4933_2.png) [@george.fst](https://discourse.haskell.org/u/george.fst)
#### Post date: [December 2, 2025, 4:56pm UTC](https://discourse.haskell.org/t/advent-of-code-2025/13350/4 "2025-12-02T16:56:14Z")

</div>

I’m using this to brush up on Rust this year. Probably doing everything in Haskell first, then translating. Repo is [here](https://github.com/georgefst/aoc-2025). It’s a fairly nice setup with a Nix flake (`haskell.nix` + `crane`) and `tasty-golden` for tests.

---

<div class="post-metadata">

### Author: ![tristanC](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/tristanc/32/827_2.png) [@tristanC](https://discourse.haskell.org/u/tristanC)
#### Post date: [December 2, 2025, 5:37pm UTC](https://discourse.haskell.org/t/advent-of-code-2025/13350/5 "2025-12-02T17:37:28Z")

</div>

Here are a couple of solutions using clash-prelude:) [TristanCacqueray/advent-of-clash - Codeberg.org](https://codeberg.org/TristanCacqueray/advent-of-clash) . It’s not very practical, but it works!

---

<div class="post-metadata">

### Author: ![brandonchinn178](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/brandonchinn178/32/5103_2.png) [@brandonchinn178](https://discourse.haskell.org/u/brandonchinn178)
#### Post date: [December 3, 2025, 10:16pm UTC](https://discourse.haskell.org/t/advent-of-code-2025/13350/6 "2025-12-03T22:16:31Z")

</div>

I’m trying Haskell, C, and Sqlite here!

> **[advent-of-code/2025 at main · brandonchinn178/advent-of-code](https://github.com/brandonchinn178/advent-of-code/tree/main/2025)**
>
> Contribute to brandonchinn178/advent-of-code development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![raehik](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/raehik/32/5337_2.png) [@raehik](https://discourse.haskell.org/u/raehik)
#### Post date: [December 4, 2025, 9:58am UTC](https://discourse.haskell.org/t/advent-of-code-2025/13350/7 "2025-12-04T09:58:50Z")

</div>

I’m lightly attempting to write solutions in type-level Haskell, using Symparsec for the parsing (and praying that the problems stick to integers and lists). Repo and day 1: [aoc-2025/src/Raehik/Aoc2025/Solutions/Day01.hs at main · raehik/aoc-2025 · GitHub](https://github.com/raehik/aoc-2025/blob/main/src/Raehik/Aoc2025/Solutions/Day01.hs)

It took about 5 minutes for the part 1 program to complete. But it did work!

---

<div class="post-metadata">

### Author: ![sjoerdvisscher](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/sjoerdvisscher/32/1275_2.png) [@sjoerdvisscher](https://discourse.haskell.org/u/sjoerdvisscher)
#### Post date: [December 4, 2025, 6:55pm UTC](https://discourse.haskell.org/t/advent-of-code-2025/13350/8 "2025-12-04T18:55:28Z")

</div>

My solutions are here: [GitHub - sjoerdvisscher/aoc25: Advent of Code 2025](https://github.com/sjoerdvisscher/aoc25)

---

<div class="post-metadata">

### Author: ![jotaalvim](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/jotaalvim/32/4691_2.png) [@jotaalvim](https://discourse.haskell.org/u/jotaalvim)
#### Post date: [December 5, 2025, 2:00pm UTC](https://discourse.haskell.org/t/advent-of-code-2025/13350/9 "2025-12-05T14:00:03Z")

</div>

Here are my solutions: [advent-of-code/2025 at main · jotaalvim/advent-of-code · GitHub](https://github.com/jotaalvim/advent-of-code/tree/main/2025)

---

<div class="post-metadata">

### Author: ![iteratee](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/iteratee/32/4332_2.png) [@iteratee](https://discourse.haskell.org/u/iteratee)
#### Post date: [December 5, 2025, 10:07pm UTC](https://discourse.haskell.org/t/advent-of-code-2025/13350/10 "2025-12-05T22:07:18Z")

</div>

I did my first live stream live coding my solution for Day 4. [I’ll be doing it again for Day 5](https://www.youtube.com/watch?v=jpK9eqqc9Cg) in just over an hour.

---

<div class="post-metadata">

### Author: ![mpilgrem](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/mpilgrem/32/2529_2.png) [@mpilgrem](https://discourse.haskell.org/u/mpilgrem)
#### Post date: [December 7, 2025, 7:05pm UTC](https://discourse.haskell.org/t/advent-of-code-2025/13350/11 "2025-12-07T19:05:17Z")

</div>

My solutions are here: [GitHub - mpilgrem/aoc-solutions: My Haskell solutions to Advent of Code puzzles](https://github.com/mpilgrem/aoc-solutions)

---

<div class="post-metadata">

### Author: ![VegOwOtenks](https://avatars.discourse-cdn.com/v4/letter/v/a87d85/32.png) [@VegOwOtenks](https://discourse.haskell.org/u/VegOwOtenks)
#### Post date: [December 8, 2025, 1:26pm UTC](https://discourse.haskell.org/t/advent-of-code-2025/13350/12 "2025-12-08T13:26:10Z")

</div>

You can find [my solutions here](https://git.jossco.de/vegowotenks/aoc2025): Only the first four days are in Haskell. I switched to [Futhark](https://futhark-lang.org/) afterwards because I wanted to try and learn something new.

---

<div class="post-metadata">

### Author: ![mpilgrem](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/mpilgrem/32/2529_2.png) [@mpilgrem](https://discourse.haskell.org/u/mpilgrem)
#### Post date: [December 27, 2025, 12:34am UTC](https://discourse.haskell.org/t/advent-of-code-2025/13350/13 "2025-12-27T00:34:02Z")

</div>

I am stuck on Day 10 Part 2, with the puzzle input, and, consequently, can’t reach Day 12 Part 2.

I can see that the Part 2 puzzle reduces to an integer linear programming problem. So, first, I investigated linear programming libraries, in the (vain) hope that the real solutions would also be integer solutions (as in the case of the example input).

I tried `simplex-method-0.2.0.0`, but it did not seem to be able to cope even with the example input (perhaps I did something wrong).

Then I tried `coinor-clp-0.0.0.2`, which is a Haskell wrapper around a C++ library (COIN-OR/CLP). That worked (which is how I found relying on real solutions would be in vain), but not without some complexity on Windows: the MSYS2 project does not provide the C++ library for the MINGW64 environment (Stack’s default) but for others. I shifted my Stack set-up to be in the UCRT64 environment (it took me a while to realise that would require a clean slate).

At that point, I thought the C++ library COIN-OR/CBC (a mixed integer linear programming solver) could be a solution. The MSYS2 project provides it. I tried `limp-cbc-0.3.2.3` (uploaded to Hackage in 2018), which is a Haskell wrapper around it, but it either (1) failed to build (with Cabal flag `embedded` set) or (2) failed with `Access violation in generated code when executing data at 0x0` (with the Cabal flag unset). I gave up on that package.

Finally, I thought I would try returning to COIN-OR/CLP augmented with my own attempt at a ‘branch and bound’ algorithm. That worked for some items but, for others, the branching exploded (again, perhaps I did something wrong).

Those are my dead ends. I’m now going to ‘cheat’ by looking at what other Haskellers did.

---

<div class="post-metadata">

### Author: ![mje](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/mje/32/1158_2.png) [@mje](https://discourse.haskell.org/u/mje)
#### Post date: [December 29, 2025, 10:14pm UTC](https://discourse.haskell.org/t/advent-of-code-2025/13350/14 "2025-12-29T22:14:24Z")

</div>

I used the HiGHS solver from another language. It appears that it is available to Haskell through MIP. [MIP: Library for using Mixed Integer Programming (MIP)](https://hackage.haskell.org/package/MIP)

---

<div class="post-metadata">

### Author: ![mpilgrem](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/mpilgrem/32/2529_2.png) [@mpilgrem](https://discourse.haskell.org/u/mpilgrem)
#### Post date: [December 30, 2025, 5:18pm UTC](https://discourse.haskell.org/t/advent-of-code-2025/13350/15 "2025-12-30T17:18:26Z")

</div>

Interesting! By looking into what other Haskellers looked at, I learnt that this type of integer linear programming problem can be solved, in practice, by brute force by binary expansion, pruning and recursion. I wrote up my understanding of the mathematics at [https://pilgrem.com/2025/12/30/integer-linear-programming/](https://pilgrem.com/2025/12/30/integer-linear-programming/) .

---

<div class="post-metadata">

### Author: ![miguel-negrao](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/miguel-negrao/32/1948_2.png) [@miguel-negrao](https://discourse.haskell.org/u/miguel-negrao)
#### Post date: [August 24, 2026, 6:50pm UTC](https://discourse.haskell.org/t/advent-of-code-2025/13350/16 "2026-08-24T18:50:47Z")

</div>

A little bit late, but here are my solutions. All puzzles are solved.

> **[GitHub - miguel-negrao/Aoc\_2025](https://github.com/miguel-negrao/Aoc_2025)**
>
> Contribute to miguel-negrao/Aoc\_2025 development by creating an account on GitHub.
