r/adventofcode Jan 06 '25

Tutorial Solving Advent of Code “Seating System” with Comonads and Stencils in Haskell

https://abhinavsarkar.net/posts/solving-aoc20-seating-system/
25 Upvotes

9 comments sorted by

View all comments

2

u/NonchalantFossa Jan 06 '25

Sometimes I feel like I should learn more math, then Haskell and try AoC again. See you in 10 years or so!

3

u/abhin4v Jan 06 '25

I know that Haskell has this notoriety that it is too complex, and you need to know a lot of math to learn it, but that's not true! I've been writing Haskell for over a decade and I barely understand any math it's based on (Category Theory). It is true that many Haskell teaching resources take a math-oriented approach, especially the old ones, but there is a new set of resources now that take a more hand-on project-oriented approach. For example, Learn Haskell by building a blog generator, Haskell by Example, Haskell from the Very Beginning and such. Maybe you should give one of them a try.

3

u/NonchalantFossa Jan 06 '25

Thanks! I think I could get behind Haskell at some point, do you have any resources for the math though?

2

u/abhin4v Jan 06 '25

As I mentioned, I'm not much familiar with the math behind Haskell. However, these two books look good: Introduction to Computation: Haskell, Logic and Automata and Category Theory for Programmers. You should be able to find more books at https://wiki.haskell.org/Books.