#advent-of-code

1 messages Β· Page 34 of 1

vast jetty
#

this year's aoc has been so fun

mortal bronze
#

bruh the day 6 part 2 -_-

naive wharf
#

I am fucking stupid...

#

For day 9 part 2 I ||wrote this really elegant algorithm for calculating the higest/lowest Y-value for any X-value to the left and right of a given X-value||

#

I don't need that. at all.

#

I can just check whether ||there's a red tile inside my rectangle||

shy tulip
naive wharf
naive wharf
#

FINALLY

devout flint
#

Wassup champs

ripe meteor
#

Which day was hardest so far? Kinda struggled with day8

#

||Disjoint union sets|| didn't sit right with me

#

Should i spoiler that

shy tulip
ripe meteor
#

Day 9 is a shapely angle

#

That way if it doesnt work you can blame other people

shy tulip
ripe meteor
#

Yea thats basically it

#

Idk i couldnt grok it for hours

shy tulip
#

|| (union sa sb : [circuit | circuit <- circuits, circuit /= sa && circuit /= sb])||

#

Probably not the most efficient but it runs fast enough

hidden musk
bright spindle
#

For me at least

ripe meteor
#

Havent started on day 10 yet

cyan sleet
#

at least it's rust

#

p1 seems trivial enough modulo annoying input parsing, maybe p2 does something fun

vast jetty
bright spindle
vast jetty
#

p2 i have an idea but i havent gotten around to coding yet

vast jetty
#

i mean

#

i was for the first few days

sharp elk
#

I did part 1 with binary XOR ._. and now I've to change everything for part 2

vast jetty
#

but rn theres no chance of getting em done quick quick

#

so

#

i mean

#

d9 p1 was like 10 mins tho

#

so maybe not

bright spindle
#

It's not like all later puzzles are always hard.

vast jetty
#

yeah fair enough

bright spindle
#

They're just more likely to be hard.

vast jetty
#

interesting

sharp elk
vast jetty
#

boxes?

#

oh the junction shit?

#

hated it

minor cave
vast jetty
#

no

#

they have some shit bash code

#

ok i couldve posted it somewhere else i didnt realise

#

but also its really funny yall should go check it out

#

code in question:

quaint comet
#

lmao

vast jetty
#

its a sleep command that ends up running basically forever

#

theres a screenshot of some guy's usage

#

5135 hours

#

just sleeping.

#

apparently it would cost you like 2.5k usd

#

cuz github has some stupid bug

minor cave
#

This is completely irrelevant

shy tulip
#

Welp that's not making things easier

cyan sleet
#

rust errors are quite excellent sometimes

strange zinc
#

they are. dabbled a bit in it for uni

might do aoc eventually in it

low condor
#

I love that day 10 has a reference to the Pannenkoek Watch for Rolling rocks SM64 video. That's one of my fave Youtube videos, so I feel compelled to complete this day no matter what may come

vast jetty
#

coincidence?

#

wow who logged me out

#

yeah no

#

its never gonna run for actual input

#

aaaaaargh

#

ig it at least works for example?

#

i have one idea

warm gazelle
#

