Doing this year in Prolog! Expect slowness.
Usually, files called part1.pl
and part2.pl
contain just the code that reads
a file and writes out the answer. I am calculating lines of code very liberally:
I include only main
and any predicates defined in partx.pl
, and the entire
line count of every day's library. For example, if part2.pl
has 20 lines of
imports, a 3-line main/2
, and uses predicates defined in foo.pl
which has
10 lines other than imports and module
, I will consider the line count to be 13.
The table here lists the line count for part 2 of each day.
Every day's README.md
will have a detailed
explanation of how I calculated the line count of the solution.
You'll need SWI Prolog. Run each day's solution by doing
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
you@hostname ~> 1/
you@hostname ~> swipl part1.pl input.txt # ditto for part 2, 3, etc...
Fish is the best shell btw.
Day | Name | Solution | LOC |
---|---|---|---|
01 | The Tyranny of the Rocket Equation | solution | 15 |
02 | 1202 Program Alarm | solution | 32 |
03 | Crossed Wires | solution | 143 |
04 | Secure Container | solution | 46 |
05 | Sunny with a Chance of Asteroids | solution | 105 |
06 | Universal Orbit Map | solution | 40 |
07 | - | - | |
08 | - | - | |
09 | - | - | |
10 | - | - | |
11 | - | - | |
12 | - | - | |
13 | - | - | |
14 | - | - | |
15 | - | - | |
16 | - | - | |
17 | - | - | |
18 | - | - | |
19 | - | - | |
20 | - | - | |
21 | - | - | |
22 | - | - | |
23 | - | - | |
24 | - | - | |
25 | - | - |