Joao Neto
banner
joaopneto.bsky.social
Joao Neto
@joaopneto.bsky.social
Talks about tech, product management, data and other geek stuff. Loves surfing, mountain biking and great books.
Stylish! 😎
March 27, 2025 at 1:41 PM
Fun fact: The cache hit rate is consistently over 65% per design, but it can reach into the 90s in some cases.
December 19, 2024 at 11:23 AM
Meant 3-bit computer (0 to 7 decimal).

"This seems to be a 3-bit computer: its program is a list of 3-bit numbers (0 through 7), like 0,1,2,3. The computer also has three registers named A, B, and C, but these registers aren't limited to 3 bits and can instead hold any integer."
December 18, 2024 at 8:35 PM
The 7-bit computer hint means outputs depend only on the lower 3 bits of registers at each step. I built A incrementally, testing just 8 values (0-7) for each 3-bit chunk, which massively reduced the search space.
December 18, 2024 at 7:18 PM
Managed to solve it with the hint that this is a 7-bit computer, so this can dramatically reduce the search space.

Here is my program:
Program: 2,4,1,5,7,5,4,3,1,6,0,3,5,5,3,0
December 18, 2024 at 11:39 AM
Yep. Figured that later. 😅
December 18, 2024 at 9:03 AM
Thanks! You just saved me a couple billions of linear searching. 😅
December 17, 2024 at 2:07 PM
I imagine it should be possible with some prunning heuristics on score and possibly distance to the objective, but I don't think my laptop would get there. Running BFS took 10min for part2, I was starting to wonder if it would produce a result during my lifetime. 😅
December 16, 2024 at 1:19 PM
Yep. Tried that.
December 16, 2024 at 12:11 PM
Sure! I'll give you a hint. I created a simple function that scores the position of the bots according to their proximity to other bots. Let me know if you need more details!
December 14, 2024 at 3:31 PM
That could work but there are much simpler and cheaper solutions, like scoring how close bots are to each other.
December 14, 2024 at 1:22 PM
Oh wow! That's "creative" 😅
December 14, 2024 at 1:13 PM
I solved it on paper first. It's really just a simple system of two linear equations with two unknown variables, so it has only one possible solution.
December 14, 2024 at 1:10 PM
Love the ballanced and sober position. Looking forward to that engineer-to-engineer sharing and learning.
December 12, 2024 at 7:52 AM