#advent-of-code

1 messages · Page 29 of 1

paper folio
#

woaaoah

humble copper
#

beacon scanners gives me nightmares…….

paper folio
#

do you consider "complete" as in finish it on the day? <24 hr

#

I'm planning to try out previous years after day 25

#

or does advent end on 24

humble copper
#

just as long as you do all the challenges for each day

paper folio
#

yeah i think that's good enough for me too 😄

humble copper
#

if it’s anything like previous years, ||the part 1 for day 25 is super easy, and the part 2 is “did you complete the rest of the calendar”||

paper folio
#

hahaha

humble copper
#

traditionally the last few days are easier than the middle days so that people can spend time with their families

#

and the calendar looks a bit special when you get all 50 stars too

candid berry
#

I've finally finished day 20 😅

strange zinc
#

🎉

next viper
#

be me
stuck on day 20 for a couple days
finally get part 1, but it takes ~15s to run
whatever, part 2's the real challenge and ill need to refactor anyways
read part 2
ohgodpleaseno.png
im gonna need a better algorithm
wait hold up do i tho?
parametrize one hard-coded number and slightly refactor some of the code
f*kin works first try

#

d20p1: 2 days. d20p2: 5 minutes

#

am i... could i maybe be... sm-smart?!?!

ripe meteor
#

after day22 i feel like i deserve an MBA

#

Monkey Business Administration

cyan sleet
shut trellisBOT
graceful dawn
#

21 seconds 😂

compact wasp
#

54/11

#

i see @devout tusk gapped me p1 again

devout tusk
#

28/60 😌

devout tusk
compact wasp
#

i need top 10

#

it's so close

devout tusk
#

also, i just broke 1000 points! 🥳

devout tusk
compact wasp
#

i was sick so

#

no i wouldn't have been top 5

#

would've been slow as hell

devout tusk
devout tusk
pine tiger
#

god i love solving np complete problems

compact wasp
#

just use ||nx||

earnest forge
devout tusk
#

my p2 runs in 35s for today 💀

compact wasp
#

😭

earnest forge
#

I'm not one of them so I got 342/235 lol

pine tiger
#

disgusting

earnest forge
compact wasp
#

gnns have made me way too familiar with it

#

i forgot does star 2 of day 25 require that i have all other stars done

earnest forge
#

||yes||

#

||I usually gain about 200 places for that reason, lol||

compact wasp
#

lol

#

ig i'll just ||copy the golfs on the last day if i cba||

earnest forge
#

Lmao

humble copper
#

today was chill

#

my p2 for today runs in like

#

3 seconds

hybrid gull
#

Yeah.

magic oxide
#

i completely forgot lmao

hybrid gull
#

Mine runs in 0.5s

magic oxide
#

was showering for the past 20 mins

#

rip

hybrid gull
#

I got sub-1000 ranks 5 times this year, so I'm super happy with that. Especially with a bunch of the sub-1000s this year being taken up by... not people.

cyan sleet
#

🦀

celest swallow
#

Hello every one I just started data science with python I’m super excited to be here anyone wanna put me through because I’m having thought time about the course

feral hazel
#

doing the last couple days on a phone and im so happy i made my helper script download the input
last year i was running stuff through a discord bot and giving it the input was a mess

karmic coral
#

i completely butchered my day 23 😂

pine tiger
#

how the hell

#

do you do aoc

#

on a phone

woven oriole
#
  • and have a top 10 rank in pydis
feral hazel
woven oriole
#

too strong

feral hazel
#

oop just realizing the comment about arithmetic expansion is no longer valid

#

the script broke on day 8 because octal so i switched to bc lmao

slender ravine
feral hazel
#

oh true forgot about that
had it in the last script

feral hazel
#

done

oak flax
#

is it called cheating if i used ||networkx|| for part 2 of todays problem?!

thin topaz
#

I mean it's whatever

karmic coral
#

i clicked open workspace in vs code vs code told me the workspace is already open

cyan sleet
#

I don't, but that's more because I'm a masochist and don't want basically any library code during aoc

cyan sleet
#

compiled in rustc, without any additional crates 🙃

#

but yeah sure

#

especially for graph stuff I've always done my own thing regardless though

magic oxide
#

I'm trying to stay away from it as well

#

at least for today

#

since it's just ||like 2 lines of code||

cyan sleet
#

it's not much needed to have a good enough solution yeah

humble copper
#

i need to learn networkx in general

karmic coral
#

||networkx|| ftw woo 🙌

magic oxide
#

ok i don't understand rust, and it does not help that rust-analyzer isn't working in neovim

cyan sleet
#

(also, works on my machine)

magic oxide
#

ok finally it works

#

now wtf is a borrow

woven oriole
#

i need a good read for ||bron kerbosch algorithm cause i can't find it on cp algorithms usaco nowhere smh||

cyan sleet
woven oriole
cyan sleet
#

tl;dr it's a non-mutable reference

#

but it keeps track of things at compile time so you don't do anything bad

#

e.g. you can have multiple borrows at the same time, but mutable borrows are more restricted

cyan sleet
cyan sleet
#

and ||do that for all v||

candid berry
#

I succeeded with something much dumber than that

humble copper
#

i succeeded with something that in hindsight should not have worked

obtuse veldt
#

Hello people, someone here is good dealing with Pydantic?

#

I have been dealing with an issue for a week. I have searched online and even tried using ChatGPT, but I haven’t found any answers.

strange zinc
obtuse veldt
#

@strange zinc

strange zinc
#

you can repost it

karmic coral
#

i completed day 23 with a pencil and a piece of paper

strange zinc
#

oh boy. nice work

tender swallow
humble copper
#

can’t wait to see what we have to deal with tonight

#

🙃

earnest forge
#

Good luck everyone

shut trellisBOT
jovial aspen
#

Are they hacking?

covert arrow
#

today's p1 was pretty straightforward tbh

#

we've had a few similar ones before

woven oriole
earnest forge
#

Well today marks my first 'solution so bad I crash my entire laptop'

woven oriole
#

chat am i spending my whole day on this

woven oriole
#

which is very obvious

covert arrow
woven oriole
#

yeah

#

it was just you can find the ||other 4 with 4||

covert arrow
#

is that possible?

woven oriole
#

nvm its not

#

for our given tc its not

#

so another advent of ||reverse engineering perhaps||

humble copper
#

thats the route id go for ngl

woven oriole
#

right now my x + y and z are very close already

#

when i saw very close i mean ||1e13||

covert arrow
woven oriole
#

nice

earnest forge
#

I tried ||just shoving it into z3|| but that doesn't seem to have worked

#

Well I guess I'll see if this does anything but I'm really not seeing the proper way to do this

compact wasp
#

this is ||model based diagnosis|| but ughh

earnest forge
#

I think my current solution is technically O(n!^7) lmao

woven oriole
#

imma play genshin

#

day 24 ends for me for now 👍

woven oriole
compact wasp
#

||z3||

#

should support this

woven oriole
#

but how do you tell ||z3|| about the || 4 pairs being faulty thing||

#

does it support that

compact wasp
#

||health indicators lol||

karmic coral
#

im having issues finding ||z|| wires

#

||parsing issues||

devout tusk
humble copper
#

🥲

#

nope, instead we have ||manually picking apart the calculations for each digit||!

compact wasp
#

