4 ms·
I have recently been working through last year's Advent of Code puzzles in Elixir. I finished the puzzles in 2020 and picked my old repo back up. I recently ha
by agentwiggles 4y ago
I have recently been working through last year's Advent of Code puzzles in Elixir. I finished the puzzles in 2020 and picked my old repo back up.
I recently had the pleasure of reusing some old code I wrote for a previous puzzle. I pulled the code out into its own module, added some docs, rethought some decisions, and got it working better. I learned how implementing protocols works and made it work with all the built in Enumerable functions. This is one of the first times in my life I looked at year-old code and thought "hey, this is actually useful!"
The project has been an awesome learning experience and entirely self directed. I pulled in a cool graph library for one puzzle in 2020. I wrote custom mix task for generating puzzle skeletons. It even downloads the puzzle input automatically now! I learned to use a benchmarking tool to satisfy some curiosity about differences between two different implementations. I've gotten way better at using recursion to solve problems. Today, I cloned the Elixir source code to get a better understanding of a particular language feature.
None of this stuff was necessary, and indeed it's not even technically useful - these puzzles are toy code, and I'm sure my implementations could be better. But I've just been enjoying the hell out of Elixir and going the extra mile doesn't feel like work, just more fun to be had.
- quechimba 4y agoElixir is great. Very well designed. Enjoy :)
- agentwiggles 4y agoIt really is a wonderful language. I honestly can't think of a single complaint I have with it.