Advent of Code 2024
Advent of Code is an advent calendar of programming puzzles. They can be solved any programming language - only the output/result matters.This year I am doing AoC while trying to use as many different programming languages as possible. Both as an exercise and to explore new languages. I will write up my experiences of each day (at least each day I complete) here!
As always you can find the code in this repository (I will release my solutions the day after)
Day 01 - Perl
Using Perl here was really fun. I have never used it before. It feels like pythons older brother.
The easy file I/O, list and hash map handling made it a great fit for this task as well. I would also like to explore Perls regex capabilities in a future task.
Day 02 - Go
I haven't really used go, except for a short time a few years back. Following a recommendation of a friend I wanted to try it out again. To be honest using Go on today's challenge was not a great experience, I am not sure how much of that is to blame on me though - there are a few caveats where I don't see the benefit (yet?). Slices referencing their source array instead of copying was off-putting in particular. I don't see how this isn't a big source of nasty or annoying bugs, but that might boil down to a skill issue after all.
This won't be the last time using Go, and I am looking forward to fully exploring the language and getting my hands dirty with it.
Day 03 - Perl (again)
I originally wanted to do this in C, but halfway through my implementation of a state machine I recognized that I was basically reinventing the wheel here (and by wheel I mean Regex) - so I just switched to Perl. Using Perls excellent regex support both tasks were solved in less lines of code than my half-baked state machine for just the first task in C.
.... and that was it for this year, I did not find the time to participate further this year, maybe next time