I usually do AoC in Common Lisp, but this year I'm giving Swift a chance. It's not half bad at this kind of twiddling for being a statically typed mainstream language. https://github.com/codr7/aoc24/tree/main/swift/Sources/aoc This year is a tiny bit weird, I was just getting ramped up organizing the event at a new job; because I think it's very useful for devs to learn some real problem solving, as opposed to stitch…
I enjoyed reading your solutions! I’m surprised how terse they are!
Advent of Code 2024
381–390 of 580 posts
Re: Advent of Code 2024
#382I love AoC! Did it the last 2-3 years in Rust, hanging out in a discord where we all try to make the absolute fastest solutions. Learnt all kinds of crazy performance hacks and some advanced algorithms & SIMD that way. This time I'm trying to do them in Rust and Golang in an effort to either learn to like/tolerate Golang (because we use it at work) or prove my hypothesis that it sucks and never use it unless I have t…
Re: Advent of Code 2024
#383Earlier quoted context omitted.
One reason I didn't enjoy it was that I felt the days don't build on each other well. So you get little code reuse. It was continually changing requirements, so it was especially like work.
In 2019 he built up about 12 challenges using a VM, for Intcode, you had to construct. It was poorly received because without a working version (developed over the first few Intcode challenges), you couldn't solve the rest of them. He hasn't done anything like that since, though I thought it was probably the more interesting series of challenges. The problem with continuity across days is that the later days can be b…
Re: Advent of Code 2024
#384Earlier quoted context omitted.
I re-read the intro and the fact it mentions leetcode and the like was enough for me to decide that it's an ultimately pointless endeavour for me. I have no interest at all in competitive programming or maths; I spend 40+ hours a week doing programming for work, I want games and challenges that pull me away from that so I continue to have a life outside of my job.
For what it's worth, I hate leetcode with a burning passion, have no real interest in math, and yet I personally find Advent of Code quite fun and enjoyable.
Re: Advent of Code 2024
#385Earlier quoted context omitted.
Claude will do it for you.
What is the point in doing a programming challenge if you aren't learning anything
Re: Advent of Code 2024
#386Earlier quoted context omitted.
Only year I ever completed it it took eight months. I’m not seeing my name on a leaderboard any time soon.
Oh yeah, me neither. The competition is far too intense. What takes me hours takes the competitors minutes.
Ended up at around spot 6500.
Boggles my mind to even imagine what it would take.
Re: Advent of Code 2024
#387Earlier quoted context omitted.
It ate my life for a few years in a row, I even managed to finish on Christmas eve twice. Now I don't even look, it turns from fun to stress rather quickly.
I just do the puzzles until it stops being fun. For me that's usually around day 14.
Re: Advent of Code 2024
#388This years challenge for me: write it in C without the standard library or an allocator. Has to be runnable on an STM32 with 32kb of SRAM. I tried doing it in Assembly two years ago, ended up spending hours and hours writing an Assembly standard library, then gave up and switched to Rust...
Good luck! Personally, I'm still going with CL but decided to try it in all the languages I "know" for the first day. Including C which doesn't have hash tables (inb4 hsearch)... what a pain, let me tell you. https://git.sr.ht/~q3cpma/aoc2024/tree/master/item/01 If you could post a repo link so I can look at some of the progress, I'd be grateful.
- you can implement a hash table in C in about 125 LOC and reuse it.
- hash tables are not the only way to solve problems. hammer/nail
Re: Advent of Code 2024
#389Earlier quoted context omitted.
There are some "filter" days for sure, usually those are when the solution needs a major leap in your approach such as concurrency, dynamic programming, or geometry equations.
It's usually not concurrency FWIW, it's almost always algorithmic in nature. On a modern machine, even highly concurrent* code would only execute 10-20x as fast and you could just wait a bit. One common AoC trick is that you can brute-force part one (e.g. O(n^2) complexity or worse), but part two scales up `n` to make that intractable. *ignore my sloppy conflating of concurrency and parallelism
Re: Advent of Code 2024
#390Earlier quoted context omitted.
It ate my life for a few years in a row, I even managed to finish on Christmas eve twice. Now I don't even look, it turns from fun to stress rather quickly.
I re-read the intro and the fact it mentions leetcode and the like was enough for me to decide that it's an ultimately pointless endeavour for me. I have no interest at all in competitive programming or maths; I spend 40+ hours a week doing programming for work, I want games and challenges that pull me away from that so I continue to have a life outside of my job.