#advent-of-code

1 messages · Page 36 of 1

iron shadow
coarse wagon
#

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

hidden musk
iron shadow
#

I live in the best time zone

#

little varience to utc

#

makes dealing with tz's much easier

wary wigeon
#

it's 8.30 for me

#

but i have school 🥲

placid lake
#

advent of code or my sanity throughout the month?

willow ocean
#

.aoc join

tight dune
tight dune
wary wigeon
#

i have to go to school

tight dune
#

oh rip

stiff kraken
#

shame that it releases at 6 in the morning for me

final eagle
#

.aoc count

hidden copperBOT
#

The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.

tight dune
#

.aoc count

hidden copperBOT
#

The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.

wary wigeon
#

.aoc count

hidden copperBOT
#

The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.

wary wigeon
minor cave
#

If you hover over it, it'll show you the datetime it's supposed to start

wary wigeon
#

oh right

tight dune
#

.aoc count

hidden copperBOT
#

The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.

tight dune
#

13 hourssssssssss

#

icantwait

west summit
#

how does this advent of code work ? a coding challenge everyday ?

dark gyro
#

idk

molten fulcrum
sinful pawn
#

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

rancid fjord
#

.aoc help

hidden copperBOT
#
Command 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*
rancid fjord
#

.aoc countdown help

hidden copperBOT
#

The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.

tulip elbow
idle rivet
#

wohoo

junior hinge
#

.aoc countdown

hidden copperBOT
#

The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.

muted pivot
#

.aoc countdown

hidden copperBOT
#

The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.

hollow wharf
#

oh god its so early for me

ripe hollow
#

.aoc about

hidden copperBOT
#
What is Advent of Code?

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.

How do I sign up?

Sign up with one of these services:

Auth Services

GitHub
Google
Twitter
Reddit

How does scoring work?

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.

Join our private leaderboard!

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.

idle rivet
#

6am for me. Guess I know what I'll be doing in art class

sleek shuttle
#

what is this channel i stumbled upon?

brisk briar
#

hey whats the topic

#

or will that be announced later

sleek shuttle
#

what is this channel?

#

.aoc join

brisk briar
#

and also how do i make date text

peak dock
maiden solstice
#

.aoc join

earnest forge
cerulean hatch
#

.aoc join

gritty cedar
#

.aoc join

strange zinc
#

.aoc join

peak dock
#

!src aoc leaderboard

marsh currentBOT
#
Bad argument

Unable to convert 'aoc leaderboard' to valid command, tag, or Cog.

peak dock
#

hm

#

!src aoc

minor cave
#

it's .src

#

cause it's lancebot

peak dock
#

oh right

#

.src aoc leaderboard

hidden copperBOT
#
Command: adventofcode leaderboard

Get a snapshot of the PyDis private AoC leaderboard

Source Code
peak dock
#

totally got it right first try

sullen ermine
#

.aoc subscribe

hidden copperBOT
#

Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.

minor cave
#

