#advent-of-code
1 messages · Page 41 of 1
What if you copied and modified the functions and put it into a different command-thingy? Maybe that's redundant, and I personally haven't seen the codebase, so I have no idea, but that's just a possible(?) thing.
ah alright
I imagine you could probably get it to work by reading sys.argv for a --test or something but honestly I don't feel like sinking a lot of development time into a feature I'd never use
I'll happily merge a PR if you want to do it though
I think quite a few people would use it, but honestly considering the amount of architectural changes it would need, I would just leave it as is
Maybe add it as a feature in the off-season if you wanted to
I mean it's entirely open source (https://github.com/Starwort/aoc_helper) so you're welcome to hack at it until you get something that works, then submit a PR
ohh it's OSS?
Yeah lmao
I've never installed aoc-helper, only heard of it, so I wasn't sure if it was OSS or not
morning guys ☕
Sorry 'bout that
Mornin!
GM
yeah I should, especially if I'm gonna try and make a PR
I'll mess around with it for the later days of AOC this year
When you decide to use it do py -m aoc_helper template <day>
gotcha, does that jut set up a template for a file?
It'll put in all the boilerplate for you
Yeah
It sets up the imports, the fetch, the functions, and the submit
oh lol day 4 is in 30 mins
its some sort of CLI
i better eat lunch
i better breakfast
hmmmmmmm... do I be reasonable and go to bed now. Or just stay up late and regret?
i dont feel like rushing today
I meann it's a weekend, might as well stay up
actually it depends
do you want to code while you're dozing off
dewit
I have to wake up at 9 AM but 9 hours of sleep is perfectly reasonable so I'm gonna stay up
heck even 7 hours is good enough for me
Whats Advent of code?
lmao same
so I heard the weakends are a bit harder?
Yeah I heard the same
There's something so satisfying about this tbh
The last weekend is typically harder. The other weekends are more on par, if they're harder it comes down to googling and problem solving.
ah
From Eric Wastl's Leetspeak 2019 talk, he talks about what goes into making each puzzle and how he tries to get the difficulty right, both for each individual puzzle and considering the progression overall
iirc I got mentioned in that talk (nope never mind it was the other one)
"Weekdays vs weekends" 👀
👀
👀
how hard can it be /s
inb4 "count the amount of sides in a fractal" /s
🙃
During the talk he even mentions that for some of the part 1 vs part 2, his part 2 will purposely have a similar concept but then have a totally different set of requirements. To partially simulate the real world of a customer totally changing up requirements on you
that sounds kind of like day 3
He talks that some people can predict it (i.e. they can kind of see where it's going and build in flexibility to their part 1 solution, sometimes that means their part 2 takes literally less than 30 seconds) and others don't, so it takes longer for them to change their implementation
yeah I'm the second
i'm both
i'll either make something really flexible, or the most brittle solution ever to exist on my hard drive
ooh yes a little of that too
I usually can't break down backtracking problems easily and takes a lot of time for me. I wish there were some tutorials online that were interactive, because I have tried to watch some tutorials then immediately had some question but had no answer
If you want to kill some time, I do recommend watching the first 8 minutes of that talk
watch the whole talk >:)
It's very amusing listening to him recount the launch of Advent of Code back in 2015
"I'll predict that 70 people will be interested in this, my small server can handle that"
24 hours later: 9000 people have created accounts
DJ Khaled Suffering from Success
also stick around for the post aoc chat/stream after the season ends. generally a great discussion with good people.
Screencap from the slide, which is 48 hours after the first puzzle releases in 2015
this person on the private leaderboard i have at school keeps staying up late to solve the problems, so hopefully today i can finish before him
and apparently f1re and nedbat are both beating me by 1 point
ha, they are. That's amusing
OHH now I remember watching that talk yeah
finish in 2 minutes to show complete dominance
👀
i think i saw it last year while waiting for a challenge lol
Discrete is UP THERE on the staff lb though
true, lx too
cries in 11th
Also CR being staff this year @_@, competition is fierce
good morning people
pathfinding or conway's game of life 👀 for today
alright, both my cats and my fiance are alseep. I should probably go sleep too since I have like 12 hours of research work to do tomorrow
good luck y'all!
if it's either I'm giving up till morning lol
Wait 20 mins so you can finish aoc first
For those who are very fast and within range of leaderboard placement, please refrain from posting solutions until global fills~
ty i need it ! hopefully todays gonna be managable
Day 4 starts in 9 minnutes
i think the ultimate flex would be posting in #advent-of-code-spoilers-archive 2 mins after and asking for improvements on a sol
it's only 9 minutes until next day now
if we can post solution before global fills, we are global xD
good luck everyone
gl everyone!
Also, somewhat Soon ™️ we'll have an .aoc link feature, where you can associate your Advent of Code name with your discord ID. This will soon mean .aoc lb will automatically include your specific placement
Once we have the link feature I can officially announce the Advent of Code Finisher role
and when is the soon™️ emoji coming
soon
is there news on what color the role will be 👀
™️
(TM)
well played
what color would you like it to be?
Pink!
fuchsia
ewwwwwwwww
.color name Fuschia
No colour found for: Fuschia
.color name Fuchsia
haha, send me some hex codes and we'll see
this is the partner color i think
This role will also have a role icon! So I need suggestions on that too
that's not fuchsia lol
is finisher all 50 stars or 25 stars?
we should use the jam champion color
.color #ffd1dc
when do you get this role? when aoc is done 
Get every star by January
no we can't crowd the champion color
so all 50 stars, then
feels like there should be something for 25, since getting all 50 is hard
We'll query in January and probably set up a daily task in January to check for people who finished in January
heh
advent of code in 5 minutes but i cant do it because essay :((
Then is it going to stay?
getting all 50 is indeed difficult, hopefully a role icon is good motivation~
That'll be some motivation tbh
do essay instead of chat, then do AoC
\😩 it's almost that time of day again
It'll stay at least until the end of January, maybe into February
getting 49 is difficult. the 50th is ez 👀
LOL true
do you guys think todays gonna be harder than yesterday?
complete every day except d2p2
let it stay until next year
i waste all of my time
20-25th days would have the epic ones
quick attempt:
yeah, weekends are harder
50th star is just for getting 49 stars though
So continue procrastinating the essay and do day 4 in 5 minutes
should I post this in dev-branding as a suggestion?
bah... guess my saturday is gonna be a rough one 😉
cant im not skilled enough also 1 more body paragraph and conclusion paragraph to go
and its due in 9 hrssss
AoC <t:1638594000:R> 
wait till next saturday :P
less go
Bad attempt at a joke, since I consider d2p2 to be one of the easiest stars to get and it would be amusing to be 1 shy of 50 stars because of the easiest star to miss
GLHF
So close discord until the essay is done.
Gird your loins.
then AoC after
Literally can't get 49 unless you're missing 25-2 though lol
Starting <t:1638594000:R>!
lol
shhhh, let me have my bad joke that doesn't actually work
does anyone know how to fix an extra blank line being written while writing text in a file at the end
shh pretend i didnt mess up
.aoc c
Day 4 starts <t:1638594000:R>.
just make it 48 then it works
another day, another chall
soon 👀
2 mins
GLHF everyone
my inner feelings are telling me to not read the story just head straight to the sample input
same
:awkward_child:
PSA: everyone read this please 
yeah, I'll probably lose track of it in this channel
got a tab open just for the day4 input
this
the creator of aoc himself suggested this in that talk
not reading the story just feels incomplete
I tend to read the story after day 25
thanks for reminding
< 1 min
just skip to the numbers are start reading from there
that's what you have to do if you want to place, but if you just want to enjoy it and have fun take your time reading it!
read story after you solve the problem
cya guys in 10 hours or something
hf
okay 30 secs
.aoc c
Day 4 starts <t:1638594000:R>.
gl everyone, something tells me i wont be beating my global 13 today
good luck!
Refreshing is fun
15
focus up
good luck everyone
the changing ASCII art
LESSGO GUYSYSYYS
gl everyone
hi lance, tell us something we already know! 😛 /s
gl
<@&518565788744024082> Good morning! Day 4 is ready to be attempted. View it online now at https://adventofcode.com/2021/day/4. Good luck!
mmmmm, sweet sweet silence
someone said that should post a few minutes early
That is some ugly input
ehh nope i'll try this tomorrow, this is too complicated for my tired mind
good luck with bingo yall!
i just got homeee
too bad i cant do this
same
that aged quick
ok im def losing
day 4 question is released
Day 4: Giant Squid
what?
man..
I am appalled by how quickly people finish these things
oof
wtf is part 1
oh no i forgot abt this whole thing
i agree
make an issue on lance's repo 😛
Damn ppl are fast for this
two days in a row I got ~350th on part 1 but snuck in top 300 for part 2
head to the spoilers channel if you want some help
I think I hate this ._.
;-;
done 😌
I hate this >:(
I literally spent 20 minutes debugging because I'm a dumbass who made a trivial mistake
day 4 time >:3
can anyone give me input plspls
don't worry you got this coz you are a pro
nice i gained a rank on python leaderboard even with my slowish performance today 🙂
https://paste.pythondiscord.com/jinuxazupa.yaml 14093/17388
4, 4-5-6666
how do you make the grids into an array of numbers
List-comps and the int constructor
Finally beat prt 1 holy crap
omg this is so dumb
I was a dumbass and wasted 15 minutes on part 2
Bingo
stupid bingo
it's squid game
who on Earth invented this stupid game
the squid game is bingo
Playing bingo against a giant squid
ah
a squid plays bingo
sounds stupid
lol
I literally hate this so much
I hate working with this stuff
what
that was the big relief
idk how to match diagonals
this is so frustrating 
what are these numbers
Diagonals aren't too bad
read the question first
yeah i did the diagonals and then spent 20 minutes figuring out why my solution didn't work on part 2
what
it worked on part 1 by accident
yeah I did it once, but don't like it
just zip the board and do the same thing
just got 2576 on the sample input instead of 1924 on part 2
I... can't
I think they mean that part 1 didn't win with a diagonal
Lmao
I'm here for a while
eeeee
idk what to do next
i cant solve these now
i got the first 2 days
and the first part of day 3
now i cant do it
how should i improve my problem solving skills to be able to do this
yess got it to work
:3
i have all the boards split now
now i have to define the win condition and figure out which one wins first
I don't understand how y'all do this
practice, also it's gonna take me a heccin while to finish
I spent way too much time on part 1
I literally have like no way to really do part 1 except the really long way
i have a 3d array for this
and I refuse to do that
the short way is numpy
^^
show in spoilers channel?
I only have "nimpy" -_-
sure
my code is so ugly
thanks
or zip too 👀
luxuries of a Python programmer -_-
yeah so many build-in stuff
er-
my code looks kinda sus-
boards = [{"Board": x, "Marks": starting_marks} for x in boards]
:3
same
i hate aoc damn 😂
my board-getting mechanism is literally a 300 char long list comprehension
you don't need that many-
||boards = [x.strip() for x in data[1:] if x.strip()]||
that's what i have
¯_(ツ)_/¯
what is strip
string-formatting
f-strings
is this a gem i missed
bruh
!d str.strip
str.strip([chars])```
Return a copy of the string with the leading and trailing characters removed. The *chars* argument is a string specifying the set of characters to be removed. If omitted or `None`, the *chars* argument defaults to removing whitespace. The *chars* argument is not a prefix or suffix; rather, all combinations of its values are stripped:
```py
>>> ' spacious '.strip()
'spacious'
>>> 'www.example.com'.strip('cmowz.')
'example'
``` The outermost leading and trailing *chars* argument values are stripped from the string. Characters are removed from the leading end until reaching a string character that is not contained in the set of characters in *chars*. A similar action takes place on the trailing end. For example:
bye
lol-
it's kinda difficult
im dealing with it rn
another way of saying, "you'll win if your code is good"
literally woke up at 6 am just to fail
If you want some real data to test with this is my input and answers
My solution for part 2 is || removing the boards returned by part1 iteratively until only one board is left || but it's not working for some reason
Make sure you don't forget to check boards after the first not-winner, I didn't 🙃
despite this i still moved up in rank, tf
hey this one actually wasnt as stupid difficult as i thought
i blocked myself by initially setting all of the called numbers to 0 on my bingo cards
not realizing that the cards can have values of 0 in them
||what if there's grids that never get bingos? so multiple will always be left||
it's giving an answer though

That's not possible
why not?
WTF diagonals don't count
nah
Because it would make the challenge as posed literally impossible
nah just a simple check
oof I just realized ||rank == len(boards)|| run into the same problem.
bruh accounting for diagonals gave me the wrong answer
I mean it literally contradicts the question text but ok all right technically it doesn't state that but ||you can't put numbers on a card if they aren't in the selection||
ok i found the mistake
I assumed p2 was for ||the longest lasting board of the boards that eventually get a bingo|| but maybe they all do eventually, I didn't check 
literally typed if_all_trues instead of is_all_trues
If you think about it they have to since ||you pull every number, eventually you'll completely finish every board||
What if a board has numbers that are never called?
or did they mention that can't happen 
I read the problem text as 'all numbers are permuted to form a draw order, and 25 of them are picked at random for each board'
How is the leaderboard score calculated? nvm
Rust is rusty
the numbers at the top are all numbers 0-99 in random order, so it should have every number
finally
nice!
im stuck but i dont wanna look at the spoilers channel :/
try doing some debugging, even if that means just throwing in random print statements, usually gets things flowing again
if you've learned about typehinting, I recommend using it for these, it helps to keep track of which variable has what type
its the logic that im having issues with 😮
i got every row in its own list inside a list now, but i think i need to make 5 and 5 of those rows into separate lists. so they become individual boards.
what is this pattern
helloooo, im doing the problem too and I'm having problems debugging, does anybody know which board is supposed to win so I can keep an eye on that one?
everyone has different inputs so we can't be sure
i fucking love it lmao
or the inputs are probably different at least
someday we should all test
time to go bang my head against a wall, it works on my example but not my actual dataset lol
I don't think i understand part 2. ||why exactly did he choose 13 and stop? logically "figure out which board will win last" should mean the last drawn number, right?||
it's getting harder with each day 😩
the top of the water
there may be a squid eventually
i haven't gotten to part 2 yet but is it even a guarantee all boards win?
could be a submarine with fishes around in
cool
they basically come from a pool of inputs/solutions
yes
whoever made these questions spend a lot of time in them
yep, about 4-5 months total each year
hard work
the marine floor
wow my solution for day 4 is EVEN jankier than yesterday XD
day 4 is literally squid game
wtf
lol
||not necessarily the last number in the list, but yes, the last number that produces a bingo||
||1 produces a bingo as well though 🤔 ||
kek
Brb gonna rename all my variables
My list of numbers to draw will be frontman
this is how far i've gotten. i got every row in the inputfile into seperate lists inside a list. im stuck now ;O
small visualization helper, do ```py
from pprint import pprint
...
pprint(grid)```
ty
i can tell you that as somebody who isn't great at programming
this shit is better than sex ^^^
nice, my code is very ugly but worked
i think it has to be like some of the ugliest of the functioning solutions. i feel like it should go into some type of modern art exhibit
wait shan't that be day 6
🤨
yeah, its nice to have something to look forward to everyday
more like 87 lines of working code
and discussing the same question
yeah i feel like this is way better than all the other websites that just give you random puzzles to learn, here it kinda forces you to pace yourself and gives you much more interesting prompts than just "something mathematical, go do"
The fun of AoC is solving the problems, and all the fancy vis people come up with anyways
Having terrible code is part of the game™️
totally
plus having terrible time complexity 🥴
Terrible code Verbose code
Hey, as long as you can submit your solution in december, it's all fine
TOOK COMPLETE 1 SECOND FOR VSCODE TO display the INTEGER lmfao while execution
but it did, right
yeah , jk
also i have a question:
let's say i have a variable x and a variable y where both are lists equal to each other through
x = y
If i run the below code, does it also get rid of the same index on x?
y.pop(some index)
because for some reason i was having one variable that was never even touched being changed
lists are mutable
in 2019 some of my programs were running for like 8 min because they were so inefficient
so yes it will get popped from both
The nice thing about python is you can just check things like those yourself pretty easily
!e
x = y = [1,2,3]
x.pop(1)
print(x,y)
@woven oriole :white_check_mark: Your eval job has completed with return code 0.
[1, 3] [1, 3]
don't mind me, just relaxed after clearing some bugs
!e
x = [1,2,3]
y = x.copy()
x.pop(1)
print(x,y)
@woven oriole :white_check_mark: Your eval job has completed with return code 0.
[1, 3] [1, 2, 3]
@onyx plank
why does it do that tho? ix x becoming some pointer towards y rather than inheriting the values themselves?
fuck
okay is there any way to specify that i wouldn't want to let it reference and have it actually copy the variables into a new place?
copy and deepcopy should be fine
but i think copy is enough
that was tripping me up when i was doing part 2 bc usually i just copy paste everything so i can isolate my code for both parts a bit
yeah that happens
!e ```py
couples = [[0,0]] * 5
couples[1].append(7)
print(couples)
finally done. part 2 was actually quite easy
@quaint hare :white_check_mark: Your eval job has completed with return code 0.
[[0, 0, 7], [0, 0, 7], [0, 0, 7], [0, 0, 7], [0, 0, 7]]
this shit lost me a whole hour yesterday
Damn today nearly killed me
yeah, just changed 2 lines from part 1 lol
me too
i am crying thinking about day 25 💀
im just hoping to get to day 15 lmao
I'm a bit annoyed cause I spent so much time debugging only to find out that I used the wrong function argument
frick i went down to 64
😮 now let the fun begin wooho (hopefully this is manageable with this datastructure)
The puzzles don't necessarily get progressively harder. The difficulty varies throughout. Today was probably not the hardest, but many future ones will probably not be as hard.
yeah it's written that
Even if it's hard one day, the next day might be easier, so don't give up!
.
help
my name is not in the board
How come I am 11 on the aoc leaderboard, but here I am 71st
if you just summited a answer, it isn't updated yet
it is updated with my latest submission
morning 😄
hi
my part 2 is successful with the test data but fails with the real data
we have multiple leaderboards that are joined together
thats bad
there is a limit on how many can be in one aoc leaderboard
what are these leaderboards?
why am I not in the leader board
you have not joined
I completed 3 parts
there is a join command there
oh yeah I see
wow doing today's was brutal for me
funnily enough, I thought that checking if a board had won would be hard
that was a piece of cake
but actually running the games was death
checking if a board had won is a oneliner
yeah it worked out prettier than I expected
well mine is 3 lines but it's just like that for semantic clarity
good luck 🙂
it's not too bad
what if I told you that parsing the input is the easy part
the fall of day 4
lmao
well yeah
it'll be up to around 60 000 by this time tomorrow, I suspect
or not
maybe this is indeed the big first wall in this year
last year it dropped heavily on day 7 and 4 at first
iirc
👀
I mean
this is not a hard problem
it's an annoying problem
but it's not technically hard
yeah they are all do what i say problems so far
thats what these problems are
noooooooo later problems often require cleverness
no but like for example day 10 last year you would have to optimise or it would take forever
hmm
i used a queue
to emulate
recursiom
yeah. here if you just read the instructions and implement the naïve solution, it works
in y2020 d23 p2 (iirc) you had to get a bit clever to reduce time complexity a lot
yeah you just have to translate between english and code
why not just memoize lol
or not if you used arrays from the get go
but later you have to be clever
hashmaps go brrrrrrr
brrrrrrrrrrrrrrrrrrrrrrrrrr
At minimum yes, but part of what makes it fun is everyone discussing their solutions and trying be creative about them
idk how hashing actually works in the language that I'm doing AoC in
use google
oh for sure, I just mean that they can all be solved without any clever hacks
yeah there are lots of nicer solutions etc but a working one for these will just be the naive solution
I am trying to do that but idk what in the hell a state monad is
I think at some stage into the event they become too frustrating to just 100% brute force
oh cmon boards is a 3D
It doesn't have to be super smart though yeah
it's definitely easy to write a solution that will terminate in several lifespans of the universe too
well some of them require optimisations to get the right time complexity
but mostly if you are the right time complexity it should work
well anyway done solving today's problem time to go do drugs yeet
Don't listen to him kids
last year was kind of a moderate challenge
but now even day4 is competence simulator
last year's day 4 was just parsing hell lol
Yeah the difficulty rose more sharply this year I think
iirc it wasn't really even a hard problem, just the parsing was a nightmare
But we'll see
either the creator got smart or the quarantine changed everyone
ahahaha
as someone who does a fair share of teaching, it can be very difficult for someone with a lot of experience to gauge how hard a problem is
bingo? more like bingo for your brain
i don't think we can really extrapolate a trend yet we'll have to see how it goes
urgh my code for today is like 100 lines
actually it's only 51LOC
the rest is comments and whitespace
so that's not too bad
actually that's similar to my solution for yesterday's
note that this is a weekend problem and they tend to be more difficult
^
😮
ahhhhh I'd forgotten about tha
oh I wonder how long it took robert...
wow Robert did it in 5:30
can't believe how good that guy is lol
havent sen the problem yet
great teacher too
they are all 2-part
there probably aren't, but it's not stated in the problem that there aren't so it's hard to make guarantees
ty
Today was quite nice
there's always a 2 part, 2 * per day
no, no duplicates actually I take it back, I didn't have any duplicates, but that does not mean it's not possible
also in this version, no diagonals
is it possible to change my change my name to something else outside the anonymous user name and my google name
woohooo
i take every small victory, a little break before i open part 2 now 😄
:DDDDDDDDDDDDDDD
Congrats!
nice 😄
now im stuck at part 2, but im trying to figure it out 😄
this time with a timer so i can take a 5min break every 30min and stretch thisbody
was also stuck on part two, i had an off by one error, thought i removed the winning board, but removed the winning board +1 isntead
could i ask a question about part 2 here? just the logic. i dont wanna open the spoilers channel before im done
so instead of ||removing the board|| i just set it to ||None'|| and it worked out well
thats what im trying to do
ask and include spoilers for anything that is spoilery
Honestly today part 2 was just a little modification for me
I thought its gonna be a project after part 1, but it was alright
@winged trellis could I ask to see your code 😄
my time complexity for this is wayyyyy up tho haha 😅
i have two versions, its on my github, its just to long to paste
thank you thank you
Do you have a 2nd github or something or its private? i dont see anything
203!
ah duhh
the list version is my rewrite
day4.py is like reading a different language to me lol
the use of ||dataclasses|| was never really needed
but i imagined a harder part2 and felt having the details || in a class|| would help me out
202!
numbers: ClassVar[list] = []
board: list[list[Number]] = field(default_factory=list)
no clue what is going on here haha
yea ill check out your rewrite
early future proofing while solving part1
weekend puzzles are more challenging then weekdays, so i expected it to be much harder
Yea I just dont understand the syntax for the first line and never saw field
what is the first line tho
actually 2nd line too
the name and :
its the syntax you use when you make a || class attribute using dataclassess||
start by going to the python docs about the topic
its a rather new feature of python, only been around a few years
start = perf_counter() is this to test run time?
yes
end - start gives you the correct time
what did you get?
first version 0.13, list version 0.02
.02
thats a 
mine is .13 too but I wouldnt know how improve it too much by myself
thats a neat code
no real need to optimize something that takes a fraction of a second to run 😄
we are really just running it once to get the answer
numbers, *boards = f.read().split('\n\n') what happens here?
how come you have 2 variables on the left? not sure if calling it a tuple in this context is right
if it works, dont touch it 😆
a, b, c = [1, 2, 3]
oh he touched it and did magic tho haha
this will unpack the three values on the right into the three names on the left
but if you dont know how many values you have on the right, you can pack the rest into a name by adding a star
first, *the_rest = [1, 2, 3, 4, 5, 6]
ah
first will have the value 1 and the_rest will be the list [2, 3, 4, 5, 6]
I did not know the unpacking thing here
so what im doing is getting the first line of the file and the rest
this is some big brain splitting
Every time I think im decent, u guys pull tricks out of your ass that I never saw before. Its great
python has a lot of tricks, its wise to pay attention during AoC to grab a few tricks 😄
gonna take a lot at dataclasses and itertools chain now I guess
yeah seriously theres so much crasy stuff ppl do for this
Its why im here! Thank you for the help and insights, def gonna take another look once im not as tired haha
my pleasure
omg... the record for day four is less than 5 minutes. That's embarassing
holy
you don't submit the code, only the result. But yes, you can re-submit
There's a submit button near the empty space. That's why I asked, but thanks!
yes, after you hit that it will tell you if you were right or wrong, but you can try again
I see. Why is it so small, anyway? All code goes in one line and looks uncomfortable
not code, only the result
Most of the time you will be asked to find/calculate a number.
That number goes into the submit form
Oh, thanks for the clarification. I had believed that we need to enter the code, but that's fine.
I FINISHED PART2 DAY4 2021
part1 was kind of easy but part2 made me think of my life decisions regarding ||returning a int instead of a list||
It took me forever for part one, but luckily it included the result for part 2 as well 🙂
That feeling 😄
yeah it looks like everyday I learn something new 😄
my back kracked after i did some stuff after winning the second star
it's a crack of relief
hey, is this the right place to ask for help in solving advent of code?
or are you just discussing it here
yes and no, for spoilers go to #advent-of-code-spoilers-archive
WOOOOOOOOOO YEAHHH BABYY
can i play day 4 if i don't finish day 3
yup, though going in order is recommended as they generally increase in difficulty
PART ONE DONEEEEEEEEEEEE WOOOOOOOO
yay
100+?
102 ;O
and I though my code is big
i got a lot of teststuff init tho
how did everyone find part two of day 3 ?
take you much time ? I got part one , part two seems you need put more time into it or is it fine ?
...false
weekends are usually harder than non-weekends
part two is actually harder
oh yeah I know , but how hard did you find it ?
I did say generally 🙂
my code were doubled
I forget the question , but do you need get the most common and least common for it ?
yea
https://adventofcode.com/2021/leaderboard/private/view/512551 shows my name, but bot command says my name isn't in the list and I don't have the role alsoo.. ?
so you can iterate through gamma and epsilon values I guess
there is no gamma and epsilon anymore in the part 2
but you could use it from part one ? maybe we should discuss this spoilers or can we discuss it here ?
you could but they're not g & e anymore
they're ocr and csr
alright i have a bad joke
||advent of code||
it's bad
i have a worse joke:
|| aedvent of code ||
how is that a joke
||read the bold text||
:lemon_sus:
ah... that is what I did
man this is doin my head in
I have what feels like the right answer but apparently not and i cant figure out why
the example from the website
yh yh
i did and as far as i can tell im fine, imma go through it one more time....
oh im so done
In day 4 (part 1) if I had drawn 6 numbers and there is no winner, then I draw 7 numbers and so on or it needs to end at 6?
keep drawing until u get ur first winner
so every time I got i=i+1?
basically, for every number u draw, u check if a winner exist at that number
Ok but instruction says first time you take 5 numbers, then 6
it is just trying to demonstrate to u how bingo works
so you just do 1, 2, 3, 4 and so on?
just cross out numbers on each board successively
I FINISHED PART TWO YAYYYYYY
bro how do aoc puzzles escalate so quickly lmao
sigh, if only I knew how to manipulate matrices and use numpy... guess I'm going the primitive route
same
After having to downgrade from 3.10 to 3.9, because pytest + PyCharm was giving me Windows memory errors during debugging, I finally have done Day 4
.aoc countdown help
Day 5 starts <t:1638680400:R>.
Do someone know what they mean by last win?
because when I just add all "wins" to list and print last entry it doesnt give right answer
Do you want to share code? Maybe worth talking in the spoilers channel
I already did so
Star wars reference? I must have missed it
Let the wookie win
Hover over the text where it says to let the giant squid win
There's some hover text there that confirms it
ah that's cool
Mhmm - got it instantly lol
||there's lots of references in AoC, you should try to find em||
In addition to this ||if you get all 50 stars it highlights where all the secret references were||
Though you can just ||look at the HTML|| if you want to bypass that lol
lol
In the 2nd part of Day 4.
||It is written that the 2nd board will win at last, and the total of unmarked numbers is 148.
But how it is 148 ?
as it wins when 13 number called.
So, numbers which are unmarked are:
6,15,25,12,22,18,20,8,19,3,26,1, and it's sum is 175 .
But it is written 148 there, how ?||
you should move this to the spoilers channel
oh ok
||you just assumed it has all numbers, it doesn;t have 1 or 26||
Hmm, got it thanks
the worst ive seen is 100+ lines
i wouldn't say that's bad, sometimes it's better to have longer code so its more legible
yeah, thats been what ive been tryng to do
mind you that an answer to this day is perfectly legible with 30 lines, and 100 lines is ridiculous for one single part lol
(if we count reading/printing/imports that's 45 tho, in my personal case)
I haven't had time nor motivation to check the current task yet. From the messages above it seems it's easy to overthink it?
oh in that case im doing well
and yeah it seems like it
im gonna catch up on the stuff i havent finsihed today lol i had so much hw
i abandoned almost all of my code and FUCK
omg i just realised how mcuh ive complicated things
?
||i converted everything into a list, and then all of that into ints, when really i could've just replaced parts of it as a string||
is it really gonna be better like that?
||yes||
yeah pretty much. If you use numpy it helps a lot too
Whew....just finished day 3 part 2 lol. I think I'm already lagging behind
for day 4 part 1 are we meant to assume that numbers are being drawn 5 at a time?
or one at a time
one at a time
ok thanks
Just to clarify, you draw numbers from the first line in the input. The rows of 5 are your boards
this AoC has taught me one thing: learn numpy
ok
i'lll probably learn it after AoC is over
numpy is magic
bc the problem description does them 5 at a time so i thought we had to do the same
it really is
I saw people complete it in so little lines
It doesn't though. Where did you see it?
Ah no, they're just fast forwarding to this position
ok that makes sense
numpy's slicing is one of the best things introduced to Python by a third party library, although I understand that it might not fit in the general case, as numpy arrays have specific shapes
maybe we could have some live workshop with numpy on this discord after AoC ? :))))
I'm considering it honestly, I doubt I'll have the time though 😅
sometimes the thought is all that matters
I started using numpy only like 2 weeks ago. Seeing some examples and looking for '[numy function here] example stackoverflow' or '[what you want to do with array] numy' and then going to stackoverflow helps a lot
and seeing other people's solutions helps you get to know about new functions you can use
documentation moment
So for the inputs of aoc puzzles, how do i store hundreds of them in a list?
docs are a bit hard 😭 but yeah it always helps trying to read them
devdocs has numpy :o
yup! thanks for the advice. i'll keep my eyes open 🙂
is it?
:o I didn't see those. I just jumped straight to [function I needed] doc page
documentation isnt just documentation of the code
good documentation will generally have a nice quickstart through which you can get the feel of the library, and from there you can branch out
i wish the idea of hoogle was more extended (function lookup based on function signature)
ive been trying on and off for like an hour
that's good
How long did day 4 part 1 take for y'all?
2-3 hrs
damn
and now stuck in part 2
i'm going to start 4.1 now
don't know how to do it
d4p1 is much harder than the last ones lmao
i am happy that i restarted it 5 minutes ago
ive managed to set up everything in 3 lines, before it took me 8
and it was insanely slow
I wonder how hard day 25 problem will be 
im also going to make use of this ||https://stackoverflow.com/questions/4455076/how-to-access-the-ith-column-of-a-numpy-multidimensional-array||
easy
all day 25s are easy cause its christmas
just a lil dessert for the finish line
i could maybe help
wait for day 4 part 1 do we assume that no number appears on the board twice
I'd think so
Yes
oh thank god
have you played other years
lol
2020 was simple, 2019 was literally a videogame that was already made for you in intcode
you just had to play it
when even parsing the input becomes a pain in the ass, you know shit's 'bout to get fun
don't-know-how-to-use-numpy moment
2017's was a turing machine and very reminiscent in difficulty to the first 5 days
😔 numpy laughing at me rn when i ignored it at the start thinking its a basic lib
lmao
do everyone have the same input?
yep
no
you dont need numpy to parse this...
input is different
numpy does parse it fast
it is made simpler with numpy but its not that bad in vanilla import-less python
i know, but without numpy it's a fat, ugly nested list comp
pog that's good
wait
input different means answer different 👀
aoc 4?
2021.4.1, yeah
of course
correct
AMAZING
help
lmao why do you need that for aoc
didn't think that the website will have to handle different outputs as answer from like thousands of people
ig the website has a way of generating the answer
correct
wonder if it's server side or client side
they have randomized input + decides the output using their predefined code , i sus
hopefully server side
there's a set number of unique inputs --- say, 100 and you'll get one of those
I'm making a file encryption tool, but I had this problem
ok but thats not aoc-related
i think you should ignore it
as long as it works
it works
because part of cryptography is written in rust
no
and i think that may make stuff like mypy and pylance freak out
y2015d04
seems like santa predicted the future of mining
. .venv/bin/activate && pip install cryptography && deactivate
crypto everywhere
AdventCoins to the moon
but yeah
2015''s puzzles really do feel different to the latter years tbh
or just pip install cryptography
python.exe -m pip?
this ?
whatever you're using to run python
i dont use windows this is weird
Try py -m pip install cryptography
is a matrix search O(n^2) only? how can you make it more efficient?
perhaps sorting the matrix and binary searching (how would that even work lmao)?
i used numpy.where lol. speed doesnt matter in this context doe
although my code took 9 seconds