Live data from Hacker News

Advent of Code 2024

adventofcode.com

321–330 of 580 posts

Re: Advent of Code 2024

#321

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

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.

I don't think there are enough entries to make it worth the cost of a hash. I know it's not "efficient" exactly, but just repeatedly looping through and counting just isn't that slow.

Re: Advent of Code 2024

#322

I will try to do it with F# and Gleam this year, but like every year I won’t have time (and brain) to do more than 10/12 days ^^ For the pythonists around here, give F# a try: it can feels very close to scripting and it has a wonderful REPL too :)

How's linux support? :)

Works like a charm for me with Ubuntu 24.04/VSCode/Ionide (F# extension) !

For AoC I don't use a real project setup, just a `dayX.fsx` file and I run it like a script with `dotnet fsi dayX.fsx`, et voilà :)

Re: Advent of Code 2024

#323

Other challenges (in advent and not in advent) like advent of code: https://github.com/NoelJacob/advent-and-other-calandars Compiled by myself.

Do you want to add Genuary to your list? A month of daily prompts to get you producing some generative / creative coding art. Starts Jan 1. Website here: https://genuary.art/

I've promised myself that one year I will move beyond the first seven prompts ... who knew creativity could be so taxing?

Re: Advent of Code 2024

#324
post #208

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

I agree that it wasn't completely well-received, and I think this is a real shame. The stated goal of Advent of Code was always to make better programmers. Extending, maintaining, and testing large systems is an important part of real-world engineering efforts.

I thought the IntCode thing was great and I hope to see something like that again this year.

Re: Advent of Code 2024

#325

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

Symmetrically, I would consider only using sh and standard non-Turing-complete CLI tools (grep yes, awk no). About as limiting, but without devastating memory corruption bugs.

Re: Advent of Code 2024

#326
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 go in to this not caring how fast I do it, or how far behind I get. It's just an opportunity to learn something and challenge myself a little bit.

At best, I tend to set myself an upper limit for runtime.

Re: Advent of Code 2024

#327

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.

> I can really enjoy the winter break from work

What line of work are you in that you can take a winter break, and furthermore, that you can actually not work during that break? I'm envious...

I've always wanted to do AoC but on top of work it is too much.

Re: Advent of Code 2024

#328

AoC is in this weird place where it's too easy to be fulfilling on its own, but too bothersome to just do it for leisure. I did it once (using Python with no imports for some mild challenge), waking up super early to actually start on time, then golfing my answers if I felt like it. It was a fun thing to do... once. I don't feel the need to repeat that and I don't find it engaging enough to do without time pressure,…

It's best for me when I do something that I ordinarily don't do for AoC. I find no particular pleasure in using an everyday language like Python for it, because as you said it's too easy. I have used Haskell, Racket, and in some easier cases APL and it's been fun. Treating it more like a puzzle than an actual programming assignment. When learning new languages, it's best to do something that actually makes you think…

C# allows for terser and very functional-y implementations thanks to differences between LINQ and Java’s Streams.

Re: Advent of Code 2024

#329
post #327

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.

> I can really enjoy the winter break from work What line of work are you in that you can take a winter break, and furthermore, that you can actually not work during that break? I'm envious... I've always wanted to do AoC but on top of work it is too much.

I get the week between Christmas and New Year's off and then I take a bunch of my PTO in December. It's not an official break or anything.

Re: Advent of Code 2024

#330

I maintain a joke domain which I've found sadly applicable through the years. https://adventofrealizingicantread.com . I try to keep it updated pointing to the current day throughout the month I've found especially as the month progresses it's just as much Advent of Reading Comprehension as it is coding :)

It seems it does not work now now?
Post reply on HN