Advent of Code ... Final cut (... and First cut :))

2018-11-30 Software-Engineering Haskell Eta Scala Kotlin Advent-of-Code

Today Advent of Code 2018 started again (at 05:00am (GMT))!!!

And …

… just in time …

… today I am also wrapping up Advent of Code 2017!!!


My first implementation was (obviously) in Scala.

And that one alone was interesting, because I also used ScalaCheck for property-based testing and ScalaMeter to implement performance tests for all solutions.

I then made the Scala code cross-compile with ScalaNative.

At the time I was also learning Kotlin and spend some cycles to port the code to Kotlin.

With that I had enough for a first initial benchmark.

The disclaimer still applies: I have not spend a lot of time on analysing the behaviour(s) and/or tunning the solutions, means some of the numbers (probably) need to be taken with a grain of salt.

Last but not least (in the last 4 weeks) I implemented/ported the solutions to Haskell and … Eta!!!

I did not make any changes to the Haskell code, means some of the Eta solutions do not work (run out of memory or stack or … time), but in general I was pleasently surprised how well Eta works and performs.

Last year 43000 people got 2 stars on Day 1. Only 4413 cracked all problems. My claim to fame is that I am (probably) the only one with implementations in 3 languages :).


I updated the benchmark sheet and I am hoping that people will find the code useful.