Skip to content

rolandtritsch/scala-aoc-2017

Repository files navigation

Build Status GitHub issues

Advent of Code - 2017 (Scala Edition)

Note: There are implementations of this in Scala (JVM and native), Kotlin, Haskell and Eta. If you like any of these ... star it :).

This is a JVM/Native crossproject. To make this work you need to ...

  • install git (brew install git)
  • install sbt (brew install sbt)
  • clone the repo (git clone ...)
  • run the tests (sbt aocJVM/test)
    • this will run all tests and this might take a while
    • you can run specific tests with sbt "aocJVM/testOnly aoc.Day01Spec"
    • you can run sbt "aocJVM/testOnly aoc.Day*Spec -- -l aoc.SlowTest" to only run the fast tests (exclude the slow tests)
    • you can run sbt "aocJVM/testOnly aoc.Day*Spec -- -n aoc.SolutionTest" to only run the tests that will test for the correct solutions
  • run the JVM main (sbt aocJVM/run)
  • run the Native main (sbt aocNative/run)
  • run a subset of the days (sbt "aocJVM/run 1/1 5/2 18/1")
  • generate the doc (sbt doc) and look at it (open target/scala-2.10/api/index.html)

Note: To make Scala Native work you probably need to install a couple more packages.

Have fun!!!

Note: An older version also had ScalaCheck tests and ScalaMeter tests (that do not work anymore).