Live data from Hacker News

Advent of Code 2024

adventofcode.com

411–420 of 580 posts

Re: Advent of Code 2024

#412
I'm trying Haskell this time.

For this one, I learned how to write a basic parser with Text.Parsec and manipulate the tuples with bimap !

It's a very fun occasion to learn a new programming language.

Re: Advent of Code 2024

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

Re: Advent of Code 2024

#414

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.

what is the dev cycle like on that? can you attach to it and operate it remotely via something like a repl or do you have to compile something to a cartridge and boot it from that?

Re: Advent of Code 2024

#415

I 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…

Go (not "Golang") has better compilation times than Rust and does not try to combine incompatible ways of using concurrency. I have the opposite dilemma to you, I want to learn to like Rust.

Personally I loathe golang for the sheer fact that it was created recently enough to have included a much better design. Old languages get a pass.

Rust to me is what a modern take on a systems language would be. I think it’s substantially better than go.

Re: Advent of Code 2024

#416
I'm doing the challenges in PowerShell to see how it goes.

I want to use it as a test to see how human programming can be improved by an AI, so I wrote the solution for day 1, got the right answer, and then gave my code to ChatGPT 4o to ask it to make the code faster.

My version ran in ~3500 ms ChatGPT's version ran in 140 ms

both worked

A great example of how a common DevOps language program can be improved on by ChatGPT.

Re: Advent of Code 2024

#418
post #173

Earlier quoted context omitted.

Using LLM for this kind of thing is like using cheats or aim assist for online games. So yes, this is prime example of enshifittication.

enshittification isn't "things become worse" - it's the specific process of how services worsen in 3 stages: > Here is how platforms die: first, they are good to their users; then they abuse their users to make things better for their business customers; finally, they abuse those business customers to claw back all the value for themselves. Then, they die. I call this enshittification, and it is a seemingly inevitabl…

Just because that's how it was defined in a blog post doesn't mean that it's the only way to use it

Re: Advent of Code 2024

#419

Earlier quoted context omitted.

Last year I tried C on a real Amiga 1200 (using DICE, Matt Dillon’s compiler / runtime). I didn’t get very far, lack of memory protection makes things really hard. This year the Amiga has an 060 upgrade with an MMU, so perhaps I can figure out how to use that and have another go.

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.

Re: Advent of Code 2024

#420
This is my fourth year. I'm using Go while being surprised how inadequate it is for this kind of problem. Standard libraries lack basic data structures and often Go is too slow for a compiled language!
Post reply on HN