Lemmy: Bestiverse
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
RSS BotMB to Lobste.rsEnglish · 2 hours ago

Advent of Code 2025: Haskell Solution Reflections for all 12 Days

blog.jle.im

external-link
message-square
0
fedilink
1
external-link

Advent of Code 2025: Haskell Solution Reflections for all 12 Days

blog.jle.im

RSS BotMB to Lobste.rsEnglish · 2 hours ago
message-square
0
fedilink
Merry Christmas all! This is my annual Advent of Code post! Advent of Code is a series of (this year) 12 daily Christmas-themed programming puzzles that are meant to be fun diversions from your daily life, help you find a bit of whimsy in your world, give you a chance to explore new ideas and program together with your friends. I always enjoy discussing creative ways to solve these puzzles every day, and it’s become a bit of an annual highlight for me and a lot of others. My favorite part about these puzzles is that they are open ended enough that there are usually many different interesting ways to solve them — it’s not like a stressful interview question where you have to recite the obscure incantation to pass the test. In the past I’ve leveraged group theory, galilean transformations and linear algebra, and more group theory. Haskell is especially fun for these because if you set up your abstractions in just the right way, the puzzles seem to solve themselves. It’s a good opportunity every year to get exposed to different parts of the Haskell ecosystem! Last year, I moved almost all of my Haskell code to an Advent of Code Megarepo, and I also write up my favorite ways to solve each one in the megarepo wiki. All of this year’s 12 puzzles are here, but I’ve also included links to each individual one in this post. I’m also considering expanding some of these into full on blog posts, so be on the look out, or let me know if there are any that you might want fully expanded! And if you haven’t, why not try these out yourself? Be sure to drop by the libera-chat ##advent-of-code channel to discuss any fun ways you solve them, or any questions! Thanks again to Eric for a great new fresh take on the event this year! * Day 1 - Secret Entrance — The classic Day 1 scanl * Day 2 - Gift Shop — The super efficient IntSet * Day 3 - Lobby — StateT + [] = backtracking search monad * Day 4 - Printing Department — 2D cellular automata * Day 5 - Cafeteria — The power of the data-interval library * Day 6 - Trash Compactor — Data.List manipulations * Day 7 - Laboratories — Tying the knot * Day 8 - Playground — Iterative Clustering * Day 9 - Movie Theater — IntervalSet and IntervalMap * Day 10 - Factory — Guassian Elimation, Type-safe Mutable Vectors * Day 11 - Reactor — More Knot Tying and DP! * Day 12 - Christmas Tree Farm — Counting

Comments

alert-triangle
You must log in or register to comment.

Lobste.rs

lobsters

Subscribe from Remote Instance

You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !lobsters@lemmy.bestiver.se
lock
Community locked: only moderators can create posts. You can still comment on posts.

RSS Feed of lobste.rs

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 18 users / day
  • 86 users / week
  • 321 users / month
  • 1.29K users / 6 months
  • 2 local subscribers
  • 288 subscribers
  • 9.95K Posts
  • 521 Comments
  • Modlog
  • mods:
  • patrick
  • RSS Bot
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org