(the join codes aren't things we post outside of DMs or AoC planning channels)

daring monolith
#

.aoc subscribe

hidden copperBOT
#

Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.

fringe temple
#

.aoc subscribe

hidden copperBOT
#

Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.

gritty cedar
#

.aoc subscribe

hidden copperBOT
#

Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.

junior hinge
#

.aoc subscribe

hidden copperBOT
#

Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.

timber glacier
#

.aoc subscribe

hidden copperBOT
#

Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.

wanton tangle
#

.aoc subscribe

hidden copperBOT
#

Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.

warm berry
#

Also check out #aoc-bot-commands

hidden musk
hidden copperBOT
#

Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.

signal grotto
#

Here comes the AoC activity, who’s ready?!

minor cave
#

let's gooo 1 am bed times for the next 25 days 🥲

earnest forge
#

I have not had enough sleep and will almost certainly not get enough sleep

#

you can all have a chance this year

hidden musk
earnest forge
#

Lol

minor cave
earnest forge
#

Understandable

hidden musk
#

:O you can't stay up then not finish

peak dock
#

just like move to the correct timezone lmao

minor cave
#

(but I also need to be awake until the global fills up so I can unlock the spoilers channel)

minor cave
minor cave
earnest forge
hidden musk
#

it's only an advantage if you don't have a job or school lol

earnest forge
#

Eh my university starts at 12 most days

minor cave
#

hawaii and like east asia is where it's at for timezone advantage

earnest forge
#

And several days I don't have anything

peak dock
#

whats it like for australia

hidden musk
#

midday, right?

minor cave
#

Even west coast US, the challenge opens at 9 pm for them

delicate hawk
#

.aoc join

peak dock
#

hm

earnest forge
minor cave
#

lmao it is my eternal battle within this server to slowly convert things from the british spelling to the us spelling

warm berry
#

I'll just do mine 20 hours behind

minor cave
hidden musk
#

🤮

earnest forge
#

Fun fact: Webster spoke against removing the u, before doing it himself a few years later

hollow oyster
#

89 people joined to leaderboard, nice

#

What are the challenges like, I have never joined this before.

minor cave
#

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

minor cave
warm berry
#

Think themed codewars kata

hollow oyster
#

what kind of questions there has been?

hollow oyster
tepid cairn
#

Hi :D

minor cave
junior hinge
hollow oyster
#

oh my... I give up instantly

minor cave
#

I highly recommend giving it a shot and taking your time with it

#

you learn a lot

hollow wharf
#

Can this be done in O(n)?

minor cave
#

Advent of Code is also fun because it's doesn't need to be done well it just needs to be done

hollow oyster
#

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

hollow wharf
#

The one i had in mind is o(nxn)

hollow oyster
#
def multiply(a, b):
  a * b

multiply(1, 20) # line made by me
``` (from code wars) for example what would even be wrong here?
warm berry
#

||return||

hollow oyster
#

;-;

stiff kraken
#

So close yet so far for me for AOC

rapid wolf
#

@hollow wharfyes, using a set

stiff kraken
#

Or just do anything with the result of a*b

hollow oyster
#

makes sense

hollow wharf
rapid wolf
#

a set can be constructed in O(n) and has O(1) membership checks

#

so you can just iterate twice

stiff kraken
#

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

rapid wolf
#

(or even in one iteration if you are clever about it)

#

well, you can't optimise it in python

hollow oyster
#

looking at the code war stuff, it seems a lot of basic python but nothing that I can actually do

rapid wolf
#

since * could have a side effect

hollow wharf
stiff kraken
#

Is a set in python the same as a set in maths? As in a set of unique numbers in order?

rapid wolf
#

that's not what a set is in math generally

ripe ingot
#

.aoc subscribe

hidden copperBOT
#

Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.

ripe ingot
#

.aoc join

rapid wolf
#

a set is an unordered collection of items in both python and math

#

in python they also need to be hashable

stiff kraken
#

Wait unordered?

rapid wolf
#

yeah, sets don't have an order

tepid cairn
stiff kraken
#

I’ve been told they are ordered

placid lake
#

woo, i love those cursed solutions

rapid wolf
#

you have been misled, a general set cannot even be ordered

stiff kraken
#

And that 2 different orders are the same as they will be changed to ordered anyways

rapid wolf
#

since not every set has a sensible ordering on it

tepid cairn
#

Cursed solutions best solutions

minor cave
#

like, is my code horribly inefficient? yes. Is it quick to code and fast enough to run? yes

warm berry
#

Solution = best solution

rapid wolf
#

consider the set of all functions that produce 1 for some result

#

how would you order those?

hidden musk
stiff kraken
hollow oyster
#

is there a way to unjoing AoC if I want to? As it seems like I will not be able to anything

minor cave
stiff kraken
hollow oyster
#

I know it alrd

minor cave
#

there's plenty of space on leaderboards

minor cave
ripe ingot
#

.leaderboard

#

Oops

#

Sorry

#

.aoc leaderboard

hidden copperBOT
#

:x: Please use #aoc-bot-commands for aoc commands instead.

hidden musk
minor cave
#

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?

warm berry
#

Meme Crypto NFTs

placid lake
hidden musk
stiff kraken
#

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

hidden musk
#

0-3 hours for me. I am average I think

minor cave
junior hinge
#

wooohoo i managed to do day 1 😄

craggy wraith
#

Since there is a new challenge each day, would I be able to do them like a few days after they are opened

placid lake
#

day 1 part 1 :)

hidden musk
#

only the first part :P

hidden musk
junior hinge
craggy wraith
#

Nice

mighty goblet
#

last year I failed badly

#

I only got through day 1

hollow oyster
#

so when will it start?

placid lake
#

.aoc countdown

hidden copperBOT
#

The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.

hollow oyster
#

oo

#

!remind 14h I might be at school and aoc has begun

marsh currentBOT
#
Naw.

Sorry, you can't do that here!

mighty goblet
#

All I see is <t:1638334800:R>.

craggy wraith
#

How do the two stars work?

placid lake
#

each day has two parts

#

each part is one star

stiff kraken
#

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

craggy wraith
peak dock
placid lake
#

except for day 25

minor cave
#

mhm, there are two stars for each day, so two parts

hidden musk
#

the 50th star is always a gimme

craggy wraith
#

Are both parts released at the same time?

hidden musk
#

yeah, but you can only do the second part after the first

placid lake
#

yep, but you have to complete the first part to get access to the second

peak dock
#

oh ic

minor cave
#

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

uncut zinc
placid lake
#

the intcode machine was so cool

junior hinge
placid lake
#

there was something that reminded me of it in 2020

hidden musk
#

yeah, fixing the kid's game thing

minor cave
#

oh yeah, fixing the jump codes

hidden musk
#

there was a cool graph solution for that one

placid lake
#

that got me into making a chip-8 interpreter lol

#

oooh yeah

#

used ||networkx||

brittle mauve
#

Im excited. I can never come up with ideas for projects but this'll give me some challenges to do.

junior hinge
#

is there anyway to multiply an iterable like sum()?

hidden musk
#

math.prod

unique osprey
#

It'd be cool to get another series of problems that build on each other like that

proud cosmos
#

Loved 2020 time to do 2021

#

Barely made it in 2020 haha, crunched one challenge till last minute

tawdry horizon
#

hello

#

it is time

#

well not for me as of now

terse comet
#

well, sort of yes, but how would you get around it?

#

all international events suffers from that

minor cave
#

I could argue it's sleep schedule biased too.

placid lake
#

mmm maybe i’ll stay up tonight since it should only take me a few mins

#

damn that’s nice

obtuse flume
#

wow December already

void ocean
#

starts at 1 pm here too 😆

#

Where do you live?

#

👀

sleek cave
#

.aoc join

void ocean
#

Magandang umaga sa iyo, kababayan

#

Oops, just broke a rule 😢

hidden musk
#

banned

woven solar
#

So is there going to be the first day task posted on the timestamp in the announcement?

minor cave
#

there is

#

.aoc countdown

hidden copperBOT
#

The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.

minor cave
#

that will update for each day

#

but that's when the thing will get released on the aoc website

proud cosmos
#

.aoc join

hidden copperBOT
#

:x: @proud cosmos, please (temporarily) enable DMs to receive the join code

bleak sable
mild tapir
#

.aoc join

vapid flare
#

.aoc join

bleak sable
#

I JUST POSTED THE BOT COMMANDS CHANNEL ABOVE YOU

minor cave
bleak sable
#

but it's annoying when there's a dedicated channel and as I said, I literally linked it just above them. T.T

signal grotto
#

That command doesn't fill much space, it's not a huge deal for that one.

bleak sable
#

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...

bleak sable
#

so I was afraid that since second person followed the first (just after my channel link), then it would result in more commands again

signal grotto
#

I assume we'll get some better discussion once the event starts too

narrow crown
#

ooh it comes it in exactly 5 hrs

#

luckily i might be awake for an hour to try it before going to sleep

sharp panther
#

@compact token Please don't post copypastas and ping users without reason here.

bleak sable
sharp panther
#

Yeah, I deleted them.

compact token
#

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

bleak sable
# sharp panther Yeah, I deleted them.

Wouldn't that count as spam and get a mute? pithink If they posted it as one message or without changing anything (tag changed content), then bot would automatically mute them

compact token
#

please

#

i want to live

sharp panther
#

!mute 903477658216710174 6h Please don't post copypastas here. Take some time to decide whether you'd like to meaningfully contribute to the server.

marsh currentBOT
#

failmail :ok_hand: applied mute to @compact token until <t:1638339816:f> (5 hours and 59 minutes).

bleak sable
narrow crown
#

bruh

thin blaze
#

Hello !

#

Ready for Advent of Code ! \o/

muted sand
#

The aoc will start after 4 hours?

thin blaze
#

As an European, I have no choice to do it after sleeping. 😂

placid lake
#

time to do my homework as fast as possible in four hours!

muted sand
#

I thought I only have 4 hours left

tight dune
#

i have break at 10:30

#

the stars have aligned

sinful pawn
#

lol

#

I'm gonna try to get my brother to participate this year

true forge
#

Hi can someone tell me whats happening in advent of code event??

hidden musk
sinful pawn
#

I'm struggling to think of ways to prepare

hidden musk
#

write a script to fetch inputs for you

sinful pawn
#

I can... make 25 folders named Day {i}

sinful pawn
placid lake
#

uhh i've applied to my top school ED, and i'm doing the rest RD later

hidden musk
#

huh? link? @sinful pawn

placid lake
#

you?

tight dune
#

lmao what

sinful pawn
#

I was looking to see if they had an API or something

hidden musk
#

i mean, downloading the inputs once, and caching it, is the same as opening the site manually and copying the inputs

placid lake
#

they do, but yes, please play nice with it

sinful pawn
minor cave
#

.aoc countdown

hidden copperBOT
#

The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.

tight dune
#

👀

sinful pawn
#

other than like

if not exists_file("input.txt"):
    # Insert code to download input

in each file

tight dune
#

4 hours lesgoooo

sinful pawn
#

or... a helper that does this

placid lake
#

i made myself a cli to create days, and run, time, and submit solutions

#

it comes in handy

sinful pawn
#

Perhaps I should do the same

sinful pawn
#

time to learn about Nim modules

hidden musk
#

i did that too

sinful pawn
#

and... time to do some sniffing with AoC requests

#

unless there's documentation somewhere

sinful pawn
#

Google keeps trying to refer me to Ms. AOC

tight dune
#

haskell tho :(

placid lake
#

haha yeah, AoC vs AOC

sinful pawn
tight dune
#

weird loads for me

#

'twas a bit slow tho

sinful pawn
#

omg it loaded

tight dune
sinful pawn
#

gosh. I feel like people over-complicate their scripts

#

I just wanna know the endpoints lemon_angrysad

placid lake
tight dune
#

that looks amazing

sinful pawn
#

Discord is refusing to play that

#

do I smell... Rich

placid lake
#

lol.. you smell curses

sinful pawn
#

oh. yay, pain

placid lake
#

the code for that was horrific

sinful pawn
#

as is the nature of curses

placid lake
#

i wrote it once and never looked back

sinful pawn
#

I think you probably could've done something nice with Rich

#

it has "TUI" type stuff

placid lake
#

yeah probably

tight dune
#

or textual

sinful pawn
#

I... wanna do that now but I want to commit to Nim

#

I wonder if I can just use some interfacing o_o

tight dune
#

ill use rust

sinful pawn
#

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

lofty notch
#

.AOC join

#

.aoc join

mossy basin
#

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

earnest forge
#

Yeah I remember really liking your computer visualisation

#

I still like my blinking router visualisation but it's much less impressive than yours

sinful pawn
#

salt-die is the dedicated TUI god

#

there's no beating them 😔

placid lake
#

salt has the coolest TUIs and animations

hidden musk
#

too cool 😔

earnest forge
#

Anyone wanna play something while we wait for puzzle unlock?

hidden musk
#

naptime

earnest forge
#

I wish I could sleep for 3 hours at a time lol

placid lake
#

would anyone like to complete my homework for me?

#

i didn't realize i chose such tedious and annoying classes this year

hidden musk
sharp panther
#

this is making me want to make pretty tuis for every answer this year ahhh I must resist

placid lake
sinful pawn
#

intense procrastination noises

placid lake
#

senioritis :/

hidden musk
#

it's not even second semester yet lmfao

sharp panther
earnest forge
#

I have just gone downstairs, from my desktop, to free my laptop from a pile of stuff

mossy basin
#

i no longer have to fight curses

placid lake
#

lol

torn palm
#

2 more hours

merry ocean
#

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?

earnest forge
#

Once the puzzle unlocks you can complete it any time at all

placid lake
#

you could finish them in the next century if you'd like!

sharp panther
#

Yes! You can do the challenges whenever you want, even after it has ended.

candid berry
#

but your leaderboard score is based on how quickly you solve it after it's unlocked.

placid lake
#

if AoC is still around by then

merry ocean
#

ohh thanks a lot

bright spindle
#

They are open indefinitely.

merry ocean
merry ocean
#

Thanks a lot again!! I am so happy now ducky_party!!!!

lavish lava
#

.aoc subscribe

hidden copperBOT
#

Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.

lavish lava
#

.aoc join

merry ocean
#

.aoc subscribe

hidden copperBOT
#

Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.

merry ocean
placid lake
#

you can join the Python Discord leaderboard

warm ore
#

.aoc join 🎉

hidden copperBOT
#

:x: @warm ore, please (temporarily) enable DMs to receive the join code

warm ore
#

.aoc join

lavish lava
hoary canyon
#

.aoc countdown

hidden copperBOT
#

The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.

merry ocean
distant flicker
#

what should i do to make the right side have ascii

earnest forge
#

Display a second column of options?

distant flicker
#

yeah

#

also note that code ss i sent is just a simulator i made its not real

fast mural
earnest forge
#

I mean like specifically 3 hours and not longer

fast mural
#

why?

#

that's bad for your health

earnest forge
#

I mean like at will lol

fast mural
#

why?

earnest forge
#

So I could be better rested for aoc 🙃

fast mural
#

ok

hollow wharf
#

.aoc join

placid lake
#

i think they mean they can't take naps

hidden musk
#

a nap

placid lake
#

mmm the homework i need to do is now done

#

so time to prepare for AoC and rest a bit

#

!role "Advent of Code"

marsh currentBOT
#
Advent of Code info
ID

518565788744024082

Colour (RGB)

#000000

Colour (HSV)

0.00 0.00 0

Member count

270

Position

7

Permission code

6442450944

placid lake
#

not bad, 270

hollow wharf
#

.aoc subscribe

hidden copperBOT
#

Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.

noble dew
#

.aoc subscribe

hidden copperBOT
#

Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.

noble dew
#

.aoc join

minor cave
#

2 Hours Remain

rocky oar
candid berry
#

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

placid lake
#

the first of many fun challenges

minor cave
#

It's the start of Advent of Code in general. It's a fun time.

hidden musk
#

I'm so ready to go to sleep and be well rested so I can do the problems in the morning

flat yew
#

.aoc subscribe

hidden copperBOT
#

Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.

placid lake
#

not staying up this year psvm?

hidden musk
#

nope

#

you can take my leaderboard spot 🥺

earnest forge
#

Can't say I was expecting to recable my house at 3am but internet cutouts demanded it 🙃

void ocean
#

.adventofcode subscribe

hidden copperBOT
#

Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.

earnest forge
#

Time to hope that fixed the issue

placid lake
#

i’m only planning on staying up tonight but we’ll see lol

hollow wharf
#

Is the scoring based on who submits the fastest?

#

Is there scoring pithink I've never done one of these when it was live

shadow stag
#

.aoc subscribe

hidden copperBOT
#

Hey, you already are receiving notifications about new Advent of Code tasks. If you don't want them any more, run .adventofcode unsubscribe instead.

sinful pawn
#

I cannot at all figure out how to send an answer and... do anything

minor cave
minor cave
sinful pawn
#

I'm testing on last year

#

but I want to use it for this year

minor cave
sinful pawn
#
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
dim oracle
#

.aoc subscribe

hidden copperBOT
#

Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.

dim oracle
#

.aoc join

hollow wharf
#

I've always just copied my answer into the website textbox cirISee

sinful pawn
#

I wanted to try something new 😔

minor cave
#

Because I think for that to work you need to somehow login or supply your session cookie

sinful pawn
#

I have that

frank maple
#

Anyone know of any private leaderboards? Last year i think some sponsors did like promo prizes

sinful pawn
#
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
)

pine tiger
#

dear god i'm so tense

hidden musk
#

and yeah u need to get your🍪 from inspect element

sinful pawn
#

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

frank maple
#

if you get it wrong you have a timer to retry that gets longer

minor cave
summer kraken
#

What is the sponsor join code for this server?

minor cave
earnest forge
#

(It's not a sponsor code, it's a private leaderboard code)

frank maple
#

.aoc join

sinful pawn
minor cave
sinful pawn
#

yuh

#

I post to day/10/answer and I get 302 Found to day/10

wet osprey
#

Is "Advent of Code" event hard for beginners?

#

OvO)

earnest forge
#

Hard? No. Hard to do quickly? Yes.

sinful pawn
hidden musk
#

last year the difficulty kinda plateaued though

sinful pawn
#

I couldn't get past day 9

#

day 10 was far too confusing for me

hollow wharf
#

@sinful pawn How come? Aren't you really good at py

sinful pawn
hollow wharf
#

Oh yeah right

sinful pawn
#

also I'm not really good but I'd like to think I'm somewhat competent

hollow wharf
#

if you're not good then i suck at python lol

minor cave
sinful pawn
#

I am... so confused

hollow wharf
#

why did they change the server pfp bruh

earnest forge
#

It's the AoC-themed one

hollow wharf
#

the old ones was better

minor cave
#

It's December, time for Advent of Code profile picture and banner~

#

I really like the animation for this server pfp

sinful pawn
#

could the problem be that I'm using Nim ;-;

candid berry
#

not unless you're misusing the HTTP API

sinful pawn
#

I don't think so

candid berry
#

once the request is on the wire, the server can't have any way of knowing what language it was created in.

sinful pawn
#

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

placid lake
wet osprey
#

hmmm maybe i will only watch to learn

sinful pawn
peak dock
#

lmao im pretty sure i'll not be able to finish before some of yall here though i live in a more advantageous timezone

sinful pawn
#

;-; I'm gonna be too obsessed with getting my helper working

earnest forge
#

just pip install aoc_helper 🙃

sinful pawn
#

:c

#

I could technically do that since I'm using nimpy

#

but no

earnest forge
#

It has CLI as well :)

sinful pawn
#

I keep getting redirected >:(

pine tiger
#

only hope there's nothing like intcode again this year

#

just hope this year is nothing like 2019

#

actually

#

that year gave me ptsd

tight dune
#

.aoc count

hidden copperBOT
#

The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.

tight dune
#

in an HOUR

#

LETSGOOOOOOO

earnest forge
#

GLHF

sinful pawn
#

noooo

#

;-; I've not got time for this

#

I'm beyond confusion

frank maple
#

just type in the answers lol

peak dock
#

ikr

sinful pawn
#

:(

#

that's no fun

peak dock
#

u dont look like ur having much fun rn either

sinful pawn
#

Oh, I think I figured it out

frank maple
#

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

potent pumice
#

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

dusk ibex
#

helo what should i do?

frank maple
#

i just copy and paste input lol, maybe ill set the input gtabbing for tomorrows

hollow wharf
#

you can .aoc join but it doesn't start for an hour and a bit ducky_tube

slim island
#

.aoc join

candid berry
sinful pawn
#

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

candid berry
#

I think nim should be sending a Content-Type: multipart/form-data instead, but it looks like that ought to happen automatically...

sinful pawn
#

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!

frank maple
#

yeh its on cooldown

sinful pawn
#

It's no longer sending me to the day page anymore

sinful agate
#

hi

pearl needle
#

each part will use the same input for the day?

candid berry
#

yes

sinful agate
earnest forge
#

Wait he vendored it lol

sinful agate
#

wait really

earnest forge
#

Yeah

#

pip install aoc_helper

sinful agate
#

ah

mossy basin
#

yeah, i've rewritten it again and probably will every new year

#

so vendored version is best for me

earnest forge
#

you have write access to my repo and I'm fairly sure you have write access to the PyPI package

mossy basin
#

maybe, but i'd rather just hack at my own repo

earnest forge
#

Fair

sinful pawn
#
Error: unhandled exception: <class 'ModuleNotFoundError'>: No module named 'datetime.datetime'; 'datetime' is not a package [Exception]

um...

#

oh no 😔

earnest forge
#

Did you import datetime.datetime or something?

sinful pawn
#

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

placid lake
#

oh no, i got in bed and now i’m way too sleepy

#

i might be out for tonight’s AoC lol

earnest forge
#

RIP

final eagle
#

wait nani 37 minutes

split niche
#

a fine addition to my collection

mossy basin
#

i couldn't think of any other utilities

sinful agate
#

what is lazy_submit?

earnest forge
#

Check the CLI for templated code generation

sinful agate
#

yea did that

earnest forge
#

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

sinful agate
#

when does it ask for the cookie

earnest forge
#

First time you run it

sinful agate
#

alright right now it says waiting for puzzle to unlock

earnest forge
#

You can just fetch something from last year to force it to ask immediately

sinful agate
#

alright

earnest forge
#

(e.g. fetch 1 --year 2020)

placid lake
#

alright, i’m tapping out early.. good luck everyone

earnest forge
#

o/

placid lake
#

see you all tomorrow morning

sinful agate
earnest forge
#

Yup, that's the prompt for your cookie

sinful agate
#

oh

#

so do I get cookie from any years input or that won't work for 2021

earnest forge
#

Go to any advent of code page, and pull your cookie with e.g. editthiscookie

woven solar
#

Lol, looks like the server is down already

pearl needle
#

oh

#

ok i was worried

earnest forge
#

Yup lmao

#

Nice

pearl needle
#

literally tested my script at the same second that it died

sinful agate
#

I use firefox lol

pearl needle
#

(i hope I didn't kill it)

final eagle
#

i thought my wifi died kek

sinful agate
#

same

earnest forge
wispy ice
somber crow
sinful agate
#

ok worked

#

it loads for me

wispy ice
#

yep is bacc

earnest forge
#

Yup

#

hey the puzzles seem to be in order this year

#

glares at 2020

sinful agate
#

lol

earnest forge
#

I take it you know how to pull your token?

sinful agate
#

yes

woven solar
#

I think I'll unironically use my smart iterator class, lol

earnest forge
#

Smart iterator?

woven solar
#

that's how iterators are in languages which can type them properly. way more compact, IMO

earnest forge
#

That's actually pretty neat

#

Yeah I do like the way e.g. Rust or JS handles iterators

minor cave
#

.aoc countdown

hidden copperBOT
#

The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.

minor cave
#

soon

livid gull
#

5am here lol

sinful agate
#

won't be able to take this as a cp rn :( have exams

earnest forge
#

Actually I guess that's basically just an eager map

#

Maybe a .flatten()/.exhaust() to convert it to a list instead?

woven solar
#

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)

earnest forge
#

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

woven solar
#

the point is to not need that

#

parentheses 🤮

somber crow
#

^

earnest forge
#

there are literally just as many parens

sinful agate
#

lol

somber crow
#

But less nesting

woven solar
#

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(...)

gray arrow
#

how many spots are on the global leaderboard?

mossy basin
#

dict(my_iterator) vs my_iterator.feed(dict) ... is this less nesting?

sinful agate
somber crow
woven solar
#

so how many seconds until the global LB fills?

mossy basin
#

for day 1, like less than 30

earnest forge
#

About 1-5 minutes

sinful agate
#

damn

split niche
#

less than 30 seconds

mossy basin
#

day 1 last year was the only day i got top 100 and it was purged

#

rip

sinful agate
#

f

somber crow
#

F

earnest forge
#

F

split niche
#

F

somber crow
#

10.5

woven solar
#

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 👀

somber crow
#

👀

somber crow
#

Less than 10 mins

#

9:20

woven solar
#

inb4:
-it's 04:59 GMT
-server goes down and only gets back up in minutes
-the LB is already full

minor cave
#

lmao, I mean we already have code in our bot to handle "oh fuck, server went down. No points for this day"

sinful agate
#

no pls

woven solar
hollow wharf
#

starting soon!

sinful agate
#

.aoc countdown

hidden copperBOT
#

The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.

woven oriole
#

7 mins lessgo

sinful agate
#

it is early

woven oriole
#

i am not expecting any ctf equivalent :pls:

#

or some hash related puzzle

earnest forge
#

Imagine though

sinful agate
woven oriole
#

yes

#

exactly

earnest forge
#

AoCTF

somber crow
#

Discord is rounding

#

.aoc countdown

hidden copperBOT
#

The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.

peak dock
#

oh god i finally remembered where i've seen the AOC abbreviation before

sinful agate
peak dock
#

its Alexandria Ocasio Cortez

sinful agate
#

lol

junior hinge
#

morning people (good night/good evening). its freakin 14 degrees celsius in my room. i got jacket and beanie on

woven oriole
somber crow
#

Imagine if the first puzzle is related to rockets

tulip elbow
#

Alex Oxlade-Chamberlain

mossy basin
#

spoilers is for solutions , not questions

earnest forge
woven oriole
#

ye thats what

hoary canyon
#

less then 5 min remain

earnest forge
#

Good luck everyone

sinful agate
rancid creek
#

resisting urge to press F5 relatively well I must say.

earnest forge
#

imagine controlling the browser yourself

#

couldn't be me

woven oriole
mossy basin
#

go ahead and prepare:

for i in data:
    ...
sinful agate
woven oriole
#

lmao

#

ye got

lucid oyster
sinful agate
#

lol

prisma sundial
woven solar
#

tsiolkovsky: 😳

rancid creek
#
expenses = [ int(n) for n in open(day_01_path).readlines() ]
print( [prod(c) for c in combinations(expenses,2) if sum(c) == 2020 ] )
woven oriole
#

what

woven solar
rancid creek
#

I'm ready!

mossy basin
woven oriole
#

what is this code

split niche
#
def solve_part_one(data):
    aoc.guess_input(data)
earnest forge
sinful agate
#

me when using maps which is disaster

woven solar
#

careful people, let's at least not crash our discord along with the AoC server

woven oriole
#

!?1 context

candid berry
junior hinge
#

should i save the input locally or is it okay to use requests ?

candid berry
#

you should save it locally.

lucid oyster
#

me: trying to have a good sleep schedule
aoc: yeah thats gonna be 5am

woven solar
rancid creek
#
print( aoc.read().solve() )
mossy basin
#

ints could be separated by commas or newlines or spaces, this is where re is nice

prisma sundial
void ocean
#

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()
woven oriole
#

10:30 am for me lmfgao

sinful agate
woven solar
#

.aoc countdown

hidden copperBOT
#

The Advent of Code event is not currently running. The next event will start <t:1638334800:R>.

hoary canyon
#

less then 2 mins

sinful agate
#

lol sed lyf

woven oriole
#

wait are we going to get a file attachment already?!?!?!

#

ok now i understood why everyone giving templates smh

sinful agate
#

lol

woven oriole
#

i thought it would be somewhat like a codejam

sly latch
#

1 minute

wispy ice
#

t-60s

hoary canyon
#

less then a minute

junior hinge
#

we are most likely going to get data in a textfile

somber crow
#

50s

prisma sundial
#

lets see who the real winners here are

sinful agate
#

@woven oriole it will be a text file

lucid oyster
#

time to start pressing f5 😳

hollow wharf
#

30s

shadow stag
#

Feels like I’m waiting for a livestream to start

somber crow
#

30s

tulip elbow
#

hf

sinful agate
# woven oriole al

well you will need to make it textfile manually or download lol if you don't have helper function

sly latch
#

hf

earnest forge
#

GLHF

somber crow
#

20s

hollow wharf
#

20s

wispy ice
#

t-20 all systems go

sinful agate
#

gl

woven oriole
#

10

somber crow
#

10

#

5

shut trail
#

3

woven oriole
#

2

marsh currentBOT
#

: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).

shut trail
#

2

sinful agate
#

slowmode inc

hidden copperBOT
shut trail
#

1

wispy ice
#

t-3 ignition

sinful agate
#

lmfao

shadow stag
#

It started :0

cyan fable
#

RIP

sinful agate
#

fuck you site

hollow wharf
#

!unmute 675937585624776717

marsh currentBOT
#

:incoming_envelope: :ok_hand: pardoned infraction mute for @hollow wharf.

sinful agate
#

bad resp

woven oriole
#

lmao

sinful agate
#

pls god send help

#

tiemot

robust stratus
#

yeah

sinful agate
#

always happens

shadow stag
#

I have the site working fine

livid gull
#

rank 77 !

#

:))

minor cave
#

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"

sinful agate
#

everyone be like: intense clicking

livid gull
#

rank 77 but its probably gonna be purged

shadow stag
#

Oh the site is really slow now

gray arrow
#

do points still get awarded after the leaderboard fills up?

north silo
#

Anyone getting gateway timeout trying to submit?

sinful agate
#

mad lad already submitting

minor cave
sinful agate
#

wt

earnest forge
#

385/153 but I think it's getting purged

#

I literally got randomly signed out 🙃

woven oriole
#

what will be the name of the file we have to open , its not given lol

earnest forge
#

Nvm I'm a dumb

#

Still got 2 504s

gray arrow
minor cave
woven solar
#

okay, I did pretty bad

mossy basin
#

dammit, had to wait 30 seconds for part 1

earnest forge
#

I got two errors when trying to load the puzzle 🙃

trim urchin
#

There is already a puzzle out for me lolol

minor cave
#

I wouldn't be surprised if they nulled today

mossy basin
#

you need to update your token

earnest forge
#

Ended up switching and submitting it with my desktop browser lol

#

Nope was 504

mossy basin
#

oh

#

that sucks

earnest forge
#

I updated the lib to prompt on bad token

hollow wharf
#

<@&831776746206265384> mute me for 10m or make slowmode

#

!slowmode

#

!mute

#

sus

hollow wharf
marsh currentBOT
#

: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).

minor cave
#

I'm sorry but LMAO

pine tiger
#

what

#

i don't even get

#

p2

somber crow
#

Why am I getting 504?

hollow wharf
#

!i e 56057 12h You can keep it for longer if you wish to have mutes that bad 😄

void ocean
#

Wow I'm taking too long to solve part 2 lol

minor cave
pearl needle
#

got em both

trim urchin
prisma sundial
#

wow not a good start this year

hollow wharf
#

zip helped a lot ducky_angel

final eagle
#

i am done

shadow stag
#

I don’t understand what we have to do exactly- can someone elaborate?

whole veldt
#

I am also getting 504

final eagle
#

i overthought the 2nd part a little

trim urchin
#

Crazy stuff

minor cave
hollow wharf
#

uh oh 504 ducky_cheese

trim urchin
#

I don't know if any genius can solve this lol

winged pond
#

||That was fun||

signal grotto
sinful pawn
#

._.

sharp panther
#

yay! I'm finally done, that took me way too long

sinful pawn
#

I give up

lucid oyster
woven oriole
#

input.txt ?

sinful pawn
hearty shuttle
#

Lol

final eagle
#

yeet

minor cave
hearty shuttle
#

AOC hype! This is exciting

trim urchin
signal grotto
#

You got this!

rancid creek
#

HUrrah!

#

1 down. 🙂

sinful pawn
#

I am no longer excited

#

oh well. I tried

minor cave
#

There should be a "get input" or something on page where you can grab your input data

trim urchin
#

Yeah there is get input data

#

This is my first time so i really dont understand it

trim urchin
#

yeah

hearty shuttle
# sinful pawn I am no longer excited

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

minor cave
unique osprey
#

oh are we allowed to do spoilers here?

minor cave
minor cave
gloomy kernel
#

Wait is it started

rancid creek
#

smgaller!

trim urchin
#

@woven oriole You got the same thing? lol

gloomy kernel
#

I just woke up

hearty shuttle
woven oriole
sinful pawn
sinful agate
#

I am getting 504 when submitting

sinful pawn
#

it's quite depressing

#

._.

minor cave
somber crow
#

I just accidentally deleted my solution

hearty shuttle
#

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

minor cave
#

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

gloomy kernel
rancid creek
#

11 minutes = top 3000. woo! First day more about figuring out your setup. 🙂

hearty shuttle
#

Honestly, I'm going to do something really really dumb ..I'm going rust for these.

shrewd thicket
#

fuck i forgot that this is today

lucid oyster
#

I just spent 2 hours writing a persistent scheduler and yet this is too hard for me

sinful pawn
#

I've already murdered my own motivation

winged trellis
#

wow that was fun

hearty shuttle
#

Hola eivl

honest elk
#

guys what will be the name of the list which we are going to use in our code

trim urchin
#

@winged trellis Don't tell me you figured it out lol

winged trellis
#

well.. i have work in 15 minutes.. so id better be getting ready

gloomy kernel
#

I will go with golang in this :)

shrewd thicket
winged trellis
honest elk
wispy ice
#

aaaa i made stupid errors

trim urchin
restive vault
#

whos checking it

hearty shuttle
minor cave
#

(one of the leaderboards >_>)

hearty shuttle
#

If your code is correct you'd get the right result

trim urchin
hearty shuttle
#

Only the result is checked.

sharp panther
wispy ice
#

welp im on a 5 min cooldown lmao

winged trellis
pine tiger
#

bruh

hearty shuttle
pine tiger
#

the second part took way too much time

winged trellis
pine tiger
#

like what do the letters mean

gloomy kernel
#

What was the command to join

sharp panther
#

.aoc join

final eagle
#

etc etc

gloomy kernel
#

.aoc join

hidden copperBOT
#

:x: @gloomy kernel, please (temporarily) enable DMs to receive the join code

pine tiger
#

bruh

gloomy kernel
#

k

#

.aoc join