Live data from Hacker News

Advent of Code 2025

adventofcode.com

401–410 of 416 posts

Re: Advent of Code 2025

#402
post #103
post #30

Earlier quoted context omitted.

I propose Advent of Outage: just pull a random plug in the server room every day.

How about something like while [1]; do kill -9 $((rnd * 100000)); sleep 5; end Probably needs some external tool for the rnd function. On a serious note, I just saw this: https://linuxupskillchallenge.org

Bash has a built-in RANDOM.

  while true; do 
    kill -9 $RANDOM
    sleep 5
  done
Or to kill running running PIDs each time

  while true; do 
    rnd=$(ps -e -o pid= | shuf -n 1)
    kill -9 $rnd
    sleep 5
  done

Re: Advent of Code 2025

#403

Earlier quoted context omitted.

Is Rust still "non-mainstream"? Because it's extremely well suited for AoC. The ergonomics of a high-level language with the performance of C++.

> The ergonomics of a high-level language Is there a way to drop into a repl like with python and pdb.set_trace()? I couldn't find one last time I played around with Rust.

I don't think it has a debugger but if you just want to try out something in Rust quickly: play.rust-lang.org

Re: Advent of Code 2025

#404

Earlier quoted context omitted.

The "etc" is pretty important here. You can log in using Reddit, and you can create a random throwaway Reddit account without filling in any other details (no email address or phone number required).

I believe they no longer allow new accounts without an email address. It used to be that reddit had a user creation screen that looked like you needed to input an email address, but you could actually just click "Next" to skip it. The last time I had cause to make a reddit account, they no longer allowed this.

You're right, it looks like these days you have to fill in an email address. Though any random thing can be filled in. They will send a verification code, and on the next screen you can either fill it in or click Skip in top right. Then in the preferences, it can be removed from the account. A bit annoying for sure, but still not valid email address needed.

But it is true that at any time they could make using an email address or phone number mandatory, and then creating an Advent of Code account will be gated behind that.

Re: Advent of Code 2025

#405
post #20

Opinion poll: Python is extremely suitable for these kind of problems. C++ is also often used, especially by competitive programmers. Which "non-mainstream" or even obscure languages are also well suited for AoC? Please list your weapon of choice and a short statement why it's well suited (not why you like it, why it's good for AoC).

I think Ruby is the ideal language for AoC: * The expressive syntax helps keep the solutions short. * It has extensive standard library with tons of handy methods for AoC style problems: Enumerable#each_cons, Enumerable#each_slice, Array#transpose, Array#permutation, ... * The bundled "prime" gem (for generating primes, checking primality, and prime factorization) comes in handy for at least a few of problems each ye…

Haven't used prime stuff, since not so versed in algorithms I guess, but other than that totally agree. So far have enjoyed it the most. Though I remember doing those really elongated Go solutions consisting of long for loops over and over... When they were ready and ran, they were very fast even with brute force solutions.

Re: Advent of Code 2025

#406
I do love this, did it last year, but the system keeps seeming to switch its notion of what dataset I'm supposed to be using. I used git auth.

I'm having a problem where the webpage switches me to a different dataset. I've been logged in the entire time in the same session, same user. I get "wrong answer but that's the answer for a different dataset". It seems to be switching me between two "problem sets". Then it keeps telling me I'm submitting answers too fast.

Originally I saved my dataset as "prob1-test.txt". It kept telling me I had the wrong answer. I did some debugging, perhaps I fixed a bug but I'm not sure.

Then I downloaded the dataset again after I really thought I had it right and tried a bunch of other things. I got a completely different data set! Call this "prob1-test-ds2.txt". I submitted an answer on data set 2 and it was accepted.

So I'm on to part 2 of the day 1 problem. I have the same problem again, I think it's right (but not impossible it could be wrong ;-)). It's giving me this feedback:

"That's not the right answer; your answer is too low. Curiously, it's the right answer for someone else; you might be logged in to the wrong account or just unlucky. In any case, you need to be using your puzzle input. If you're stuck, make sure you're using the full input data; there are also some general tips on the about page, or you can ask for hints on the subreddit. Please wait one minute before trying again. [Return to Day 1]"

If I had to guess, as part of debugging this I get a "go back to problem 1 definition" after getting a "wrong answer" result.

Pretty sure it's working now that I have the "this is the answer for another dataset" message, but I keep getting either "this is the answer for another dataset" or "too many submissions". I'm waiting a few minutes between them.

How can I fix this switcheroo problem.

Re: Advent of Code 2025

#407

"That's not the right answer; your answer is too low. Curiously, it's the right answer for someone else; you might be logged in to the wrong account or just unlucky. In any case, you need to be using your puzzle input. If you're stuck, make sure you're using the full input data; there are also some general tips on the about page, or you can ask for hints on the subreddit. Please wait one minute before trying again. […

I'm getting this too, what did you do about? It seems to be switching me between two datasets. I downloaded the data again. When I click on "go back to problem 1", that's when it happens.

Re: Advent of Code 2025

#408

I do love this, did it last year, but the system keeps seeming to switch its notion of what dataset I'm supposed to be using. I used git auth. I'm having a problem where the webpage switches me to a different dataset. I've been logged in the entire time in the same session, same user. I get "wrong answer but that's the answer for a different dataset". It seems to be switching me between two "problem sets". Then it ke…

Update - I see someone reported the same thing below.

I know how you might fix it, put a dataset set ID at the start of the dataset and tell people to skip it. Like (# 9481818). and you have to put that in your answer. This way you could detect this bug.

Re: Advent of Code 2025

#409
post #117

I _love_ the Advent of Code. I actually (selfishly) love that it's only 12 days this year, because by about half way, I'm struggling to find the time to sit down and do the fantastic problems because of all the holiday activities IRL. Huge thanks to those involved!

IMHO they’re starting off harder this year!

Re: Advent of Code 2025

#410
post #98
post #25

Earlier quoted context omitted.

Kotlin, because it’s a language I like

IMO it's maybe the best suited language to AoC. You can write it even faster than Python, has a very terse syntax and great numerical performance for the few challenges where that matters.

I know this is pretty personal but Python's way with indention really does not play well with throwing things out. It's obviously matter of practice, but languages that have same qualities but are easier on formatting issues and aren't that set on one correct way of writing things allow much doing things much faster. But at the end, it's personal :-)
Post reply on HN