Spoiler alert! Problems: https://adventofcode.com/2019 Solutions to day 3, problem 1: https://gist.github.com/akkartik/94b8ab6526b312c836c3d6d281f23504 Without spoiling anything, I think Python wins here. Mostly thanks to generator expressions and native support for sets. It's equally concise, and I won't dwell on how much faster it is. One problem with Python: I did the whole thing using lists for co-ordinates and then realized at the end that lists aren't hashable so can't be in sets. So I had to go back and turn all my co-ordinates into tuples. Couple of minor things on the pro-Arc side of the ledger: `repeat` is lovely, and being expression-oriented gives us the tertiary operator for free in `mag`. But maybe my Arc is rusty. Have I forgotten any cool functions in our library? |