Stream: advent of code

Topic: Day 4


view this post on Zulip Andy Kluger (Dec 04 2022 at 07:39):

Got my lousy day 4 up. It breaks roc format, so you know it's good.

view this post on Zulip Luke Boswell (Dec 04 2022 at 11:40):

My day 4 solution. :D

view this post on Zulip Shritesh Bhattarai (Dec 04 2022 at 15:42):

Hit a miscompilation(IIUC) bug trying out today's problem https://github.com/roc-lang/roc/issues/4677

view this post on Zulip Marten (Dec 04 2022 at 16:36):

It's been interesting to look at others' solutions, so I'll share mine as well ^^

view this post on Zulip JesterXL (Dec 04 2022 at 16:40):

Day 4, I completely missed that overlaps count as intersects in Part 2

view this post on Zulip Srinivas Rao-Mouw (Dec 04 2022 at 17:09):

My solution! my parsing logic is so messy, curious how others did it.

view this post on Zulip JesterXL (Dec 04 2022 at 17:36):

I think all of us were like "Just give me a record with {start, end}, kthx" haha

view this post on Zulip Shritesh Bhattarai (Dec 04 2022 at 19:15):

My solution. Today was a real doozy, not because it was a difficult problem but I kept on getting incorrect results and things kept on getting worse from there: even a simple List.map wasn't working as expected. I literally believed at one point that my machine was broken and spun up a Linux VM to repro. Turns out:

view this post on Zulip Ghislain (Dec 04 2022 at 19:35):

Wow, smart and concise @Shritesh Bhattarai ! :star_struck:
Here's mine, looking forward to the tuple feature!

view this post on Zulip Michael Glass (Dec 04 2022 at 20:09):

here's mine

view this post on Zulip Richard Feldman (Dec 04 2022 at 20:12):

ironically I think the most bugs people have run into with advent of code this year has been with a feature literally called "debug" :sweat_smile:

view this post on Zulip Michael Glass (Dec 04 2022 at 20:22):

the one I hit the most is misplacing a comma and hitting a TODO for unimplemented tuples

view this post on Zulip Tommy Graves (Dec 04 2022 at 22:37):

Here's my messy solution.

view this post on Zulip Juliano (Dec 05 2022 at 00:54):

caught up to day 4 today! part 1 part 2

view this post on Zulip Logan Lowder (Dec 05 2022 at 02:55):

I caught up too!
This solution is the one I'm most proud of so far. Day4

This time I tried out writing just type annotations with no implementations like Richard mentioned in a talk I saw recently. Worked really nicely!

view this post on Zulip Máté Kaszás (Dec 05 2022 at 22:11):

Juliano said:

I think line : Parser (List U8) [T Range Range] should do the trick there, because T is just a tag. Or, if you want to create an alias like Ranges : [T Range Range], you can do Parser (List U8) Ranges


Last updated: Jul 06 2025 at 12:14 UTC