Day 6: https://github.com/mulias/roctoberfest/blob/main/advent_2022/day_06/main.roc
roc run
with this main
function it hangs indefinitelymain =
part1 = puzzleInput |> firstStartOfPacketMarker |> Num.toStr
part2 = puzzleInput |> firstStartOfMessageMarker |> Num.toStr
Stdout.line "Part 1: \(part1)\nPart 2: \(part2)"
If I change either part1
or part2
to "0"
and only run one of the parts then it works fine. Running roc test
successfully tests both values.
List.walkUntil
with a manually incremented index
in the state.Thanks for reporting this @Elias Mulhall, can you share the input.txt and example.txt too so that we can try to reproduce the issue?
Sure thing, here's a gist https://gist.github.com/mulias/f3efc91bf8787349bc1c5f26e88c898c
I'm messing with it again and the behavior is a bit more complicated. If I delete the executable then neither roc test
or roc run
works. I just tried commenting out both part1
and part2
in main, creating an executable with roc run
, adding back part1
, roc run
then adding back part2
, then finally roc run
. That worked. I wonder if it has something to do with the puzzle input being a single line 4095 character string.
I've created #5890 for this.
Last updated: Jul 06 2025 at 12:14 UTC