crickets
Finished, then refactored, ended up much later than I'd hoped. π
But pretty straightforward all things said
Nice rect
!
That's an elegant parserβhave you built a DSL before?
Seeing your parse reminds me I have an unhealthy obsession with regexes π
For whatever reason I match on the entire instruction instead of just targeting the obvious bits
mnespor, yours is perfect amount of detail, hahah. Just the matching bit in the instruction, then conveniently pulling the two ints out - no more and no less
You're also whipping around those core matrix functions, I need to look into that lib
yeah, I spent an hour reading the core/matrix docs, then 15 minutes solving the problem π
Heheh :<
Still, once you know those, this ends up being super compact
It came in handy a lot last year, but I've forgotten everything since then
todays problem looks fun
im excited to give it a go
I see i have to hurry up and catch up on the 2015 problems to get to the 2016 ones. Perhaps i should cancel sleeping βΊοΈ
I think getting to know core.matrix
could probably be helpful in the coming problems. But it doesn't seem to provide much help for last nights problem. numpy
and pandas
both have a huge advantage for problems like this.
or J :troll:
Should've used APL...
lol
I would love to see someone's answers in J
there are answers in J on the reddit thread
https://www.reddit.com/r/adventofcode/comments/5h52ro/2016_day_8_solutions/daxiz60/
yay Thank you π
did anyone use https://github.com/mikera/core.matrix today?
oh snap @bhauman mentioned it a few hours ago
I did!
@mnespor were you better off for having done so? π
Not really
bahahaha
pm
was handy for checking my work, however