Live data from Hacker News

Advent of Code 2023 is nigh

adventofcode.com

131–140 of 319 posts

Re: Advent of Code 2023 is nigh

#131
post #12

I am looking at advent of code for years but never tried. Why? As they would like to force you to login with GitHub, Google, Twitter or Reddit account. I will wait for the next year, maybe 2024 Advent of Code will be less intrusive. If not... I can live without it. A hint to the authors for simple load/save, far simpler than what you have now, without use of intrusive 3rd party providers: use Digest::SHA qw(hmac_sha2…

I agree that using an auth provider is unnecessary for the problem faced. A bit ironic considering how AoC is all about programming challenges. Funny seeing the problem solved in 4 lines of Perl.

If there were a trustworthy auth provider it wouldn't be as bad, but I don't really know of any... maybe something in the Fediverse?

Re: Advent of Code 2023 is nigh

#132

Maybe I'm too stupid for this > Consider your entire calibration document. What is the sum of all of the calibration values? Where is the document? Where do I download it?

The very next line is "To begin, get your puzzle input." with a link

Ahhh. I have

> To play, please identify yourself via one of these services:

Ok got it.

Turns out I am too stupid.

Re: Advent of Code 2023 is nigh

#133

Without going into spoilers, its interesting that people jumped to regex to solve this. For me that was a fairly non intuitive when I first saw the problem(both parts). What jumped to me is the problem statement indicated a finite number of states and I crafted a solution based on that information. But its really cool to see how we all jump to different implementations.

[deleted]

Re: Advent of Code 2023 is nigh

#135
post #8

Last year there were people solving the puzzles with LLMs, but I don't think I saw anyone get past day 5 or so. I'm interested in how well it goes this year. Please reply if you are trying yourself or can link to public attempts by others

Out of curiosity after finishing my solution, I tried it with chatgpt 4.0 Part1 worked after me explaining a tiny bug. Part2 however never worked. Even after explaining exactly where the bug was in the python solution got came up with, it couldn’t fix it. It was quite fascinating watching it try over and over with different approaches, but it couldn’t even get the example working.

This just goes to show how good of a puzzle maker Eric is if it stumped gpt4 on day1 when last year gpt3.5 did the first 5 days.

Re: Advent of Code 2023 is nigh

#136

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 agree, the first day is usually trivial, that wasn't the case here. I also tried using regex but ended up implementing a much simpler solution using index() and rindex().

Re: Advent of Code 2023 is nigh

#137

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.

I interviewed somebody recently for a podcast who is a big AoC fan. His biggest reason is that, if you're learning a new language it's a great way to put it through its paces. He tries to learn a new language every year doing AoC.

He's done it with R, Julia, Rust and this year Kotlin.

Re: Advent of Code 2023 is nigh

#138

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.

Another option when using regex would be to use the lookahead[0] operator (as long as supported, which is the case for the python re module)

  (?=(one|two|three|[...]))
would return `["two", "one"]` for the input string `twone` since the lookahead operator doesn't consume the next character.

[0] https://www.regular-expressions.info/lookaround.html

Re: Advent of Code 2023 is nigh

#139
post #73

Earlier quoted context omitted.

Edge cases such as "1oneight", "3sevenine", "sevenine3" (I made these up to highlight)

I’d wager that most implementations would be fine on “sevenine3”, as they’d likely get 73 for the row, whether or not they found the 9.

If they have functions that for example reads from forward then backward or vice versa while changing the structure of the row, one test will pass but the other won't. It's a lot of rows in the input and it took a lot of time for me personally to debug to understand what went wrong

Re: Advent of Code 2023 is nigh

#140

Earlier quoted context omitted.

Unless the question has been edited recently, it did. There are multiple lines in the second example input that show the overlap: > eightwothree > 4nineeightseven2 > zoneight234 I test my AoC solutions incrementally by printing output, so I found that I was failing to produce the correct list of numbers in a line right away. I suppose if you're taking a faster approach and just trying to extract the first and last nu…

Yes, same. I keep seeing people say this on discord and reddit, but that edge case was shown twice in the example.

It shows an overlap, but it doesn't indicate how one should parse it.
Post reply on HN