Stream: advent of code

Topic: 2023 Day 8


view this post on Zulip Johan Lindskogen (Dec 08 2023 at 07:55):

Solved day 8, but it's really slow :snail: :laughing: https://github.com/lindskogen/advent-of-code-2023/blob/main/day08/main.roc

view this post on Zulip Artur Domurad (Dec 08 2023 at 11:30):

I have something similar and it runs for about 5s :oh_no:

remarks

view this post on Zulip Fabian Schmalzried (Dec 08 2023 at 12:21):

Here is mine

BTW, you can use // for integer division (shorthand for Num.divTrunc), no need to transform to floats.

view this post on Zulip Artur Domurad (Dec 08 2023 at 15:00):

I didn't know this // existed in roc.
Thanks :)

view this post on Zulip Oskar Hahn (Dec 08 2023 at 21:15):

https://github.com/ostcar/aoc2023/blob/main/days/day08.roc

Why I did not like day8

view this post on Zulip Ryan Bates (Dec 09 2023 at 04:47):

Here's my solution for day 8. I got it down to 1 second for both parts (with roc dev).
https://github.com/ryanb/advent-2023-roc/blob/main/day08/main.roc

Note on performance

view this post on Zulip timotree (Dec 11 2023 at 05:55):

Here's my solution for day 8: https://github.com/timotree3/aoc2023/blob/main/roc/day8.roc

Algorithm


Last updated: Jul 06 2025 at 12:14 UTC