Live data from Hacker News

Advent of Code 2024

adventofcode.com

441–450 of 580 posts

Re: Advent of Code 2024

#441
I am a bit late to the trend, but I am planning to do Advent of CUDA this year. It's been a while since I have written a lot of parallel code, and thinking about concurrent algorithms is fun.

Re: Advent of Code 2024

#442

My personal challenge last year was to solve everything on my mobile phone, using LLMs (mostly ChatGPT4 with code interpreter; I didn't paste in the problems, but rather described the code I wanted.) This year I'm declaring "Advent of Claude"! Challenge: Write a Claude custom style to solve Advent of Code puzzles within Claude's UI. Score: # adventofcode.com stars earned in 2 daily conversation turns. Fine print: web…

While I personally wouldn't find it a ton of fun to solve the puzzles that way, that's pretty cool. Nice work. Is there a place where you're blogging this or at least aggregating the links so we can see how far you get with it as the puzzles get more challenging?

Fair enough! I'll document my progress at https://github.com/jmandel/advent-of-claude/tree/main, though I may not keep up.

Re: Advent of Code 2024

#443

I'm gonna try doing this on the NES (Nintendo Entertainment System) this year. Probably some problems will be impossible with limited RAM (2KiB, plus an optional 8KiB on the cartridge, maybe more if a fancy cartridge is used). But I'll try to solve as many as possible. Today's was possible, in under 4 seconds, using 4KiB extra RAM on the cartridge.

Very interested in this - I have a SNES flash cart, I wonder if there's a good basic library to handle printing to the screen and such.

Re: Advent of Code 2024

#444

Earlier quoted context omitted.

It goes into "too bothersome" territory in this case for me. Competing in a local leaderboard was fun and kept me engaged until the end, but it was only possible by choosing a comfortable language to be free to actually think about the puzzle itself to solve it fast. Choosing something that I'm not already familiar with (or that isn't well-suited for this type of tasks) is a great way to ramp up the difficulty and pe…

> There's plenty of actually useful projects I could do in this time to learn new things instead after all. I suppose. I do actually useful projects at work. AoC reminds me of why I personally loved programming in the first place - solving small technical puzzles. I don't like trying to make every single moment of my life "productive".

Who does?

When I said "useful", I meant "useful to me". I figure I'd prefer to solve some problem to scratch a personal itch, or play some instrument, or make a funny game, whatever. Even spending that time on resting would probably be useful. Solving a technical puzzle is nice, but my point was that collecting stars to finish the advent calendar isn't particularly useful or rewarding on its own, and if I need to be motivated internally to do it by adding some artificial challenges, then I can find more enjoyable ways to make myself busy as well.

But that's just me. I just don't think AoC could motivate me into learning something I wouldn't learn otherwise. It just doesn't provide enough incentive to keep going. Tasks are mostly too easy to be rewarding on their own, but some are too hard to just do casually. I can't imagine spending as much time as I did on it - about 30 hours in total, not counting time spent on golfing and browsing other people's solutions etc. - if I had a regular job at the time, and once you skip days it just becomes a random set of challenges that could be tackled at any time anyway.

Re: Advent of Code 2024

#445
This year I will solve AoC using Gleam. My challenge is to finally learn functional programming and learn Gleam at the same time.

I already solved the first problem and it was hard to get things ready, read the file, handle the data, etc. But once I had the first steps done it was easy to solve the problem

Re: Advent of Code 2024

#446

Earlier quoted context omitted.

Same. I am doing rust + clojure this year. Very interested in performance hax, esp around SIMD. I know absolutely nothing at all about rust, this is my first time working with it. My day 1 rust solution: cargo solve 1 -- release Finished `release` profile [optimized] target(s) in 0.05s Running `target/release/01` Part 1: 1189304 (95.8µs) Part 2: 24349736 (120.4µs) Day 1 clojure solution: lein run 1 running all tasks…

There's a Rust solution posted in the Reddit Day 1 answers mega thread which claims 22 microseconds part 1 and 10 microseconds part 2. (I haven't tried to verify): https://old.reddit.com/r/adventofcode/comments/1h3vp6n/2024_...

Sure but how long did it take to compile

Re: Advent of Code 2024

#448
post #159

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…

Are you writing the solutions / compiling / running all with Emacs? I wanted to try Swift this year as well but feels sort of silly spinning up XCode for this.

Re: Advent of Code 2024

#449
post #138

I’m using sqlite this year. Hoping that there won’t be any computational geometry or trie problems. Kind of hoping for a graph problem solvable with recursive CTEs, that would be cool.

I've been doing a lot with SQL for the first time in my life, this is tempting. I posted some SQLite CTE dark magic the other day but I certainly didn't understand it.

Edit: Someone else posted an "Advent of " list which included https://adventofsql.com/, perhaps those problems will be a little more pedestrian for SQL.

Re: Advent of Code 2024

#450
post #138

I’m using sqlite this year. Hoping that there won’t be any computational geometry or trie problems. Kind of hoping for a graph problem solvable with recursive CTEs, that would be cool.

I've solved some days in past years with sqlite + enough awk to transform the input into something that can be imported into a table. It can be a fun challenge.
Post reply on HN