Advent of Code - Programming On Unix

Last year was the first time I took part in the Advent of Code (, and enjoyed it so much I came back this year too.

Some problems this year would take me too much time, so I skipped a few days, but overall it's been a fun week. I thought it would be nice to start a separate thread with solutions to particularly interesting problems.

My favourite so far was day 6 (, with some simple graph node-counting. To avoid parsing the input (I'm going to use C as long as I can), I used Awk to generate a header file which gets #included:

#!/usr/bin/env awk -f

    print "node nCOM = {.parent = NULL};";

    print "node n" $2 " = {.parent = &n" $1 "};";

Is anyone else taking part? Could you share some solutions that you've found particularly interesting?
Grey Hair Nixers
very cool!

I'm currently doing this years in clojure to get a better feel for it --