Fork me on GitHub
#adventofcode
<
2016-12-08
>
fellshard06:12:34

Finished, then refactored, ended up much later than I'd hoped. 😛

fellshard06:12:40

But pretty straightforward all things said

mnespor06:12:46

That's an elegant parser—have you built a DSL before?

fellshard06:12:48

Seeing your parse reminds me I have an unhealthy obsession with regexes 😞

fellshard06:12:35

For whatever reason I match on the entire instruction instead of just targeting the obvious bits

fellshard06:12:05

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

fellshard06:12:55

You're also whipping around those core matrix functions, I need to look into that lib

mnespor06:12:23

yeah, I spent an hour reading the core/matrix docs, then 15 minutes solving the problem 😕

fellshard06:12:42

Still, once you know those, this ends up being super compact

mnespor06:12:02

It came in handy a lot last year, but I've forgotten everything since then

samueldev14:12:18

todays problem looks fun

samueldev14:12:20

im excited to give it a go

spfeiffer17:12:13

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 ☺️

bhauman19:12:16

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.

fellshard19:12:21

Should've used APL...

andrew.sinclair19:12:21

I would love to see someone's answers in J

bhauman20:12:55

there are answers in J on the reddit thread

andrew.sinclair20:12:05

yay Thank you 😉

samueldev22:12:29

oh snap @bhauman mentioned it a few hours ago

samueldev22:12:37

@mnespor were you better off for having done so? 🙂

mnespor22:12:00

Not really

mnespor22:12:16

pm was handy for checking my work, however