#advent of code 2025
1 messages Ā· Page 10 of 1
make DAY=10
elle abandoned soon
yeah
do ellec solution.le --ssa and send result
oh just had to do install-runtime instead of install-stdlib
I don't use the normal target build-dir so it breaks
ah
also add stacktraces
blehhh why is it broken
need to figure out how to generate those at some point
ok im going to bed
ping me if you get it working ill see it in the morning

eyy same
I'm kinda cooked
im glad i finished day 10 in a reasonable amount of time (it literally took all day)
yeah I told myself I was only gonna solve p1 today
i looked at it last night and already knew p2 was gonna be hell
erm actually the day has already passed so the correct statement would be "I have school today"
@native maple if the input is 166 lines long it breaks (gets that out of bounds err). If it is 165 or 167 lines long it works
haha
one of the strangest errors I've ever seen
of course, since it works with 167 lines, this is the fix
- lines := io::read_to_string(args[1]).split("\n");
+ lines := io::read_to_string(args[1]).concat("[.] (0) {0}").split("\n");
is this cursed or what
of course, this has something to do with memory because a 166 line file filled with [.] (0) {0} will compute without fail
@robust yacht I'm trying your solution is it supposed to take 10 million years
no
i can no longer reproduce this failure 
hell yeah idk whats going on
@native maple heres what you wanted
z3
eagely is an ai
i feel so stupid i drew it out in graphviz and was going thruogh the individual nodes counting their paths to out until i noticed a negative number and therefore an overflow 25 mins after writing my solution
is this path finding
yes
@native maple my solution is 3 lines
for p2
for both parts actually
just as a hint
do i need ||topo sort|| for p2? seems pretty good
fast fourier transform reference
LMAO it's so weird
gm
i'll do today in the car
i like how p1 assimilates into p2 once again
hmm i wonder why mine is so much slower on your machine
you're compiling without gc right?
yep
strange
isnt that just so clean
no im not doing them at midnight anymore
i was gonna do this at midnight but i accidentally doomscrolled until 1am
ok that was more annoying than i wouldve liked
fast tho
||```rs
use std/prelude;
let cache = HashMap::new<(string, string), i64>();
let graph = DefaultMap::new<string>(fn() HashSet::new<string>());
fn dp(string start, string end) -> i64 {
if graph[start].contains(end) { return 1; }
if _, res := cache.get($(start, end)) { return res; }
res := graph[start].iter().map_with(dp, end).sum();
cache[$(start, end)] = res;
return res;
}
fn solve(string[] lines) {
for line in lines {
name, rest := line.split(":").map(string::strip);
for d in rest.split(" ") { graph[name].add(d); }
}
i64[2] total = #[0, 0];
total[0] = dp("you", "out");
for a, b in ["dac", "fft"].permutations() {
total[1] += dp("svr", a) * dp(a, b) * dp(b, "out");
}
return total;
}
fn main(string[] args) {
lines := io::read_to_string(args[1]).strip().split("\n");
$dbg(solve(lines));
}
i didnt bother
things went wrong anyway
entirely irrelevant to the problem i was trying to solve
this could be made nicer if i implemented a default dict sort of structure there
why is it so long
override fun solvePart2(input: File) = dp(input.lines.map { it.split(" ", ":").dropBlanks() }.associate { it.first() to it.drop(1) }, "svr", false, false)
@Memoize
private fun dp(cons: Map<String, List<String>>, cur: String, dac: Boolean, fft: Boolean): Long {
if (cur == "out") return if (dac && fft) 1 else 0
return cons[cur]?.sumOf { dp(cons, it, cur == "dac" || dac, cur == "fft" || fft) } ?: 0
}
}
u dont need the 2 bools even
from functools import cache
G = {k[:-1]: v for k, *v in map(str.split, open("i.txt"))}
D = cache(lambda c, g="out": c == g or sum(D(n, g) for n in G.get(c, [])))
print(D("you"), D("svr", "dac") * D("dac", "fft") * D("fft") + D("svr", "fft") * D("fft", "dac") * D("dac"))
u can remove start==end
oh you can
Today's was easy, 246 bytes ||```py
G={L[:3]:L[4:].split()for L in open(0)}
O={"out":[1,0,0,0]}
for K in[G]99:
A=B=C=D=0
try:
for V in G[K]:p,q=V=="fft",V=="dac";a,b,c,d=O[V];A+=a;B+=b+ap;C+=c+aq;D+=d+cp+bq
O[K]=A,B,C,D;del G[K]
except:0
print(O["you"][0],O["svr"][3])
i think doing it with bools would be simpler for u
how fast
why
its already very simple
This one is pretty nice ngl, it's probably better than my approach
@hoary mirage
no
Yeah this is a much better approach, 213 bytes despite the import ||```py
G={L[:3]:L[4:].split()for L in open(0)}
from functools import*
A,B,C,D,E="you out svr fft dac".split()
R=cache(lambda a,b=B:(a==b)+sum(R(c,b)for c in G.get(a,())))
print(R(A),R(C,D)*R(D,E)*R(E)+R(C,E)*R(E,D)*R(D))
you broke v8 insanee
now doing d11 in 
yop do
it seems like heapq problem
lets cook
okay p1 was easy
had to debug because I wrote
p1 =+ 1 rather than p1 += 1
hmmm part2 wants me to abondon heapq and make it a list
ITS RUNNING SINCE SECONDS
WHY ITS NOT FINISHED
heap did make stuff fast really š„
rosie its not completing
@hoary mirage do you think d12 will be dj akstra
is today dj akstra
nop
smthn wrong w my code
it worked in example
I dont think it would cause any loops
bro theres a loop
my p1 code doesnt work either
WHY ERIC
there wont be a dijkstra this year
tomorrow is the last day and surely it will be easy
why
ROSIE WHY IS IT NOT COMPLETING
https://www.reddit.com/r/adventofcode/comments/1pjufxs/2025_day_12_part_2_patch_cable_organizer/ bro got early access to day12
oooh
@hoary mirage
@hoary mirage
@hoary mirage
@hoary mirage
@hoary mirage
@hoary mirage
@hoary mirage
KYS NON0
ig i will nbeed to do recursion
jhateeee
That's not the right answer; your answer is too high. If you're stuck, make sure you're using the full input data; there are also some general tips on the about page, or you can ask for hints on the subreddit. Please wait one minute before trying again. [Return to Day 11] death
That's the right answer! You are one gold star closer to decorating the North Pole.
FINALLY
@hoary mirage love?
love
discord loves refusing to spoiler python code
main.py: Lines 1-27
||```py
from functools import cache
p1, p2 = 0, 0
connectionMap = {}
allPossibleWays = {}
@cache
def findAllPossibleWays(start, target, hasdac, hasfft):
r = 0
for target in connectionMap[start]:
if target == "out":
if hasdac and hasfft:
r += 1
else:
r += findAllPossibleWays(target, "out", hasdac or target ==
"dac", hasfft or target == "fft")
return r
with open("input.txt", "r") as file:
for i in file.readlines():
connectionMap[i.split(":")[0]] = i.split(":")[1].strip().split(" ")
p1 = findAllPossibleWays("you", "out", True, True)
p2 = findAllPossibleWays("svr", "out", False, False)
print(p1, p2)
That's a bit bigger than mine
this is nice
@lusty atlas
car
nuh uh
oh yeah also
uhhh i think zed just straight up never frees any memory
i think when i start a shell within zed it forks the process and therefore all memory allocated within processes ran within that shell instance never have their memory freed to the os
so i can oom by just running my solutions enough times
i too browse r/adventofcode
i started to put a seperate terminal under zed lol
since i have a tiling wm its actually pretty decent to use
okay so i wasnāt insane when my shit just didnāt copy anything for like a few times in a row
happens if ur low on storage but also just happens sometimes
it happened for me when i made a screenshot and tried to copy it without saving
it just like didnāt copy anything
iāve never had any clipboard issue on mac
thatās a pretty nice setup. aerospace?
roinga
i used tiling window managers for a couple years but iāve stopped
yabai and sketchybar
mhm do you have SIP disabled
isnāt the space switching slow then?
well its instant
I thought that was only the case if SIP was disabled
unless you mean, to get rid of the animation
hiii roie
hiii
when you switch spaces with hotkeys, there is still this animation. if SIP is disabled this can be removed
itās still there if you swipe though
i never use hotkeys anyway so that wouldnt affect me much
its certainly much better than a non-tiling wm tho
i dont have to fiddle around for ages to open 2 things side by side
or i guess before i used to just put them on different desktops and switch between them
but thats still bad
iām on a non tiling wm and itās actually more convenient for me, most important thing is spaces and hotkeys
idk i dont mind either
doesnāt it break with native tabs?
rosie how did you make mac look this ugly
@hoary mirage do i solve d11 or finish discord connect four
solve d11
tomorrow yk
??????
@lusty atlas solve day 11
what do we think of the font
ulgyt
i heard path finding and decided no
its not really pathfinding there are easier ways to do it
its not a grid problem its a graph problem
anyway still would rather work on smth else 
fair enough
loses points for transparent background
gotta be one of the ugliest things i've ever seen. kinda looks like mono lisa x monaspace radon
yop
hard?
try it
can't tonight
i looked at it and yeah it looks tough
@robust yacht you know those puzzle games where you have to fit a bunch of blocks together
its that
but a lot
@robust yacht
@pale stirrup
my solution is 1 short line
the puzzle is stupid
its either made wrong or he purposefully made it stuid
is that one line with utilities
fun
it will be a few chars longer without utils
dms
i dont have a util for tryFittingAllRotationsOfTheseShapes
you will now
i love spending 54 minutes on a smart solution then going on reddin and seeing that the solution is ||one division|| and the puzzle is either accidentally terrible or eric is evil
@pale stirrup have you done d11
nop i intended to but then the game awards happened
90 bytes ||```py
print(sum(int(B[:2])int(B[3:5])>7sum(map(int,B[6:].split()))for B in open(0)if'x'in B))
Sort of an actual spoiler this time actually
@terse edge today is so easy lol
its not
its only easy if u submit the upper bound
is it even possible
Within the universe's lifetime? Probably not
||```rs
use std/prelude;
fn solve(string[] blocks) {
total := 0;
sizes := blocks.slice(0, 6).iter().map(fn(b) b.iter().map(fn(c) c == '#').sum()).collect();
for part in blocks[6].nums<i64>().iter().chunks(8) {
area := part.remove(0).unwrap() * part.remove(0).unwrap();
total += area > sizes.iter().zip(part.iter()).map(fn(p) p.x * p.y).sum();
}
return total;
}
fn main(string[] args) {
blocks := io::read_to_string(args[1]).split("\n\n");
$dbg(solve(blocks));
}
runs in 41.3ms
<500ms for all parts!!!!!!!!!
my day 10 takes longer that your everything
you can make it O(1)
well its O(n) but per line its O(1)
Day12.kt:
package solutions.y2025
import Solution
import utils.extractNumbersSeparated
import utils.product
import utils.sdanl
import java.io.File
class Day12 : Solution(2025) {
override fun solvePart1(input: File) = input.sdanl().last().map { it.extractNumbersSeparated() }
.count { g -> g.take(2).product() >= g.drop(2).sumOf { it * 9 } }
override fun solvePart2(input: File) = "worst aoc day ever"
}
what the fuck
@terse edge @robust yacht @feral valve gonna start progtamming like this
š
if your screen is far away it looks georgian
or malayalam
Oh, you did ||multiply by 9||? I did ||7|| for some reason. Guess that means ||the inputs are far enough from the gray zone that it doesn't matter||
my day 10 is only fast because i spent 5 years writing a simplex
ofc a hand rolled solution will be faster than using a general library
i forgot this
day 1 in nĀ·vim
part 1:
||- :%s/R/+<CR>:%s/L/-<CR>:%s/.*/(((\0)%100)+100)%100=<CR>gg prepare the expressions
ea50<Esc>base caseqq0yt=$"=<C-r>0<CR>p0f=lYj0llpq9999999@qcreate and evaluate formulae (might want toclipboard -= unnamnedplus):v/=0/dget rid of useless lines:%s/.*\n/+1/g0xprepare the counting of 0syyV"=<C-r>0<CR>panswer||
part 2:
||-:%s/L\(.*\)/(((-\1)%100)+100)%100=;(-\1-100)\/100=<CR>:%s/R\(.*\)/(((+\1)%100)+100)%100=;(+\1)\/100=<CR>ggprepare the expressionsei50<Esc>f;la50<Esc>base caseqq0yt=f="=<C-r>O0<CR>pllyt=$"=<C-r>0<CR>p0f=lyt;j0ePf;lpq999999@qcreate and evaluate formulae (might want toclipboard -= unnamnedplus)%s/.*;(0-.*/\0-1we actually over count because we count 1 after matching exactly 0 and going left from that so we add one to these:%s/.*=/<CR>:%s/-/<CR>cleanup:%s/\(.\)\n/\1+<CR>$xprepare the big sumyyV"=<C-r>0<CR>panswer||
iāve been trying to come up with a visualization for day 9 but the map is so big nothing works
iāve tried generating a png 10 different ways but it corrupts itself somehow
so iām generating a ppm
rn converting it to png with imagemagick
109 Gigabytes of temp files
this looks so difficult
ROSIE WHAT IS IT TRYING TO SAY
itās so easy
yeah look at the actual input
my solution fails on the sample
i actually did part 2 of day 6 in neovim too lol
it was too much of a mess to do all the parsing and manipulating in c
day 6 in nĀ·vim (not optimized at all for least keyĀ·strokes):
part 2
||- GddggP not necessary but seemed convenient
e<C-v>GelxGo<CR><Esc>pggprepare things to make it easier for the macro (really not necessary probably)/[\*+]<CR>qqggn<C-v>n4jhxGo<CR><Esc>pggq9999@qrearrange the blocks for easier parsing (takes a bit (also for some reason you end up in the middle of nowhere but itās fine))<Esc>gge<C-v>4jlxGo<CR><Esc>prearrange last bit:%s/^\(....\).$/\1<CR>:%s/^..$/\0 /<CR>:%s/^...$/\0 /<CR>normalize blocks for regex parsing:%s/^\([\*+]\) \n[0-9 ][0-9 ]\([0-9 ]\)\([0-9 ]\)\n[0-9 ][0-9 ]\([0-9 ]\)\([0-9 ]\)\n[0-9 ][0-9 ]\([0-9 ]\)\([0-9 ]\)\n[0-9 ][0-9 ]\([0-9 ]\)\([0-9 ]\)\n/\0\2\4\6\8\1\3\5\7\9\r<CR>:%s/\(.\) \n\([0-9 ]\)\([0-9 ]\)[0-9 ][0-9 ]\n\([0-9 ]\)\([0-9 ]\)[0-9 ][0-9 ]\n\([0-9 ]\)\([0-9 ]\)[0-9 ][0-9 ]\n\([0-9 ]\)\([0-9 ]\)[0-9 ][0-9 ]\n/\2\4\6\8\1\3\5\7\9\1<CR>we need to do it in two times because nĀ·vim only has 9 named captured groups:%s/ //g<CR>:%s/^$\n/<CR>Gdd:%s/.$/<CR>:%s/\(.*\)[^0-9]$/\1<CR>:%s/\(.*\)[^0-9]$/\1<CR>cleanup (yes twice. not the most efficient but yk):%s/\(.*\)\n/(\1)+<CR>$xyyV"=<C-r>0<CR>pthe grand evaluation (might take a bit)||
idg whats the deal with input
i thought day 10 was dijkstra
try and see
holy shit chat
gimp just opened a 28 gigabytes big ppm file
and itās working fine
36 times shape 0
donāt worry about the sample
the sample has cases the actual input doesnāt have
That's the right answer! You are one gold star closer to decorating the North Pole. [Continue to Part Two]
bro š„
this is stupid
why doesnt it work on example but work on real input
dont rage about it i wasted 2 hours raging its not worth the effort just accept that the puzzle is stupid


true
i still didnt do d11
do
nop
nin0 so lazy
first I finish discord connect 4
WHAT THE HELL IS DISCORD CONNECT 4
You will see
its vibecodable
kill yourself
for some reason my copilto stopped working so i cant even vibecode
cba to make it work
use google antigravity
if its a fucking vscode fork
yes more space on my mac please!
why is this an option???
to vibecode
test driven development vs vibe engineer driven development
im the cvo
chief vibe officer
vibe architect
it can even do the flood fill for me!
(day 09 part 2)
it just flood filled a 28 Gigabyte file
i kinda cheated in day 9, 11, and 12
there were ways to simplify the problem heavily
day 9 i assume ||you could like make a list of rectangles than when ORed together are the area?||
solution.le: Lines 1-50
||```le
use std/prelude;
fn contained(i64[4][] edges, i64[2] mx, i64[2] my) {
for i := 0; i < edges.size; i += 1 {
e := edges.elements[i]; // skip bounds check
if mx[0] < e[2] && mx[1] > e[0] && my[0] < e[3] && my[1] > e[1] {
return false;
}
}
return true;
}
fn solve(string[] lines) {
tiles := lines.map(fn(l) l.split(",").map(i64::parse));
edges := Array::with_capacity<i64[4]>(tiles.len()).filled();
i64[2] best = #[0, 0];
for i := 0; i < tiles.len(); i += 1 {
px, py := #[tiles[i], tiles[(i + 1) % tiles.len()]];
edges[i] = #[
math::min(px[0], py[0]), math::min(px[1], py[1]),
math::max(px[0], py[0]), math::max(px[1], py[1])
];
}
edges.sort_with(fn(a, b) a[0] - b[0]);
for i := 0; i < tiles.len(); i += 1 {
for j := 0; j < tiles.len(); j += 1 {
if i >= j { continue; }
p1, p2 := #[tiles.elements[i], tiles.elements[j]];
mx := p1[0] < p2[0] ? #[p1[0], p2[0]] : #[p2[0], p1[0]];
my := p1[1] < p2[1] ? #[p1[1], p2[1]] : #[p2[1], p1[1]];
area := (mx[1] - mx[0] + 1) * (my[1] - my[0] + 1);
if area > best[0] { best[0] = area; }
if area <= best[1] { continue; }
if contained(edges, mx, my) { best[1] = area; }
}
}
return best;
}
fn main(string[] args) {
lines := io::read_to_string(args[1]).strip().split("\n");
$dbg(solve(lines));
}
what syntax highlighting is this using š why are my newlines GREEN
isnāt that normal rust
sorry
well this was a wonderful end to this years aoc, though it was very short
ill go to slumber again, see you next year
@robust yacht
@frigid socket
@robust yacht
how
@frigid socket
I await Zoot turn
nino death
Game over!
š“ @frigid socket won.
š” @robust yacht lost.
š³ š³ š³ š³ š³ š³ š³
š³ š³ š” š” š³ š³ š³
š³ š³ ā¤ļø š” š³ š³ š³
š“ š” š“ ā¤ļø š³ š³ š³
š” š“ š“ š” ā¤ļø š³ š³
š“ š” š” š“ š” ā¤ļø š³
salad will rewrite
2swap has a series of great videos on connect 4 strategies
i vibe architected every day
ā
honestly i wouldn't be surprised if you end up using some "coding agent" or some bullshit like that and add your whole kotlin utils as context so you can get solutions that look similar to what you'd actually write
is that how context works? can you even add multiple files
helo
yes. i believe it also can just travel your file tree by itself as needed
silly
thats exactly what i do except there is nothing "i" would write because i vibe design everything
oh ok ā¤ļø
dude are you deadass
every single message eagely sends is a shitpost
he is almost always ragebaiting don't take anything he says seriously ever
oh thank god
rosie confirmed vibecoder
@hoary mirage thoughts?
she was always vibecoder
all 35k 38k lines of code in elle are vibe coded
@native maple hiiii
@native maple hii
@hoary mirage
@robust yacht
@hoary mirage have you done d12
yes I done all
nop
lies
im behind on other days
WHERE ARE YOU GOING NEXT WEEK
hi
no???
im not almost always ragebaiting
im always ragebaiting
@terse edge have you ever heard of a https://en.wikipedia.org/wiki/Finger_tree
In computer science, a finger tree is a purely functional data structure that can be used to efficiently implement other functional data structures. A finger tree gives amortized constant time access to the "fingers" (leaves) of the tree, which is where data is stored, and concatenation and splitting logarithmic time in the size of the smaller ...
a what
rosie has no fingers
is this another useless fp abstraction
@lusty atlas
DEVIN, STOP REMOVING THIS LINE YOU DUMBASS, YES TYPESCRIPT DOES THROW AN ERROR IF YOU DON'T HAVE IT, NO THIS IS NOT "UNUSED", AND YES YOU ARE BREAKING OUR CI PIPELINE EVERY TIME YOU DO IT
Did a very cursed golf to 80 ||```py
print(sum(eval(B.translate({120:42,58:"/7>",32:43}))for B in open(0)if'x'in B))
we love ai
@robust yacht WHATS HAPPENING ON R/HALFLIFE
thereās a global leaderboard actually?
damn gg
mine looks so bad
did vee not do 11 12
@lusty atlas doooooo
you guys are not real grugs. you donāt have brute force in your soul. well i have. and this takes 2 hours to compute the answer but it damn does. grug power!
ignore line 75
i didnāt believe in grug power then
also not sure about freeing a null pointer but whatever it doesnāt happen
freeing a null pointer is a noop
cool
Watch out for the Mod Bilboofan
Watch out for the Mod Bilboofan
Watch out for the Mod Bilboofan
@frigid socket see #1302000818131828810 bro
@hoary mirage do d14
done
done with exams
how should i do day 12?
seems pretty hard to enumerate all tilings
roinga
I'm curious, how long is your d2
it's like 170ms
you should optimize it 
optimizing my d2 was probably the thing i enjoyed the most this AOC
how long does yours take?
wow fast
year 25 
yop
are you old enough to have lived at the same time as jesus
sadan is 3
Oh yeah and I wrote a proper d10p2, it's 375b if you remove the newlines ||```py
from numpy import*;r=arange
from functools import*
for L in open(n:=0):
[,*P,],Q,R=L.split()
B=[bincount(eval(q[1:-1]+","),None,len(P))for q in Q]
S=len(B);M=r(1<<S)[:,None]>>r(S)&1
F=cache(lambdaV:any(V,*[W:=V-M@B]0)and min([sum(M[i])+2F(*W[i]//2)for i in where(all(~W&(W>=0),1))[0]]+[1e9]))
n+=min(M[all(M@B%2^less('#',P),1)].sum(1))+F(*eval(R[1:-1]+","))*1j
print(n)
do you write it then minify it or write it like that
Think the first draft was about 500 bytes
how
@hoary mirage
WHAT