Advent of Code 2019 - Day 23

Note: This topic is to talk about Day 23 of the Advent of Code 2019.

There is a private leaderboard for elixirforum members. You can join it by following this link and entering the following code:


1 Like

I went back to using my process-based Intcode machine from day 13 (with modifications). That choice made some things easier and other harder. In my first stab, to get the correct solution I needed to add a timeout of 100 ms in the NAT to ensure that all NICs were truly idle. I managed to eliminate that timeout in my polished solution.

1 Like

I was seriously considering rage-quitting after yesterday’s challenge, but then I figured since I got this far I might as well see it through. Here’s my take. Nothing particularly fancy about it. My intcode is purely functional, and I’m invoking computers in a round robin fashion, resolving the idle state if needed. During the last edition I wrote a few enum helpers, so I ended up using one of them called non_uniques, which returns a lazy collection of elements which appear in the input enumerable more than once.


I’m trying to use a process-based network, but the incode computers send messages to unexisting addresses, like 47714, which seems to be a X or Y value. And I don’t know why … This is frustrating :slight_smile:

1 Like

I had a stupid pattern matching error …

Also I found that the code for part 2 with processes goes way faster if you provide an initial -1 in the input and just wait in receive instead of doing something like after 0 -> -1