#advent-of-code
1 messages Β· Page 38 of 1
your pride
I'm just glad I got my 2 stars, I have a feeling my effort will drop off as this goes on
like day 4 yea; as the mathiness ramps up quick
Day 1 visual, ocean floor is generated from input.
that's so cool
reminds me of RPGs of some sort
this was a fun one to make
Damn, you never cease to impress! I was curious if the sweep was from a stationary sub or if it was moving along
i need some christmas lights for the sub though π¦
Well that was fast
i always underestimate your skills. This is just beyond me
.color hex 547603986
Your input was invalid: Cannot convert #547603986 to a recognizable Hex format. Hex values must be hexadecimal and take the form #RRGGBB or #RGB.
Usage:```
.colour hex <hex_code>
!e print(hex(412547603986)[2:])
@minor cave :white_check_mark: Your eval job has completed with return code 0.
600dc0de12
bood coder?
I should probably come up with a new nickname for this year
ha, good coder. cute.
... You know there's a B in hex right?
i know, i see it, you bood boi
Hahaha, nice
i just occurred to me that my parallax widget supports vertical offsets
hes up again doing his renderized solutions lol
So when do we get aoc: the game @mossy basin
thats 2019
True
that's true
Btw does anyone know confusedreptile's time zone?
hey salt, how long did it take you to get this skilled at making graphics in a terminal, starting from scratch?
since pretty much anyone is just amazed by your skills
like utc+5 or something
this is just another reason for me to learn your library
i dunno, like two years i guess
damn, that's amazing
i've been doing python for like...3 years i guess?
and even then i'm still amazed by this
Hm ok, thanks I asked about adding their smart iterator to aoc_helper like 5 hours ago but they're offline lol
Goddamnit salt stop being cool
or never stop being cool π
Your pfp is cursed btw
and not mine? π
well, mine is just myself π
Nah, yours is great and hasn't changed for a while lol
add a christmas hat and then maybe
yes, thats true, kat made it for me i think.. let me see if i still have it
I clearly leveraged some super skills for my santa hat
Yes it is
Literally perfection
haha that's top notch
how the heck did you do that up there
you mean salt's graphical representation?
yep
salt is godlike and made his own library for these things
as far as i'm aware, helper is mostly based of python skills and ability to teach others. The next step up is moderator which means you also need to be fit for moderator duties
the roles are not directly tied to your level of proficiency (though there is a minimum skill level we'd expect, but even then it is not the only factor)
-1 on salt mod
and between just helping others and actually moderating is quite a difference for people unexperienced
@salt-die for Terminal Graphics Lead
being a moderator sometimes is more than just swinging a hammer around, ye'know?
β
I'd say the most important criteria are culture fit and how dedicated you are to contributing to the community, either through helping, contributing to our code repos, events organization, creating art or other assets, etc.
(you mean that mostly for Helper, not Moderator/Admin, right?)
oh i'm fully aware of that, but i'm sure many haven't paid attention much to how it works and don't know
idk, but anyway that is all it takes lol
mods are chosen from the helpers right? so i assume all helper criteria are met for mods
Yes, although mod and admin are basically just different ways of contributing to the quality of the community.
Does anyone have a good system to organize all of this aoc code? You guys putting part 1 and part 2 into functions?
i put it on github. I made 1 big repo for AOC in general, then a folder per year and then inside those a folder per day
and inside those the code and input files
i do something similarish
2021/
- day_01/
- input.txt
- solution.py
- day_02/
- ...
Gotcha. Yes that's probably a good idea
except i don't have folders for days
what's your strat?
all my inputs are in a single json
I usually create a new repo for each year/language combination.
it's my first year so eh
And a separate directory per day
That's waht I did for my rust template, single json file containing the inputs
on par with my reading comprehension this morning, I thought this said "I made a separate repo per day"
i should probably make a github repo for my solutions
Exactly, that's how much I golf my solutions, I need a full repo at least, otherwise it becomes unmanageable.
i having different branches for different languages (rs/py) rn
hah i cannot imagine the mess that would be if you followed from the first year
will probably shift to a separate repo
ive got a directory whose directories have the form [year]/[day]/. i do AoC in several languages, but all of them follow the same pattern when it comes to code - there's 2 functions for the algorithms that solve each part and a 3rd one for creating a data structure convenient for solving the problem (if such data structure is even needed)
i like to solve puzzles this way
do you keep the inputs for each day?
cache'd, yea
How can I play it?
Am I supposed to do it on the Webpage or Github?
in the webpage you jsut post the solution for the puzzles
Is the input for both parts the same?
you can get the answers to the puzzles however you want
yea
you join AOC by going to the webpage, reading the question, and giving the answer. This often involves writing a short program to solve it for you
is it still going ?
today is day 1
it ends on christmas (day 25)
although you are free to do the questions any day
you can still look back at 2015 if yo uwant
Is it possible that someone does not write the program, but solves the question manally?
where are qus ? i am new to this
oh yeah, it's been done in the past
you can, but most will include a very large dataset and you'll probs be busy for hours
but some questions can be more easily solved by hand
Hmmm... I see.
today's dataset is 2000 numbers
I don't mean to do them manually, was just asking.
keep in mind, everyone has a different dataset to stop cheaters
But- the same code will work.
anyone wanna review my code for day1? I did it in a hurry this morning before running to work π
yes, unless you hard coded the dataset in your code
possible or practical?
try sharing it in #advent-of-code-spoilers-archive
And why are different shapes made each year?
In 2015 it was a Christmas tree.
This year it is a ||I can't tell. Sorry||
lore reasons
the puzzles do be havin lore
2016 had a business building since thats where the puzzles took place
2019 had a solar system cause we were literally navigating in space
Can I tell what's it for 2021?
2017 was like a circuit board or something
Do the problems get harder each day?
Yea... I suppose
afaik yes
Guys can You help?
yeah they get a lot harder
Oop
i guess you can look at previous years to see how it changes
Perhaps
oof
last year it was like a map
What are we creating in this?
Can we Share self created modules
Or anything else
you're just challenging yourself
you are trying to answer small questions
and maybe you'll even learn something new
Okay
your approach may be in any way, but just don't cheat
Hello. Can someone explain me what I have to do in day 1 part 2 problem? I read it like 3 times, and still don't understand π .PS : Don't give me solution or hint. Just need explanation of the problem
Where's the questions
when you have 5 things
12345
you have 3 windows of 3
123
234
345
always nβ2 windows
find the total for each window
Oh I see
Hmm alright let me try it out now
Thanks
Thanks @velvet stag I solved day 1 completely!
can someone help me please :(
I my gues was wrong
1764
import os
os.chdir(os.path.dirname(os.path.abspath(__file__)))
def getIncreases():
file = open("num.txt", "r")
lines = file.readlines()
counter = 0
lineCounter = -1
for line in lines:
lineCounter += 1
if lineCounter == len(lines) - 1:
lineCounter -= 1
if lines[lineCounter] < lines[lineCounter + 1]:
counter += 1
return counter
print(getIncreases())```
in the file are all numbers that I got at https://adventofcode.com/2021/day/1/input
... inputs are session-bound, by the way
what?
everyone has a different input
that's not the point, though, really
but what is wrong with my code?
what does your code do?
takes the numbers from my input file and checks if they increase
your code doesnt seem to do that
so line would be your number?
yeah
this should probably move to #advent-of-code-spoilers-archive
right.. lets do that @regal gazelle
@junior hinge did you not join the leaderboard?
oh anonymous user
for some reason I chose anonymous when creating AoC earlier a few weeks back
im debating with myself if im gonna be on 06:00 tommorow or not π
nice π
i prefer the anonymous user tbh! im probably gonna fail on day 2 anyways xD
its not a competition among us, its a competition with yourself
i was just lucky i was up at 06:00 am today. my stomach went into super crazy mode at 4am so i was not able to sleep anymore π
yeah i know. its a good challenge for me and my self! ive allways been afraid of failing
failure is the best teacher of all
thats probably because people dont find time. im a single man with all the time in the world... its just that im quiet new in Python
you dont have to do challenge each day? like if you miss one , you can do it another day ?
yes you can
i still have two left from last year
so i might do them this year maybe π
are there any prizes for the leaderboards btw?
stars
fame and glory i guess π
nah, this is just a for-fun challenge
Putting in a prize brings out the worst in some people and unnecessary cheating increases and kind of ruins it
okay i get so satisfied by ascii stars anyways. its making my heart feel warm and cosey
Although maybe we have a fun temp role for january that's essentially "I finished every AoC puzzle for this [past] year"
roles are silly
people enjoy them, so i see no harm π
I mean, this would have a β¨ role icon β¨
i do like my role icon tbh π
I'm still so proud of how those turned out
β¨ colour β¨
.aoc join
.aoc join
perfect
.aoc join
add a colour there as well?
.aoc join
.aoc join
How's the challenge going for everyone else?
great
I gave up instantly, well after looking at question for 10 minutes
i already see ive become so much faster compared to the previous year - altho its just the first day lol
this is the first time ive done it, its been fun so far
.aoc join
I have been doing python for about 9 months I guess, and that question is fricking confusing
It's certainly a skill in itself to read and parse the question
I was able to think in some way to what I should do but that's it
Ok so in order to get more points, I have to solve the puzzle faster than others right? Like right as it releases?
yup!
Hmm
I'll have to wake up early
eh maybe I wont be going for most points this year. Exams are more important lol
also, whats this supposed to be?
saw this on the calendar page of 2020
is it just some ascii art?
Same! I enjoyed it.
a map of the northen hemisphere
Oh
that year we were goin on a trip to the sandy beaches of hawaii
will i get star if i solve this question tomorrow
It's a map of your adventures trying to go on vacation!
Ah
if you don't do a puzzle one day, can you do that puzzle the next day?
yes
yup! You don't need to complete them in order and you can do them on later days
great!
what does the swiggly lines in calender mean?
its a drawing
it's part of the ascii drawing!
as days pass, you will see a full drawing
Each day you complete will reveal more of the drawing and in color
im a beginner on python and i got through day 1, im actually so happy lol
may I share the result for recommendations on how I could've done it better? or is that against the rules
#advent-of-code-spoilers-archive probably here is fine
thanks! π
I bet someone is going to try to solve all the problems in a one liner
that would be fun π€
I am planning to solving these in multiple langs, just to get some proper training in them all
I guess I could throw one line python into the mix xD
.aoc join
hello, i don't understand the second step in the first day of aoc, in the sense that i don't quite understand the term "three-measurement sliding window", like does it go like this: ```
199 A
200 A B
208 A B C
210 B C D
200 E C D
207 E F D
240 E F G
269 F G H
260 G H
263 H
.
.
.
.
243 Y Z A
345 A Z B
342 A B C
or in some other way?
challenge accepted
.aoc
**```
.adventofcode
**Can also use:** `aoc`
*All of the Advent of Code commands.*
**Subcommands:**
**`about `**
*Learn about Advent of Code*
**`countdown `**
*Return time left until next day*
**`join `**
*Learn how to join the leaderboard (via DM)*
**`subscribe `**
*Notifications for new days*
**`unsubscribe `**
*Notifications for new days*
Advent of Code (AoC) is a series of small programming puzzles for a variety of skill levels, run every year during the month of December.
They are self-contained and are just as appropriate for an expert who wants to stay sharp as they are for a beginner who is just learning to code. Each puzzle calls upon different skills and has two parts that build on a theme.
Sign up with one of these services:
GitHub
Google
Twitter
Reddit
For the global leaderboard, the first person to get a star first gets 100 points, the second person gets 99 points, and so on down to 1 point at 100th place.
For private leaderboards, the first person to get a star gets N points, where N is the number of people on the leaderboard. The second person to get the star gets N-1 points and so on and so forth.
Come join the Python Discord private leaderboard and compete against other people in the community! Get the join code using .aoc join and visit the private leaderboard page to join our leaderboard.
.aoc join
everythings possible in a single line it turns out
Mild spoilers
||the alphabetical naming isn't important here, it was just to give you an example. What you need to do is add all the numbers which have the same window letter.||
Not actual code but solution :
||Add the first 3 and you'll get A window
And the second 3 and you'll get B window
So on...
yet again, alphabets are not important, just append these to a list and then compare them. Good luck!||
So I hit a wall on today's puzzle and ran my data through someone else's program and it turns out I'm off-by-one... I just can't find it lol
Can I spoiler code?
that happened with my first one, it was because i hadent converted the values to ints
use #advent-of-code-spoilers-archive i think
what was the challenge
since it's the latest day, please share it in #advent-of-code-spoilers-archive
ah thanks y'all π
what was it, I forgot
It's the "compare sequential numbers to see how many are higher than the previous number"
so, like, "205, 210, 204, 203" would be "increase, decrease decrease"?
Yes
205, 210, 204, 203 -> 1
kk, thanks
so the puzzles started right?
i can still go to the website and login and start working on the solution tho right?
when is the deadline for the first puzzle
You can work on it whenever you want, points for the first 100 to complete it
ah
well i think im late for points but eh
im mainly gonna participate for fun lol
but wait another question
can i use copilot for some parts of my code (i have early access)
Yes
Solve the puzzle however you want (but it is frowned upon to steal other people's code if you're competing for points)
ah okay then
nah dont worry i wont steal other peoples code lol
i dont think i will ever stoop that low lol
wait a minute
does that include stackoverflow tho?
Depends if it's about the AoC question or not
E.G. a year or two ago one of the questions was OEIS-able
And Eric (the organiser) allowed that as a valid solution
ah so if i just search for a problem about a certain part of my code on stackoverflow and not about the exact AoC solution thats fine then?
googling what you don't know is expected.
I mean, hopefully you won't need that with the easier problems. π
i should leave the sponsor code blank correct?
eh i havent been doing anything programming related recently tho so
As a general rule, if you don't know you need it, you don't need it
hopefully tho
But if you find something like "Oh I need a bfs search for this" then googling a bfs search algorithm is expected.
bfs search
ah i got it
finds bfs from all search algorithms
so like
if i need a sorting algorithm for example
i can google that and use it as a part of my code
Yeah, but .sort in python is typically all you need.
(or sorted())
yeah ik i just used that as an example lol
also this
Dang I did pretty good
Lmao, I did half of my solution in school
lol i did todayβs in the parking lot before school
Iβm in the PST timezone so I did it last night
lol
oh god i know im probably gonna look dumb for saying this
but
damn the first puzzle looks hard lol
Break it down into parts. Try to determine exactly what itβs asking if you
nope
pog
you can still solve them
WHAT
i've been doing it str(hex(X))[2:] for like years, you have enlightened me π
your username is genius
hex() is a string lol
i thought it returned an int π
how would it return an int
I would do that but my teachers watch me like hawks bc im so far behind on some work π
The first puzzle my program gives correct output for the example code input that was given , then the output it gives for the actual input im given is 1 short of the answer . So I have submitted the correct answer but my program seems to produce 1 short , anyone else get this issue ?
My wife is a teacher - she loves catching students doing things they shouldn't be doing. She has software that shows the kids desktop on her computer.
Share code in #advent-of-code-spoilers-archive?
sure
I like pizza
for the second puzzle , we have to implement the windows ourselves ? is there a pattern ?
wait nvm
the βwindowsβ just mean that you consider the numbers in groups of three
yes
you have revealed my stupidity in ways i never imagined π
i read that twice, thought about it for a second, and realized i knew nothing about integers
Lmao rip, didn't mean to do you like that my dude
lol its all good, no harm done
(yeah I could tell lmao)
anyone?
Look at each adjacent pair of numbers, a followed by b
If b > a, count up by 1
What's the answer?
So let's say that a = 208 and b = 210, so if 210 > 208 then count up by 1
Yes
205, 210, 204, 203 -> 1
Ok
.aoc leaderboard
:x: Please use #aoc-bot-commands for aoc commands instead.
:x: Please use #aoc-bot-commands for aoc commands instead.
sorry about that , I dont see my name on leaderboard tho
let the games begin
well have you completed any of the exercises on the aoc website, or at least done the first's days one?
Yes I completed the first day
it takes a little bit for the leaderboard to refresh
It should be updated in ~30 minutes
but if you navigate to this page: https://adventofcode.com/2021/leaderboard/private
you should be one of our leaderboards
Okay sure , it says its owned by Joe Banks . Would this be correct ?
yup! That's one of ours. So you're good to go
great !
also is aoc just for fun and programming experience or is there anything we can get from it ?
mostly just for fun
If you finish all the days, you will get a role on this server, the Advent of Code Finisher that will be visible for the entirety of January. It'll have a cute role icon with it too
.aoc leaderboard
:x: Please use #aoc-bot-commands for aoc commands instead.
oh sounds good
wait, like, all 50 stars? or participation award lmao
if you get all 50 stars
any idea how challenging they can get ?
I will have to do it
it is my goal in life to have a role
they got pretty hard for me, but I dont know a lot about programming
I thought today was a nice way to start off , not too hard
Yeah I know , I rather just focus on 1 a day
I do want to clarify, you'll get the role if you finish all the days by some point in January. You don't need to finish it the same day it comes out
what's challenging for you how would we know
depends how much you know, if you are just a beginner they are very hard
just from a general aspect , like from previous years whats the hardest things that has been asked
previous year was extra easy
wow ok
the hardest thing last year was assembling a jigsaw and counting dinosaurs and it took the top 100 an hour
assembling a jigsaw and counting dinosaurs ? lol
you get a ton of pieces like this
X XX X
XX XXX
XXX XX
X X
X XX
X X X
``` and you have to connect them, so the edges fit
so you get the picture on the right, and it has some amount of dinosaurs, highlghted on the left
you need to count them
oh god.
I'd probably create a class for each piece, and a class for each part of a string
Yo they weren't kidding when they said it gets harder
then I'd iterate through every connection and test if each part of a string on the connection becomes filled
:ohno:
Anyone know discord bot coding lol?
wrong place, try #discord-bots
if they can't answer your problem go to #βο½how-to-get-help
I AGREE
IM HAVING SO MUCH FUNNNN
IVE BROKEN MY CAPS LOCK KEY I HIT IT WITH A HAMMER HELP
the thrill of completing a puzzle, even if it's easy, is insane
yes
.aoc
**```
.adventofcode
**Can also use:** `aoc`
*All of the Advent of Code commands.*
**Subcommands:**
**`about `**
*Learn about Advent of Code*
**`countdown `**
*Return time left until next day*
**`join `**
*Learn how to join the leaderboard (via DM)*
**`subscribe `**
*Notifications for new days*
**`unsubscribe `**
*Notifications for new days*
(--------;
.aoc join
:x: @mental knot, please (temporarily) enable DMs to receive the join code
.aoc join
:x: @mental knot, please (temporarily) enable DMs to receive the join code
.aoc join
:x: @mental knot, please (temporarily) enable DMs to receive the join code
@mental knot Read the message, enable your DMs temporarily to get the code π
Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.
.aoc join
@signal grotto thanks!
.aoc subscribe
Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.
.aoc subscribe
Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.
.aoc about
Advent of Code (AoC) is a series of small programming puzzles for a variety of skill levels, run every year during the month of December.
They are self-contained and are just as appropriate for an expert who wants to stay sharp as they are for a beginner who is just learning to code. Each puzzle calls upon different skills and has two parts that build on a theme.
Sign up with one of these services:
GitHub
Google
Twitter
Reddit
For the global leaderboard, the first person to get a star first gets 100 points, the second person gets 99 points, and so on down to 1 point at 100th place.
For private leaderboards, the first person to get a star gets N points, where N is the number of people on the leaderboard. The second person to get the star gets N-1 points and so on and so forth.
Come join the Python Discord private leaderboard and compete against other people in the community! Get the join code using .aoc join and visit the private leaderboard page to join our leaderboard.
YO THIS IS FUN
YES IT IS IKR
ah, i see you're a man of culture as well for attending the "One Anus" event ||\s||
so inspiring
EXACTLY! I think my burnout has ended from coding cause of this event
.aoc join
.aoc join
Hello @visual idolyone! Iβm trying to import Hmm library on google colab, but thereβs some mistake and Iβm unable to solve it. Can anyone please help me fixing it
...is this about AoC?
Done day 1, doing it on python was a breeze but trying it on shell not so much ;-;
I don't really see how this is about advent of code. Maybe ask in a help channel instead?
Which channel specifically, there are so many by that name. Im new to this server
#βο½how-to-get-help i think its explained in this channel ^^
They are managed automatically - post in a channel from the Available section and that'll claim it. 
what does it want me to find here? How many measurements are larger than the previous measurement?
that's what part1 asks, yes
but it doesnt make sense
how come?
Why not?
take this example
1 # greater than previous
2 # greater than previous
3 # greater than previous
1 # not greater than previous
4 # greater than previous
8 # greater than previous
2 # not greater than previous
so here, the answer would be 5, since 5 of them are greater than the previous
if you mean logically in the context of the description - that's true, they aren't exactly trying hard with the justification for their tasks, lol
All the description is is flavor text to make you waste time skimming through it when seconds count 
ohh ok
subscribe
.aoc subscribe
Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.
Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.
.aoc help
**```
.adventofcode
**Can also use:** `aoc`
*All of the Advent of Code commands.*
**Subcommands:**
**`about `**
*Learn about Advent of Code*
**`countdown `**
*Return time left until next day*
**`join `**
*Learn how to join the leaderboard (via DM)*
**`subscribe `**
*Notifications for new days*
**`unsubscribe `**
*Notifications for new days*
.aoc about
Advent of Code (AoC) is a series of small programming puzzles for a variety of skill levels, run every year during the month of December.
They are self-contained and are just as appropriate for an expert who wants to stay sharp as they are for a beginner who is just learning to code. Each puzzle calls upon different skills and has two parts that build on a theme.
Sign up with one of these services:
GitHub
Google
Twitter
Reddit
For the global leaderboard, the first person to get a star first gets 100 points, the second person gets 99 points, and so on down to 1 point at 100th place.
For private leaderboards, the first person to get a star gets N points, where N is the number of people on the leaderboard. The second person to get the star gets N-1 points and so on and so forth.
Come join the Python Discord private leaderboard and compete against other people in the community! Get the join code using .aoc join and visit the private leaderboard page to join our leaderboard.
oh dang, i only know a little python and theres alr a bunch of errors :/
anyone mind helping?
you can ask in #advent-of-code-spoilers-archive
oh right, mb
this is going to be cool https://i-also-posted-this-on.shitcord.com/9e9PNDIcOD
Days of Advent of Code Remaining: 30
Are you sure about that?
lmfao
bonus advent
will the puzzle become harder each day?
they tend to
ok thx
my rust sols take 30 years to compile bruh
Finished dev [unoptimized + debuginfo] target(s) in 2m 37s π©
wow typo oof
.aoc join
.aoc join
Hey, I am having problems in day 1, I'm fairly new at python, and I don't know how can I use large inputs like the one the site pass us. Could someone give me a hint?
So, some of us paste it into a txt file, then from our python program we read that text file. How are you approaching it?
Yeah, I did not thought on that, I will do that, thanks
huh, i thought the first didn't count. wouldn't this be 4 instead?
yellow -> orange -> green? congrats on green ππ
ctrl + a, ctrl + c, new txt file, ctrl + v
ok
I copy pasted it into browser address bar
so it became space separated
think.jpg
that's big brain lmfao
OH YEAH
woops, I did a dum dum
π
I just don't understand how to use the leaderboard api and also while testing multiple requests are needed so will you get "banned" ?
So far making a custom helper class is going decently well, I'm excited for Day 2
You donβt submit code
ohhh
You don't submit the code necessarily, you write code which gives you your output and you submit that output via heading to https://adventofcode.com/day/1/ (just using 1 since it's the day today) and then sign in and answer
OOHHHHHH
You go to the page with the question and just put in the answer
np!
idk how to proceed in part 2, any hint?
lists?
ok tht goes
whoo I finished my custom helper class
it just has getting input and a submit decorator as of now
hello, person who first introduced me to the sublime pensive emote. i have since seen how ubiquitous this excellent emote is and have learned its ways. i thank you for showing me its beauty.
What are the squiggly lines on the left?
all jokes aside, this is now my most frequently used emote-
the tildes
they form a cool picture at the end if you've completed all the puzzles
ooh
like last year it was a map, year before that was a space map
there was a lot of thought put into AOC, wow
i remember the first one was a christmas tree, then a factory, then a computer chip
yeah, the guy who runs it, eric wastl, is awesome
oh it was a map?! i spent minutes staring into the chaotic disturbance trying to figure out what it is lmao
Yeah, there's so much work put into this. Apparently he spends 4-5 months coming up with the challenges.
there was a cool typhoon animation, and the sea monster lol. and the star lit up!
cant wait
Who's "he"?
also I'm impressed that someone does this all by themselves
Eric Wastl
all this talk is reminding me to get AoC++
ooh this might be a year themed as underwater stuff, based on https://twitter.com/ericwastl/status/1465976909108592642
You know what will probably be useful during this #AdventOfCode?
A submarine!
165
What's AoC++?
i would if i had money
Ahh
Considering the story so far, yep π€£
Neither did I but I remembered seeing the word submarine as I glanced over it
That's like the only think I saw from that and I've looked at it like 5 times before now without reading it
This is what I do, then go back and read the plot
After the solution
2.5 hours to go!
.aoc countdown - Coming soon to a computer near you! π
Day 2 starts <t:1638421200:R>.
I'm in mountain time, so 10pm isn't too bad for me, I stay up most nights
do you know where I can get the challenges from the previous years?
yeah, they're on the website
https://adventofcode.com/2021/events has a list
ah yea, thanks... oh I could've just gone to events lol, I just changed the 2021 in the url to 2020
Yeah events has all the previous years
It's 12 AM when the next puzzle comes out here
For once it sucks being on the east coast regarding time zones
we get everything else nice cause of UTC
Eastern is -5 right?
I'm in EST, so I'll do it if I'm already staying up anyway, but not specifically for aoc
utc-5, yeah
why does "utc-5" look like a file encoding 
utf-8
10 pm
There isn't one
fuuuun
It's mostly meant to be done on the website, just use your browser's dev tools to trace the requests
alright
which ones do you need?
im already finished for the day
pretty much what there is:
Make a get request with your cookie to https://adventofcode.com/2021/day/{day}/input for getting the input
and also
i dont even know which ones there are
last year was great because we had this amazing schedule where school started online at 9:00 so staying up until 1 for aoc was not a big deal
Post request with your cookie with the data of a dict with the following data: {"level": part of challenge goes here, "answer": result you got} to https://adventofcode.com/2021/day/{day}/answer
cc @hollow wharf
that's how to submit for the post request
ok
I'm eastern time - i'm usually awake around midnight, but not for long, so i need to code fast.
lmk if you wanna know how to find the cookie @hollow wharf (sorry for the ping)
ill just use the website
Ah alright
for me day 2 starts at 12:00 am (UTC+7)
Would you mind deleting that and putting in #advent-of-code-spoilers-archive? This year, the policy is not allow solutions or detailed hints in this channel.
oops my bad
.aoc join
I fired up the website and it said 2 hours till day 2, looks like ranking is based on absolute time so my ranking is probably as low as we'll get among the people who completed both stars
is there any way i can automate the input taking process by requests or something? I'm currently copy pasting it. please ping me if answered.
I don't know how to automate it, but once it's loaded, i just view source and save the file.
yeah i mean i do ctrl-A ctrl-V but i need a better way, may be just copy their cookies and just request on their URL.
That sounds like a plan. Maybe someone else already has something to do it.
i just pasted the input into a text file and used that
i tried requests but does not work due to different files for different person that would require me to log in with my credents using some cli thingy
you just need your session cookie for it
let me pull psvm's and f1re's code for it
so this is dennis's: https://github.com/Den4200/advent-of-code/blob/master/aoc.py#L58
aoc.py line 58
def get_input(day: int) -> t.Optional[str]:```
you can use dev tools in your browser to find it. I know for Firefox it's under storage
i guess chrome calls it session id
not sure
it should be a very long string
let me boot up chrome real quick
alright
F12 -> Application -> Cookies -> adventofcode.com
mine is empty, but you'll see a "session" value in the list on the right
the string in the "value" column is your session token (do not share this with anyone)
<_< be me, with almost all of Python Discord DevOps knowing what mine is
found π
i don't know how much harm can come from hijacking your aoc token, but better to teach good habits lol
next thing is to use it with requests?
mhm, dennis's looks like:
problem_input = requests.get(
f'https://adventofcode.com/{YEAR}/day/{day}/input',
cookies={'session': AOC_SESSION_COOKIE}
)
thanks
and then you can grab it with problem_input.text
yea
just check for request success though, (404 erros when fetching input for non existing problem)
Just out of my own curiosity, what is the benefit of getting the input file programmatically?
save precious seconds of time
You don't need to download it manually and is therefore quicker
mmm those seconds
We have very different workflows.
It's also good if your lazy, but not if your too lazy to implement it
the first 100 for day 1 were all done within seconds of each other, so if you want points on the global leaderboard it's almost necessary
same with automating submission
I'm so slow anyhow, while I'm reading the directions, I'm not sure how much longer the right-click on the link to dl the file takes.
Is there a prize for scoring high?
It is recommended to make your program save the input to a txt file and then ready from there. AoC organizers have asked folks not to stress their servers unnecessarily
copilot guessed what i was doing just by naming the folder Aoc lmfao
lol
Other than being on the leaderboard, no
alrighty
Completing all the days will earn you a role for the month of January on this server though!
this is what I do, is_sucess is necessary otherwise it would create the day's folder without the correct input
Good luck to you speedy coders out there.
dang thats op
When does everything have to be done by?
Jan 1, and at various points during January
OK :)
import requests
def start_aoc_day(day: int, AOC_SESSION_COOKIE: str, year: int = 2021) -> None:
if AOC_SESSION_COOKIE is None:
print(
f"[red][bold]AOC_SESSION_COOKIE[/bold] not found in environment variables![/]"
)
return
cookies = dict(session=AOC_SESSION_COOKIE)
# cookies = dict(_ga='GA1.2.700534864.1622907838', _gid='GA1.2.54649315.1638358225')
problem_input = requests.get(
f"https://adventofcode.com/{year}/day/{day}/input",
cookies
)
print(problem_input)
print(problem_input.status_code)
if not problem_input.is_success:
print(
f"[bold red]Unexpected response [blue]'{problem_input.status_code}'[/blue] "
f"while fetching problem input with URL <[blue]{problem_input.url}[/]>"
)
return
return problem_input
I'm not sure why this is not working, its giving 400
cookies is a kwarg?
i am using httpx btw, not sure if requests has is_sucess
yeah but its stuck before that
Requests has raise_on_error
and cookies is a kwarg IIRC
btw the cookie would be valid for an hour right?
It's a kwarg, you need to do cookies=stuff
cool
lol
AOC_SESSION_COOKIE also why are using _gid and stuff
500 is server error?
just copy the session value
cookies parameter would require a session key where you would pass the value
.http cat 400
AoC cookies are valid for 25 days and plus an unknown amount of extra days
.status cat 400
that we did
yeah the problem is with your cookie
uhm
its something liek this
session value
that looks wrong
200 is success
shit yeah hold on
Error and 200 are two words that can never go together
Wrong - professor to me: Your code has 200 errors in it.
perfect. done.
cool
What about "There are 200 errors"
if it has 200 errors idk what you are doing
^
neither did i!
If you have 200 errors you shouldn't
complete lol
And if you don't have 200 errors, those words don't go together
9 minutes!
so anyways, for those of you who do not wish to save the file but just take the input string, you can use below code. I'm using requests so dependency of httpx does not come for me in colab.
Taken code of @digital ember and changed a lil bit, cheers!!
import requests
def start_aoc_day(day: int, cookie: str, year: int = 2021) -> str:
if cookie is None:
print('Session mate')
cookies = dict(session=cookie)
problem_input = requests.get(
f"https://adventofcode.com/{year}/day/{day}/input",
cookies=cookies
)
if problem_input.status_code != 200:
print('yeah nah yeah')
return
return problem_input.text
.aoc countdown
Day 2 starts <t:1638421200:R>.
Smh, when I can't stop the mods from talking in a locked channel
lol
There's a locked channel?
they have same url for 2nd star?
starting in 8.5 minutes!!!
yes
Input is same for both parts
I lock spoilers 15 minutes before until the global leaderboard fills up
input remains the same throughout the day
lol go to day 1 and change the 1 to 2 in the url
great thanks!
won't work
just check out the msg it ufnny
pls site don't give me timeout this time ffs
inb4 server goes down
.aoc count
Day 2 starts <t:1638421200:R>.
good luck
hype
why do the clocks not align, I wonder
Whoo
global timezone when
the site countdown is 3 minutes fsater
unix timestamp
did you wake up using alarm clocks
hope its not too hard
t-2minutes
t-2 min, lock your visors
I'm looking for a challenge. I want to learn something new!
Minutes or seconds?
minutes
... huh
clicking intensifies
clackety
GLHF everyone
please don't actually F5 all the time, lol
lol
request the endpoint when the clock on the site finishes
1:03
t-1minute
eee
too bold to assume
time to test their server....
hf
why do i get so excited about this
already died
t-30 launch sequence activated
10
10s!
gl
lol
t-6 ignition
5
<@&518565788744024082> Good morning! Day 2 is ready to be attempted. View it online now at https://adventofcode.com/2021/day/2. Good luck!
go gog og og og og og og
oh crap lol
Nice it pinged today
i forgot
pog
oh that cant be that hard
@bright spindle @wispy glacier lol you guys #advent-of-code-spoilers-archive is locked right now
pogs
ohhh
i thought like, locked as in don't talk abt next day stuff
good morning?
but-
should be right about now?
NO i inputted the negation of my answer

