Stream: advent of code

Topic: 2024 Day 5


view this post on Zulip Oskar Hahn (Dec 05 2024 at 06:04):

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:

view this post on Zulip Oskar Hahn (Dec 05 2024 at 06:08):

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.

view this post on Zulip Brendan Hansknecht (Dec 05 2024 at 06:21):

Maybe the list is smaller after the filtering step?

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

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

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

90% of my app's time is in one function... :sweat_smile:

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

I like your use of List.sortWith very clever :smiley:

view this post on Zulip Nicola Peduzzi (Dec 05 2024 at 16:36):

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 :)

view this post on Zulip Nicola Peduzzi (Dec 05 2024 at 17:07):

there we go

Day 05 part 1: (Ok 7198) [3ms]
Day 05 part 2: (Ok 4230) [11ms]

view this post on Zulip Anthony Bullard (Dec 05 2024 at 22:12):

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.

view this post on Zulip Anthony Bullard (Dec 05 2024 at 22:12):

Right now writing Roc and working on Roc are my happy place

view this post on Zulip Nicola Peduzzi (Dec 05 2024 at 22:19):

try watching "Silo" on appletv+. great show imo :big_smile:

view this post on Zulip Robin Camarasa (Dec 07 2024 at 13:53):

Here is my version: https://github.com/RobinCamarasa/Advent-of-code/blob/master/2024/day05/RobinCamarasa/main.roc

view this post on Zulip Isaac Van Doren (Dec 07 2024 at 19:47):

https://github.com/isaacvando/aoc/blob/main/2024/5.roc

view this post on Zulip Anton (Dec 11 2024 at 13:20):

No difficulties on this one
main_claude2.roc

view this post on Zulip Anton (Dec 11 2024 at 18:55):

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