r/adventofcode • • Dec 22 '19

SOLUTION MEGATHREAD -🎄- 2019 Day 22 Solutions -🎄-

--- Day 22: Slam Shuffle ---


Post your full code solution using /u/topaz2078's paste or other external repo.

  • Please do NOT post your full code (unless it is very short)
  • If you do, use old.reddit's four-spaces formatting, NOT new.reddit's triple backticks formatting.
  • Include the language(s) you're using.

(Full posting rules are HERE if you need a refresher).


Reminder: Top-level posts in Solution Megathreads are for solutions only. If you have questions, please post your own thread and make sure to flair it with Help.


Advent of Code's Poems for Programmers

Click here for full rules

Note: If you submit a poem, please add [POEM] somewhere nearby to make it easier for us moderators to ensure that we include your poem for voting consideration.

Day 21's winner #1: nobody! :(

Nobody submitted any poems at all for Day 21 :( Not one person. :'(


This thread will be unlocked when there are a significant number of people on the leaderboard with gold stars for today's puzzle.

EDIT: Leaderboard capped, thread unlocked at 02:03:46!

30 Upvotes

167 comments sorted by

View all comments

Show parent comment

2

u/Rick-T Dec 22 '19

Great solution. My solution was similar to yours, except that I did not use datakinds. I know they existed but I did not really understand them. Your solution is a really nice example of how to use datakinds. It really helped me getting a grasp of the concept :)

Now my solution looks very similar to yours. I must say, it's a lot nicer than before.

1

u/naim42 Dec 22 '19

Thanks; I had never used data kinds either before writing this solution. I'm learning tons about Haskell by doing these challenges.

Today I hesitated a long time about which modular arithmetic to use (modular-arithmetic, finite-field, finite-typelits, arithmoi...) and ended up deciding that it was more fun to do it myself.