Stream: advent of code

Topic: 2024 Day 6


view this post on Zulip Luke Boswell (Dec 06 2024 at 06:03):

When you reach for the simplest brute force implementaiton... but it takes a realllly long time to run (haven't finished yet :sweat_smile: ). Time for some optimization or something smarter :smiley:

view this post on Zulip Luke Boswell (Dec 06 2024 at 06:38):

I've got something that is more efficient, and passes for the example input but isn't giving me the right answer. I need to afk now, so figure I may as well share what I have so far. :smiley:

https://github.com/lukewilliamboswell/aoc/blob/main/2024/06.roc

TIMING:
READING INPUT:  <1ms
SOLVING PART 1: 5ms
SOLVING PART 2: 4567ms

view this post on Zulip Oskar Hahn (Dec 06 2024 at 12:19):

https://github.com/ostcar/aoc2024/blob/main/day06.roc

part1 in 196.243ms
part2 in 7m29.008s

I don't have any time this weekend. But I have to come back to this and look for a better solution :innocent:

view this post on Zulip Nicola Peduzzi (Dec 06 2024 at 12:49):

Part 1 done: https://github.com/thenikso/advent-of-code-2024-roc/blob/main/06.roc

this is starting to be quite time consuming :sweat_smile:

view this post on Zulip Nicola Peduzzi (Dec 06 2024 at 14:11):

Done with part 2:

Day 06 part 1: (Ok 4789) [30ms]
Day 06 part 2: (Ok 1304) [3194ms]

view this post on Zulip Paul Stanley (Dec 06 2024 at 18:45):

Pretty much brute force worked for me . The only trick I played was in narrowing down the candidates for Part 2.

Part One: 4663 [49 ms].
Part Two: 1530 [387 ms].

view this post on Zulip Rob Merrell (Dec 07 2024 at 04:27):

Got my Part 1 done just in time. I brute forced this one too, it was a pretty convenient approach. :grinning: https://github.com/robmerrell/aoc2024/blob/main/day6.roc

view this post on Zulip Anthony Bullard (Dec 07 2024 at 14:47):

Finally able to start AOC again after the day 5 epic quest. I hate when you pass the example first try, but not on the real input

view this post on Zulip Anthony Bullard (Dec 07 2024 at 14:54):

This one sucks to debug on the real input is well

view this post on Zulip Anthony Bullard (Dec 07 2024 at 15:00):

Thank god for off-by-one errors

view this post on Zulip Robin Camarasa (Dec 08 2024 at 15:58):

Brut forced but spent already way to much time on it... https://github.com/RobinCamarasa/Advent-of-code/blob/master/2024/day06/RobinCamarasa/main.roc

view this post on Zulip Anton (Dec 13 2024 at 15:52):

This took a couple of tries:

SOLVING PART 1: 331ms
SOLVING PART 2: 146388ms

main_claude2.roc

view this post on Zulip Brendan Hansknecht (Dec 13 2024 at 16:50):

Claude really writing some optimized code for part 2


Last updated: Jul 06 2025 at 12:14 UTC