so uhh my approach didn't work

#

😦

woven oriole
#

dead

woven scaffold
#

Might be time for me to go and have breakfast lol

#

Haven't made much progress on this

covert arrow
#

so close yet so far...

karmic coral
#

dont tell me this is an ||easter egg||

woven oriole
humble copper
#

just so im not going insane, is it easier to ||find pairs of swapped outputs, or find all faulty outputs overall?||

covert arrow
humble copper
#

?!?!

#

||how 😭||

woven oriole
#

what the sigma

#

||so like swapped operands?||

karmic coral
#

i am getting output and numbers! ||31688159490575|| lol is that close

humble copper
#

||swapped inputs?||

#

that would be a lot easier to handle

woven oriole
#

also ||are there useless commands too||

#

gotta check

covert arrow
#

hint: ||sort each wire by its depth (how much recursion you need to find the output)||
hint 2: ||simplify xN AND yN and xN XOR yN||
hint 3: ||full adders...||

warm gazelle
#

do you guys think it’s possible to use cuda to brute force day 17 part 2 ||the programming language problem||

earnest forge
woven oriole
thin topaz
#

wth is this part2

#

😭

woven oriole
#

okay oh you made a ||tree or soemthing||

humble copper
#

just my luck - power’s out at home

#

:)

covert arrow
woven oriole
#

yeah

#

figured

thin topaz
#

||do we need a tree for every z wire?||

covert arrow
woven oriole
#

i see

pine tiger
#

disgusting

pine tiger
thin topaz
covert arrow
#

This helps because ||the pattern becomes much clearer like this||

thin topaz
#

so ||change all non xyz wires to Axx?||

#

right

woven oriole
#

there are also ||ORs with non xyz wires||

#

smh

karmic coral
#

yeppers

pine tiger
#

btw ||sympy helps a ton||

#

esp because for me

#

||the bad wires were immediately obvious||

karmic coral
#

||simpy?||

pine tiger
#

yeah

#

you can google it

woven oriole
#

i didnt know that

pine tiger
#

i suppose they do

devout tusk
thin topaz
#

umm am I ||just not doing any actual search here and just look at where the wire pattern breaks....||

#

that would be kinda underwhelming

warm gazelle
#

my university’s high performance computer to be exact

earnest forge
#

Hopefully tomorrow's will be much easier

earnest forge
#

My usage didn't really have any crazy spikes though so I think it's just 'Z3 did something strange and crashed'

warm gazelle
#

unless your computer uses a ton of gpu or a ton of threads there’s basically nothing that’s gonna change anyway

earnest forge
#

A) that's fine
B) I'm like 90% sure Z3 would still crash anyway

warm gazelle
#

what is ‘Z3?

earnest forge
#

Z3 is a theorem solver

warm gazelle
#

is that for day 24?

#

i haven’t looked at today yet

earnest forge
earnest forge
#

Technically if it didn't segfault it should give the right answer

warm gazelle
#

isn’t segfault usually indicative of a software bug

#

that’s going to happen no matter what computer you run it on, right?

earnest forge
#

The segfault in this case was probably Z3 failing to allocate

warm gazelle
#

oh, so you need a lot of ram then

earnest forge
#

(I'm not sure why z3 needed to allocate, but I don't know the internals of z3)

warm gazelle
#

but remember to shut it down when you’re done so you don’t use a ton of money

earnest forge
#

It should only be about 98k variables, I'm not sure why it would be running out of memory

warm gazelle
#

i don’t know then

earnest forge
#

¯_(ツ)_/¯

warm gazelle
#

does task manager show any resources maxing out

earnest forge
#

I have graphs in my bar but they didn't seem to go much higher than normal

#

¯_(ツ)_/¯

devout tusk
hybrid gull
#

Literally solved today's pt2 by hand in Notepad by ||recreating each full adder individually and seeing where the mismatches were|| 💀

#

lol... 3+ hours and still not even 1800 pt2 solves

thin topaz
#

I don't even know why the code works

#

but ok I guess

hybrid gull
#

Day 25, pt1: Help! The elves have detected a single broken NAND gate in this 16-bit CPU. Can you find it for us?

thin topaz
#

nah it would probably be some cosmic rays flipped some unknown number of bits in my cpu register, please find when it happened and how many bits are flipped

hybrid gull
#

We know when it happened... while Santa was doing a Mario 64 speed run and clipped through the ceiling

magic oxide
#

tho tbf p2 is decently hard

pine tiger
#

> weekend puzzle is easy
> monday night puzzle is balls hard
what did eric mean by this

tender swallow
#

trying to use ||graphviz|| on this problem was a mistake

bleak sable
obtuse veldt
#

someone did help me yesterday

cyan sleet
tender swallow
#

10,162x16,763 pixels

woven oriole
#

okay sadly || i drew the entire full adder assuming the non xyz wires will be constantly used throughout all the bits wrote a script to store them all, later found out the equations are not the same ||

#

kms

#

someplace they are doing ||x08 AND y08 and directly storing it into z08|| which does not make sense at all

#

wtf

covert arrow
woven oriole
#

damn

#

woah

#

but this is just one

#

smh smh

#

okay let me try out more

jovial aspen
#

tbh I want to skip today's part 2
But idk if there's any better method without manually drawing the circuit map

jovial aspen
#

