Other challenges (in advent and not in advent) like advent of code: https://github.com/NoelJacob/advent-and-other-calandars Compiled by myself.
Advent of Code 2024
301–310 of 580 posts
Re: Advent of Code 2024
#302AoC 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…
Re: Advent of Code 2024
#303Re: Advent of Code 2024
#304Earlier quoted context omitted.
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 just want to note that Quake 3 CPMA is one of the best games ever made. No idea if the handle is in reference to that, but thanks for the :)
https://www.musixmatch.com/lyrics/Kraftwerk/Boing-Boom-Tscha...
Re: Advent of Code 2024
#305This 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...
Re: Advent of Code 2024
#306Earlier quoted context omitted.
The global leaderboard is so fast that any AI assistance would literally slow them down, here's one of the guys who tends to score highly solving today's puzzle. ( https://youtu.be/ym1ae-vBy6g ), and on the more complicated days that's even more pronounced because anyone who is even somewhat decent doesn't need to ask chatgpt how to write Dijkstra. Obviously if you're doing it recreationally you can cheat with AI but…
Python looks excruciatingly slow to me. If you want fast I believe you need to think and write in vector languages like kdb+/q. I am not a kdb+ expert by any means and my code can probably use more q primitives, but here was my solution in ~2 minutes: i1:("I I";" ")0: `:1.txt; sum {abs last deltas x }each flip asc each i1 / answer 1 sum {x * sum x = i1[1]}each i1[0] / answer 2
from collections import *
xys = list(map(int, open(0).read().split()))
xs = xys[::2]
ys = xys[1::2]
xs.sort()
ys.sort()
print(sum(abs(x-y) for x,y in zip(xs,ys)))
yc = Counter(ys)
print(sum(((yc[x])*x for x in xs)))Re: Advent of Code 2024
#307Re: Advent of Code 2024
#308Last 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.
What's so hard about Day 12? It's just +/'{x:".",x;H:(-1+;1+i-)@'+|\m*i:!#m:x=\:"#." R:(x=x)({[h;d;x;y;z](z#0),+\(((-z)_~"#"=x)&z_d>z)*(*y),(-z+1)_y-0^y h}. H)[x]/y (*|R)-R@*|0,&1_*+m}.''1({("?"/:5#,x;,/5#,y)}.')\@[;1;.:]'" "\:'0:`:i/12.txt
Re: Advent of Code 2024
#309Last 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 got stuck on the graph-cut puzzle for FOUR MONTHS. I had to write a force-directed graphing engine to find the longest three edges to cut. After I solved it I looked at other people's solutions and they used Meta's proposition solver in about 10 lines. Seemed like a massive cheat to me.
Re: Advent of Code 2024
#310Earlier quoted context omitted.
Here's a website that appears to be about competing on the performance of each solution: https://codspeed.io/advent
>Participants have 36 hours Looks like it is for young people who have dedicated time for it everyday. Personally I would like to do anything like this with no time limit and probably no monetary prizes. I think the only value of those puzzles is to fire up rarely used neurons that hopefully are still there after another year of shipping corporate products xD. I might appreciate fresh point of view from young people…