AoC 2025: Day 6

Main thread for Day 6 of the 2025 advent of code. Feel free to discuss the challenge and ask questions. If particular discussions become large, we can break them off into new threads.

Notice that Advent of Code has changed it’s schedule and there will only be 12 days of puzzles this year.

Some Rules:

  1. Please try to keep spoilers within spoiler tags. This is done by typing [spoiler]text to be blurred[\spoiler]. If you have longer sections you can also use the [details=“Title”] tags. If you use the new WYSIWYG editor, remember to close the details section, as it is opened by default. This is an issue (feature?) of the newest discourse updates. If you use markdown, then you can remove the “open" parameter (not in by default unless you use the WYSIWYG editor)
  2. Have Fun

Day 6 Challenge

Templates:

Resources:

1 Like

Ah. I wasn’t going to do it but gave in to the temptation. It’s a rambling of code. Imperative FTW! At least I got to use my new file line reading util, FileLines.

1 Like

Not my cleanest solution but I get the job done :sweat_smile:

I struggled at first until I realised I could parse the last line of operators to get the width of columns.

2 Likes

https://zigbin.io/42504f

had to rewrite it a couple times to get part 2 working. i think i’m happy with it now though. managed to get down to 56 lines including all my input handling nonsense. and i only allocate once for the input.

1 Like