I'm trying to learn a bit more Julia by solving the puzzles over
on http://adventofcode.com
On day 3, the problem is to follow a number of directions and figure out
how many new places you end up.
http://adventofcode.com/day/3
I thought I can solve this simply by defining a set of [x y] positions,
each time adding a new grid position to the set, so I'd end up with a Set{
Array{Int64,2}} of the right length.
However, this doesn't work as expected. I get the wrong number (it's too
low).
Wrapping each grid position into a string() call, however, gives me the
right answer.
The explanation is a bit convoluted. To avoid spoilers I've put the code up
at https://gist.github.com/jstrube/3d54e15f7d051b72032b
I don't quite understand this. Is this expected?