Heres what I have got from the adder:
||```py

rules

x_n XOR y_n -> X_n

x_n AND y_n -> A_n

c_n XOR X_n -> z_n (sum)

c_n AND X_n -> t_n

t_n OR A_n -> c_n+1 (carry)

magic oxide
#

i might solve this one manually before trying for a generalized sol

#

what i've done so far lends really nicely to doing it manually

woven oriole
#

same

#

i literally created a text file for the thing i am going to do

woven oriole
#

okay i retire from aoc now

#

nvm one more day

flat thorn
#

i'll do this next yr ig
was busy with ncc

hybrid gull
#

Maybe Eric will be generous and tomorrow will be like, "Oh no, an elf fell asleep on the keyboard while typing his password and typed a bunch of extra B's. Remove the B's and figure out what he was typing."

tender swallow
#

the 25th problem is always easy from what I've heard

magic oxide
#

generally day 25s are on the easier side

#

last year's 25 was debatable

rancid creek
#

It depends, day 25 part 2 is the least finished puzzle each year. 🙂

mossy basin
#

dunno, every single day 25 part 2 has been finished

lime fulcrum
mossy basin
#

by everyone that's ever seen it

#

!e

print(all([]))
marsh currentBOT
mossy basin
#

just a statement about members of the empty set

minor cave
#

@past jay this isn't the right place to run code

past jay
#

mmk

minor cave
#

You want #bot-commands

past jay
humble copper
#

im so lost on this

#

i know what i’m supposed to be checking for but im not sure how to check it

devout tusk
#

i really hope tomorrow doesn't require all 499*'s celebrating 10 years 💀

magic oxide
#

💀

humble copper
#

yes

lime fulcrum
#

Dm ok? I have a graphic that might help

humble copper
#

sure

#

i mean ive visualized the entire ||full adder||

lime fulcrum
humble copper
#

did that too

#

above is expected, below is actual

#

i looked at ||the operation for the 9th digit from the right on a graph||

#

OH

#

WAIT

#

||each output (zXX) should be the result of some xor gate||

#

and ive already been checking ||which outputs are not the result of xor gates||

#

there's exactly ||4 of those||

hybrid gull
karmic coral
#

Day 25! Sheesh we made it to the last day chat

candid berry
humble copper
#

yep, managed to get it eventually

#

🫠

#

i swear, if eric pulls something on us for tomorrow cuz its the 10th anniversary

naive stone
#

i'm really struggling with this one. I get that ||i need to look at the entire chain of full adders and find which ones are wrong, but once one thing is wrong, everything starts to look wrong, and it's difficult to understand where the wrongness ends...||

#

like i see for example that one of my ||output digits which should be sum_out XOR carry_out is something else, so that obvoiusly means that that output digit is one of the wrong ones. but now if i dive deeper into the 2 inputs that were unexpected, i have no idea what i'm supposed to expect from them||

woven oriole
naive stone
lime fulcrum
woven oriole
naive stone
woven oriole
#

||find all the wrong things, there are not many if you filter enough||

naive stone
woven oriole
#

i assume ||you are not dealing with actual values they have||

#

its just ||4 pairs of wires , rest all should follow the correct binary adder logic||

naive stone
#

||isn't that a bad assumption though? theoretically 2 or more mistakes could be chained together right? which would look like a huge mess||

#

||like i guess as soon as i see any issue, i just skip to the next z digit, i was sort of considering that but was afraid of there being 2 or more issues in the same adder||

woven oriole
#

i dont think we can ||pin point the exact wires by working with bits||

#

it will indeed create a huge mess

naive stone
#

basically, ||looking through my adjacency list and whenever i see something i don't expect, i assume the output needs to be swapped||

#

more intuitively, ||i'm going through the full adder backwards, and keeping track of outputs when any of the inputs or gate is not what it should be. but as soon as that happens, anything below it will also not be what it should be, and so i'll incorrectly think that output needs to be swapped as well||

woven oriole
#

yeah exactly , it would ||flip so many things||

#

if we think about this ||in terms of wires, its like this figure, A and B being xN and yN, S "should" be zN, ||

naive stone
#

right

woven oriole
#

and by manually checking i found out there are || no discrepancies in xN xor/and yN||

#

so we can ||label the thing they produce prolly||

naive stone
#

hmm, am I shooting myself in the foot ||by trying to look through the schematic backwards? should i start from each xN and yN to check if their output is what i expect?||

woven oriole
#

yes more like ||are their operands consistently being used||

#

for example ||AN BN being always produced , AN should always be one of the operand in the final XOR, BN should be one of the operand in OR (Carry out)||

#

||and they MUST produce zN||

naive stone
#

the part that confuses me the most is the ||XOR input to the sum out, and likewise the AND input to the A input of the carry out||

#

like without context, it's impossible to know if those are right because they're just 3 random letters

woven oriole
#

exactly

lime fulcrum
#

||well you are adding 3 inputs together and outputting it as s and cout||

woven oriole
naive stone
woven oriole
#

yes

naive stone
#

interesting

mossy basin
#

|| what XOR is connected to is something you could check ||

naive stone
# mossy basin || what XOR is connected to is something you could check ||

well it's either connected to ||a zN wire, or it's connected to a random 3 letters right? if it's connected to anything else then it's wrong, but it could be connected to a random 3 letters but not the right one, in which case it's more difficult to identify that unless i rename those i guess?||

#

i guess it could also be ||connected to the wrong zN, which would also be confusing||

mossy basin
#

|| you could check operands of a XOR for being x,y or result for being z ||

naive stone
#

||the operands could be a pair of 3 random letters though. I wouldn't know if they were the right ones||

#

oh that's why you said ||the result being a z||

#

i see...

mossy basin
#

||if none of the checks work, then something is off with that XOR ||

naive stone
#

right right, ||because the inputs of a gate never need to be swapped, those are all correct. it's only some gate outputs that are wrong. so I can either confirm it's right by the gate inputs being what i expect, or the gate output being what i expect...||

mossy basin
#

|| like the XOR could be connected to a wrong z and you wouldn't know, but if it isn't connected to z at all and the inputs are random -- you know this gate is off ||

naive stone
#

||the only gate i'm confused how i'd verify now using that method is the AND connected to the A input of the carry out||

mossy basin
naive stone
#

i guess so

#

if i solve this soon, i hope you guys will still be around to help me with day 21 part 2 lol. bane of my existence

lime fulcrum
naive stone
#

careful not to get locked in a room on a reindeer-class starship either

#

hah, i thought it only reacted to tree

naive stone
#

intuitively i can understand which output is wrong in this section:
||```py

graph["z19"]
('ndj', 'XOR', 'fvw')
graph["ndj"]
('y19', 'XOR', 'x19')
graph["fvw"]
('ffh', 'XOR', 'gdw')
graph["ffh"]
('vvt', 'OR', 'bct')
graph["gdw"]
('x18', 'XOR', 'y18')

||this zN looks right initially, its `ndj` input is right, but its `fvw` is obviously wrong. but that doesn't mean the zN is the wrong output, the `fvw` is the wrong one. I know that because i can see that based on its inputs, the output should actually be `z18`. I don't know how to verify this programmatically...||
mossy basin
naive stone
mossy basin
naive stone
#

it's still an assumption, i have to determine whether it's correct or not

#

intutively i can tell it's correct, but programmatically i'm failing to think of a way

mossy basin
#

i just have a short list of checks to see if a gate is wrong -- if it's not obviously wrong, continue on

naive stone
#

hmm

mossy basin
#

at the very worst, you get some list of wrong gates, which could make the problem brute-forceable if you are still stuck

naive stone
#

i suppose. I have already manually confirmed 5 wrong outputs lol

mossy basin
#

what were the others and how did you know they were wrong?

naive stone
#

well i'm a little suspcious, ||the rest of the ones i found are all z wires, they weren't connected to an XOR gate, which to me is obviously wrong||

mossy basin
#

yeah, that's another check ||if the gate isn't a xor and it outputs to a z (except z45) it's wrong||

naive stone
#

oh right, ||last bit has to be the carry out of the previous, so it should be OR?||

mossy basin
#

the other checks i did involved looking at whether the result was an operand of a certain type of gate, so going one-level deeper

mossy basin
naive stone
#

i am sorry that is transparent lmao

#

either way, i'll be less strict and see how that does

mossy basin
#

that last gate is a OR gate isn't it

naive stone
#

yea it is

mossy basin
#

i guess it is an or

#

oh, you do AND with the result and the carry bit, but you have to OR that with whether the result has a carry

#

electronic engineers should get a new programming language

naive stone
#

right

#

lol

mossy basin
#

for instance, if a ||XOR gate output was the input to a OR gate|| i marked it wrong

naive stone
#

you mark the ||output of the XOR gate as wrong presumably, right?||

mossy basin
#

yeah

naive stone
#

i feel like the fact that i made a directed graph is making this more difficult

mossy basin
#

probably, i just have a [(a, op, b, result), ...] list

naive stone
#

oooooookaaaaay, that was tough. Anyone around to help with day 21 part 2? lol

#

i tried ||caching my dfs that simulates the paths, but that just isn't good enough for 25 robots. I'm thinking i need to just calculate the cost of getting from one button to another from the perspective of the robot one level up, so i'm just adding numbers. but i don't really know how to acheive this assuming that is the right approach||

