Live data from Hacker News

Advent of Code 2025

adventofcode.com

201–210 of 416 posts

Re: Advent of Code 2025

#201
post #127

Earlier quoted context omitted.

Does this solution copy the state on each iteration?

Haskell values are immutable, so it creates a new state on each iteration. Since most of these "game of life" type problems need to touch every cell in the simulation multiple times anyway, building a new value is not really that much more expensive than mutating in place. The Haskell GC is heavily optimized for quickly allocating and collecting short-lived objects anyway. But yeah, if you're looking to solve the puz…

Fun fact about Game of Life is that the leading algorithm, HashLife[1], uses immutable data structures. It's quite well suited to functional languages, and was in fact originally implemented in Lisp by Bill Gosper.

1. https://en.wikipedia.org/wiki/Hashlife

Re: Advent of Code 2025

#202
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).

The language doesn't really matter much. I think I keep using PHP as in the years before.

Re: Advent of Code 2025

#203

Small anecdote: In the IEEEXTREME university programming competition there are ~10k participating teams. Our university has a quite strong Competitive Programming program and the best teams usually rank in the top 100. Last year a team ranked 30 and it's wasn't even our strongest team (which didn't participate) This year none of our teams was able to get in the top 1000. I would estimate close to 99% of the teams in…

Man, those people using LLMs in competitive programming ... where's the fun in that? I don't get people for whom it's just about winning, I wish everyone would just have some basic form of dignity and respect.

It's a different kind of fun. Just like doing math problems on paper can be fun, or writing code to do the math can be fun, or getting AI to write the code to do the math can be fun.

They're just different types of fun. The problem is if one type of fun is ruined by another.

Re: Advent of Code 2025

#204
post #16

I'm actually pleasantly surprised to see a 2025 edition, last year being the 10th anniversary and the LLM situation with the leaderboard were solid indications that it would have been a great time to wrap it up and let somebody else carry the torch. It's only going to be 12 problems rather than 24 this year and there isn't going to be a gloabl leaderboard, but I'm still glad we get to take part in this fun Christmas…

>It's probably an unpopular stance, but I've never done Advent of Code for the competitive aspect

Is this an unpopular stance? Out of a dozen people I know that did/do AoC every year, only one was trying to compete. Everyone else did it for fun, to learn new languages or concepts, to practice coding, etc.

Maybe it helps that, because of timezones, in Europe you need to be really dedicated to play for a win.

Re: Advent of Code 2025

#205

Going blind with uiua this year.

For those who think this is a typo, uiua [1] (pronounced "wee-wuh") is a stack-based array programming language.

I solved a few problems with it last year, and it is amazing how compact the solutions are. It also messes with your head, and the community surrounding it is interesting. Highly recommended.

[1] https://www.uiua.org/

Re: Advent of Code 2025

#206

Earlier quoted context omitted.

Man, those people using LLMs in competitive programming ... where's the fun in that? I don't get people for whom it's just about winning, I wish everyone would just have some basic form of dignity and respect.

Yeah, it's like bringing a ~bike~ motorcycle to your marathon. But if you can get away with it, there will always be people doing it. Imagine the shitshow that gaming would be without any kind of anti-cheat measures, and that's the state of competitive programming.

Why is that strange? Competitive programming, as the name suggests, is about competing. If the rules allow that, not using LLM is actually more like running tour de France.

If the rules don't allow that and yet people do then well, you need online qualifiers and then onsite finals to pick the real winners. Which was already necessary, because there are many other ways to cheat (like having more people than allowed in the team).

Re: Advent of Code 2025

#207
Looking forward to it but also sad that it is "only" 12 puzzles, but I completely respect Eric's decision to scale it back.

I've got 500 stars (i.e. I've completed every day of all 10 previous years) but not always on the day the puzzles were available, probably 430/500 on the day. (I should say I find the vast majority of AoC relatively easy as I've got a strong grounding in both Maths and Comp Sci.)

First of all I only found out about AoC in 2017 and so I did 2015 and 2016 retrospectively.

Secondly I can keep up with the time commitments required up until about the 22nd-24th (which is when I usually stop working for Christmas). From then time with my wife/kids takes precedence. I'll usually wrap up the last bits sometime from the 27th onwards.

I've never concerned myself with the pointy end of the leaderboards due to timezones as the new puzzles appear at 5am local time for me and I've no desire to be awake at that time if I can avoid it, certainly not for 25 days straight. I expect that's true of a large percentage of people participating in AoC too.

My simple aim every day is that my rank for solving part 2 of a day is considerably lower than my rank for solving part 1.

(To be clear, even if I was up and firing at 5am my time every day I doubt I could consistently get a top 100 rank. I've got ten or so 300-1000 ranks by starting ~2 hours later but that's about it. Props to the people who can consistently appear in the top 100. I also start most days from scratch whilst many people competing for the top 100 have lots of pre-written code to parse things or perform the common algorithms.)

I also use the puzzles to keep me on my toes in terms of programming and I've completed every day in one of Perl, C or Go and I've gone back and produced solutions in all 3 of those for most days. Plus some random days can be done easily on the command-line piping things through awk, sed, sort, grep, and the like.

The point of AoC is that everyone is free to take whatever they want from it.

Some use it to learn a new programming language. Some use it to learn their first language and only get a few days into it. Some use it to make videos to help others on how to program in a specific language. Some use it to learn how/when to use structures like arrays, hashes/maps, red-black trees, etc, and then how/when to use classic Comp Sci algorithms like A* or SAT solvers, Djikstra's, etc all the way to some random esoteric things like Andrew's monotone chain convex hull algorithm for calculating the perimeter of a convex hull. There are also the mathsy type problems often involving Chinese Remainder Theorem and/or some variation of finite fields.

My main goal is to come up with code that is easy to follow and performs well as a general solution rather than overly specific to my individual input. I've also solved most years with a sub 1 second total runtime (per year, so each day averages less than 40msec runtime).

Anyway, roll on tomorrow. I'll get to the day 1 problem once I've got my kid up and out the door to go to school as that's my immediate priority.

Re: Advent of Code 2025

#208
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 tried to do it in emacs lisp one year. Made it about halfway :)

Re: Advent of Code 2025

#209
post #166

Earlier quoted context omitted.

A couple of the Slack/Discord groups I’m in do a local leaderboard with friends. It’s fun to do with a trusted group of people who are all in it for fun.

I'm also in a few local leaderboards, but I'm not "really" competing, it's more of a fun group thing. Premises: (i) I love Advent of Code and I'm grateful for its continuing existence in whatever form its creators feel like it's best for themselves and the community; (ii) none of what follows is a request, let alone a demand, for anything to change; (iii) what follows is just the opinion of some random guy on the Int…

> The problems are too easy.

The problems are pretty difficult in my book (I never make it past day 3 or so). So I definitely would hope they never increase the difficulty.

Re: Advent of Code 2025

#210

It is quite odd to call this advent when it ends halfway into the month rather than on Christmas. But I will have fun doing them either way

It may have made more sense to start on Christmas Day, matching the Twelve Days of Christmas [1].

[1] https://en.wikipedia.org/wiki/Twelve_Days_of_Christmas

Post reply on HN