for part 1 does the stuff in curly brackets do anything?
[.##.] (3) (1,3) (2) (2,3) (0,2) (0,1) {3,5,4,7}

pine tiger
#

you'll see

frigid mural
#

not for part 1, no

bright spindle
warm gazelle
#

oh that's the joltage thing

#

sorry, my reading comprehension is horrible sometimes

humble copper
#

running list of the top 5 hardest days imo

#

the fish one from 2021 is somewhere in the top 10

pine tiger
humble copper
#

ive only done 2021-2025

#

but yes at a first glance that one looks difficult as well

zinc kindle
#

Got stuck for a while on part2 for day10 because I didn't notice that ||indicator lights were now irrelevant||. After that I got stuck again. Well, kinda. I found an algorithm that in theory might find a solution within a few hours (probably <24), but my computer has insufficient RAM. Part of me wants to try find an algorithm with better space complexity - even if it's slower, and maybe try parallelization. But the rest of me recognizes I need to find a different track, because

every problem has a solution that completes in at most 15 seconds on ten-year-old hardware

shut trellisBOT
half swan
#

I forgot πŸ’€ time to rush

ivory marsh
#

It looks like more combinatorics again :( I guess no regex solutions today either

earnest forge
#

My part 2 code is producing different answers each time I run it wtf

#

||is there a loop in the input||??

hidden musk
#

maybe in your input? my code accounted for it, but i remove the check and it's still fine

earnest forge
#

Nvm I figured it out I'm just stupid

ivory vigil
#

My initial solution hung so I assumed there must be a loop. But nope.

earnest forge
#

I ||forgot to clear my entries when I read from them|| so ||it was dependent on the order they were visited|| which theoretically should have affected p1 as well but I guess the magnitude of the difference gave me a free pass on that lol

rancid creek
woven oriole
#

classic specific gitignore moment

ivory vigil
uncut mason
#

I think these are getting too hard for me. 😝 Day 9 was the limit

ivory vigil
#

Day 11 is easier than 10.

#

And day 11 is easier than 9

rancid creek
uncut mason
#

No way. I have no idea how to begin optimizing for 11.2

#

but I agree 10.2 is impossible

rancid creek
uncut mason
#

Yeah I was doing that...

#

still hung for ages and made my browser crash

rancid creek
ivory vigil
uncut mason
ivory vigil
uncut mason
ivory vigil
rancid creek
ivory vigil
#

Maybe I'll get to bed at a reasonable hour tonight. Time to step away from AoC/the computer and do night time chores.

humble copper
#

solution for part 2 works, got the star. what i dont understand is whether ||repeat nodes|| are allowed? like if ||svr -> dac touches node aaa, and dac -> fft -> out also touches aaa, why that would be considered valid||? it doesnt seem this way in the samples

#

could also just be the specific examples given dont have that happen but it's allowed regardless

woven oriole
#

since the last day is not on christmas

#

i expect the hardest problem πŸ€”

cyan sleet
cyan sleet
#

assuming it's like usual

woven oriole
#

oh yeah

vast jetty
#

alright

#

day 11 p1 looks eay enough

#

ill do it later

#

i failed to do 10dp2

vast jetty
cyan sleet
cyan sleet
vast jetty
#

so you get the final star by just getting the rest 48?

#

...10 in this case

cyan sleet
#

49, 23 this year

vast jetty
#

oh yeah 22

#

well im not counting the one for part 1 in the 'rest'

#

so 48 22 sure

vast jetty
#

i know people manage to not do d25

#

and have done all the rest

cyan sleet
vast jetty
#

i seee

#

ok ill go do d11 in a bit

#

then might finish d10p2

#

or move on to d11p2

magic oxide
#

i'm probably gonna drop out of the roulette for now, have some other work i want to do

#

and i'm already 2 days behind

#

will return after AoC is over tho

vast jetty
#

oh we had rust yesterdya

magic oxide
#

i haven't looked at yesterday's problem at all, but from what i've heard about it ||it's just ILP so I would probably just be looking at a rust library for that||

vast jetty
#

it is

#

i didnt realise

#

so it should be maybee kindaaa easy?

#

now that i know how to do it

#

so sure ig

magic oxide
#

i literally had an exam that day where a part of the content was on that specifically

#

so

thin topaz
#

||solving like 6-7 systems of linear equations brainmon||

peak dock
vast jetty
#

alright

cyan sleet
#

a bit like saying "||it's just TSP, how hard can it be?||"

#

though to be fair we have some decent methods for ||ILP ||

magic oxide
#

look i'm a mathematician

#

if you can reduce it to some other problem, that's the end of my job ||\s||

cyan sleet
#

NP - no problem

bright spindle
bright spindle
ripe meteor
cyan sleet
#

P - no problem
NP - problem

bright spindle
#

Yeah

#

P is no problem and NP is problem but if problem is no problem then NP is no problem but P is still no problem

cyan sleet
#

P is np and NP is p but if P = NP is np then NP is np and P is np too

bright spindle
lucid jackal
bright spindle
lucid jackal
bright spindle
#

if p=np then nothing is np

magic oxide
#

if p=np then nothing is np and everything is np

lucid jackal
naive wharf
#

if p = np that means that the momentum of something can be expressed as an integer multiple of some other momentum

#

for d10p2, how do I solve this?
linear algebra?

humble copper
#

||in all seriousness linalg is one way to do it||

thin topaz
#

||cvx|| could solve it

humble copper
thin topaz
humble copper
#

ahhhhh lmao

pulsar drum
peak dock
#

yeaa

vast jetty
#

we found salt die's reddit

warm berry
#

NaCl = salt

vast jetty
#

where is the dying tho

torn sapphire
#

that's the cube

vast jetty
#

looks interesting

#

also intimidating

#

i feel like im learning a new language im so lost

ivory vigil
#

I suspect my lb rank is gonna drop tonight. Company holiday party or AoC? Or AoC @ party?

vast jetty
#

i cant understand these docs

#

im gonna ask gpt for some docs assistance

blissful granite
woven oriole
#

or if you are a maniac

#

||you can re invent what they do using simplex , branch and bound optimizations what not||

naive wharf
woven oriole
#

Spoiler it

#

||same reason as Z3, solving integer linear algebra||

bright spindle
naive wharf
bright spindle
vast jetty
#

finally

rancid creek
vast jetty
#

finally reading some of these texts

#

that i hadnt before

#

very fun

magic oxide
#

bruh

#

i missed this sentence in day 9 p2

rapid wolf
#

rip, that's like the only relevant sentence

magic oxide
#

i wonder

#

yeah nope max rectangle doesn't happen to have red corners

#

sadge

#

i guess it does make for a simpler algorithm now, but kinda annoying since i coded up an entire thing for this

#

i'm kinda sad it has to have red corners

vast jetty
magic oxide
#

i found the largest rectangle with red or green tiles

#

but that doesn't necessarily have a pair of red corners

#

at least most of my code is usable i think

#

ok i should probably sleep

#

guess i'll leave it to tmr

vast jetty
#

this 10 after the 11 looks so upsetting

strange zinc
#

one thing I hate about that is not being able to reorganise without unfollowing the posts

magic oxide
vast jetty
#

ayyy

#

only one more problem left

#

2 if tradition is broken

warm gazelle
remote mauve
#

!subcribe

warm gazelle
#

in the private leaderboard API:

Please don't make frequent automated requests to this service
I wonder why they don't just have a ratelimit

ripe meteor
#

<@&831776746206265384> scam

minor cave
#

!compban 1357158747973222502

marsh currentBOT
#

:incoming_envelope: :ok_hand: applied ban to @hoary agate until <t:1765850853:f> (4 days).

half swan
paper folio
#

I hope it is 2

humble copper
#

surely the last day cannot be that bad right

#

surely it cant right

#

😭

hidden musk
#

27 parts inco

paper folio
#

LOL

woven oriole
#

i want it to be bad so badly

earnest forge
humble copper
#

day 12: solve days 1-11 but your runtime has to be <10 seconds total

paper folio
#

The only puzzle I didn't solve is day10p2

paper folio
#

otherwise this year has been easier than last year?

vast jetty
humble copper
#

yeah with the exception of days 10 and 11 which were pretty on-par

shut trellisBOT
humble copper
#

oh god

potent pumice
#

THE FINAL DAY

sullen adder
#

yippee

potent pumice
vast jetty
#

ok what.

tender swallow
#

and here I thought they might go easy like day 25 lol

vast jetty
#

yeah what the hell is this

#

😭

#

Considering giving up after just 4 minutes lol

#

no clue where to even begin here

sharp elk
#

Same Lmao

humble copper
#

i might actually give up

vast jetty
#

well at least theyre all under 100x100

#

maybe one could brute force

vast jetty
#

and almost certainly come up with nothing

#

so then id come back later

pine tiger
#

you can even rotate them bro what

humble copper
#

so it's not really 100x100

tender swallow
#

||maybe you're "supposed" to hardcode a table of which shapes can fit into each other and how||
||and then try to make amalgamations of them?||

feral hazel
#

oop no spoiler chat

sharp elk
limber aurora
#

the trick i used is ||the only thing we need to know about each shape is the area||

humble copper
humble copper
#

OH WAIT

#

im actually dumb

#

😭

pine tiger
#

????

sharp elk
pine tiger
#

no way that works

sharp elk
#

that really doesn't work always though

pine tiger
#

wait the sample input literally disproves this

humble copper
#

yeah thats what im thinking, no way it can

vast jetty
#

eric why

vast jetty
uncut mason
#

yeah... day 12's a big nope from me

vast jetty
#

eliminate options

#

but i doubt itd ever come up

vast jetty
#

why eric why

sharp elk
#

:(

vast jetty
#

same

#

lol

limber aurora
vast jetty
#

i was told the last day is typically easier

humble copper
uncut mason
sharp elk
humble copper
#

though ||it does serve as a decent heuristic and eliminates ~50% of the rows initially||

sharp elk
#

We're just gonna assume input is nice?

limber aurora
#

im not it works for the actual input

humble copper
#

?

vast jetty
#

i thought it wouldnt come up

#

thanks eric

humble copper
#

it does in some cases

vast jetty
#

i suppose

sharp elk
#

does everyone get the same input?

vast jetty
#

no

humble copper
#

||WAIT WHAT||

vast jetty
#

what trig

pine tiger
vast jetty
#

that sounds absurd

#

since when is actual input easier than the exampl

pine tiger
#

i reember this happening like once

sharp elk
#

bro got easy input it seems

vast jetty
#

i think it happened once in 24 too

pine tiger
vast jetty
#

but on the last day seems suspect.

sharp elk
vast jetty
#

what

#

you tried?

limber aurora
vast jetty
#

||the area thing?||

humble copper
#

πŸ₯΄

#

wack

pine tiger
#

ok but like still

sharp elk
#

||area is working? πŸ’€||

pine tiger
#

||i believe that eric just generated the input based on this and thought "eh, no computer could actually verify these before the heat death of the universe"||

vast jetty
#

spoiler

pine tiger
vast jetty
#

so time to ||go implement area?||

#

thats so stupid

sullen musk
#

its so bad

humble copper
sullen musk
#

it doesnt work on the sample

#

but it works on the actual input

vast jetty
#

LMAO OK

pine tiger
#

that's what i'm sayin!!!

vast jetty
#

time to go do it

sullen musk
#

so i spent a year coding a correct solution

#

but thats a massive shortcut

sharp elk
#

πŸ’€

#

I'm amazed

vast jetty
#

its such a get out of jail free card tho

#

implement better solutions yall

humble copper
#

nah

vast jetty
#

tetris can do it

#

im sure you can too

uncut mason
#

woah, it worked for me too

humble copper
#

so that's a finished calendar

vast jetty
#

THIS IS SO STUPID

humble copper
#

and like previous years, ||everything is animated once you complete it||

vast jetty
#

i didnt even code up parsing yet

#

cuz i thought its gonna be a nightmare

#

hahhaa

#

hooboy

vast jetty
uncut mason
#

I did the parsing initially because it seemed fun... then stopped

humble copper
#

THAT'S ||TODAY'S EASTER EGG||

vast jetty
#

i can code it up in like 10-15 mins thp

vast jetty
pine tiger
#

what a cop out...

humble copper
#

i cannot wait to see people in r/adventofcode showcase their actual solutions

vast jetty
#

like

#

all this does is tell us which def cant be done

#

but nothing about the rest could be

uncut mason
#

it annoys me that ||the example doesn't work this way tho||

vast jetty
#

i feel bad even coding this up it feels like a total cop out lol

tender swallow
#

no way lmao
I was thinking it would be hilarious if the dumbest solution worked on the input
but it really happened

vast jetty
#

atp i dont even think we should spoiler this

#

since nobody else would be psycho enough to try this

#

and thats not their fault

#

and its not fair

#

😭

tender swallow
#

I had tabs open for researching ||polyomino packing|| and everything

vast jetty
#

lemme just go code this up

#

then we can wonder about a better solution

humble copper
vast jetty
#

should i take my time or should i rush

humble copper
#

speed code

#

code golf it even

vast jetty
#

like

sharp elk
vast jetty
#

nobody would think to do this because it shouldnt work

#

theres no reason it should

sharp elk
vast jetty
#

it just so happens that it does

vast jetty
#

i wouldnt think to just post that answer

half swan
#

thank god I decided to check back in here before I went down this rabbit hole πŸ’€

vast jetty
#

thats insane

vast jetty
#

i feel bad spoilering ||the area thing||

#

its not like any of us came up with ourselves

#

indeed

half swan
#

input is ||35x35 - 50x50||

vast jetty
#

see yall in a few minutes

peak dock
#

dont spoilers in this channel pls

sharp elk
#

||I wasn't gonna attempt it anyways It didn't make sense like day 10 p2||

woven oriole
#

i have so many questions but most importantly what the actual fuck

thin topaz
#

I don't believe today's problem can be solved efficiently?

#

with like arbitrary shapes and area

pine tiger
#

90% sure it's ||np complete in general||

sharp elk
#

Now I've to return back to all days to see the easter egg ._.

vast jetty
#

i might have been too slow

#

aaand i get an error on actual input

#

it feels wrong lol

#

wow what

#

whats with this

#

||telling you to go finish the rest of them?||

#

||i already have!||

half swan
vast jetty
#

ah sure but i thought it wouldnt even show for me since i have lol

warm gazelle
vast jetty
#

well that's the first time i have a filled calendar

#

aaand it feels unearned

warm gazelle
half swan
#

Even if today was

#

Anti climactic

vast jetty
warm gazelle
#

is it hard?

half swan
#

||looks hard, but there's a dumb solution, that technicalllyyy shouldn't work, but for the input given, does||

vast jetty
#

AoC agrees

warm gazelle
#

it feels like the puzzles this year were easy until they flipped a switch on the shapely one (assuming you don’t use shapely)

vast jetty
#

its just ||a way to eliminate some of the options||

#

||but you should still have to check for the rest||

warm gazelle
#

interesting

ivory vigil
vast jetty
#

full on 'solution' description:

elder quest
vast jetty
#

i mean i would believe it ||even if the area discrepancy is huge||

#

im not sure it is

woven oriole
elder quest
#

The given || shapes do not perfectly pack. Which would be a shortcut to solving the problem, but they don't do so, so even that doesn't exist. ||

ivory vigil
#

Alright. Time to go read the AoC 2025 story with the hover texts. And to rewrite my terrible framework.

vast jetty
#

i was thinking of like ||some sort of heavy caching solution, build up possible shapes from the ground up, etc etc||

#

but nooo

#

idk

#

id rather it have ended with a problem like d11 even

#

that was nice and sweet

#

and fair

elder quest
#

Actually

#

You can solve it || statistically ||

vast jetty
#

fine

#

||the minimum we have is like||

#

so ig thats slightly more fair?

#

i dunno

elder quest
#

None of the provided input data || requires more than 75% of the grid covered ||

vast jetty
#

||im sure the ones who realised it themselves feel happy with themselves||

elder quest
#

and || a basic arrangement of the tiles || always does better than that

vast jetty
#

yeah

#

i guess so

elder quest
#

Hold on

#

The fucker.

#

|| Statistically, the polyomino's I have only cover 7/9ths of the space. Which is to say, a full tile of them horizontally will leave 22% of the tiles free.

HOWEVER.

All of the "good" arrangements have, at worst, 25% free space. Which means that you should be able to solve the actual input by merely tiling them without any packing at all. This is also unlike the test data, which has polyomino's that are less dense than those provided in the actual data.

Excepting for the cases where the edges don't round nicely (because the omino's are 3x3, and some of these are non-divisible-by-three, which would leave you wtih two columns of empty space). But we can handwave that and say "yes, but remember, we didn't do any packing yet. "
||

vast jetty
#

rip

elder quest
#

The worst case in my data requires || 74.4% coverage. Just tiling gets 77%. So you can just tile with no rotation or anything and get the correct answer ||

#

...anyway a decent chunk of that was wrong because I mixed up || the test ominos and the real ominos. But the packing limit of being able to fit sum(presents) 9's in the grid naively holds ||

vast jetty
#

hmm

#

dominos

#

pizza etc

#

the >24h ruining this screen

#

freaking thanks d10

#

leaderboard/personal times

elder quest
#

I haven't finished d10p2 yet

#

not sure I want to tbh

vast jetty
#

just import some library and be done with it

sharp elk
#

Meh I never wake up early ._. Today was an exception

vast jetty
#

also what the hell is this ascii art of

vast jetty
#

cuz d8 had broken my morale

#

actually no d9 i also woke up early

#

d10 i didnt

sharp elk
#

day 9 was easy for me

#

day 10 made me regret doing advent of code itself

#

._.

vast jetty
#

d9p2 was hard

#

but we learnt stuff

#

so good

warm gazelle
vast jetty
#

d10p2 was just 'import a library'

vast jetty
#

there isnt a part 2

warm gazelle
warm gazelle
warm gazelle
vast jetty
#

no

#

p2 is 'get all other stars'

sharp elk
warm gazelle
#

i remember from last year now

vast jetty
woven solar
#

wow, that...sure is a day. aoc sure is ending on a low note

woven solar
#

It's a ||fake problem||.

hollow oyster
#

Oh....

vast jetty
#

Yeah idk I need to do smth else now

#

Time to go finish Codyssi?

ivory vigil
#

Yes!

vast jetty
#

I don’t remember how much of it I did

ivory vigil
#

Codyssi, Everyone Codes, CodingQuest, Tom's Data Onion

vast jetty
#

Maybe 2-3 days

#

How much even is there

ivory vigil
#

How much of what?

half swan
vast jetty
#

I’m out rn I’ll check when I get back at my laptop

ivory vigil
vast jetty
#

22 okay

woven solar
#

fun question, btw: does anyone have a fast python solution for aoc 2015 day 4, the one with the md5 hashes?

#

I tried parallelizing my Python solution but it basically didn't work at all to utilize multiple cores, weirdly enough

#

(and the Rust solution was way faster πŸ₯΄)

vast jetty
#

no surprises there

#

i havent done 2015

#

i think im gonna speedrun the first few days of codyssi

#

well not speedrun speedrun

feral hazel
#

probably not how you're supposed to do this but it works :D```nix
buildPhase = ''
runHook preBuild

    cd src
    sed -i''' -e 's!DEFPYTHONPATH=.*!DEFPYTHONPATH='$out'/lib!g' Makefile
    CFLAGS=-std=c89 make python

    runHook postBuild
  '';
vast jetty
#

just do a bunch in one sititng

#

sounds fun

ivory vigil
#

Codyssi is fun

vast jetty
#

it was launched this year right

#

i think i did the first few days as they released

#

but im not sure

#

aw codyssi wont let you log in with github

ivory vigil
#

That used to work

#

Oh. Maybe not.

elder quest
#

Is it just me or are the scipy docs taking an eternity to load?

vast jetty
#

use ||cvxpy||

#

||or z3||

#

or smth

uncut mason
vast jetty
#

oh i wonder how thats doing

uncut mason
#

Not sure where it's from... can't remember

elder quest
vast jetty
#

5th and 6th

#

okay

vast jetty
uncut mason
#

It might be, I don't recall joining it

#

Maybe an old version

vast jetty
#

yeah it's server's

#

i guess

runic drift
#

anyone here got day 10p2 without just using a solver

vast jetty
#

nah idts

#

altho theres an interesting idea i found

#

posted in the forum thread

#

forum channel?

#

forum.

runic drift
#

so was a solver intended solution?

vast jetty
#

i guess?

#

im not sure thats insane

#

like we use libraries all the time

#

like regex

#

some of these seem designed for regexing

#

granted regex is built in

runic drift
#

but like those solver libraries seem so niche? are they more common than i think

vast jetty
#

i mean

#

linear programming is a common thing

#

also you can do it with just numpy

#

itll just be annoying

feral hazel
night fractal
#

Solved the first 11 days, but wth is this day 12 😭
I don’t even know where to start

magic oxide
#

minor hint: ||try the easiest check for whether it's impossible||

magic oxide
#

i think my favourite day this year is either day 7 or day 9

#

those are definitely the ones i found hardest at least

#

and the ones i have the nicest solutions for imo

#

this year has a really pretty map tho

vast jetty
#

finally got pithon

vast jetty
#

day 9 was fun yeah

#

day 7 was def not hard tho

vast jetty
magic oxide
vast jetty
#

ah sure then

magic oxide
#

if i did it in python it would've been fine probably

vast jetty
#

i suppose

#

the parsing would be annoying

#

the actual logic should be same tho

magic oxide
#

i went with the laziest parse i could because i didn't want to touch zig dynamic arrays

#

which also meant my logic was basically language independent

#

i also just had a lot of OBOEs because my code was quite messy

vast jetty
#

this year's venv πŸ’€

#

i only played around for d10p2 its not fair

#

hahaha

hollow summit
#

what could you possibly need jinja for

vast jetty
#

i dont recall installing that.

uncut mason
late portal
#

my deps empty, cpp ⭐

still plume
feral hazel
#

i think my favorite langs this time were idris and clojure
idris felt like haskell but more
though the errors with type inference did suck at times
and idk i just really liked closure for some reason lol
for days i'd say 3 and 9

magic oxide
#

interesting

#

im not a huge fan of dependent types

lusty rover
#

(((((((I’m)just)not)a)fan)of)Clojure)
(((Not)sure)why)

hidden musk
#

wrong way

ripe meteor
#

Is there really a right way

magic oxide
#

i quite liked clojure as well

#

for what it was

feral hazel
#

i think the more i do functional stuff the more my python starts looking like a lisp

magic oxide
#

i feel like my style of python is
functional or dp

cyan sleet
#

I think odin was one of the more interesting things

magic oxide
#

or bfs/dijkstra/a* ig

#

i still need to do odin

#

and rust

#

and for my own sanity I'm doing julia

cyan sleet
#

😭

magic oxide
#

does carbon at least have arrays

cyan sleet
#

err, meant for the last msg

magic oxide
#

uh

cyan sleet
#

which kind of arrays

magic oxide
#

im fine with hardcoding so like fixed sized arrays of ints

cyan sleet
#

yeah, that exists

#

(but that's about it)

magic oxide
#

hmm

#

ok but coordinate compression is going to be a pain in the ass

cyan sleet
#

one of your bigger pains is going to be io

#

there is ReadChar, PrintChar and Print(i32)

magic oxide
#

πŸ’€

cyan sleet
#

also coordinate compression is not too bad the way I did it

magic oxide
#

ok it can't be worse than writing assembly

#

did anyone else do that day the way I did it?

#

||coordinate compression, and then 2d prefix sums||

feral hazel
magic oxide
#

also the 3 times I have implemented a DSU this AoC I've messed up the exact same line all 3 times

cyan sleet
magic oxide
#

interesting

cyan sleet
#

and now you have the mapping as an array

magic oxide
#

i presume carbon definitely does not have a hashmap

cyan sleet
#

nope

magic oxide
#

ok yeah I might do that

#

i need to finish rust, odin, and python 0.9.1 first tho

#

my rust ability is lacking

cyan sleet
#

for your own sanity

#!/bin/bash
carbon compile --optimize=speed *.carbon \
    && carbon link --output="main" *.o
magic oxide
#

how did you guys install carbon?

cyan sleet
#

I just downloaded the release

feral hazel
#

i used compiler explorer for everything

#

it's motivation!!!
if it times out then your solution aint good enough

#

-# (i couldn't get the compiler to run)

cyan sleet
spiral tangle
feral hazel
# cyan sleet for me it literally worked out of the box

😭 Could not start dynamically linked executable: carbon NixOS cannot run dynamically linked executables intended for generic linux environments out of the box. For more information, see: https://nix.dev/permalink/stub-ld

cyan sleet
#

ah, you nixed yourself

feral hazel
#

yeah lmao

spiral tangle
#

what's the topic of the aoc channels?

cyan sleet
#

advent of code

feral hazel
#

still haven't got all the obsidian plugins to work yet

cyan sleet
spiral tangle
feral hazel
#

it's a yearly set of programming puzzles released daily around christmas

#

oh i forgot the bot did that lol

spiral tangle
#

so what's the puzzle now

feral hazel
spiral tangle
#

I don't understand any of that

feral hazel
#

yeah that's actually what everyone's saying today lol

#

but if you're a beginner, it might be better to start off on one of the earlier days
the difficulty tends to ramp up as the days go on

magic oxide
#

i feel like this year difficulty peaked on day 9 ngl

hollow summit
#

should i just skip

magic oxide
#

you could skip and come back yeah

hollow summit
#

have you completed this year

magic oxide
#

yeah

hollow summit
#

cuz ive heard that you need all the other stars to get the last

magic oxide
#

you can still do the puzzles, you just can't get the last star until you go back and finish day 9

hollow summit
#

alright

ripe meteor
#

i thought day8p2 was hardest tbh

#

day9 i used ||shapely|| and day10 i used ||z3||

vast jetty
#

thats one ive not heard of

#

oh that makes this ridiculously easy

#

i guess im proud of having done it myself

#

valuable dev info

#

but hmm

#

i guess i wouldnt complain too much about never doing it again

vast jetty
#

have you used it before

ripe meteor
vast jetty
#

for aoc?

#

ah

#

i mightve missed it

#

which one

#

i did until day 19

ripe meteor
#

let me consult my archives

cyan sleet
#

||coordinate compression|| is a more fun approach to the problem

#

i.e., what if we ||contort space|| to make the brute force check work

torn sapphire
#

||i still find it funny that you can even do it wrong and end up with the right answer||

vast jetty
#

indeed

ripe meteor
#

theres always some random polygon problem in these things

vast jetty
#

although its not very brute forcey

#

like the ||odd even check or whatever else you might implement||

cyan sleet
#

||flood fill the interior||

torn sapphire
# vast jetty which one

||coordinate compression for day 9, you can essentially over-compress the input data in a way that should cause bugs, but the input data just so happens to not trigger said bug||

cyan sleet
#

and then for the rects check ||all cells it covers in the grid||

vast jetty
cyan sleet
vast jetty
#

i dont know how ||coordinate compression|| works tbh so ill have to look it up

cyan sleet
#

same algo would work on the full grid, it's just very inefficient

vast jetty
#

things learnt this year are ||coordinate compression|| and ||dsu||

#

and a bunch of libraries

cyan sleet
#

compressing 100k side length into ||a few 100s||

vast jetty
#

hmmm

cyan sleet
#

well, more like ||500|| and I did ||1000|| for convenience reasons

torn sapphire
#

||you make two lists, one of each unique X position, the other of each unique Y position, and sort them, then map each coord (x,y) to (2 * xs.index(x), 2 * ys.index(y)), essentially - now with the input data your max X and Y positions are like 500 instead of 100,000 or whatever it was||

cyan sleet
#

only it was pain in carbon

#

currently no hash maps, no dynamic arrays

vast jetty
#

if i had to have guessed, id like ||find the greatest common divisor of all side lengths and divide by that||

#

well ||the gcd for height and width separately i suppose||

cyan sleet
#

so I did ||counting sort|| and some stuff, thankfully ||100k is not a huge number||, so a ||100k long array|| works ok as a ||mapping||

torn sapphire
# vast jetty ||what are xs and xy||

||if you've got the original list of coords tiles: list[tuple[int, int]], then xs = sorted({x for x,_ in tiles}), and ys = sorted({y for _,y in tiles})||

vast jetty
#

||tiles: list[tuple[int,int]]|| right?

torn sapphire
#

oh yep, correct

vast jetty
#

the rest hm

#

hold on brb

vast jetty
#

oh d12?

#

aaaah

#

i did a ||floodfill||

#

lol

cyan sleet
#

coordinate compression example

#

basically there are regions where nothing interesting happens, so collapse those

vast jetty
#

aaaaaaaaaah

#

i see

#

very interesting

shy tulip
#

||I didn't bother with the coordinate suppresion thing since just checking all line segments took under a second anyway||

cyan sleet
#

but coordinate compression allows you to just don't do geometry

#

it's great

#

it's a simple thing to allow a very dumb solution

hollow summit
#

so you only get the relevant cells

cyan sleet
#

here ||all the columns between corners "where interesting stuff happens" gets squished into 1 column each||

#

and then do the same ||for the y direction||

cyan sleet
#

<@&831776746206265384> want some crypto scams?

minor cave
#

!compban 1357243121011785809

marsh currentBOT
#

:incoming_envelope: :ok_hand: applied ban to @trail vessel until <t:1765897072:f> (4 days).

cyan sleet
#

moderators did not want crypto scams

covert arrow
#

oops I forgot to scroll

pine tiger
#

i think this might be me first top 1?

#

a lotta people left compared to last year so lmao

woven oriole
#

true

#

someone named oliver Ni used to appear consistently before

#

if my memory serves

vast jetty
ripe meteor
#

Are you guys tryharding release times 😑

feral hazel
vast jetty
#

huh what

#

wtf is pydis

strange zinc
#

python discord

feral hazel
#

top 1 is an interesting way to put it though lol
in sorted(leaderboard)[:1]

vast jetty
#

@pine tiger this you?

shy tulip
#

They do have that name on their profile

vast jetty
#

oh on the git

#

sure

jovial jay
#

Geez, I forgot this was a thing.

vast jetty
warm ice
#

Hello, I just learned about Boyer-Moore Voting algorithm, so cool

#

How do I join advent of code?

strange zinc
#

From the website, you can create an account. Then you start solving the problems.

You can read more here #announcements message

versed moss
#

i dont know where to start for day 12 lol

ivory vigil
cyan sleet
#

ok, finally I have time to look at today's problem

#

now...do I have python 0.9.1 around?

#

I might have deleted it

ivory vigil
#

What is python 0.9.1? You mean Python 3.14?

cyan sleet
#

that would have been an impressive typo

#

it doesn't compile for me 😭

#

one missing header include which was easy enough to fix

#

but now mentions of flushline which is defined nowhere

feral hazel
cyan sleet
#

oh, it's in ceval.c

#

how tf did this code ever work?

cyan sleet
#

now, I remember multiplication being broken on non-windows

#

let's see

#

yeah...

>>> 1*2
Unhandled exception: run-time error: integer overflow
Stack backtrace (innermost last):
  File "<stdin>", line 1
#

so the bug is assuming that long is 32 bits

#

(maybe the project will accept a PR)

feral hazel
#

convert to double lmao that's so good

cyan sleet
#

yay

>>> 1*2
2
#

ok, pyright you are not going to be helpful here

#

and ruff

feral hazel
#

editor kept removing my trailing spaces too

cyan sleet
#

huh

>>> a = [1, 2, 3]
>>> a[-1]
Unhandled exception: run-time error: list index out of range
Stack backtrace (innermost last):
  File "<stdin>", line 1
>>> a[:-1]
[1, 2]
#

😭

Unhandled exception: type error: unpack non-tuple
feral hazel
#

ran into all the same errors lol

cyan sleet
#

err, how do I parse str to int?

#

string.atoi?

#

yes

feral hazel
#

there's an atoi???? i missed it and used eval instead oof

cyan sleet
#

oh yeah

Parsing error: file main.py, line 32:
      if c == '#':
             ^
Unhandled exception: run-time error: syntax error
minor cave
#

good, Completionist Role is getting assigned

cyan sleet
#

soonβ„’

feral hazel
#

i think i had to relink before it got assigned but it worked :D

normal loom
#

gonna have to lock in this weekend to catch up on all the days I missed

cyan sleet
#

we'll see when the role kicks in

covert arrow
#

chat am I purple

#

yippee

ivory vigil
#

Is it contagious?

cyan sleet
#

seems so

buoyant perch
#

When does it end? How long do we have to finish all the problems?

magic oxide
magic oxide
ivory vigil
peak dock
#

chat am i still orange

#

im orange w a pink tree ill take it

warm gazelle
#

day 9 part 2 not looking so good

#

actually now it's at 4 hours

#

still not great though

feral hazel
#

oop forgot to turn off the alarms

buoyant perch
magic oxide
buoyant perch
#

Sweet!!!

#

What about the discord completed role thing?

humble copper
#

omg pink role!

#

i love it

warm gazelle
warm gazelle
covert arrow
humble copper
#

ooooh

magic oxide
woven oriole
#

Gm

magic oxide
#

gm

warm gazelle
tender swallow
#

Until January

kind comet
marsh currentBOT
# kind comet

Please react with βœ… to upload your file(s) to our paste bin, which is more accessible for some users.

kind comet
# kind comet

I cannot get real output , can Anyone solve this.....

tender swallow
# kind comet

This doesn't seem to be related to Advent of Code. Or Python, for that matter.

worthy horizon
vast jetty
#

wow

#

completionist roles

hollow summit
#

agh i want pink role

magic oxide
#

what day is preventing you from getting pink role?

hollow summit
#

anything after day 8 looks hard

#

i heard people had to use ||"solvers"|| for day 10

#

i have no idea what that is

magic oxide
#

like ||z3||

hollow summit
#

a ||theorem prover||??

tender swallow
#

||integer linear programming||

#

||you tell it to maximize/minimize a function under some constraints||

hollow summit
#

okay i'll get to that after i solve day 9 part 2

vast jetty
hollow summit
#

i'm still stuck on the polygons, not even llms can help me

vast jetty
#

altho most i know didnt

hollow summit
#

anything i do either doesn't work, or does work but is too slow for the real input

magic oxide
#

day 9 is a lot more doable without resorting to libraries than day 10 imo

#

wait

vast jetty
#

didnt i help you on the ||odd even checks||

hollow summit
vast jetty
#

why is too slow

hollow summit
#

but i have no idea how to cast a ray, or check if there's a wall

#

without being slow

vast jetty
#

it runs in like 2 minutes top

hollow summit
#

nah my solution ran out of memory after like 30 mins πŸ’€

vast jetty
#

which is slow

#

but its not too slwo

vast jetty
hollow summit
#

yea sure

magic oxide
#

there are better ways than ||raycasting|| if you don't feel like it

vast jetty
#

you shouldnt be storing so much stuff that it runs out of them memories

magic oxide
#

matter of taste ig, I tend to avoid doing as much geometry as I can because it usually spawns a lot of edge cases

#

you can avoid doing line intersection at least

vast jetty
#

omg i got banned from r/aoc for saying 'fuck' twice llol

#

thats interesting

half swan
#

That's why you always read the rulesβ„’

vast jetty
#

once was smth like a 'wow what the fuck is this monstrosity' in reply to some meme code

#

and the other was for d8p2 wherein i 'cant be fucked to write a binary search myself'

vast jetty
#

cant even be mad

#

a subreddit being not hell is nice

#

maybe its too nice but oh well

#

Maybe I'll do an apology in an appeal later

#

too much going on at once to remember that r/aoc wont let me say 'fuck'

sharp elk
#

Nice role

bright spindle
vast jetty
#

yeah sounds like a good project

#

ill do an appeal

#

i hope daggerdragon forgives me

warm ice
#

Sad that the advent of code isn't open source :/

woven oriole
#

whats with this trend of having your first name followed by ellipsis

minor cave
woven oriole
#

Oh

#

Lmaooo

#

mb

#

Actually it wasn't happening for every user

#

Only for demantati in this chat

#

Maybe because of nickname = username

mossy basin
#

<@&831776746206265384> wanna try a new analytics tool

mortal bronze
#

wha...

#

where is Chris

half swan
#

Chris who

mortal bronze
#

damn solving AOC using cpp is hard ._.

#

the hard part is I don't have traceback error πŸ₯²

shadow dome
#

!cpban 1444559184497479792

marsh currentBOT
#

:incoming_envelope: :ok_hand: applied ban to @wind shoal until <t:1765981473:f> (4 days).

ripe meteor
#

going back to read the story, and its kind of rushed imo

#

guy could have spaced out the days so that we get to dec 24

#

like one puzzle every 2 days would be fine

spare agate
#

yo

bright spindle
ripe meteor
#

it would have been half a day

bright spindle
#

I spent like 10+ hours on day 12 though

#

That was the day I spent most time on this year

#

Cause I'm a dum dum

ripe meteor
#

😭

#

but now im hurrying trying to put xmas presents under a tree and stars on it, its the 13th, whats the rush for

#

why do these elves even take them down, they have one job

bright spindle
#

You're one of those people that left studying for exams until the night before, aren't you?

magic oxide
#

"one of those people" referring to most people here

bright spindle
#

Well... Well, yes.

#

Back before uni I did as well

half swan
#

We're in this message and we don't like it

lyric sigil
#

i should probably keep working on d9 and d10 but too lazy..

bright spindle
# lilac meteor Santa Claus

Yeah, when you gotta visit as many homes as I do you don't got time to make sure the presents are arranged in an aesthetically pleasing manner

#

not that putting them all flat on the floor is all that aesthetically pleasing

humble copper
#

i’m somewhat glad it was shortened to 12 days instead of the full 25 this year so i could get them all done before i went out of town

#

that being said, i feel like as a result the puzzles this year were very unbalanced

#

days 9 and 10 were significant difficulty spikes compared to the other days, and less gradual compared to past years

#

and also super math heavy 😞

tender swallow
#

I hope they can calibrate the difficulty curve better next year

humble copper
#

i miss the yearly opcode question :(

vast jetty
humble copper
#

the ones like β€œthis number means perform this action, this other number means take the next two numbers, find their LCM, and perform the next action based off of that”

#

etc etc

#

every number in your input is translated into an action that you perform, and you have to figure out what the end result is

bright spindle
#

I did 2015 d22 just now, that was fun

cyan sleet
#

11 being too easy compared to 9 and 10?

#

I have a hard time to judge difficulty since I have a lot of existing experience

#

1-5 were quite easy
6 was "pain in the ass to implement" flavor of annoying (also C did critical damage)
7 was staightforward if you are used to ||DP||

#

8 is quite literally just ||Kruskal's algorithm||, not sure if things are hard if you didn't know that

#

9 got harder, and there are a lot of sensible approaches here, neat problem

#

10 was a massive spike

#

11 came back down, but still expected doing some basic ||DP on a DAG||

#

12 was ||a troll||

#

honestly the spike at 11 isn't unlike other years where the difficulty often spikes at around day 21-22

warm gazelle
#

this took 27 mins to compute 😭

magic oxide
#

πŸ’€

#

which day?

warm gazelle
#

d9 p2

magic oxide
#

reasonable

warm gazelle
limpid grail
hollow summit
#

Oh boy