#

@lime fulcrum you seemed keen on helping, you still around or did you disappear afterall? peepoWide

frigid mural
naive stone
#

i'm wondering ||if i can just use my dfs to find the length of the path between every pair of buttons?||

frigid mural
mossy basin
mossy basin
#

yeah

frigid mural
#

Yeah, there are some cases where it matters

#

I thought I had a bullet-proof thing to avoid ||branching||, but ||there are cases where the option that looks worse at the current level ends up winning||

naive stone
#

oh god that's horrifying

mossy basin
#

tbf, i just do "all possible paths" but thats really only two paths at most

frigid mural
#

Idk if there are effects beyond 3, I haven't seen them when I was checking why my heuristic didn't always work

#

But then again why bother pre-calculating when the runtime cost is reasonably low anyway

mossy basin
#

i don't think so, i skimmed over a description for a non-recursive solution and it seemed like you could directly compute the path by considering 2-levels up

frigid mural
#

I might go back to finding the right heuristic later if I really need it to get my total AOC runtime down but that's not the top of my list

mossy basin
#

i'm not gonna pretend to know the iterative solution

naive stone
#

i'm so confused on how to proceed lol

#

feel like i'm back at square 1

frigid mural
#

I have a ||cached function that takes in the string to work on, starting and ending at A, and a level. It goes through char by char looking at the transitions, and for each transition it finds what possible paths take you between those chars, and recurses to find the cost of the (max 2) paths available||

naive stone
#

this is fast enough for ||25 robots deep??||

frigid mural
#

The ||possible path|| computation is also cached, not that it's massively important

frigid mural
naive stone
#

but wouldn't the paths be getting absurdly long?

mossy basin
#

cache really reduces the problem, i had around only 300ish entries in my cache afterwards

frigid mural
#

So the paths are all tiny

naive stone
#

i'm not following, ||is the path a string of characters? or a number representing the length of the best path?||

frigid mural
#

String of chars

#

That's the key part: ||you can split every path into a bunch of char->char transitions and compute the paths one level down for a single transition at a time. They can be cut up like this because they all start and end at A so the end of one is always the start of the next||

naive stone
#

oh

mossy basin
#

wanna see day 21 visual, it's kinda spoiler free

naive stone
#

i'll look at a visual, sure

mossy basin
naive stone
#

super clean as always salt, well done

mossy basin
#

thanks

#

i liked this one

frigid mural
#

So ||1234A -> cost(A to 1) + cost(1 to 2) + ...|| and ||cost(A to 1) -> ^<<A -> cost(A to ^) + ...||

frigid mural
mossy basin
#

i was working on one for today, but i've been really tired the last few days

#

suffering from burn out faster than usual

frigid mural
#

Well no pressure at all, I'll be happy to see em when they arrive

naive stone
frigid mural
#

That's where ||branching|| comes in

#

You may have ||at most 2 sensible paths: say >>>^^^ and ^^^>>>||

#

Anything else is trivially a waste of instructions for the next level along to run

#

By asking for ||all reasonable options in the layer below||, you ensure that regardless of the higher level effects you'll always offer the best solution ||among others||

naive stone
#

||by "layer below", you mean the next robot in the chain in the direction away from the numerical keyboard right?||

frigid mural
#

Yes

naive stone
#

i need to be hit over the head more lol. ||So for 1234A, the first thing you do is find the best path between A and 1. So are you passing A and 1 to a cost function, which in turn calls some other function to find the best path? and then the cost function returns the length of the path only? and cost is cached?||

#

that can't be right lol

frigid mural
#

I wrote ||separate functions just for clarity, in actuality I have def cost(code: str, level: int) -> int: and a def paths(a: str, b: str) -> list[str]: where a,b are single chars||

#

Both are cached although ||the latter doesn't absolutely need to be since it's not recursive||

naive stone
#

what does ||level represent? level in the robot chain? if so how does that effect things? I'm still struggling to connect how you get away with not having to generate tons of paths||

frigid mural
#

You do in theory, the branching factor is a bit under 2

#

But the paths are all ||very short so there's only so many unique ones you'll get||

frigid mural
#

To do ||cost(1234A, n) I find paths(A1) then run cost(path, n-1) for each option and take the min. Then rinse and repeat for each subsequent char||

frigid mural
naive stone
#

lol i'm so tempted to look at this point, but if i can solve it on my own i'd like to

#

i am still so confused though lol

frigid mural
#

Tbh I've basically been saying everything this message contains just spread out a little bit more

#

I'm trying to leave some dots left to connect

naive stone
#

yea i appreciate that

#

what you guys said about ||the needing to look 2 levels deep to verify a path is best is scaring me still, i'm not sure how to even do that||

frigid mural
frigid mural
#

If you just ||test each option||

mossy basin
frigid mural
#

You could ||figure out which would be best but that's more pain than just branching||

naive stone
mossy basin
#

right

#

can't make that assumption

frigid mural
#

Yup

#

There is one very important assumption that does survive tho

#

That being ||the best path is always an L, don't bother with zigzags||

#

And there's only ever ||2 possible L shapes hence the bound mentioned earlier||

naive stone
#

wait do you guys ||recurse through all 25 robots between each 2 buttons of the original numerical code? like A to 1 is either "<^<" or "^<<", and then immediately you recurse doing < to ^ and ^ to <? and so on?||

mossy basin
#

yeah, except that <^< isn't a possible path

naive stone
#

from A to 1? sure it is

mossy basin
#

ok, not a shortest path

naive stone
#

do you prune that branch immediately ||because of the unnecessary direction change?||

mossy basin
#

yep

naive stone
#

i see

#

i think i can wrap my head around this approach

#

time to put pen to paper i guess

mossy basin
#

from A to 1 is either "^<<" or "<<^" but one of these isn't legal because of the missing key

frigid mural
#

Beat me to it

#

This one's an important pitfall

naive stone
#

i don't even include that empty space in my graph, it's not possible to find that path

#

i figurd that was an ok way to avoid it

frigid mural
#

ah right you actually DFS across the keyboard

#

Like cell by cell

mossy basin
#

i just move by dx and then by dy

#

but i have to do some checks because of hole

frigid mural
#

Yeah this ends up nice and easy

mossy basin
#

but they are simple

naive stone
#

can you elaborate? like are you just checking manhattan distance and then checking if it brings you across the gap?

frigid mural
#

Yup

mossy basin
#

my check actually checks start/end coordinates directly against hole coordinates

#

but it doesn't matter how you do it

frigid mural
#

||c = "<>"[nx > x]*dx + "0v"[ny > y]*dy|| then ||if y != ... and ...: <path works>||

#

Plenty of ways to go about it, it's not the expensive bit anyway

naive stone
#

right

mossy basin
#

the "0" pretending to be a "^"

frigid mural
#

So you could even DFS if you really wanted to 🤷‍♂️

frigid mural
mossy basin
#

lol

frigid mural
#

Was so elegant

#

I didn't send a message about it but that made my code so much neater

mossy basin
#

it's nice having only one keypad

frigid mural
#

Although tbh I could have split the recursive function into 2 and then done an array DP

#

Maybe faster by avoiding the dicts but can I be bothered? Unlikely

mossy basin
#

remember that problem earlier that was calculate cost of path on graph but turns are real expensive

