Here is mine: https://github.com/ostcar/aoc2024/blob/main/day05.roc
part1 in 18.188ms, used 191.632kB of memory:
part2 in 14.141ms, used 207.2kB of memory:
I have no idea, why my part 2 is faster then part 1. But I checked it many times. In my solution, my part 2 does the same as part 1 but more. But even when I run them separatly (./day05 --part1 and afterwards ./day05 --part2), I get the same results.
Maybe the list is smaller after the filtering step?
Here's my solution :smiley:
https://github.com/lukewilliamboswell/aoc/blob/main/2024/05.roc
TIMING:
READING INPUT: 1ms
SOLVING PART 1: 2ms
SOLVING PART 2: 73ms
90% of my app's time is in one function... :sweat_smile:
I like your use of List.sortWith
very clever :smiley:
Here is mine https://github.com/thenikso/advent-of-code-2024-roc/blob/main/05.roc
Used this one to use Roc's Dict
.
Gotta start logging execution times as well :)
there we go
Day 05 part 1: (Ok 7198) [3ms]
Day 05 part 2: (Ok 4230) [11ms]
Can't complete my Part 2 (second time this AOC) because of a compiler error. And I am in desperate need for something to take my mind off things.
Right now writing Roc and working on Roc are my happy place
try watching "Silo" on appletv+. great show imo :big_smile:
Here is my version: https://github.com/RobinCamarasa/Advent-of-code/blob/master/2024/day05/RobinCamarasa/main.roc
https://github.com/isaacvando/aoc/blob/main/2024/5.roc
No difficulties on this one
main_claude2.roc
It is nice that current LLMs can be this good at Roc given the very limited training data compared to other languages. Seems like Claude is mapping Roc well to its internal abstractions.
Last updated: Jul 06 2025 at 12:14 UTC