Live data from Hacker News

Advent of Code 2024

adventofcode.com

491–500 of 580 posts

Re: Advent of Code 2024

#491

Earlier quoted context omitted.

> you cannot pass This is his entire point: getting to this brick wall is _where_ the real learning happens. When you start scrambling, reading old stackoverflow posts, and breaking out the calculus text book you're pushing the boundaries of what is possible for you. Body builders don't grow by watching other people lift weights.

Agree to disagree. Don't see any difference with finding the answers on SO, or in textbooks, and having an AI provide the same. And at the start, novice body builders will of course watch other body builders to learn how it's done. Unless you're exceptional you're not teaching yourself anything unless it's by learning from others. Few are the pioneers in any field.

I think the difference between the textbooks and AI is that the AI can answer exactly your question without providing the necessary context/reasoning behind how it arrived there.

When you are drawing connections between SO posts, textbooks, whatever you do a fair amount of reasoning yourself.

Now that I think about it it isn't AI specific (more knowledge specific) - I'd say the same if you wait a few hours and then look up the AOC solutions on github. Sure you'll have "solved" the problem but you never spent the time to actually figure out the solution.

> And at the start, novice body builders will of course watch other body builders to learn how it's done.

"Learn how it's done" - not get bigger. This is the important difference. If those novice body builders watched others and learned how its done without putting in the reps themselves they'd get nowhere.

Re: Advent of Code 2024

#493
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.

Yep, on Linux, or WSL to be exact, I just use the internal shell though.

Re: Advent of Code 2024

#494

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

Not sure if it would take away from the experience, but there's this repo which is made for AoC that handles getting the input from a text file, sets up a source file for each day, etc

https://github.com/TanklesXL/gladvent

Re: Advent of Code 2024

#495

Excited to try this. I was aiming to be done by Christmas, but this is my first AoC and reading other replies makes this seem a bit unrealistic. Decided to do it in elisp to try and improve my emacs-fu and lisp knowledge.

Gl. I've yet to meet anyone that actually finished AoC. At some point the problems take 8+ hours to solve and people give up :).

Re: Advent of Code 2024

#496
post #483

Earlier quoted context omitted.

How do they become pioneers? By digging into the body of knowledge. They know what books and authors are good, what blogs to read, they posted questions on SO. They don't search for direct answers, but instead they search for the knowledge that allowed the person who made the question to make the question, and person who found solutions to find the solution. Looking how it's done doesn't equal you doing it. It's appl…

I don't see much to disgree with in what you're saying. Were clearly talking about different things. What happens when you dig in and exhaust all your best efforts and still don't find a solution? Are you a lost cause because you couldn't figure it out for yourself? Or are you allowed to be shown the way it's done so you can learn from that? Many times in my life have I not been able to figure something out for mysel…

Honestly use the gym analogy again:

You've spent the last hour trying to curl the 50kg dumbbell and you just can't do it. You walk up to the yolked out guy and ask him to show you how it's done, he picks up the weight and curls it with ease.

At this point its not really fair to say you curled those 50kgs, and you didn't get much out of the experience. Maybe you noticed something about his technique that helped, or he gave you some pointers, but you still can't lift the weight by yourself even with that information.

Now if you instead went back and trained some more at lower weights not only would you get more out of the experience (in terms of growth), but also seeing someone else do it is more beneficial since you can try it again yourself and directly apply what you just learned. Eventually with enough training at easier weights and progressing naturally you'll be able to lift the 50kg weights. But that one curl you're now getting to do for the noobie is in no way indicative of the time and effort you actually put in to be able to do that one curl.

Now if you're instead in a warehouse doing your job moving heavy boxes from A to B getting the yolked out guy to help you isn't that bad - sure you can't do it in the future but all that matters is that it was moved from A to B. If we take that same mindset into the gym we'll get nowhere since the gym isn't about moving something from A to B, it's about making you better at moving something from A to B.

Re: Advent of Code 2024

#497

Ah here it is again, 25 days of writing increasingly complex input parsers.

the input parsers don't get increasingly complex over the days. The problems themselves do. Even on the most difficult days around 22 or 23, the inputs are all just lines of space separate ints or some grid of points or something, just like the trivial problems on days 1-3

Re: Advent of Code 2024

#498

Earlier quoted context omitted.

Forgive the dumb question... it's been ages since I've done Amiga programming in C. What behaves differently? Is the lower K of memory mapped, such that null pointer deferences cause excitement rather than simply crashing your program? Or is it something else?

AmigaOS has no memory protection whatsoever. If your program crashes, so does the entire machine. And it will possibly bring your hard drive with it, too. Not unworkable, but not the most relaxed environment for fast’n’fun cowboy coding. You typically have to reboot a lot.

I thought the Amiga 1k had page protection, just not virtual memory?

Re: Advent of Code 2024

#500

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…

Are the timings with language runtime startup, or only the procedure calls of the actual code?

Just the individual part1 and part2 functions. At least on the Clojure side, I made the runner. For the rust side I’m not sure I’m using a template project that does that containment.
Post reply on HN