#advent-of-code-spoilers-archive is unlocked, feel free to chat about solutions and implementations there
this one is easy
Aaaaaa submit cooldown
fk bro timeout
heehee
Boom done
woohoo, done
yay
where did you get those stats?
Woo 6th on staff leaderboard
oo
same
yeah same
the 2nd one was kind of confusing
tomorrow is scoreboard time though
i just copy pasted the previous code and made the changes
it was easy enough
part 2 had my a tiny bit confused at first
i kinda blundered day 1
i thought it was going to be confusing
3 minutes, impressive
damn 20 second cooldown
Fuck my rank just dropped to 10
i blundered day 2 multiple times
Hey, where can you see this info?
that was cool
oh damn
i just dropped to #10
Thanks dude!
aye hapi
There are multiple different leaderboards, the bot compiles them together
wait
no way
Yeah we split the server up into a few leaderboards, which we combine to make the server-wide table.
that makes sense actually
what leaderboard is that?
its tricky getting into a mindset where you don't think of your solution before you start writing code, it's so unnatural
holy heck that was frickin tense
.aoc lb
Here's our current top 10! πππ
| Name | Score | β, ββ
--------------------------------------------------
1 | Oliver Ni | 1580 | (1, 1)
2 | RundownRhino | 1576 | (1, 1)
3 | Defelo | 1575 | (1, 1)
4 | asishm | 1574 | (1, 1)
5 | ChaseParate | 1572 | (1, 1)
6 | Starwort | 1570 | (1, 1)
7 | Artemis | 1570 | (1, 1)
8 | artcz | 1569 | (1, 1)
9 | godlygeek | 1562 | (1, 1)
10 | Zeyu Chen | 1560 | (1, 1)
how does one finish that fast
oh wasn't updated yet lol
it has not updated ig
Thats the leaderboard name?
It'll take about 20 minutes probably
actually we're due for another one in a minute
Oh nice
.aoc lb
Here's our current top 10! πππ
| Name | Score | β, ββ
--------------------------------------------------
1 | Oliver Ni | 3162 | (2, 2)
2 | Defelo | 3154 | (2, 2)
3 | ChaseParate | 3146 | (2, 2)
4 | Zeyu Chen | 3139 | (2, 2)
5 | RundownRhino | 3120 | (2, 2)
6 | LX | 3115 | (2, 2)
7 | artcz | 3115 | (2, 2)
8 | Discrete Games | 3113 | (2, 2)
9 | Artemis | 3111 | (2, 2)
10 | Kevin Sheng | 3100 | (2, 2)
There we go
NOOOOOOOOOOOOOOOOOOOOO
NOOOOOOO
sadge
damn just barely not in top 10 π¦
ay, #3
7 places up, woohoo
oh come on
ugh, I got savaged. I sliced the tip of my finger cooking and my typing speed sucks right now.
64th place, I'll take it
improved on day 1 at least
ah come onn im #62
my score is 0 on both
climbed 21 -> 11 though so thats nice, guess that puts me on pace for 1st tomorrow π
gah i multiply xy instead of depth*x π€¦
now i have to wait :(((
the bot combines many leaderboards
bot combines all the discord leaderboards into 1
i had some super hype music on so i was typing as fast as i could
There are 7(?) different leaderboards, the bot has to combine them all
Maybe I should stop using java
ah, what are all the others?
maybe you should
XD
python ftw
there's just too many of us for 1 leaderboard, so multiple are set up on aoc.
I don't think I am gonna participate competitively in this lol. I will just peacefully attempt it
oh okay i gotcha
im going to try
Those are good times!
Check .aoc lb in #aoc-bot-commands to see the combined version
the first few days are really just a competition of who can type the fastest + who has fast internet
although nothing's gonna happen
you can participate competitively in the latter days
@rancid creek we are falling behind
Your faster than me
90th place!!!
still 0 score for me too though
I cut my finger cooking and can't type any more!
dang 53 for me then
You need to be in the top 100 globally for score
oh no!! so sorry to hear that
F. Hope you get well soon
what were you making?
Did anyone else get ghost ping by @hidden copper or what happened
F. Hope you get better!
lol. me too. probably needed a stitch, just through some bandaids on it and kept cooking.
how do u see that
You got pinged in this channel if you have the AoC role
Oh god, I hope you're okay!
Go to leaderboard then personal stats
Ohhh
well I have exams as well, so I will probably be asleep or in school. I study late at night so even though challenges release at 10 am for me, I will be sleeping π