#advent-of-code
1 messages · Page 25 of 1
lol I don't think the color of the embed makes too big of a difference in a FAQ channel like that. It's just alternating red and green
idk, without reading too much into it, you get the impression that what the title describes is allowed
and like... people typically don't read and such
I expect people to read the message and not infer the message based on the embed side color considering the context of the rest of the channel :)
I bet day3 input would still be reading line where the order of line doesn't matter 🤔
yess christmas theme! pretty cool
that's a tall ask, lol
it's really not
yea
I just realised I cannot use the argument that they have to read the question so they would read 🥴
Gn and see y'all in 6h (I think
&aoc c
Day 3 starts <t:1733202000:R>.
:incoming_envelope: :ok_hand: applied timeout to @rustic cobalt until <t:1733180849:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).
The <@&831776746206265384> have been alerted for review.
lol
Like why 🥴
"Never underestimate the power of human stupidity."
Did we just have an example 🥴
they're gonna keep that one
why the double quoting?
>>> max(Human.attribute.stupidity.range)
math.inf
🥴
pray I don't go further
Possibly couldn't underestimate more with this now
!e
stupidity = float('nan')
if not stupidity <= float('inf'):
print('stupidity is not smaller than infinity :O')
:white_check_mark: Your 3.12 eval job has completed with return code 0.
stupidity is not smaller than infinity :O
sorry about that, a cat decided to stand on my enter key..and a bunch of other keys
Precisely all comparisons give False except !=
day 2 seem a little tricky. sample works with my code, but not sure what's up
the part 2
Is there any people active here?
maybe
yes lots of people are here chatting
If you send this in #aoc-solution-hints I might give some clue about what mind be the issue from my friend
No, I am inactive, certainly and definitely
very consistent cat
Oh, I-
WHY THERE IS ELSA PROZNE
(no hate)
?
prozne?
are you trying to be too clever?
Tbf, backslash and enter is right next to each other so if the keyboard accepts constant multi input, it might happen
well, right now, i'm using a for loop and rule set to do this. and I went with using dynamic array to figure out part 1 and 2 at the same time.
my answer is correct for part 1. part 2, dunno what's up
Maybe ||You removed item by element value instead of element index?||
Also don't forget the spoiler
or maybe ||not copying the array when removing elements?||
granted, as phrased it's not much of a spoiler
Whatever, need sleep now lul
so far, aoc is fun
bold of you to assume any of us are alive. you are now in the world of ghosts.
no to either. not relevant either.
you seem to have time for smalltalk
Some of the puzzles might take longer than the three seconds it takes to type that
killing some time before I start the grind for tonight 😔
Day 1 is so easy a caveman can do it
i reckon you could do day 1 and 2 in python in like less than 20 minutes
yeah probably
well whatever, I'll catch up over the weekend
im free a total of like, three hours on saturday 😭
It took me 15 mins to do day 2 in rust, massive despair that writing rust takes me twice as long as python
I feel like that is the same with everyone who knows both rust and python. It takes me 5x longer to write stuff in rust vs python.
It’s very nice when I want to be confident my app won’t suddenly crash, but also why my stuff no type check :(
it took me 4 hours to do it in python, because how many errors i had
That’s something that gets better with practice. Especially these early days can usually be solved with the same couple patterns
day 3 is in 20 minutes 
That’s the attitude
Yeah took me a while to solve day2, might as well wait for day3 release
really close to the day 3 release
Good luck with today's puzzle everyone
ive got vs code prepared
I’m going to have to use online python on my phone ;-;
good luck with that
LOL I read that as food and was very very concerned
It was before I edited it, since I’m eating rn
lol
how do people have 589 stars??
Is the top person on the leaderboard from day one still the GPT cheater that committed their cheating code to Github?
do you mean stars or a score?
ooh score
still how do they have that much score
For the global leaderboard or private ones?
on pythons one
You get points based on how fast you finish. If you finish first, you get X amount of points, where X is the number of people on the leaderboard. If you finish second, you get X-1 amount of points, etc
ooh
<@&518565788744024082> Good morning! Day 3 is ready to be attempted. View it online now at https://adventofcode.com/2024/day/3. Good luck!
how do i remove the aoc role from myself
Is 1am rn 😭
In #roles, you can deselect it
This ping just wake me
isnt 3 just regex
You're wild for not having do not disturb mode on your phone
68/27!
welp i am so cooked
damn tessa really placed 10888869450418352160768000000 for pt2
skill issue
w
this is the best rank i've ever gotten. spare me 😭
Done ||easy with regex||
ok wow i was not that good at regex
Um... Just noticed that there is a part 2.
going crazy trying to find what's wrong with mine for part 2
me when i wake up and realize this isn't day 25 💀
Well, my part 1 solution had an eval so I can only imagine what madness I will come up with for part 2

what's your rank
and 8 minutes for today
oh
global or priva
global
im at school lmao
its rly bad bc i had to go home yesterady
im doing it in class becacuse aoc > learning
Is the advent of code server off by 5 minutes or is it my computer?
11th on pydis
idk
yo when aoc 3 come out?
same
fair
and it looks like a regex
i probably woulda gotten 2 minutes for the first one
if
i came in earlier
but
school
ooo
i did it in ruby though since i feel it's a bit more ergonomic than python
haii
yay im 18th on the leaderboard
sheesh
imagine learning at school when you could do aoc smh my head
hiii!!
private or public
:3
private leaderboard
:3
I used an function made last week called unformat that compiles a format string into a namedtuple maker. because I didn't have access to a regex manual when I needed one.
found jimmy's real name
most people on the public used chatgpt
private not globa
hol up is jimmy xelf
jimmy = xelf confirmed
apprently chatgpt slowed down whenaoc day 3 released
nah they have multiple boards
lmfao
lmfao
pretty similar... there is nothing but worse ranking from here on for me lmfao
For day 3, if a digit Is more than 3 long then don't accept it right?
yeh
okay chat
what are these timezones
pacific
im in class when aoc comes out 😭
It’s midnight not good morning sir
timezone? where did that come up in the ss
ss?
screenshot
no but like
aoc comes out at different timrs for everyeon
so
you can be in class when it comes out (like me)
or aslep
or smth
comes up at 10:30 am for me. I'm in UTC+5.5
i am not having fun trying to run elm
Oh what? I didn't even notice and check that
But well, it work :)
For day 3, should mul only be accepted or can Mul/mUl etc be accepted too?
thanks
They never said accept other casing so assuming no
Alr cool
utc -5 here
Also, were able to solve these literally any way other than Ai right?
Sometimes I'm up at midnight and do them, sometimes I play before breakfast.
I mean, most people here won't solve it with AI
I get few enough fun puzzles in my life, why would I share with a bot who won't enjoy them?
so you get a bigger number compared to everyone else
My solution is gonna be scuffed af
@twin widget please delete your message, you're going to spoil it for people
yess i just noticed it
Dang, this day is confusing
oh ffs 🙄 people are so ridiculous
did you already did part 1 ?
do you know about regular expressions?
Regular expressions?
yeah re
everyone do that with re it's kinda hard to learn it but it's worth it
I'm using splits lmao
Yea
dang a lot happened when i was gone
@twin widget @somber trench discussion of solutions and techniques goes in the relevant #1047673173447020564 thread, or in #aoc-solution-hints if spoiler-tagged
your name's green now
aight man sorry
My bad g, sorry
stickie had the green name since i joined here
hahaha
btw i just posted something could you help me ?
sure
my name is green solely because i asked for it to be green
doesn't mean much
thought it'd have time to help out, and then uni came in
Can anyone guide me how to learn regex for CPP and python
bharadwaj are you still on valorant
never was
real
bro time passes by so quickly
2 yrs ago i was a high school patzer
now i'm in grad school 💀
undergrad goes by fast
matrix
ok for anyone else doing roulette
it's probably easiest to just write an elm file that exposes a String, and then in the repl import your module and look at the string
i kinda don't wanna deal with the whole "make an html file etc" so that's how i'm doing it
i'm doing elm in the official website's TIO
W3Schools got me far enough in Python.
You know that it's one of the worst sites to lear anything, right??
Can be. But their regex stuff was great for a problem like this.
Ohh okay I will try then
I just wanna get knowledge of regex
nvm
Who pong me :(
wtf
also is it just me or the number of people participating has drastically decreased
public execution
it's normal for participation to decrease each day
https://adventofcode.com/2023/stats
https://adventofcode.com/2024/stats
You mean compare to last 2 day or?
I didn't know about it last year so participating this year
Yes, that's quite normal tbf
Cuz the question is getting harder and not everyone have the extra time to solve it or even know how to
And more could just:
Oh, AOC start now? Let me try it
And forget about it the next day
that was actually my use case tbf
so that actually helped
guys why does this give me 1 even though 4-4 = 0
which is not in 1 <x<3 or -1>x>-3
if all() receives an empty iterable, it returns True
also go to #aoc-solution-hints and spoiler the code
how would my input have empty iterables?
!e ```py
numbers = """
4 4
"""
print(numbers.splitlines())
:white_check_mark: Your 3.12 eval job has completed with return code 0.
['', '4 4']
ok ty its coz of the newline
oh yeah, it is
oh nice
I always wanted to join in, but didn't find the time to last year
But now you've found time to do so!
yeah
Also, is the Puzzle Input different for everyone?
yeah, everyone gets their own puzzle input (and so everyone has a different answer)
how do i search for anything with mul(xxx,xxx) using the re module?
:D
ik
thats what i need it for
my main problem is that i want to search for the ( )
I tried this: print(re.findall("mul([0-9],[0-9])", RawData))
but it only searches for one digit numbers and the ( ) seem to confuse it
add backslash)
oh
so its this easy
i read about the + but didn't know how it worked
like if it alone was enough
i also thought i did something wrong when i added the \ on my own as it didn't find anything
well do you know how it works now
thank you
(there usually are a few inputs that are manually checked, not everyone gets a unique one)
Is it possible to save the location of the m from mul(x,x) using the re module and save all the occurences of mul(x,x) in a list of dictionaries?
like [{mul(15,76), 87}, {mul(86,755), 123}, {mul(966,66), 165}, {mul(965,706), 198}]
What happened last year on day 21 👀
Match objects do store the indices where their match starts & ends in the given string
!d re.Match.start
Wasnt that the super hard gnome problem?
cmon python bot, be faster 😠
https://docs.python.org/3/library/re.html#re.Match.start
I don't know, I didn't do much of last year
lol what did you do
oh I didn't do last year at all lol
i think i broke !d (it also looks stuck in #mod-spam)
python bot is still typing..
hidden link!! >:o
mb, that link should be to the #secret-python4-beta-test channel, idk if you can see that one tho
Whoa wowsers!
That's cool actually
(if you find someone with the same input, you're immediately fated together /j)
Match.start([group])``````py
Match.end([group])```
Return the indices of the start and end of the substring matched by *group*; *group* defaults to zero (meaning the whole matched substring). Return `-1` if *group* exists but did not contribute to the match. For a match object *m*, and a group *g* that did contribute to the match, the substring matched by group *g* (equivalent to `m.group(g)`) is
```py
m.string[m.start(g):m.end(g)]
``` Note that `m.start(group)` will equal `m.end(group)` if *group* matched a null string. For example, after `m = re.search('b(c?)', 'cba')`, `m.start(0)` is 1, `m.end(0)` is 2, `m.start(1)` and `m.end(1)` are both 2, and `m.start(2)` raises an [`IndexError`](https://docs.python.org/3/library/exceptions.html#IndexError) exception.
An example that will remove *remove\_this* from email addresses:
woopwoop
it's there
the long-awaited invocation of the ancients has been dutifully answered
🤣
Where is the golden star of day 3? It should be there right?
Oh no, I just noticed, ye, there are no star :(
wdym?
you mean in the ascii diagram?
Yes.
hmm
AoC 2022 has no star too anyway
Am I crazy or was day 3 like 1000% easier than day 2
Yes. Got curious because we have stars for day 1 & 2 but not for 3. Wondering what might be the reason. Something related to this year's puzzle plot?
probably..?
yea idk, day 2 was pretty comfy
I had so much trouble with pt 2 of day 2 yesterday, this was so nice and easy!
When you say brute force do you mean just manually figuring out the answer?
no i mean the simplest way imaginable, compute all the possible arrays and check them one by one
also you should start the puzzle with looking at the input
like, with your eyes
lol
flashbacks to last year
Gotcha. I thought iwas doing that tbh. I was printing out each line along with whether my script thought it was "safe" or not but I just COULD NOT get it to reliably give me what I expected. Eventually I did by ||trying to remove each item from each list|| but it took me an embarrasingly long time
for day 2 part 2, ||brute forcing seemed immediately fine, since my input seemed to at most contain 8 numbers per line, meaning a worst-case bruteforce check was as costly as checking 8 lines, which isn't actually that much||
Day 2 Part 2 makes me think of that bell curve meme
even just the very very first check of part 1 felt like that lol
||you either handroll some code to check if the numbers are sorted, or you let xs == sorted(xs) or xs == sorted(xs)[::-1] do its thing||
I just bruteforced it
Yeah same, ||day 2 part 2 had two edge cases that weren't covered by the example||
it did?
Yes
||Today I just used regular expressions||
||the start and end having differing directions to the rest of the values||
||that's not really an edge case to part 2..?||
||this is where bruteforce comes in handy||
||yes it is, in fact the examples don't test it, I saw someone wrote their own test cases on reddit that check it||
it should be expected though
do you have an example
||48 46 47 49 51 54 56 being safe||
||my program just cycled through the values and removed each one once and then checked if the list of numbers held up to the criteria||
although ||it is an edge case.. since it's the start and end... okay i'm leaving bye||
||it's an edge case that's not covered by the examples, the examples pass without the case being covered||
||yeah that's the brute force way but I didn't want to do that||
||How did you do it?||
||there's plenty cases that aren't covered by the examples though||
||I let it skip over one value without failing, but it means you have to handle the case where the first is the only wrong direction separately||
||i think it's more of an insufficient generalization from the context and the cases that were tested :p||
||no, that's the only case that isn't covered I think||
im not sure this counts as an edge case
the example can only really give so many test cases, hell sometimes the point is that trying something on example input doesn't work on proper input (though that's usually due to complexity slowing stuff down over anything else)
||it's literally an edge, being the first, the edge of the list||
its only an edge case because of your solution lol
Now, the same rules apply as before, except if removing a single level from an unsafe report would make it safe, the report instead counts as safe.
||i'd define an edge case as one that the explanation doesn't cover, either by ambiguity or by complete miss||
||Huh? That's definitely not what an edge case is||
An edge case is a situation that occurs outside of what's normal or expected, and can be a problem or situation that falls outside of normal procedures.
reading the instructions, it's not really an edge case
||Yeah that's what an edge case is, just something that has to be handled separately from the rest of the logic||
but this is part of the logic
||no it isn't, it's a special case that has to be tested separate from other inputs, that's what an edge case is||
||I think the bruteforcing would have covered that||
this "edge case" you're on about can be handled using the same code as everything else
It depends on the solution
simply ||removing a single level|| normally for ||all of the levels|| works
you handle it separately
Yes because my solution is not the brute force one lol
it's an edge case for me but not for others
becuase of my choice of solution
how does it become an edge case anyway..?
i mean, if the simplest solution covers it i dont think you can call it an edge case
I explained that above when I explained my solution
Something can be an edge case for one solution but not for another one
||bruteforce is the way to go||
anyway, i was looking at the stats for day 2 yesterday and it was at 1/3 solves compared to day 1 💀
I wanted an O(n) solution
i'm curious as to what algorithm that becomes an edge case in
it only takes like 0.5 seconds
Scroll up, I explained it
Well just out of principle I wanted O(n)
not O(n^2)
i think i did the same thing when doing the language roulette challenge in smalltalk
i wouldn't really consider it an edge case
unless
Well I do but who even cares? Not sure why you guys are all grilling me tbh
hmm
AoC in general?
the heavy train of advancement and smooth sailing derails somewhere along day 5
idk i feel like day 15 is usually where things start to go downhill
at what time do the new "tasks" release for you?
- stickie, professional programmer and math enthusiast
tasks?
i am hardly professional
if you're talking about AoC, each day releases at the same time
arguably you're more professional than i am
in your timezone
1 pm
i guess i won't use that word
it's more like
knowledgeable in writing the code's algorithm i guess?
i just know a bit of dsa
if you know just a bit, then i know almost nothing :p
mine release at 4pm, but i'll soon be in 1pm territory
same
guys I just finished problem1 day1, considering the fact i am beginner beginner ahh I feel proud of myself 🥰
differences = 0
pos = 0
for l in left:
difference = l - right[pos]
differences += abs(difference)
pos += 1
(i felt so sigma coming up with this basic ahh logic)
For spoilers => #1047673173447020564
or #aoc-solution-hints with spoiler tags
get out of my temporal lobe house
Yoo the day 3 is pretty high jump of complexity from the day 1 and day 2 😂
Never really got into world of parsing 😂 anyone can give me some good source that is perfect for noob like me 😂
Crafting Interpreters has a good intro to making a practical parser
Well I made some interprets but it either use only one character or it has some proper syntax for each function like proper spacing or indication of end argument
I think the thing I made is called emulators.....
Wait sorry for ping idk what happened there
Me
I think it was probably easier than using regex tho
I made a general purpose parser last week, used it for this, it was great, given me some ideas for features to add.
oh nice
is it?
Yeah I think so
Yes
Pre-made because the site knows if you put in the answer for someone else’s input
yeah theres some pre-made sets
I wonder how many are there?
oh cool
huh, what does it do in that case?
It tells you
It could still be generated in that case
generated, but not on the day of the puzzle :p
It could still be
I can't find out if it is though
oh what happens if you enter the answer for someone else's input?
what does it tell you
does it tell you it's wrong or that it's someone else's answer?
that you got the answer for someone else's input
(and tells you you're wrong)
The latter
is everyone here doing aoc in python?
Not necessarily. We have a roulette where people do every day in a different language (announced by pydis staff)
Also people choose to code in other langs as well just because
We do like Python obviously, but for a lot of people AoC is a good opportunity to try other languages they've been meaning to
this cooldown sucks bruh
me
how Bharadwaj raju felt after reacting ✋ :
You can write tests against the examples which allow you to test your answers many times without manually submitting the answer. That's what I do
Most of the time if the example works, the real input will work as well in my experience
ok
so people cannot bruteforce and have no incentive to bruteforce to get into the leaderboard
-> You actually played the puzzle -> fun
-> You didn't DDoS the server -> Other have fun as well :)
I'm seeing people speculating that day 3's challenge may evolve into a full-blown parser/VM like 2019
personally I'd love that possibility
it would end my uiua streak rather early.
The similarity score on day one felt like it was going in a different direction
Maybe a parser for vector operations 🙃
intcode computers were 2019
why is aoc so difficult
Well, todays one involved regexes, but the yesterday and the day before it were easy ones
a bit of challenge is good
it shouldn't be so easy that you learn nothing :)
anyone used Koka before?
Old man mar truly 💀
I loved intcode. I wanna do it again
I did a couple basic examples a while back, could be interesting to shoehorn some effects into some of the later solutions.
VM? Any examples from previous?
2019 day 2, then every alternate day starting from day 5
There's a wide variety of languages being used, even here. If you check the spoilers channel there's been smalltalk, perl, c#, and rust solutions. (and also python)
intcode was my first year of AOC, and I still look back on it fondly.
Today's problem using regex was on the very easy side of things, some of the later aoc problems will be quite a lot harder and may involve researching things you've never heard of.
wow, today's puzzle was like wayyyy easier than yesterday's
uh
uh oh
It's only easy if ||you already know how to do regex. But eric was pretty open about his intention from Day 3 being to get people to learn regex.||
Honestly ||never really used regex nor have lots of knowledge about them, just knew it exists and a little bit of documentation reading was enough||
Yeah! It's not too bad, but for some people it can be a pretty significant hurdle. Kind of like how pointers are a significant hurdle for a lot of people learning CS.
I feel like people say we're gonna have parsers again every year every time there's a regex day
Honestly i hate regex but it was screaming at me
haha I gave my friend a crash course in regex, when you use a tool like regex101 they go from scary strings of text to something you can logically break down and understand quite easily
I should probably write a comma separated cursor then
now annotate tap 
the str.split, int pipeline can't work
it doesn't
You can get by with 15 minutes of studying ||regex|| and never need more than that, or you can spend years learning all the really in depth possibilities.
don't think you need years
not if you focus on it, but I think most people just pick up a little bit more here and there over the course of years.
discounting those truly sick people that use https://regexcrossword.com/ daily. 🙂
I really like this site for testing regexs: https://regexr.com/
oooh, what a lovely site
yeah, but im assuming pretty much everyone knows about regexr at this point
I don’t assume that at all! Lots of people have no experience with regex
personally, I prefer https://regex101.com
why would this require familiarity with that
||regex|| is overkill
for the problem
I always run in pcre2 mode since their python regex is out of date with the fancy new features ;-;
A bit of fun, I tried the hardest levels they have but it's still mostly comparing character sets
try regex golf
I wouldn't call it overkill, it's a great tool for the job. You definitely don't have to use it though
i say it's overkill bc you can literally just do one pass lol
it's nice to use here but the problem is fairly easy even without
though it'd still be fsm-like ig
a little
It's a shame the leader boards are cheated out the wazzo, but those are some very fun puzzles, thanks
You should post this here! https://discord.com/channels/267624335836053506/1312645339609694359
(And also delete the original from this channel)
So, because all of the discussion of whether to use regex or some other parser, as I was driving to work today I thought, if I hadn't had unformat() what would I have used? The obvious answer was multi_replace() so when I got home I tried it, new solution was .5k smaller, so!
watch day 4 be really ward
What's this channel for?
I'm getting something wrong for Day 2, part 2, but I don't know where to ask
I feel like #1035199133436354600 isn't the right place
Do the puzzles get harder as we go
well im screwed day 2 and day 3 were hard
GLHF!
It isn't always a perfectly straight line because difficulty is subjective
<@&518565788744024082> Good morning! Day 4 is ready to be attempted. View it online now at https://adventofcode.com/2024/day/4. Good luck!
god luck
no ||regex|| today 😔
stop trying to overthrow korea smh
mb
word search is crazy
Yall the answer should be the steps right?
it physically pained me looking at the question and knowing i cant do it because i have to learn about the quadratci formula
rip
😂
im not doing it cuz im studying for exams but my first thought it to just treat it as an array and transform it into a reverse list a vertical list and 45 degree list
and then just search as normal
chat its not that deep
go to square
is X?
check diagonals, up, down, left, right
ig yea
dang how'd you get 523022617466601111760007224100074291200000000 for pt2
Same but my thought was to first find all "XMAS" in the grid and then we shoulld check every letter and look in all 8 directions then count how many times it appears but I am not sure
thats ho i solve them irl too lol
just go to all occurences of x and check those conditions
😭
your placements are insane

i'm so lucky i had grid traversal stuff in my template 😭
mfw template? 😭 ranked aoc i never actually participate cuz its always around exams
people are on part 2?
ong bruh I didn’t even finish pt1
im still thinking of soluations
This was mine @dusk crow
is answer 18? why its say its not currect
dude you really think i typed everything in 40 seconds?
💀
No
guys what does overlapping worsds mean?
I'm thinking of turning it all into numbers and just + all of it
it never occured to me ppl would have a big ahh template lol
bruh, i just realised i'm top 50 on the global leaderboard 💀
WTH
and then if it equals a certain awnser then
But the result will be very very long
lmao
same
how am i #12 💀
i literally failed first 2 days
Yeah you can try that
what are ppl doing
i'm #46
That went badly
totally not the anon one
whatever you say RangerMcSexy
yay i solved the first one
Was it a long answer
wtf
bro doesn't know the yoon martial law lore
korean president
what is a law lore
it gave me a soluation
lmao
🥴
Your username is the name of whatever account you tie to your AoC account
The answer is 18 why is it saying incorrect?
💀
(if you want to tie a different account you can make another account with a different login method and then transfer to that)
wtf god
the only 2 options I get and the latter is my real name 😅
can i take a guess
Make another account and then
because your not using the input data it told you
oh man I missed the time, lost track of time working
that is what I got the first time. Definitely not lmao
My answer was around||the thousands|| so probably not
LOL
Ohhhh
Dat’s why
does it start with n and end with l
same
Yeah, about ||2.5k and 2k|| respectively
same
i lost like a solid 3 minutes because ||i was matching against xmas and not XMAS||
Nice one
no, but my first name does end with it weirdly

||2.6k and 1.9k|| for me
||2.4 and 1.8|| for me
||2.5 1.9|| for me
you might still be running your code on the example input? you get a custom input different to the examples shown in the problem
are yalls ||grids 140*140|| too?
yes
Okok
I got 38 no difference 😂
||XMASAMX
the S is used by both||
ye there's plenty more unfortunately
||or not been meaning to||
todays aoc is hard
hi
i have a question
do people only upload a solution to their github after the whole day is over
cuz i only did day1 problem1 and i uploaded
??
Hi can anyone help me with deepface lab please?
jfc, read channel names and channel descriptions
people do whatever they feel like 
is it just me or is today's Part 2 easier than part 1?
AoC guidelines say to upload/stream your solution only after the leaderboard is full. which, if you're not a speedcoder, it will be full by the time you finish and upload.
okay, so like i should upload it only after i do both problems right?
if you're not going to affect the leaderboard it doesn't matter what you do
or do people upload code for the first problem then another for the second problem
okay
you can do whatever you want
Doesn't matter, just upload once it won't affect the global leaderboard anymore
And don't upload your personal input with the code
okay thanks guys
wdy,?
wdym*? i dont get u
A request of the owner
ohh
you're not supposed to upload the full input file you download
If you're posting a code repository somewhere, please don't include parts of Advent of Code like the puzzle text or your inputs.
yes yes im too lazy to even do that
i must have been the only person who couldn't figure out how to search through a string in eight directions, huh? 🥲
my awk solution is pretty terrible
if you munge the input enough you only ever need to search in one direction 🙃
untrue, i'm not a speedcoder; people are just slow this year /hj
says 21/11
just woke up, let's go
where can i find python solution of someone top in the leaderboard? I'd like to comapre, why it took me ages to do the code. 😄
Not everyone shares their code
Some have their GitHub linked, so you can check it out if they have a repo - sometimes they publish after the event, so wait for 2025. And yeah, some never share their code
Not everyone may want their techniques or helper functions to be known 🤷♂️
Yeah. makes sense.
you can look at #1313732973274599464 to see solutions
That being said, some of them do post it 😛
That's not necessarily the top players of the global leaderboard
the green ones link to their github
current top is secemp9
but yeah their AOC doens't seem to be on it
but the top 100 are really good, so im sure you'll find SOMEONE
maybe even a python user
actually, probably a python user
yeah, but the first messages are most likely players from the top
here is solution for someone that ranked 5th today, but its in rust
https://github.com/50SACINMYSOCIDGAF/AdventOfCode2024/blob/master/src/solutions/s04.rs
Well until you compare someone of the solutions and the top leaderboard..
Like the post in the solutions was after 16 ish minutes
Top ones finished after 6 ish minutes
yeah today wasnt a good day apparently for python community
past days there were solutions after like 4mins but problems were easier tho
nah the people who finished early just didn't post their sols
there were a few people here who were finished way before i was
Yeah, so good luck comparing the solutions and when they actually finished to know if they're amongst the first ones
someone posting in 1 hour may have been the first one to solve, hence much faster to get the top leaderboard and look for their github
💀 ** **
I finally did it 
i hate grid problems
I think this is my least favorite part about AoC
In the real world, I'd know which output is incorrect
Negative indexing 🥴
shiit you know it's gonna be annoying when you see this
I felt the same when I saw it, but it turned out to be not so bad
wait till you hear about ```py
raise Exception from e
im getting someone elses answer with my shit code 💀
it's pretty easy actually
i actually wrote a really nice solution for part 1
i'm proud of it
but now i have to scrap all that for part 2
wait, aint no way
all i have to do is remove some code and i'll have part 2
OMG
I"M SO SKIBIDI
wait what does this do
is that not the same as raise e?
it's similar, but no not the same
similar to an extent where I've only ever seen it used once
it sets e as the cause of the new exception you raise, like, keeping context
part 2 was much easier than part 1
I had so much issue in part 1, because I wasn't able to visualize the directions properly, part 2 was fairly simpler once I did part 1.
Legit had to open up an excel sheet so my brain could understand what was what lol
True, I am bad at matrix based calculations, when I gotta calculate vertically or diagonally, my brain farts
sameee
But I really enjoyed todays
Yup ! It finally taught me, how to do grid based calculations, made a quick util for it, so I never have to do it again XD
Share in the spoilers chat! I want to see if yours is similar to mine
Sure, at work rn, will share later 🙂
welp i wasnt able to do today's aoc because no time
🤨
Ugh, one of those days misreading. I interpreted any direction to be a step in any direction and found all the 'XMAS' strings boggle style. Both harder and wrong.
def part_two() -> int:
tinkered_input = [list(x) for x in input.split('\n')]
counter = 0
for line_no, line in enumerate(tinkered_input):
for x,y in enumerate(line):
try:
available_ = ('MAS', 'SAM')
possibilites = [
tinkered_input[line_no - 1][x+1] + y + tinkered_input[line_no + 1][x-1],
tinkered_input[line_no + 1][x+1] + y + tinkered_input[line_no - 1][x-1]
]
if possibilites[0] in available_ and possibilites[1] in available_:
counter += 1
except IndexError:
...
return counter
print(part_two())
For some reason, i keep getting 3 more than the actual answer. If someone could point out where I went wrong, would really appreciate it. Thanks
https://adventofcode.com/2024/day/1 in this how to submit the answer
There is a box at the bottom of the page where you can put in your answer
You might have to log in first
I think you need to account for the possibility of matching wrap-arounds with negative indices.
No
I don't think so
Also that would give more positives and he says he has too many already
ye that was it
some_list[-1] is not an index error.
Oh right, that's the issue then
it extends the X to the last line thus prolly why i got 3 false positives
I don't know what you mean by "extends the X to the last line" but nevermind
I don't want a full solution
I just can't find the error in the provided code snippet
dude im like 4 days late
💀
wtf
thats crazy
I had that on day 2
We keep this channel strictly spoiler free. If you're looking for help, open a thread in #aoc-solution-hints
sorry
I deleted my message
Thanks, appreciate it!
but you posted some part of the solution
sorry
my solution seems to have spilled @hollow wharf
How do I prevent numpy from jumping from the left to the right side when i check for a negative value and instead just return none or something in a 2d array?
With the command print(array[-1,5]) for example
for returning None: manually check if it's within the bounds
for looping around in a 2d array: view(-1) before indexing might work
not sure if I get the second part
How would I integrate that in this function for example?:
def check_location(check_array, check_x, check_y):
try:
return check_array[check_y, check_x]
except:
return None
x_size, y_size = check_array.dimensions
if (not (0 <= check_x < x_size)) or (not (0 <= check_y < y_size)):
return None
it's working with the example but not the real input
I have 2 more sets of example data:
XMASQQSAMX
MMQQQQQQMM
AQAQQQQAQA
SQQSQQSQQS
QQQQQQQQQQ
QQQQQQQQQQ
SQQSQQSQQS
AQAQQQQAQA
MMQQQQQQMM
XMASQQSAMX
and
SAMXQQXMAS
AAQQQQQQAA
MQMQQQQMQM
XQQXQQXQQX
QQQQQQQQQQ
QQQQQQQQQQ
XQQXQQXQQX
MQMQQQQMQM
AAQQQQQQAA
SAMXQQXMAS
Both should yeild a count of 12 for part 1
It checks all edge cases at the corners
Got this on both parts
still confused about part 2
I might be misinterpreting part 2
Oh nevermind, I just had to change the -3 to -2
both output 12 but the real one won't work (too low)
can i have your real input to see if it works for me?
i mean to input it into my script
why?
Please check the channel description and don't post solutions here
Oh my bad
Can I still join the game if I hadnt done anything yet?
Of course
You can even do previous years if you want
The only thing that is impossible at this point is to be on the leaderboard of previous days
interesting
wait, you are telling me input is different for different individuals?
ikr, I thought it was the same for everyone too ("too" because I'm assuming your question is not sarcastic)
there are a handful of different inputs. It's to help prevent someone ripping the entire site off
for that reason Eric doesn't want you to upload the inputs to Github
It's official - my new hated language is Smalltalk. I am giving up on GNU Smalltalk and going to try Squeak tomorrow
:incoming_envelope: :ok_hand: applied timeout to @zenith ferry until <t:1733359041:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).
The <@&831776746206265384> have been alerted for review.
i hope today's AoC is easier than the previous one 🙏
It typically increases in difficulty every day, with the exception of weekends being slightly tougher than weekdays and the last day only having one part
in particular, it ramps up a lot in the middle of the month (~14ish)
17-23 will test your resolve
was not being sarcastic, in hindsight it makes sense so people don't cheat
Day 21 and 24 last year were just crazy lol
well, a properly programmed solution should work on any input, so i don't know how it would stop cheating 
Can I copy/redistribute part of Advent of Code? Please don't. Advent of Code is free to use, not free to copy. If you're posting a code repository somewhere, please don't include parts of Advent of Code like the puzzle text or your inputs. If you're making a website, please don't make it look like Advent of Code or name it something similar.
well oops
gotta go and scrape off my commits
i think people can just share the final answer if all inputs were same
Whats the advent of code?
unless their solution is wrong or inefficient, they can share the code and get a correct answer for any input.
but still a good idea to respect the AoC devs wishes
There is a pretty good explenation in #aoc-faq
it is a yearly event, where a new two-part programming puzzle is released every day for 25 days. good opportunity to improve problem solving skills or learn a new programming language 👍
that's acutally a good point
most people in the server, probably
can sm1 help me
so
i gt code
and i wanna turn it into a bot
can sm1 help mew that
oh sounds fun
bc its a gen
try asking in a help channel. this channel is for AoC discussion. #❓|how-to-get-help
i have
yeah, i have heard the puzzles can get difficult later on, but so far i am enjoying it quite a bit 👍
got no idea what im doing but need too keep myself busy
can sm1 help me w python code idk how to use it
good luck :-)
Wait so for the answer do I paste my code orrrr
@sullen adder look at my thing
what does day 4 mean by "or even overlapping other words."
You code up a solution and then put your answer in the little box on the bottom of the page
can some1 help me in my help ticket
can the diagonal be backwards?
Yes
oh god
its not that bad
eight directions :'-)
im doing diagonal check first
Why lol
because i hate diagonal
big spoiler:
Valid
or 1 direction with 3 rotations. 🙂
corect me if im wrong
from what im guessing finding the difference (Distance) between the two numbers in 2 lists starting from the smallest number
And it wants me to save the distance of each number apart ( 2 -> 5 = 3) and then add all the distance togther
yes.
Pair up the smallest number in the left list with the smallest number in the right list, then the second-smallest left number with the second-smallest right number, and so on.
Within each pair, figure out how far apart the two numbers are; you'll need to add up all of those distances.
ima do vertical
alr ill do this problom after I do my spring lab
im almost at 1000
no ||spoilers|| 🙂
now time for horizontal
oh sorry mb
no worries, day 1 spolers here: https://discordapp.com/channels/267624335836053506/1312645339609694359

Watching this while waiting for day5 https://www.youtube.com/watch?v=_oNOTknRTSU
Eric Wastl provides an intriguing backstage pass to the world of 'Advent of Code'. Offering a glimpse into the creation, challenges, and intricacies of this coding phenomenon, Wastl shares the stories and decisions that shape each puzzle.
For those eager to uncover more behind-the-scenes magic of coding challenges, https://www.tretton37.com/ awa...
Is it possible to get the stars after 00:00 of next day?
you can get the stars any time after the puzzle is released
Okay, thankyou
Day 4 seems disproportionately harder lol. I have a way out in mind, but I wanted to take some time to go about it
is it just me or are the first four days this year like 100x easier than last year?
this is my first year but does it feel that way for you?
last year was so difficult right out of the gate
day 5 ratcheted way up last year though… so i’m a bit concerned about tonight
maybe youve become better /j
