Cross platform Clojure Advent of Code solutions.
What's in it for you?
What's in it for the Clojure community?
PRs welcome. Make a new solution file with the new
script:
script/new 2017 1 username
where username
is your Github or Bitbucket username. Then fill in the solution in the file. If the input and answers are still empty you will have to provide it in data.cljc
.
This repo will not accept multiple inputs and answers (see this issue for details).
Read here how to get an nREPL for this project.
Make sure the tests for your solution pass with the test-one
script.
Please do not run calculations outside the tests. Memoized functions are permitted. Top-level lazy sequences are fine as long as they are not realized outside the tests.
CircleCI runs tests for changed namespaces with the .circle/test-diff
script.
Tests support the following metadata:
:skip-cljs
: used for skipping Node tests. Used in .circle/test-diff
,
script/test
and script/test-one
.:skip
: used for skipping tests in script/test
.Run all tests:
script/test
Run one test:
script/test-one 2017 1 username
Run with instrumentation:
INSTRUMENT=true script/test
INSTRUMENT=true script/test-one aoc.y2017.d01.username
Skip Clojure or ClojureScript:
SKIP_CLJ=true script/test
SKIP_CLJS=true script/test
To view a time comparison of your solutions to others, go to CircleCI, open "Test changed namespaces" and scroll to the end.
The entire list of scores can be viewed and downloaded in CSV format here.