naive stone
#

the reindeer race or w/e?

frigid mural
#

Oh wait not that

#

Well turns were restricted on that one but not directly costly

naive stone
#

i don't remember a puzzle about cauldrons

#

lol

mossy basin
#

yeah, reindeer race

#

maybe use that dfs to get your min paths lol

#

so you don't turn too much

naive stone
#

i almost certainly hand wrote dijkstra for that one

#

i rarely use recursive solutions because they confuse me

#

i can write a bfs with my eyes closed though

mossy basin
#

i did that day in nim

naive stone
#

what is nim?

mossy basin
#

language

#

it was the roulette language that day, but i have some prior experience so i did it

naive stone
#

ah

frigid mural
#

I started the roulette last year, but I gave up when installing the languages was too much of a pain to do during exam season

mossy basin
#
heap.push (0, START, (0, 1), @[])
while heap.len > 0:
  state = heap.pop
  if state.pos == END:
    best_score = state.score
    for seat in state.seats:
      best_sets.incl seat
    continue
  
  for neighbor in state.pos.neighbors:
    new_dir = neighbor - state.pos
    new_score = state.score + (if new_dir == state.dir: 1 else: 1001)
    if scores.getOrDefault((neighbor, new_dir), new_score) >= new_score:
      scores[(neighbor, new_dir)] = new_score
      heap.push (new_score, neighbor, new_dir, state.seats.concat @[state.pos])

nim looks pretty dope if you've never seen it

#

it's just typed python

naive stone
#

neat

frigid mural
#

Yeah it looked pretty cool

#

Reminds me of that other statically typed python

#

Mojo

mossy basin
#

lol

frigid mural
#

Idk what happened to it

mossy basin
#

i'm in the mojo server, but i dunno about it

frigid mural
#

As usual there was a bunch of hype and then it went poof

mossy basin
#

i really like:

block:
  # can make an arbitrary block of code with its own locals
#

and

discard some_proc_that_returns_something_i_dont_use()
frigid mural
#

Yeah that's nice

mossy basin
#

also blocks have a value

frigid mural
#

I like the rust-style ownership stuff

mossy basin
#
let a = block:
    do stuff to make a
frigid mural
#

Conceptually Scala is just so cool, I rarely ever use it tho

#

I wrote a whole compiler in it and then never again

mossy basin
#

lol

#

if i write a compiler, that's gonna be a the only language i use for a while

frigid mural
#

There's a bug somewhere deep in my O3 flag stuff for it which I never got round to fixing

#

Otherwise would be cool to do AOC in my own language

mossy basin
#

i wanted to make a toy array lang

#

you know how lua, the only collection is a table

#

like that, but the only collection is array

frigid mural
#

Lol

#

A really fun one is "only collection is pairs"

#

You want a list? Infinitely nest

mossy basin
#

lol

frigid mural
#

You want a struct? Sure, you'll need to cough up n-1 pairs my good sir

#

It actually works decently

#

You have to do type erasure on doubly nested pairs

#

But you can get it to work happily

mossy basin
#

i'm not sure i could get it to work

frigid mural
#

That's what my lang started with

mossy basin
#

(a, (b, (c, d))) this reminds me peano

frigid mural
mossy basin
#

because mathematicians think this is a reasonable way to define natural numbers

frigid mural
#

It's so cool tho

#

Because it lets you do some really neat stuff in Haskell funnily

#

You can define a type family for Peano numbers, and you can use the Haskell type checker to write proofs over the peano numbers

#

And from there you can actually statically type vectors of given lengths and functions over them

#

It's in the top 3 mindfucks I've ever experienced in that language

mossy basin
#

haskell too dank for me

frigid mural
#

Haskell my beloved

#

Hadn't done it in a while but then I became a TA for the first years in my uni

#

And the students all learn Haskell in term 1

#

And it took me straight back to my addiction

mossy basin
#

see, i have reasonable addictions, like graphics in the terminal

frigid mural
#

Taught them about circular programming a few weeks ago, that really got em

frigid mural
mossy basin
#

lol, i don't think it's productive, but it's a fun hobby

frigid mural
#

You end up with awesome visuals that you can use in other situations if they're similar

mossy basin
frigid mural
#

I end up with 17 folders of eldritch code fragments that would each get me an exorcism if I showed them to a sane person

mossy basin
#

lol, i actually save a ton of random code fragments

frigid mural
#

When people are doing smth interesting and I help them fix it I'll save the cool snippets

mossy basin
#

same, i actually have a discord folder with scraps of helping people

#

all my weird maze generations are in there too

#

!e

import random
from cmath import log
import networkx as nx

def line_char(x, y, maze):
    if (x, y) not in maze: return " "
    return " ╺╻┏╸━┓┳╹┗┃┣┛┻┫╋"[sum(2 ** round(log(complex(*u) - complex(x, y), 1j).real % 4) for u in maze[x, y])]

G = nx.grid_graph((9, 100))
G.remove_nodes_from((i, 0) for i in range(1, 100))
G.remove_nodes_from((i, 8) for i in range(99))
for e in G.edges:
    G.edges[e]["weight"] = random.random()
maze = nx.algorithms.minimum_spanning_tree(G)
print("\n".join("".join(line_char(x, y, maze) for x in range(100)) for y in range(9)))
marsh currentBOT
# mossy basin !e ```py import random from cmath import log import networkx as nx def line_cha...

:white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | ╻                                                                                                   
002 | ┃┏━━━━╸╺┳╸╻╻┏━━┳╸┏━╸╺━┳╸┏╸┏┓╻┏━━━━╸╻┏╸┏┳╸┏━┳━━━┳━━━┓┏┳━┓┏╸╺┳╸╺┓╺┓╻╺┳━┓╻┏╸╻╻┏╸╺┳╸╺━━┓╻╻╻╻╻┏━━━┳┓╺┳┓╻╻
003 | ┣┛╺┓┏╸┏━╋━╋┻┻┓┏┻┓┃╻╻╻┏╋╸┣╸┃┣┻┛╻╻╻╺━┫┃╻┃┗╸┗┓┗┓┏┓╹╻┏━╋┛╹┏┛┃╺━┻━┓┣┓┣┻╸╹╺┻┻╋╸┃┗╋━━╋━┳╸╺╋┻╋┻╋┫┗┳╸┏┛╹╺┫┗┻┛
004 | ┗━┓┃┃╺┛╻┃┏╋┓╻╹┃╻╹┃┣┛┣┛┃╺┫╻┃┃╻┏┻┛┣╸╺┫┃┗┻┳┳━┻╸┃┃╹╻┃┗┓┣╸╺┻╸┗┳━┓╻┣┛┃┣╸┏━┳━┓┗━╋━╋╸╺┛╻╹╺┓╹┏╋╸┃┗┳┻╸┗━┓╺╋┳┓╻
005 | ┏┳┫┃┃╺┓┣┛╹┃╹┗┳╋┛╺╋┫╻╹┏┻┳┻╋┫┗┻╋╸╻┣━━╋╋━━┫┗━━╸┃┣╸┃┗┳┛┣╸╻╺━┓┣╸┗┻╋╸┣┻┳┻╸┃╻┗━┳┛╺┫┏┳╸┗┓╻┃┏┫┗╸┃┏╋╸╺┓╺┫╺┫╹┗┫
006 | ╹╹┃┣╋━╋╋━╸┗┳╸┃┗┳━┫┃┃╻┃╺┛┏┛╹┏━┫┏┻┻╸╺┛┃╻╻┗━┳┳╸┗┛┏┛╺╋╸┣╸┗┳┓┣┻━┓╺┫╺┛┏┫┏╸┃┃┏╸┗╸╺┫┃┗┓┏┻┫┗┫╹┏━┫╹┣━┓┗┓┗┓╹┏━┫
007 | ╻╺╋┛┃╺┛┣━━┓╹┏┛╺┫┏┫┗╋┻┻┓┏┻┓┏┛┏┻┻┓╻╺┳┳┫┃┃╺┓┃╹╺━━╋━┳┻╸┣━┓┃┃╹╺┓┣┓┃╺━┛┃┗━┫┗┫╺┳┓╺╋╋╸┗┫╺┻┳┫┏┫┏┛╺┛╺┻┓┃╺┛┏┻╸╹
008 | ┗━┻╸┗╸╺┻━╸┗╸┗╸╺┛╹┗╸┗╸╺┛┗╸╹┗╸┗╸╺┻┻╸╹╹┗┻┻╸┗┻━╸╺━┛╺┻╸╺┛╺┻┛┗━━┻┛╹┗━╸╺┻━╸┗━┻━┛┗╸╹┗━╸╹╺━┛╹╹╹┗╸╺━━━┻┻━━┻━━┓
009 |                                                                                                    ╹
mossy basin
#

nice

frigid mural
#

Hah neat

mossy basin
#

don't look close at a complex log

frigid mural
#

I'm trying not to

#

Ok it makes some semblance of sense, I'll look at it more in the morning

#

It's 2:30 and I've been on mobile for the last 2 and a bit hours so sleep would be reasonable

mossy basin
#

that line char function, i ended up using it for #games message
which is what i'm trying to port for today's vis

#

to link the gates

frigid mural
#

Ah right

mossy basin
#

making it prettier though

frigid mural
#

That should be a fun one

#

I could talk all night so I'll have to stop somewhere, catch ya later! 👋

naive stone
#

see ya cheeki, thanks for the help

mossy basin
#

gn

earnest forge
#

Happy Halloween 👻

naive stone
#

christmas creeping ever closer, and i dont' feel like i'm any closer to solving d21p2. i'm so sorry chief historian

mossy basin
#

how close are you

naive stone
#

i'm not sure. I can show you what i have if you want to take a look

mossy basin
#

show it

#

trying to stay up to puzzle release, but my bed time was 3 hours ago

mossy basin
#

this looks close, i would modify the cost function a bit

@cache
def cost(path, robot: int, keypad_type: str):
    all_paths = (best_paths(a, b, keypad_type) for a, b in pairwise("A" + path))
    if robot == 0:
        return sum(...)
    return sum(min(cost(..........))
#

messed up last line, but it was supposed to be a hint

naive stone
#

why ||robot == 0 as the base case?||

mossy basin
#

so you can start at 25 and go downwards instead of going upwards

naive stone
#

how does that work? doesn't the initial call have to be with the door code? how would i know what the path is gonna look like at the top level?

mossy basin
#

the function doesn't care if your initial call is labeled 25 or 0, but it's easier to know when to stop if you count downwards (you recurse with robot - 1 instead of robot + 1)

naive stone
#

oh i see

earnest forge
mossy basin
naive stone
#

i'm confused by your path variable, is that just the start and end buttons?

mossy basin
#

no, it's the entire path, it's a string, will be like "123A" or "^>>A<<<^A"

naive stone
#

ah

earnest forge
#

Btw not really related but I like your keypad formatting, probably the best use of non-PEP8 dict formatting I've seen

naive stone
#

oh thank you haha

mossy basin
#

is pretty good

#

i'll show you a keypad trick after you solve

naive stone
#

if* i solve lol

mossy basin
#

lol

#

i think you're close

naive stone
#

i hope so, my brain is mush after day 24 so it's hard to tell anymore

mossy basin
#

been mush since that base 8 puzzle

earnest forge
#

Tbh that one wasn't too bad

naive stone
#

lol yea, that one took me like 24 hours

#

honestly, after i understood it, it seemed so obvious to me

#

that's what's so annoying about it

mossy basin
#

i sorta had an idea to solve it pretty quickly, but i spent a lot of time decompiling the machine and looking for more simplifications just out of curiosity

naive stone
#

i wasted a ton of time thinking that i had to ||partial match against the start of the output. took me way too long to realize I had to match the last output first||. so dumb

earnest forge
#

Yeah I just ||decompiled it, realised it was a loop, then condensed it||

#

That one made sense to me

#

Yesterday's took me a lot longer to spot because Digital didn't give me a useful diagram

#

Anyway GL all

mossy basin
#

gl

earnest forge
#

Btw what position are you on pydis, salt?

mossy basin
#

no idea

naive stone
#

i have this now, seems wrong still:
||```py
@cache
def cost(path: str, robot: int, keypad_type: str):
all_paths = (best_paths(a, b, keypad_type) for a, b in pairwise("A" + path))
if robot == 0:
return len(min(all_paths))

costs = []
for path in all_paths:
    costs.append(cost(path, robot - 1, "directional"))

return min(costs)
earnest forge
mossy basin
#

fine for base case, but all_paths is Iterator[list[str]] so what you want is

sum(len(paths[0]) for paths in all_paths)

for base

#

since it doesn't matter what path you take (they're the same length) for last robot

naive stone
#

hmm

mossy basin
#

oh yeah

earnest forge
#

And also your min(costs) might as well be a genexp

karmic coral
#

i dont think im getting lob today gl yall

naive stone
#

should i be appending "A" to the end of the path when returning a path from best_paths? i'm confused by that

mossy basin
#

yes

naive stone
#

and also prepending it when passing it to best_paths?

earnest forge
earnest forge
naive stone
#

i see

earnest forge
#

(and you need to press the first button in the path)

magic oxide
#

this year's been fun

earnest forge
#

Mostly

#

GLHF

woven oriole
#

mostly

#

merry christmas

jovial aspen
#

20 seconds

naive stone
#

good luck guys, thanks for the help salt/starwort

shut trellisBOT
magic oxide
#

truly is advent of grid

covert arrow
#

29/14 🥳

compact wasp
#

30/13

compact wasp
earnest forge
#

89/69 🎉

#

I screwed up my grid mapping because pylance actually I think it's Ruff's fault was unhappy

covert arrow
compact wasp
#

lol happens

covert arrow
#

so I basically tripled my points today

compact wasp
#

looks like i'm confirmed #8 global

compact wasp
#

would've quite easily been #3 if i didn't get sick

#

hopefully there's a next year

earnest forge
#

Something I'm curious about is what libraries everyone used

pine tiger
#

ok

earnest forge
#

I might make a google form to try to graph it

pine tiger
#

no leaderboard this year

#

it is what it is

compact wasp
covert arrow
pine tiger
#

prob coulda have had 1st in lb this year

earnest forge
#

I meant AoC libraries specifically - AoCD, aoc_helper, aoc_lube, etc.

pine tiger
#

if i wasn’t flying

earnest forge
#

I'll write a google form so I can graph it

compact wasp
#

oh in that case it's my own library

woven oriole
#

wow

#

bonus

earnest forge
#

Oh I'm not allowed to send forms links

#

:/

late frigate
#

i have my own lib as well

#

honestly its probably worse than a lot of the public ones out there, but its what ive used since like 2019 so its mine 🥰

magic oxide
#

i accidentally split on \n instead of \n\n and then just kinda gave up on going fast and took my time

#

still got sub 1000 tho which is crazy

#

considering i took 11 minutes

devout tusk
#

😔 I started the question 8 minutes late today. Rank #727

woven oriole
#

1072/954

devout tusk
#

Global rank #40

magic oxide
#

crazy

jovial aspen
#

finished day25!!

#

veery nice :)

#

also I got rank 4 (temporary, i am pretty sure)

earnest forge
earnest forge
#

...no?

frank rover
#

US era

hybrid gull
earnest forge
#

You know, I didn't even notice the easter egg for day 19 at the time lol

frank rover
#

i wish i did AOC this year but i just forgot about it being busy

karmic coral
#

wow i completed the last day in under 20 minutes and still didnt place global lb 😂 happy holidays chat

earnest forge
#

I like that the easter eggs are mostly dev commentary this year

pine tiger
#

alright

#

time to leave this server

thin topaz
#

done

#

yay I guess

#

my first year joining

wet yoke
#

Did part 1.
25 more stars to go 🙁
Welp, better luck in, iunno, March or something.

thin topaz
#

I was wondering how f.readlines(7) does not read 7 lines

humble copper
#

complete

#

🥹

naive stone
#

@mossy basin you still in a helpy mood? lol

mossy basin
#

sure

naive stone
#

haha

#

some type hints are wrong, ignore that

mossy basin
#

gotta fix this

    costs = []
    for paths in all_paths:
        costs.append(min(cost(path, robot - 1, ...) for path in paths)
karmic coral
#

5.5 ms on execution time sheesh

mossy basin
#

appending too many paths

#

and then sum the lengths

#

well, you don't need to do that

#

that's handled in base case

naive stone
#

how am i appending too many paths?

mossy basin
#

like that

naive stone
#

oh, hmm

#

still returns 1 even after that change

mossy basin
#

return sum(costs)

#

did you change that

naive stone
#

oh no, ok that is definitely better

#

doesn't give the right answer, but it's close i guess

mossy basin
#

i think you might need to switch your keypads

#

but i'm not sure

#

maybe not

#

but maybe, try to use numerical when you're at 0 and directional elsewhere

#

see if that works

naive stone
#

cost("029A", 2, "numerical") returns 62, which should be 68 i believe

mossy basin
#

no that doesn't make sense

karmic coral
#

do you have to complete all days to complete day 25? i read someone said that

mossy basin
#

can't even do the first input without a numerical

mossy basin
#

overtired

naive stone
#

i replied to the wrong message lol

naive stone
mossy basin
#

can i give you my paths function to test, just to see if thats where the error is

mossy basin
#

i think your paths are correct, but i'm not 100%

#
@cache
def paths(a, b):
    (uy, ux), (vy, vx) = NUMPAD[a], NUMPAD[b]
    dy, dx = vy - uy, vx - ux
    path = f"{'v' * dy}{'0' * -dy}{'>' * dx}{'<' * -dx}"
    paths = []
    if ux != _X or vy != _Y:
        paths.append(f"{path}A")
    if dy and dx and (uy != _Y or vx != _X):
        paths.append(f"{path[::-1]}A")
    return paths
#

oh shit, my numpad is different

#

hmm

naive stone
#

right yea

#

doing some weird magic there i don't understand fully yet

mossy basin
#
NUMPAD = {
    key: (y, x)
    for y, row in enumerate(["789", "456", "123", "_0A", "<v>"])
    for x, key in enumerate(row)
}
_Y, _X = NUMPAD["_"]

well, can do this an ignore the keypad

compact wasp
mossy basin
#

so i combined the keypads by overlapping the As

#

"0" now is the up arrow

naive stone
#

wow ok, with your paths function i get 68

#

i didn't expect my paths function to be the problem, i wonder what it is

mossy basin
#

ok, i think the holes check might be off

#

let me think about it i guess

#

if i'm capable

naive stone
#

lol

mossy basin
#

dy, dx might have wrong sign

naive stone
#

what do you mean?

mossy basin
#
dx = sx - ex
dy = sy - ey

try

dx = ex - sx
dy = ey - sy
naive stone
#

wow, that gave me 68

mossy basin
#

k, thought so

naive stone
#

i like triple checked that, i really thought that was right lol. my brain really is mush

mossy basin
#

end - start, b - a, etc.

naive stone
#

i got it, dude, thank you @mossy basin. merry freakin christmas

mossy basin
#

np, you too!

#

i finished 2015 too

naive stone
#

damn that's impressive. my record isn't quite as good. but it's not too bad

mossy basin
#

i got stuck on day 22 2015

naive stone
#

i'm still so upset about 2020. that one picture rotation puzzle is impossible

mossy basin
#

oh shit, is that the one i used cv2 for

naive stone
#

lol what is that

mossy basin
#

nevermind i didn't use it in 2020

#

it's computer vision library

naive stone
#

ah

mossy basin
#

i was thinking of day 19 2021

#

M = cv2.estimateAffine3D(b.coords[ks], a.coords[js])[1].round().astype(int) used a real higher-level function

karmic coral
#

That was underwhelming af 😂 had better event endings in Fortnite this was my first year participating

distant igloo
#

Guess you'd better stick to Fortnite

karmic coral
#

Pfft did you even make it to global lb I did

naive stone
#

ending is sick, whole year is a masterpiece

karmic coral
#

Ill code out 2019 n try it

naive stone
#

for what it's worth, day 25 usually isn't supposed to be hard, to give people a break on christmas morning. But 2019 day 25 is definitely not trivial

karmic coral
#

I wanted to code out 2015 the first aoc event

mossy basin
#

i think 2019 day 25 was the only time i broke top 100

#

because i just so happened to solve the rpg maze with first guesses

devout tusk
oak flax
#

Last year I could barely do the first 2 days and this year i got 39 stars. I will definitely take that pydis_strong
congrats to everyone and see you next year i guess
edit: oh and also, merry christmas

blazing vector
magic oxide
merry jolt
#

hi guys

strange zinc
#

ola

cyan sleet
warm gazelle
woven oriole
#

21 p2 being the most demonic

ripe meteor
#

i cant be bothered, its all so tiresome

blazing vector
warm gazelle
blazing vector
#

i don't even understand what they want from me

tender swallow
tender swallow
#

a virtual machine. that implements the operations detailed.

#

or an interpreter, if you'd like.

blazing vector
#

i thought about just lambda ops, tried to do in manually but i dont get right answers. For example Program: 0 is A = 729//2**0?

tender swallow
#

you can't just have program 0, since the opcode 0 needs to be followed by an operand

blazing vector
#

f that problem

cyan sleet
#

||skill issue||

strange zinc
#

wow

karmic coral
#

I’m doing aoc 2023 now in rust I’m on day 10

#

After aoc 2023 I want to do aoc 2015 in c

rigid fulcrum
#

what's the hardest day for aoc this year

#

I might try it for fun

strange zinc
#

either 17, 21 or 24p2

hybrid gull
#

24pt2 was a "screw it, I'm doing it by hand" day for me.

strange zinc
#

that was a really tough one

lime fulcrum
#

Still missing 21, 23 and 24p2.

woven oriole
zinc kindle
#

Ugh. Day24 part2 was a nightmare. Over 100 lines longer than my next-largest solution. So many false starts, plus several failed attempts to have a plotting library generate the circuit to help me understand it. But I finally managed it, and thus got all 50 stars.

proud cosmos
#

Let's go fancy role

normal loom
#

woohoo

naive stone
#

am i pink?

#

nope

#

i'm pink inside, that's what matters

proud cosmos
#

Truth...

normal loom
minor cave
# naive stone am i pink?

Your former admin role covers your Completionist role :(
I can maybe see if I can shuffle it higher if you prefer being pink

mossy basin
#

am i pink

hybrid gull
#

Lol... Was just now trying to find this Discord in my list and could not find it. Thought maybe it got removed from my list or something. Nope. It just lost its AoC decoration.

dusk crow
#

I forgot about advent of the code

covert arrow
#

yay I am pink

compact wasp
#

yay

leaden kettle
covert arrow
#

I kinda want to try speedrunning an entire aoc year

mossy basin
#

this is real fun to play with

jovial aspen
woven oriole
#

gms

naive stone
#

no puzzle tonight cry_wide

#

now begins the long wait

naive stone
jovial aspen
mossy basin
#

what's a latch

naive stone
#

probably talking about a flip flop or w/e

#

SR latch, that's what i'm thinking of

#

can you make this connection?

cyan sleet
mossy basin
#

because i need to connect a XOR to both a XOR and an AND to make the adder

#

so i just gave them all two outputs

naive stone
#

i guess those are NAND gates, you wouldn't have those

mossy basin
#

i can make them, but can i do it with other gates

naive stone
#

maybe?

mossy basin
#

i don't have a not either

naive stone
#

i feel like you can make anything with what you have, it just may be somewhat complicated. I'm certainly no expert though

#

apparently you can construct any other gate using only NAND gates, which is interesting

mossy basin
#

i get a recursion error when i connect output of gate 1 to input of gate 2 and output of gate 2 to input of gate 1

#

because i wasn't thinking about that when i made this

naive stone
#

hahah

#

yea makes sense

mossy basin
#

i might make this a separate tiny project though with more features

#

cause it's fun to play with

naive stone
#

it's what makes redstone in minecraft so much fun

cyan sleet
mossy basin
#

or a separate splitter

#

just an option to split any wire

#

at some point

#

then i could have 1 output

#

the wires can't be interacted with though in this visualization, that's another thing to add

jovial aspen
#

But I guess it is just for convenience because of the puzzle anyway

mossy basin
#

i just said that

naive stone
#

you should make a splitter

mossy basin
#

lol

feral hazel
#

you could make a NOT with an always true value and an XOR```
true: 1
input: x

input XOR true -> NOT xso a NAND could be
true: 1
a: x
b: y

a AND b -> z
z XOR true -> x NAND yor
a: x
b: y

a AND b -> z
NOT z -> x NAND y```

humble copper
#

how do you get the completionist role

#

oh nvm

#

lmao

thick bluff
#

XD

tulip elbow
#

😄

karmic coral
#

👍

lime fulcrum
#

ok endboss for me: day 21

next viper
#

it was a real doozie for sure

woven oriole
#

been a week and i already dont understand my code for 21p2

#

70 lines smh

lusty rover
#

When you just give up

magic oxide
#

fair honestly

#

things got hard

fickle plaza
#

hello

#

any body here ?

magic oxide
#

nah we're all gone

devout tusk
#

do i go pink?

candid berry
devout tusk
#

i've already added myself

#

like a while ago

ripe meteor
#

did you finish this year's AoC?

candid berry
#

You need to have all 50 stars on the account that you linked

strange zinc
#

pink is nice, but that orange 😄

#

Is there a role command? Interested in how many people have the role

minor cave
#

It's locked to staff but yes

#

!role 1191547731873894440

marsh currentBOT
#
Advent of Code Completionist info
ID

1191547731873894440

Colour (RGB)

#f87dc8

Colour (HSV)

0.90 0.50 248

Member count

51

Position

68

Permission code

0

strange zinc
#

Nice, thanks Kat

karmic coral
#

I’m doing advent of code 2015 in C thinksmirk

wispy glacier
#

congrats everyone on all puzzles solved this year!! lulucongrats

#

do we have a way of compiling stats on this? number of users that participated each year, number of collective problems solved, etc

magic oxide
wispy glacier
#

i think we have several pydis leaderboards that we combine but yeah would be nice to see some trended visuals

cyan sleet
#

<@&831776746206265384>

agile orbit
#

!cban 933714120681857036

marsh currentBOT
#

:incoming_envelope: :ok_hand: applied ban to @boreal ivy permanently.

karmic coral
minor cave
magic oxide
#

i read that as "by today or by next year" and thought "huh that's a pretty big time range"

candid berry
karmic coral
feral hazel
cyan sleet
#

mfw the finish times are really coordinates and velocity in a grid where you simulate trajectories to see at which time everyone align to spell a message

magic oxide
#

After some time, everyone joins together to form the python logo. When is the first time this happens?

stark pasture
#

guys, how long will the website adventofcode.com be up? I would love to do all the challanges but I don't have much time nowdays

ripe meteor
#

Its always going to be up

west token
stark pasture
#

Ooh, alr thanks

stark pasture
cyan sleet
west token
#

no way, funny pink role

cyan sleet
#

it's also a pretty sight

west token
#

looks like a budget christmas tree

karmic coral
cyan sleet
worthy shoal
#

I'm not very good at programming

#

One day I'll be really good at it

karmic coral
unkempt mesa
#

Y'know, I haven't tried Advent of Code yet. Should I go try it for fun?

#

I want a break in "monotony"

karmic coral
#

python is too cracked for aoc

minor cave
#

Okay, I'm pulling data now. Are y'all just interested in the general leaderboard data or would you also like per-day data?

#

Ah it turns out the AoC website just gives you everything anyway. Have fun parsing =P

#

Python Discord Leaderboard Data

Attached is a zip file with the leaderboard data from our 9 community leaderboards for all years since Advent of Code has started. There will be duplicate members across multiple leaderboards, handle that appropriately. File naming structure is Year-LeaderboardID.json.

YEARS = (2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024)
LEADERBOARD_IDS = (957532, 645282, 968271, 274879, 422097, 512551, 631135, 1436883, 74242)
cyan sleet
#

or do just sum across all leaderboards, my star counts will look amazing

snow hamlet
#

hi

hybrid gull
#

According to the data, 8 named people across all pydis leaderboards have all 500 stars:

nitekat
MBoffin
Defelo
Starwort
algmyr
Allan Taylor
Edward Keyes
Kevin Sheng
gentle cape
#

Goats

cyan sleet
#

🐐

karmic coral
#

I got to day 5 aoc 2015 in C 😏 I may not finish 2015 before school starts again

hardy lantern
#

I can't solve day 24 of 2024 aoc

hybrid gull
#

I solved it by hand. Literally.

hardy lantern
#

Can you explain it a little?

candid berry
hardy lantern
#

I know. So what