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: