#advent-of-code
1 messages · Page 36 of 1
I am planning to wake up 6am (when it starts for me), but that is because school, I won't have time to do aoc before later xD
live in a better time zone
I live in the best time zone
little varience to utc
makes dealing with tz's much easier
advent of code or my sanity throughout the month?
.aoc join
advent of code supremacy
i already skip classes skipping one more wont harm anything
i have to go to school
oh rip
shame that it releases at 6 in the morning for me
.aoc count
The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.
.aoc count
The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.
.aoc count
The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.
ok.
it's using the discord timestamp feature, which is always up to date
If you hover over it, it'll show you the datetime it's supposed to start
oh right
.aoc count
The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.
how does this advent of code work ? a coding challenge everyday ?
idk
Yep, basically. Check out the #911684406605930496 for more info
Shoot. I've done no work with trying to get Emacs working for Nim
I wonder if I should just use VSCode for the first few days and then transition
.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*
.aoc countdown help
The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.

thanks
wohoo
.aoc countdown
The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.
.aoc countdown
The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.
oh god its so early for me
.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.
6am for me. Guess I know what I'll be doing in art class
what is this channel i stumbled upon?
and also how do i make date text
check out #911684406605930496 :)
.aoc join
<t: UNIX TIMESTAMP : FORMATTING CODE>
Formatting codes are d, f, t, D, F, T, R
E.G. <t:0:t> <t:0:t>
.aoc join
.aoc join
.aoc join
!src aoc leaderboard
Unable to convert 'aoc leaderboard' to valid command, tag, or Cog.
totally got it right first try
.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.
(the join codes aren't things we post outside of DMs or AoC planning channels)
.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 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 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.
Also check out #aoc-bot-commands
.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.
Here comes the AoC activity, who’s ready?!
let's gooo 1 am bed times for the next 25 days 🥲
I have not had enough sleep and will almost certainly not get enough sleep
you can all have a chance this year
1 am is ambitious lol
Lol
listen, whether or not I finish a puzzle I am going to sleep at 1am
Understandable
:O you can't stay up then not finish
just like move to the correct timezone lmao
(but I also need to be awake until the global fills up so I can unlock the spoilers channel)
:3c watch me
that's like 5mins tho
not on the 24th day
I actually do almost want to move into Europe just for the competitive advantage
it's only an advantage if you don't have a job or school lol
Eh my university starts at 12 most days
hawaii and like east asia is where it's at for timezone advantage
And several days I don't have anything
whats it like for australia
midday, right?
Even west coast US, the challenge opens at 9 pm for them
.aoc join
hm
yeah but no way in hell am I using US spelling
lmao it is my eternal battle within this server to slowly convert things from the british spelling to the us spelling
I'll just do mine 20 hours behind
I have PTSD for colour
you were waaaaay too nice for that. I would've rejected all nitpicks that it should be colour
🤮
Fun fact: Webster spoke against removing the u, before doing it himself a few years later
lessons learned for sure
89 people joined to leaderboard, nice
What are the challenges like, I have never joined this before.
I can be downright mean for some PRs if I get worthless nitpicky suggestions that don't leave any measurable impact of the code or readability of it
they'll be released on the advent of code website each day
Think themed codewars kata
what kind of questions there has been?
Never used anything like that either
Hi :D
soooo last year one of the questions from the first week was
Specifically, they need you to find the two entries that sum to 2020 and then multiply those two numbers together.
For example, suppose your expense report contained the following:
1721
979
366
299
675
1456
but of course it's very themed and very cute: https://adventofcode.com/2020/day/1
im doing that one right now 😄
oh my... I give up instantly
it's super fun though!
I highly recommend giving it a shot and taking your time with it
you learn a lot
Can this be done in O(n)?
Advent of Code is also fun because it's doesn't need to be done well it just needs to be done
I have only been doing API stuff and discord bots and I have almost completely forgotten basic python, soo most likely I will not be able to do anything
The one i had in mind is o(nxn)
def multiply(a, b):
a * b
multiply(1, 20) # line made by me
``` (from code wars) for example what would even be wrong here?
||return||
;-;
So close yet so far for me for AOC
@hollow wharfyes, using a set
Forgot to return the value
Or just do anything with the result of a*b
makes sense
How will the set help here ?
a set can be constructed in O(n) and has O(1) membership checks
so you can just iterate twice
Normally in any language with a compiler that optimizes, it probably would optimize all of that code away
Python doesn’t optimize and just runs it
(or even in one iteration if you are clever about it)
well, you can't optimise it in python
looking at the code war stuff, it seems a lot of basic python but nothing that I can actually do
since * could have a side effect
That's what I'm trying to accomplish
Is a set in python the same as a set in maths? As in a set of unique numbers in order?
that's not what a set is in math generally
.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 join
a set is an unordered collection of items in both python and math
in python they also need to be hashable
yes
Wait unordered?
yeah, sets don't have an order
Aha time to make cursed solutions
I’ve been told they are ordered
woo, i love those cursed solutions
you have been misled, a general set cannot even be ordered
And that 2 different orders are the same as they will be changed to ordered anyways
since not every set has a sensible ordering on it
Cursed solutions best solutions
like, is my code horribly inefficient? yes. Is it quick to code and fast enough to run? yes
Solution = best solution
consider the set of all functions that produce 1 for some result
how would you order those?
the trade off between easy and "fast enough" really showed up on that 4d Conway cube day lmao
Was this also the goal of aaaaAAAA?
is there a way to unjoing AoC if I want to? As it seems like I will not be able to anything
aaaaAAAA was a staff experiment if we could visualize the action of shitposting in a game
You don't know till you try
Hmm I’ve never done anything else but numbers in sets. That is a fair point that you made
I know it alrd
you can leave the leaderboard if you want, but also don't worry about it
there's plenty of space on leaderboards
was that the ||chinese remainder theorem|| one or the one where || slapping on lru_cache|| solved it?
:x: Please use #aoc-bot-commands for aoc commands instead.
neither, it was just something like "what's the state of the 4d cube after 6 turns"
I wonder what the tech theme will be this year
last year it was def regex favored and you made like... what a state machine or something?
Meme Crypto NFTs
day 17
||numpy was a savior for that one||
in 2019 it was intcode
frfr, ||convolve|| 😩
Btw this will be my first AOC. How long is the average person busy with a day’s question?
Assuming they do have some at least basic and intermediate knowledge
0-3 hours for me. I am average I think
if I am the average person, I took my time and it took me between 20 minutes - 1 hour, but I also got busy with finals and didn't get past day 9
Since there is a new challenge each day, would I be able to do them like a few days after they are opened
day 1 part 1 :)
only the first part :P
yeah, you can even do them out of order
thats right 😄
Nice
so when will it start?
.aoc countdown
The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.
Sorry, you can't do that here!
All I see is <t:1638334800:R>.
How do the two stars work?
For me that will be 6 in the morning meaning I will need to do the question like 12 hours later when I’m done with uni for the day
Oh ok thanks
wait what
except for day 25
mhm, there are two stars for each day, so two parts
the 50th star is always a gimme
Are both parts released at the same time?
yeah, but you can only do the second part after the first
yep, but you have to complete the first part to get access to the second
oh ic
I thiiiiink, I might try doing an end of advent code subset of the leaderboard, where we re-score but only include people who have finished each day
Loved that year
the intcode machine was so cool
there was something that reminded me of it in 2020
yeah, fixing the kid's game thing
oh yeah, fixing the jump codes
there was a cool graph solution for that one
Im excited. I can never come up with ideas for projects but this'll give me some challenges to do.
is there anyway to multiply an iterable like sum()?
math.prod
unlucky
I loved Advent of Intcode
It'd be cool to get another series of problems that build on each other like that
Loved 2020 time to do 2021
Barely made it in 2020 haha, crunched one challenge till last minute
well, sort of yes, but how would you get around it?
all international events suffers from that
I could argue it's sleep schedule biased too.
mmm maybe i’ll stay up tonight since it should only take me a few mins
damn that’s nice
wow December already
.aoc join
banned
So is there going to be the first day task posted on the timestamp in the announcement?
which announcement?
there is
.aoc countdown
The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.
that will update for each day
but that's when the thing will get released on the aoc website
.aoc join
:x: @proud cosmos, please (temporarily) enable DMs to receive the join code
#aoc-bot-commands
.aoc join
.aoc join
I JUST POSTED THE BOT COMMANDS CHANNEL ABOVE YOU
It's fine to use this channel for the join codes. It's not a big deal.
but it's annoying when there's a dedicated channel and as I said, I literally linked it just above them. T.T
That command doesn't fill much space, it's not a huge deal for that one.
it was less annoying when the channel was less active, but now, with the first puzzle 5.5h away, I click on the channel thinking some discussion is happening...
a few days ago it was way more people posting it, even after someone linked the dedicated channel
so I was afraid that since second person followed the first (just after my channel link), then it would result in more commands again
I assume we'll get some better discussion once the event starts too
ooh it comes it in exactly 5 hrs
luckily i might be awake for an hour to try it before going to sleep
@compact token Please don't post copypastas and ping users without reason here.
There was more than one, i got tagged in here as well but the message was deleted.
Yeah, I deleted them.
please im going to die
search her
I am Teresa Fidalgo and if you don’t post this on 20 other photos I will sleep with you forever.
“A girl ignored and her mom died 29 days later. You can even search me on google
Wouldn't that count as spam and get a mute?
If they posted it as one message or without changing anything (tag changed content), then bot would automatically mute them
!mute 903477658216710174 6h Please don't post copypastas here. Take some time to decide whether you'd like to meaningfully contribute to the server.
:ok_hand: applied mute to @compact token until <t:1638339816:f> (5 hours and 59 minutes).
First rule of living: don't believe in everything you read on the Internet. This includes chainmails.
bruh
The aoc will start after 4 hours?
As an European, I have no choice to do it after sleeping. 😂
time to do my homework as fast as possible in four hours!
I thought I only have 4 hours left
Hi can someone tell me whats happening in advent of code event??
Check the last post in #announcements
done college stuff? 👀
I'm struggling to think of ways to prepare
write a script to fetch inputs for you
I can... make 25 folders named Day {i}
I read a Reddit post to not do that
uhh i've applied to my top school ED, and i'm doing the rest RD later
huh? link? @sinful pawn
you?
lmao what
I was looking to see if they had an API or something
i mean, downloading the inputs once, and caching it, is the same as opening the site manually and copying the inputs
they do, but yes, please play nice with it
Yeah, I suppose. I'm not terribly sure how I'd make it automatically download, though
.aoc countdown
The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.
👀
other than like
if not exists_file("input.txt"):
# Insert code to download input
in each file
4 hours lesgoooo
or... a helper that does this
i made myself a cli to create days, and run, time, and submit solutions
it comes in handy
Perhaps I should do the same
wow
how?
time to learn about Nim modules
i did that too
and... time to do some sniffing with AoC requests
unless there's documentation somewhere
tht sounds interesting
Google keeps trying to refer me to Ms. AOC
haha yeah, AoC vs AOC
page proceeds to not load
omg it loaded
https://github.com/wimglenn/advent-of-code-data
more useful stuff
gosh. I feel like people over-complicate their scripts
I just wanna know the endpoints 
ooh i remembering making this last year https://cdn.discordapp.com/attachments/464905259261755392/785208805294211112/2020-12-05_18-48-06.mp4
that looks amazing
lol.. you smell curses
oh. yay, pain
the code for that was horrific
as is the nature of curses
yeah probably
or textual
I... wanna do that now but I want to commit to Nim
I wonder if I can just use some interfacing o_o
ill use rust
I wonder if I could use nim to import a python file that's literally just import rich
ahaha, I can now leverage all that is Python from Nim
AoC, I'm coming for you
i made visualizations for the intcode computer two years ago
they're some of my favorite ones, but i think the maze solver was the most popular visual
here it is in action
Yeah I remember really liking your computer visualisation
I still like my blinking router visualisation but it's much less impressive than yours
salt has the coolest TUIs and animations
too cool 😔
Anyone wanna play something while we wait for puzzle unlock?
naptime
I wish I could sleep for 3 hours at a time lol
would anyone like to complete my homework for me?
i didn't realize i chose such tedious and annoying classes this year
is it time for #ot2-never-nester’s-nightmare ramblings
:o that's so pretty
this is making me want to make pretty tuis for every answer this year ahhh I must resist
unfortunately not because i actually need to do this work lol
intense procrastination noises
senioritis :/
it's not even second semester yet lmfao
https://twitter.com/sdrobertsCode/status/1465802988031815688 this is absolutely wonderful lmao
I have just gone downstairs, from my desktop, to free my laptop from a pile of stuff
this year i'm prepared for many more visualizations than normal!
i no longer have to fight curses
good time to review https://docs.python.org/3/library/re.html
oh my lord
lol
2 more hours
I want to participate in advent of code. But I have exams and so I might not be able to code on a few days. So can I code inconsistently for like day 1 project on one day then like 2nd one on the 3rd day or something like that? Or do I have to be consistent?
Once the puzzle unlocks you can complete it any time at all
you could finish them in the next century if you'd like!
Yes! You can do the challenges whenever you want, even after it has ended.
but your leaderboard score is based on how quickly you solve it after it's unlocked.
if AoC is still around by then
ohh thanks a lot
You can still complete any of the puzzles from AoC from previous years as well.
They are open indefinitely.
yeah but I don't care about the leaderboard because I am doing it just for practicing 😄
ohh
Thanks a lot again!! I am so happy now
!!!!
.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 join
.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.
what is this one for?
you can join the Python Discord leaderboard
.aoc join 🎉
:x: @warm ore, please (temporarily) enable DMs to receive the join code
oh
.aoc join
for the leader board
.aoc countdown
The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.
yeah, admin dennis told me.
Display a second column of options?
how can you not sleep for at least 3 hours?
600dc0de12
I mean like specifically 3 hours and not longer
I mean like at will lol
why?
So I could be better rested for aoc 🙃
ok
.aoc join
i think they mean they can't take naps
a nap
mmm the homework i need to do is now done
so time to prepare for AoC and rest a bit
!role "Advent of Code"
518565788744024082
#000000
0.00 0.00 0
270
7
6442450944
not bad, 270
.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 join
2 Hours Remain
then im probably gonna be last bc im never usually awake at 5am (UK)
It's too late for today, but you can fly to the US in time for tomorrow's puzzle release
sure, there's one released each day
the first of many fun challenges
It's the start of Advent of Code in general. It's a fun time.
I'm so ready to go to sleep and be well rested so I can do the problems in the morning
.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.
not staying up this year psvm?
Can't say I was expecting to recable my house at 3am but internet cutouts demanded it 🙃
.adventofcode 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.
Time to hope that fixed the issue
i’m only planning on staying up tonight but we’ll see lol
Is the scoring based on who submits the fastest?
Is there scoring
I've never done one of these when it was live
.aoc subscribe
Hey, you already are receiving notifications about new Advent of Code tasks. If you don't want them any more, run .adventofcode unsubscribe instead.
I cannot at all figure out how to send an answer and... do anything
yup! scoring is based on who submits the fastest
for this year or previous years?
Wouldn't it be both?
I'm testing on last year
but I want to use it for this year
so this year's hasn't opened yet, no puzzle has been released to submit answers to
proc submit*(year: Natural, day: Natural, level: Natural, answer: string): string =
let multipart_data = newMultipartData({"level": $level, "answer": answer})
let response = client.post(&"https://adventofcode.com/{year}/day/{day}/answer", multipart = multipart_data)
return response.body
let r = submit(2020, 10, 1, "aa")
echo r
.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 join
I've always just copied my answer into the website textbox 
I wanted to try something new 😔
mmmm, I'm trying to remember who has some of the auto submission scripts..
Because I think for that to work you need to somehow login or supply your session cookie
I have that
Anyone know of any private leaderboards? Last year i think some sponsors did like promo prizes
load_env_from_string(read_file("utils/.env"))
let session_id = get_env("SESSION_ID")
let client = new_http_client(
headers = new_http_headers({"cookie": &"session={session_id}"}),
max_redirects = 0
)
I've got mine on gh
dear god i'm so tense
and yeah u need to get your🍪 from inspect element
yeah, and I have it
I can get /input and stuff
but I'm a bit confused on the answering aspect
What happens when you get it right? What happens when you get it wrong?
Right now, it keeps trying to redirect me to the day
if you get it wrong you have a timer to retry that gets longer
so the message you receive back should have some indication of how you did
What is the sponsor join code for this server?
run .aoc join to get it
(It's not a sponsor code, it's a private leaderboard code)
.aoc join
It keeps redirecting me to the day, though
for 2020?
Hard? No. Hard to do quickly? Yes.
Eh, not the beginning days... but it gets pretty difficult further in
last year the difficulty kinda plateaued though
@sinful pawn How come? Aren't you really good at py
well, this was like a year ago
Oh yeah right
also I'm not really good but I'd like to think I'm somewhat competent
if you're not good then i suck at python lol
hurm... I'm not sure why you're getting redirected to not the answer page when you submit
I am... so confused
why did they change the server pfp bruh
It's the AoC-themed one
the old ones was better
It's December, time for Advent of Code profile picture and banner~
I really like the animation for this server pfp
could the problem be that I'm using Nim ;-;
not unless you're misusing the HTTP API
I don't think so
once the request is on the wire, the server can't have any way of knowing what language it was created in.
I mean input works fine, so I know that at least the cookie is working
proc submit*(year: Natural, day: Natural, level: Natural, answer: string): string =
let multipart_data = new_multipart_data({"level": $level, "answer": answer})
let response = client.post(&"https://adventofcode.com/{year}/day/{day}/answer", multipart = multipart_data)
debug_echo response.headers
debug_echo response.status
return response.body
I'd think that means the error is somewhere here... but I don't think I can tell what it might be
perhaps multipart_data, since frankly I don't understand if that's how it's meant to work
hmmm maybe i will only watch to learn
I don't think we're doing anything much different ;-;
lmao im pretty sure i'll not be able to finish before some of yall here though i live in a more advantageous timezone
;-; I'm gonna be too obsessed with getting my helper working
just pip install aoc_helper 🙃
It has CLI as well :)
I keep getting redirected >:(
only hope there's nothing like intcode again this year
just hope this year is nothing like 2019
actually
that year gave me ptsd
.aoc count
The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.
GLHF
just type in the answers lol
ikr
u dont look like ur having much fun rn either
Oh, I think I figured it out
to be fair these first ones are prolly going to go real fast do the top 100 will prolly be down to small time differences
I'm doing it but when I wake up at 7 or so
I haven't even set up a venv or file loader or anything
helo what should i do?
i just copy and paste input lol, maybe ill set the input gtabbing for tomorrows
you can .aoc join but it doesn't start for an hour and a bit 
.aoc join
what was it?
I didn't figure it out 😔
POST https://adventofcode.com/2020/day/10/answer
Content-Type: application/x-www-form-urlencoded
Cookie: session=[REDACTED]
level=1&answer=aaa
This work using PyCharm's HTTP client
when I remove Content-Type, it doesn't work
I think nim should be sending a Content-Type: multipart/form-data instead, but it looks like that ought to happen automatically...
hm so should I try sending a raw body without multipart
<main>
<article><p>You gave an answer too recently; you have to wait after submitting an answer before trying again. You have 7m 50s left to wait. <a href="/2020/day/10">[Return to Day 10]</a></p></article>
</main>
Aha!
yeh its on cooldown
It's no longer sending me to the day page anymore
hi
each part will use the same input for the day?
yes
@mossy basin can I use this? https://github.com/salt-die/Advent-of-Code/tree/master/2021/aoc_helper
We rewrote it, you can install it from pip now
Wait he vendored it lol
wait really
ah
yeah, i've rewritten it again and probably will every new year
so vendored version is best for me
you have write access to my repo and I'm fairly sure you have write access to the PyPI package
maybe, but i'd rather just hack at my own repo
Fair
Error: unhandled exception: <class 'ModuleNotFoundError'>: No module named 'datetime.datetime'; 'datetime' is not a package [Exception]
um...
oh no 😔
Did you import datetime.datetime or something?
oops I fixed it
apparently it's trying to import "datetime.datetime" as if it was all a package name
let Datetime = py_import("datetime").datetime
let TimeDelta = py_import("datetime").timedelta
this works, it appears
RIP
wait nani 37 minutes
thanks for the helper functions
a fine addition to my collection
i couldn't think of any other utilities
what is lazy_submit?
If your function returns something other than None, submits it as your answer, otherwise does nothing
Check the CLI for templated code generation
yea did that
So yeah you just fill in your functions and let aoc_helper do the rest :)
Also if you run your code early, it'll open the browser tab for you as soon as the puzzle is set to release
when does it ask for the cookie
I got some in my template repo
https://github.com/Tisawesomeness/AdventOfCodeTemplate/blob/master/aocutil.py
First time you run it
alright right now it says waiting for puzzle to unlock
You can just fetch something from last year to force it to ask immediately
alright
(e.g. fetch 1 --year 2020)
alright, i’m tapping out early.. good luck everyone
o/
see you all tomorrow morning
Could not find configuration file. Please enter your token
Yup, that's the prompt for your cookie
Go to any advent of code page, and pull your cookie with e.g. editthiscookie
Lol, looks like the server is down already
literally tested my script at the same second that it died
I use firefox lol
(i hope I didn't kill it)
i thought my wifi died kek
same
https://addons.mozilla.org/en-GB/firefox/addon/etc2/ but use whatever you know lol
uh oh
yep is bacc
lol
I take it you know how to pull your token?
yes
I think I'll unironically use my smart iterator class, lol
Smart iterator?
#python-discussion message
I've shown it a few times
that's how iterators are in languages which can type them properly. way more compact, IMO
That's actually pretty neat
Yeah I do like the way e.g. Rust or JS handles iterators
.aoc countdown
The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.
soon
5am here lol
won't be able to take this as a cp rn :( have exams
Have you considered making foreach return a listcomp? It would be slightly more time efficient and could be more expressive
Actually I guess that's basically just an eager map
Maybe a .flatten()/.exhaust() to convert it to a list instead?
I do have a tolist in my version
and even a more general
def feed(self, fun):
return fun(self)
(e.g. .feed(dict) to make a dict from an iterator of items)
I'm not sure I like that one
But yeah
Ooh
I mean it's still just as easy to wrap in a function call
But yeah I see how that could look nice
^
there are literally just as many parens
lol
But less nesting
to wrap something in a map, I need to go to the beginning of the line, write map(..., go to the end, leave a )
with SIs I can just do .map(...)
how many spots are on the global leaderboard?
dict(my_iterator) vs my_iterator.feed(dict) ... is this less nesting?
100?
I think it's 100
so how many seconds until the global LB fills?
for day 1, like less than 30
About 1-5 minutes
damn
less than 30 seconds
f
F
F
F
10.5
Please don't repeatedly request this endpoint before it unlocks! The calendar countdown is synchronized with the server time; the link will be enabled on the calendar the instant this puzzle becomes available.
whoops 👀
👀
who reads that
inb4:
-it's 04:59 GMT
-server goes down and only gets back up in minutes
-the LB is already full
*EST
lol
ikr
lmao, I mean we already have code in our bot to handle "oh fuck, server went down. No points for this day"
no pls
fixed
starting soon!
.aoc countdown
The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.
goosebumps
7 mins lessgo
it is early
Imagine though
code golf atw
AoCTF
The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.
oh god i finally remembered where i've seen the AOC abbreviation before
watch 1st one be like
its Alexandria Ocasio Cortez
lol
morning people (good night/good evening). its freakin 14 degrees celsius in my room. i got jacket and beanie on
the #advent-of-code-spoilers-archive would post the solution for the questions of the previous day amiright
Imagine if the first puzzle is related to rockets
Alex Oxlade-Chamberlain
spoilers is for solutions , not questions
Once top 100 part 2 fills up it's opened for solutions
ye thats what
less then 5 min remain
Good luck everyone
why previous day sol?
resisting urge to press F5 relatively well I must say.
sending sols of the same day would be bad
go ahead and prepare:
for i in data:
...
they will open after the leader board fills
this is why we have tabnine
press 'f' and it will fill the for
lol
i'll do you one better
data = """
"""
data = [int(e) for e in data.strip().splitlines()]
tsiolkovsky: 😳
expenses = [ int(n) for n in open(day_01_path).readlines() ]
print( [prod(c) for c in combinations(expenses,2) if sum(c) == 2020 ] )
what
data = SI(fetch_day(1,False).split()).map(int).tolist() 🙂
I'm ready!
better:
data = aoc_helper.utils.extract_ints(raw)
what is this code
def solve_part_one(data):
aoc.guess_input(data)
I'll do you one better:
import aoc_helper
raw = aoc_helper.fetch(1, 2021)
data = aoc_helper.extract_ints(raw)
me when using maps which is disaster
lol
careful people, let's at least not crash our discord along with the AoC server
!?1 context
why not just data = [int(e) for e in data.split()] ?
should i save the input locally or is it okay to use requests ?
:)
you should save it locally.
me: trying to have a good sleep schedule
aoc: yeah thats gonna be 5am
Fetch with requests and cache locally.
sleep
print( aoc.read().solve() )
ints could be separated by commas or newlines or spaces, this is where re is nice
what if there are two numbers on each line, gotta be ready for the most flexible adjust
lol
4pm for me :)
2 mins!
oh you guys have fancy templates, i just have this 😆
from pathlib import Path
lines = Path("input.txt").read_text().split('\n')
out = Path("output.txt")
og_print = print
def print(*args, **kwargs):
og_print(*args, **kwargs, file=out.open('a'))
def solve():
print("1")
solve()
10:30 am for me lmfgao
trying to end competition
.aoc countdown
The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.
less then 2 mins
automatic fancy templates :)
lol sed lyf
wait are we going to get a file attachment already?!?!?!
ok now i understood why everyone giving templates smh
lol
i thought it would be somewhat like a codejam
1 minute
t-60s
less then a minute
we are most likely going to get data in a textfile
50s
lets see who the real winners here are
@woven oriole it will be a text file
time to start pressing f5 😳
al
30s
Feels like I’m waiting for a livestream to start
30s
hf
well you will need to make it textfile manually or download lol if you don't have helper function
hf
GLHF
20s
20s
t-20 all systems go
gl
10
3
2
:incoming_envelope: :ok_hand: applied mute to @hollow wharf until <t:1638335398:f> (9 minutes and 59 seconds) (reason: burst rule: sent 8 messages in 10s).
2
slowmode inc
<@&518565788744024082> Good morning! Day 1 is ready to be attempted. View it online now at https://adventofcode.com/2021/day/1. Good luck!
1
t-3 ignition
lmfao
It started :0
RIP
fuck you site
!unmute 675937585624776717
:incoming_envelope: :ok_hand: pardoned infraction mute for @hollow wharf.
bad resp
lmao
yeah
always happens
I have the site working fine
AoC serverside have the worst problem of "all of our requests will hit at the exact same time, there is no way to spread it out"
everyone be like: intense clicking
rank 77 but its probably gonna be purged
Oh the site is really slow now
do points still get awarded after the leaderboard fills up?
Anyone getting gateway timeout trying to submit?
mad lad already submitting
on the global, no. On private leaderboards, yes
#advent-of-code-spoilers-archive is now open since the leaderboard filled up
wt
what will be the name of the file we have to open , its not given lol
so place 101 doesn't get points?
on global, no. On the private leaderboards it does
okay, I did pretty bad
what do you mean?
dammit, had to wait 30 seconds for part 1
I got two errors when trying to load the puzzle 🙃
There is already a puzzle out for me lolol
I wouldn't be surprised if they nulled today
you need to update your token
I updated the lib to prompt on bad token
We won't be doing that. You'll have to figure out a way to not talk here for 10 minutes.
why?
do i gotta spam?>
:incoming_envelope: :ok_hand: applied mute to @hollow wharf until <t:1638335780:f> (9 minutes and 59 seconds) (reason: duplicates rule: sent 4 duplicated messages in 10s).
I'm sorry but LMAO
Why am I getting 504?
!i e 56057 12h You can keep it for longer if you wish to have mutes that bad 😄
Wow I'm taking too long to solve part 2 lol
server is struggling
got em both
wow not a good start this year
zip helped a lot 
i am done
I don’t understand what we have to do exactly- can someone elaborate?
I am also getting 504
i overthought the 2nd part a little
We do allow discussions of solutions freely in #advent-of-code-spoilers-archive
uh oh 504 
I don't know if any genius can solve this lol
Oh yeah sorry
||That was fun||
Plenty of people already have, good luck!
._.
yay! I'm finally done, that took me way too long
I give up
dw nor can i
the name of the file containing the inputs
input.txt ?
I didn't need to read this
Lol
yeet
it's just going to give you a plaintext list that you can copy and paste into whatever filename you want
AOC hype! This is exciting
🤣 Damn... My brain dont even work 1% for this
You got this!
There should be a "get input" or something on page where you can grab your input data
this right
yeah
Yeah don't rush it, take your time, read it carefully if you're stuck. As a suggestion, run your code against the input example that they give. Not your direct input
feel free to discuss without spoilers over in #advent-of-code-spoilers-archive
oh are we allowed to do spoilers here?
mah bad mah bad
no worries~ it's a new setup this year
yup!
Wait is it started
smgaller!
@woven oriole You got the same thing? lol
I just woke up
Different people get different numbers
is there any template we need to use in our code
eh, it's not that... I just uh... don't feel like being in such a competitive environment
I am getting 504 when submitting
nope, just get an answer that works. How you get there is entirely up to you
I just accidentally deleted my solution
It's only competitive if you care for it.
If you don't want to be on the competitive train, perhaps just start puzzles at your own time or your own pace.
That is absolutely fine
I only have plans to do this during my lunch break, so no way am I competing. It's just fun and a way to practice new skills
I will do it later I am brainded rn
11 minutes = top 3000. woo! First day more about figuring out your setup. 🙂
Honestly, I'm going to do something really really dumb ..I'm going rust for these.
fuck i forgot that this is today
I just spent 2 hours writing a persistent scheduler and yet this is too hard for me
No, u aren't genuine
I've already murdered my own motivation
wow that was fun
It's simple for me, I want to learn it, I don't wish to compete. So this seems like a good opportunity
Hola eivl
guys what will be the name of the list which we are going to use in our code
Won't matter
@winged trellis Don't tell me you figured it out lol
It's for fun yeah
well.. i have work in 15 minutes.. so id better be getting ready
I will go with golang in this :)
😎
yeah, just finished, but its very early for me
so it will be checked manually by some guy?
aaaa i made stupid errors
Dang... How did you even solved the puzzle
whos checking it
Your code isn't checked. If you look at the task it asks for a number based on your code
(one of the leaderboards >_>)
If your code is correct you'd get the right result
Any ideas as to how its done ?
oh damn got it thanks
Only the result is checked.
Good luck! What I'm doing is doing it in Python first, and then doing it in Rust but with pretty logging and stuff.
welp im on a 5 min cooldown lmao
sure, but there are others here that have time to help you out with some hints. also keep spoilers in mind and never share solutions here
bruh
Oh, that might be a good way to do it actually
the second part took way too much time
#advent-of-code-spoilers-archive looks like a great place if you need spoilers
like what do the letters mean
What was the command to join
.aoc join
it means 199 200 208 is under window A
etc etc
.aoc join
:x: @gloomy kernel, please (temporarily) enable DMs to receive the join code
bruh
