Live data from Hacker News

Advent of Code 2023 is nigh

adventofcode.com

101–110 of 319 posts

Re: Advent of Code 2023 is nigh

#101

As others have said, part 2 of today's was really difficult. I finally solved it using Python regex `overlapped=true`, but it was very tricky. The irritation of having all of the test cases passing, but it failing for my challenge input! I hope it doesn't scare off newcomers, but I already know a few who have given up on part 2.

Same here. I would've really like if the spec specifically mentioned the possibility of that one edge case ahead of time instead of having to sift through the 1000 lines of input.

No hate on AOC though, I really respect all the hard work that goes into it.

Re: Advent of Code 2023 is nigh

#102
I think the edge cases were entirely unclear in day 1, part 2. I had to redo it in a "dumb"/brute-force way to avoid using fancy regex tricks I don't know.

It's quite clear the small sample data was chosen intentionally to not cover them.

Re: Advent of Code 2023 is nigh

#104
post #74

Genuinely curios why people are so into AoC ... Feels leetcode-y

I wonder if there is a more productive form of it that helps learn/practice difficult technologies in a short amount of time. Say a combo of Ray tracing in a weekend, a game with reinforcement learning etc that helps people learn disparate technologies that they may not be familiar with while staying grounded on practical yet difficult problems.

FWIW AoC is great and anything that keeps the core CS spirit going seems like a good thing!

Re: Advent of Code 2023 is nigh

#106
post #83
post #74

Genuinely curios why people are so into AoC ... Feels leetcode-y

A few reasons I like them: 1. The goal is to come up with a workable solution - not to try to fold your brain inside out to optimize them like leetcode. They feel a little more "real-world" (though still firmly in the domain of programming puzzle) 2. There is a community that all solve them at once. At my company, we have a leaderboard and a Slack channel discussing them every day. And then there is the Reddit and ev…

the find solution rather than optimize nice

Re: Advent of Code 2023 is nigh

#108
post #74

Genuinely curios why people are so into AoC ... Feels leetcode-y

cute stories, whimiscal ascii art reveal over time, problems of various difficulty, and the cool (to me) idea that many people are working and "struggling" with the same idea/problem over time. I'm also in awe at the work that goes into it. It's like watching a master craftsman to consider Eric making 25 unique puzzles, testing them, crafting many inputs that all work with the same rules, writing hints and stories to go for each puzzle. It boggles the mind.

Re: Advent of Code 2023 is nigh

#109
post #65
post #24

Part two was exceptionally hard. Many people on reddit reporting they were hit by one edge case that's not covered in the examples. But my implementation passed these edge cases too. I was hit by another edge case. So there are at least two edge-cases (which are in the actual data) that aren't covered in the examples or the description.

Ok, I'll be that guy... what edge case? My part 2 was 4-line addition to part 1 (see code below, if inappropriate let me know and I'll remove it), and it worked first try. On the other hand, I made a mistake in part one and got it right only on a second attempt... (definition of nums[] omitted) for (j = 1; j

I don't understand getting hit by an edge case either. Here's mine using Linq.

  var bestFirstValue = possibleValues
    .Where(x => currentLine.IndexOf(x.searchString) != -1)
    .OrderBy(x => currentLine.IndexOf(x.searchString))
    .First()
    .intValue;

Re: Advent of Code 2023 is nigh

#110

As others have said, part 2 of today's was really difficult. I finally solved it using Python regex `overlapped=true`, but it was very tricky. The irritation of having all of the test cases passing, but it failing for my challenge input! I hope it doesn't scare off newcomers, but I already know a few who have given up on part 2.

I moved a pointer until match then moved back one step to cover overlap, probably not great but worked.
Post reply on HN