Skip to content

kareila/aoc-solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kareila/aoc-solutions

I participated in the annual Advent of Code for the first time in 2022 and enjoyed it quite a bit. I decided to share my solutions here, which were all programmed in Perl 5 without using any CPAN modules. I have been a Perl programmer for more than 20 years and it's the language I know best. I got the impression from lurking on various popular internet forums that not many AoC participants were using Perl, so I thought that my solutions might be of interest to fellow Perl programmers.

Based on what I learned from that experience, I decided to teach myself the Elixir language using the excellent Exercism website. Once I finished that syllabus, I decided to gain further practice by reimplementing some of my AoC solutions in Elixir, which I am also sharing here. It seems to me that Elixir scripts take longer to start up than Perl scripts, but once they get going, they can resolve large computations faster, especially on exercises that can be solved with asynchronous parallel calculations.

I have not included my input files here, because it is my understanding that it is frowned upon to do so, and my scripts will quit with an error saying that the input file was not found. You will need to either download your own inputs from the AoC site (which requires an account), or create a workaround if you want to run my code as-is using the examples provided in each puzzle's description on the AoC site.

Have fun saving Christmas!

Changes

28 Dec 2023

Finalized my solutions for the 2023 Advent of Code. These were written in Elixir and none take more than 5 seconds to execute on my machine. (Only Day 23 takes more than 3 seconds.)

7 Oct 2023

Updated the 2021-2022 Elixir solutions to use the shared libraries. I think I'm finally done with revisions on these - I kept coming back because I enjoyed writing code in Elixir so much.

4 Oct 2023

Finished Elixir versions of my solutions for the 2020 exercises. Now I have Elixir code for 2017-2022 and Perl code for 2020-2022.

27 Sep 2023

Updated the 2017-2019 Elixir solutions to use shared libraries of common functions. Also finally figured out how to use the Intcode input data as a map instead of a linked list, resulting in a huge speed boost - as much as 10x in some exercises.

26 Sep 2023

Solved exercises for 2017 using Elixir. Elapsed time: only 5 days??

20 Sep 2023

Took 7 days to write Elixir versions of my solutions for 2021.

13 Sep 2023

Solved exercises for 2018 using Elixir. Elapsed time: 11 days exactly.

30 Aug 2023

Solved exercises for 2019 using Elixir. Whoa, we're halfway there.

27 Apr 2023

Published Elixir versions of my solutions for the 2022 exercises.

23 Jan 2023

Completed Perl solutions for 2021. Three years down, five to go...

6 Jan 2023

Finished Perl solutions for 2020. (It's the twelfth day of Christmas!)

27 Dec 2022

Initial release of Perl solutions from 2022.

kareila at dreamwidth dot org // 28 Dec 2023

About

My solutions for Advent of Code problems.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published