Live data from Hacker News

Advent of Code 2023 is nigh

adventofcode.com

91–100 of 319 posts

Re: Advent of Code 2023 is nigh

#91
post #74

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

I find nothing wrong with Leetcode. I've been avoiding it forever, and finally started to practice it 2 months ago. I can say I learned quite a lot. Thus far in carrier I've primarily relied on `List` when it comes to data structures, now I realize how wrong I was.

Re: Advent of Code 2023 is nigh

#92
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.

Re: Advent of Code 2023 is nigh

#93

I think I’d like to try this year’s in a language I haven’t touched before. What languages should I consider if I want something paradigmatically different from Go, Python, etc?

APL, BQN, and Uiua all make me feel dumb, until you get something working. Suddenly I expect to find my phd in the mail.

Prolog is pretty different from the mainstream.

I would also like to try to be way too fancy about parsing aoc data at some point. That example of a CSV parser in four lines blows my mind. Not really because of the number of lines, but just the whole type system.

I'm doing it in uiua, and I don't expect to last long to be honest.

Re: Advent of Code 2023 is nigh

#94
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…

We do something similar at work. We have a Slack channel and a private leaderboard, but we also have prizes for getting a certain number of stars, and also do "challenges" like most unique languages or using an esolang for a day. We also had some non-software engineering people take part and they had fun too. Last year was the first year we did it and it was well received.

Re: Advent of Code 2023 is nigh

#95

Every year I want to love this. Every year I get four days in before it feels like work. I think I’m just the wrong audience, but I really do want something this well-produced but with perhaps a very shallow diff little curve, bordering on just effortless fun.

Agreed. Games like TIS-100 just feel unrewarding to me because I'd rather be solving my own problems.

Re: Advent of Code 2023 is nigh

#96
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.

I found the problems straightforward to code in Haskell. The first part ran correctly right after I got it to compile. The second initially gave bogus results. Turns out I needed to invert a test and then it ran correctly too. 15 lines of code including 3 imports and 3 type declarations; 1 line to comment out to do the easier problem.

Re: Advent of Code 2023 is nigh

#97

I think I’d like to try this year’s in a language I haven’t touched before. What languages should I consider if I want something paradigmatically different from Go, Python, etc?

While not many didn't touch it, many for sure didn't consider it for AoC: SQL.

You can go for one query solution or use views/tables for multiple steps.

It's an acquired taste for sure, but I kinda like it!

Re: Advent of Code 2023 is nigh

#99
Seems to me that people made part 2 harder than it us. Just define an array containing the digits: "one", "two", and so forth. Then check for substring matches, position by position. Maybe not elegant, but effective.

Re: Advent of Code 2023 is nigh

#100
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.

I just created a list of string-value pairs and found first index of and last index of for each of them keeping track of the best first and best last. C# is pretty freaking amazing like that.
Post reply on HN