I solved Part 2 in python but uh... in a slightly unconventional way. I re-wrote the CPU so that it used Redis for memory instead of variables, wrote functions so it could operate one cycle at a time every time the script was run, built it into a Docker image, and pushed it to a registry, and then wrote an Airflow DAG to orchestrate running of the CPU inside a kubernetes cluster.
And then had it brute-force the solution by running it one cycle per Kubernetes Pod, deployed by Airflow, until it found the answer and sent it to me via Slack.
I'm a Sr. Software Engineer at Flashpoint. I specialize in Python and Go, building functional, practical, and maintainable web systems leveraging Kubernetes and the cloud. Blog opinions are my own.
I solved Part 2 in python but uh... in a slightly unconventional way. I re-wrote the CPU so that it used Redis for memory instead of variables, wrote functions so it could operate one cycle at a time every time the script was run, built it into a Docker image, and pushed it to a registry, and then wrote an Airflow DAG to orchestrate running of the CPU inside a kubernetes cluster.
And then had it brute-force the solution by running it one cycle per Kubernetes Pod, deployed by Airflow, until it found the answer and sent it to me via Slack.
Blog: dev.to/meseta/advent-of-code-day-0...
Omg youβre a hero. This is so very impressive