Advent of Code 2019 - Day 9

Thank you guys! :sunglasses:
Updated to a Map data structure, and it does all the difference!

3 Likes

Interesting one where I get the high-level logic right, but a subtle bug has been hiding in my code since day 5, and today it comes to bite me in the ass in a very annoying manner.

3 Likes

Today was not my day…

I tried at work while waiting for CI and other people…

I spent a lot of time hunting down for unexplainable–and even worse–nonreproducable crashes of my IntcodeVM. And I didn’t even had tackled any D9 specific stuff, I was just preparing the VM to accept non-pos-mode args for ā€œwrite toā€ arguements…

It ended in me just committing the state as it was, driving home and after lunch trying again from where I left.

Everything went smooth, I got clean match errors with nice stack traces and I could fix the issues within minutes…

In the VM code, even some try/catchs are left which I used to try to figure out whats going on…

1 Like

My solution. Mine is apparently quite slow, needing 1.5 seconds on Part 2. :man_shrugging:

Ahh, [203, 0]! You are not alone, I was there too, struggling to figure out the cause of [203, 0] at some point in progress! I also store the input to the wrong address for 203. I’m as excited as you when I saw you got it working. :grinning: