This was a fun one: https://github.com/ostcar/aoc2024/blob/main/day17.roc
part1 in 23.117us
part2 in 237.182us
It was a fun one! I massively over-engineered the computer, and made a silly mistake in not building the program into the machine but couldn't be bothered to re-engineer.
https://gist.github.com/PaulStanley/6c2efa227c29ccd1b86084508a70a315
Part One: ... [0 ms].
Part Two: ... [2 ms].
The optimizer seems to not like my style of recursion or something. roc build --optimize day17.roc && ./day17
says it cannot find an answer while roc dev day17.roc
gives the correct answer. Are there known cases of the optimizer changing a programs output?
There is #bugs > opportunistic mutation bug with "--optimize"?
Thank you! I will check the #bugs channel next time
Last updated: Jul 06 2025 at 12:14 UTC