Live data from Hacker News

Advent of Code 2024

adventofcode.com

361–370 of 580 posts

Re: Advent of Code 2024

#361
post #215

Earlier 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.

I have enough fun side project ideas that I want to do. Ones which will also be helpful for me once I’m done with them.

Re: Advent of Code 2024

#364

People here are doing it in Common Lisp and C standard library, meanwhile I’m just sitting here trying to get a curl call to download the data file.

I have this script:

  #!/bin/sh
  set -e
  curl "https://adventofcode.com/${YEAR:?}/day/${DAY:?}/input" --cookie "session=$(cat .token)"
then: YEAR=2024 DAY=1 ./aocdata

Re: Advent of Code 2024

#365

Last year I got stuck on Day 12 for a full week, and thinking about how to solve it consumed my every waking moment. I think this year, I'm going to be kind to myself and not participate so I can really enjoy the winter break from work.

Heh, I just checked. That's where I got stuck last year, too. I solved the first half.

Re: Advent of Code 2024

#366

Work on a side project this December instead of doing this. Solving advent of code just keeps you in your comfort zone. Creates a false sense of accomplishment. Redirect all the positive energy to something that will make you proud when you are old or help with an earlier retirement. This won't.

I’m gonna do a side project because it’s more fun and useful to me.

Re: Advent of Code 2024

#367
What I hate about AoC is the tons of bullshit about Christmas elves I have to tolerate before getting to the damn point. I mean, I understand they want to make the context entertaining, but sometimes it's like reading a Jira card written by a junior product owner!

BTW I love AoC for all else

Re: Advent of Code 2024

#368

This 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...

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?

Re: Advent of Code 2024

#370

Earlier quoted context omitted.

How about something creative that is at the same time relaxing? Some time ago I started creating mods for the game stardew valley. It still involves some programming but mainly drawing, creating animations and composing music! It's an absolute blast and so relaxing (like the game itself). I think by now I could even start working on my own game but I don't yet have a desire to.

Not OP, but that’s really neat. What’s your process for that? What IDE for the coding? Is C# required? What software for the art?

I started with something called ContentPatcher. It let's you patch game assets and other stuff (including some logic) using a json based DSL.

For more complex things C# is needed as Stardew Valley is made with XNA/MonoGame. There is a NuGet package to set it up which even includes hot reloading of the mod into the running game: https://www.nuget.org/packages/Pathoschild.Stardew.ModBuildC...

I use NeoVim but you can use any editor. It was a bit of a pain to get dotnet going on arch linux but I got it working after some tinkering.

To get started, one can install SMAPI, then unpack the game assets. Then, you can open game maps and assets in the Tiled level editor. I also use Aseprite to make the pixel art tilesets for the maps (LibreSprite would also work). I use a mix of my own tiles and tiles from the game itself for my maps. Music and sound can also be added or patched with ContentPatcher. I make all sound related stuff with Ableton Live. I haven't done much with C# yet but SMAPI provides a pretty nice API so it should be pleasant to use.

Post reply on HN