#advent-of-code

1 messages Β· Page 1 of 1 (latest)

minor cave
#

&aoc c

shut trellisBOT
#

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

brisk briar
#

.aoc

#

&aoc

shut trellisBOT
#
&[adventofcode|aoc]

All of the Advent of Code commands.

Commands:
  about       Learn about Advent of Code
  countdown   Return time left until next day
  dayandstar  Get a view that lets you filter the leaderboard by day and star
  global      Get a link to the global leaderboard
  join        Learn how to join the leaderboard (via DM)
  leaderboard Get a snapshot of the PyDis private AoC leaderboard
  link        Tie your Discord account with your Advent of Code name.
  stats       Get daily statistics for the Python Discord leaderboard
  subscribe   NOTE: This command has been moved to &subscribe
  unlink      Tie your Discord account with your Advent of Code name.

Type &help command for more info on a command.
You can also type &help category for more info on a category.
mossy basin
#

&aoc join

shut trellisBOT
#

:x: Failed to get join code! Notified maintainers.

placid lake
#

&aoc join

shut trellisBOT
#

:x: Failed to get join code! Notified maintainers.

placid lake
#

incredible

minor cave
#

Taking a look now

placid lake
#

ladies and gents, it's that time of year again

#

it's time to stay up till 3am for the entirety of the month of december

crimson marsh
#

'tis the season to be fixin' bugs

placid lake
tepid cairn
#

we're up!

#

I wont' be able to do these at the crack of dawn, because school πŸ˜”

#

&aoc join

shut trellisBOT
#

:x: Failed to get join code! Notified maintainers.

young oriole
#

&aoc join

shut trellisBOT
#

:x: Failed to get join code! Notified maintainers.

tepid cairn
#

rip

sharp panther
#

four hours left πŸ‘€

crimson marsh
#

i hope the maintainer notifications have some kind of duplicates rate limit πŸ‘€

minor cave
#

env vars got a bit scrambled, our lovely @spring heron has fixed and redeployed

empty fable
#

&aoc join

hidden musk
analog dome
#

&aoc join

kindred holly
#

&aoc join

tepid cairn
#

east coast best coast

hidden musk
#

right coast right coast

kindred holly
#

no coast sad coast 😒

tepid cairn
#

can't spell best without est

soft matrix
#

&aoc join

daring raptor
#

&aoc join

steady schooner
#

&aoc join

broken cradle
#

might be at a disadvantage if it releases at midnight est because no way I'm staying up till midnight tonight

trail flare
#

&aoc join

broken cradle
#

yeah

placid lake
hidden musk
#

πŸ˜”

placid lake
#

east coast was the best coast

#

where do you go to school? if you don’t mind me asking

#

i miss the philly suburbs

hidden musk
#

north philly lol

placid lake
#

fun fun

#

don’t die out there

woven sable
#

&aoc join

shut trellisBOT
#

:x: @woven sable, please (temporarily) enable DMs to receive the join code

woven sable
#

&aoc join

hidden musk
tender cradle
#

&aoc join

placid lake
#

yeah.. that's pretty bad

woven sable
#

&aoc

shut trellisBOT
#
&[adventofcode|aoc]

All of the Advent of Code commands.

Commands:
  about       Learn about Advent of Code
  countdown   Return time left until next day
  dayandstar  Get a view that lets you filter the leaderboard by day and star
  global      Get a link to the global leaderboard
  join        Learn how to join the leaderboard (via DM)
  leaderboard Get a snapshot of the PyDis private AoC leaderboard
  link        Tie your Discord account with your Advent of Code name.
  stats       Get daily statistics for the Python Discord leaderboard
  subscribe   NOTE: This command has been moved to &subscribe
  unlink      Tie your Discord account with your Advent of Code name.

Type &help command for more info on a command.
You can also type &help category for more info on a category.
woven sable
#

&aoc link

shut trellisBOT
autumn sierra
#

about

#

&about

shut trellisBOT
#
Command not found

Command "about" is not found

woven sable
#

&aoc about

shut trellisBOT
#
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.

woven sable
#

&aoc link

shut trellisBOT
woven sable
#

&aoc link Shom770

shut trellisBOT
woven sable
#

oh this is the discussion channel oops

gleaming token
#

&aoclink

shut trellisBOT
#
Command not found

Command "aoclink" is not found

gleaming token
#

&aoc link

shut trellisBOT
tulip elbow
#

&aoc join

gleaming token
#

&aoc join

zealous brook
#

&aoc join

shut trellisBOT
#

:x: @zealous brook, please (temporarily) enable DMs to receive the join code

zealous brook
#

&aoc join

hollow wharf
#

Hello

#

does anyone know how to add music to Pygame

severe meteor
#

&aoc join

keen lichen
#

&aoc join

rancid creek
#

&aoc join

shut trellisBOT
#

:x: @rancid creek, please (temporarily) enable DMs to receive the join code

rancid creek
#

😦

#

Why does discord hide the flag for enabling DM's every time I have to go searching for it. lol.
(under user settings, privacy and safety, toggle the all server setting a couple times and reset everything)

#

&aoc join

sudden coral
#

Hello, does anyone know whether any set up for AOC is required?

lofty junco
#

&aoc join

rancid creek
sudden coral
#

Where can I find that input file?

#

@rancid creek

minor cave
rancid creek
mossy basin
#

can save it directly from browser or copy/paste directly into your ide

undone quarry
#

we're cloooooose!

#

I'm dyin' to start

mossy basin
#

time to use christmas theme ide

sudden coral
#

Oh okay.

minor cave
#

&aoc c

shut trellisBOT
#

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

summer parcel
#

if I joined last year, do I have to join again?

minor cave
hollow wharf
#

&aoc join

sharp panther
#

that's one of them, yes

mossy basin
#

4700 seconds to go

torn thorn
#

does anyone know where i can see where a leaderboard came from

#

there's one i joined like a few years ago but i can't for the life of me remember πŸ’€

mossy basin
#

can wait for it to fill up and see if you recognize anyone

torn thorn
#

i forgot to do this last year

minor cave
#

that is not one of our leaderboards

torn thorn
#

probs not

hidden musk
#

hmm..wonder what the drawing will be

craggy umbra
#

&aoc join

#

&aoc lb

shut trellisBOT
#

Here's our current top 10! πŸŽ„πŸŽ„πŸŽ„

     | Name                      | Score | ⭐, ⭐⭐
--------------------------------------------------
   1 | godlygeek                 |     0 | (0, 0)
   2 | Daniel Brown              |     0 | (0, 0)
   3 | Jack92829                 |     0 | (0, 0)
   4 | gustavwilliam             |     0 | (0, 0)
   5 | janine9vn                 |     0 | (0, 0)
   6 | Rafferty Chen             |     0 | (0, 0)
   7 | Hassan Abouelela          |     0 | (0, 0)
   8 | Sebastiaan Zeeff          |     0 | (0, 0)
   9 | Robin                     |     0 | (0, 0)
  10 | salt-die                  |     0 | (0, 0)

The leaderboard is refreshed every 30 minutes.
Last Updated: <t:1669868354:t>

Number of Participants

867

Full Leaderboard
hidden musk
#

damn ok @candid berry

mossy basin
#

barely made it

long egret
#

how does it measure top 10

#

everyone has 0 stars

mossy basin
#

by prettiness

minor cave
#

arbitrary ordering based on the order we pull the leaderboard info

long egret
amber sun
#

&aoc join

shut trellisBOT
#

:x: @amber sun, please (temporarily) enable DMs to receive the join code

amber sun
#

&aoc join

broken cradle
#

every minute closer we get it feels like the time a minute takes is increasing

undone quarry
#

&aoc join

mossy basin
#

less than 1000 seconds

torn thorn
#

whooooooo

#

(how does one do input in aoc again i forget πŸ’€ )

#

oh nvm it's not like usaco

wispy glacier
#

i can't believe it's december

placid lake
#

merry chrysler

humble copper
#

merry crisis

hidden musk
nocturne blaze
#

&aoc lb

shut trellisBOT
#

Here's our current top 10! πŸŽ„πŸŽ„πŸŽ„

     | Name                      | Score | ⭐, ⭐⭐
--------------------------------------------------
   1 | dawn                      |     0 | (0, 0)
   2 | nedbat                    |     0 | (0, 0)
   3 | Anonymous #1291621        |     0 | (0, 0)
   4 | Jack92829                 |     0 | (0, 0)
   5 | Bradley Reynolds          |     0 | (0, 0)
   6 | fiskenslakt               |     0 | (0, 0)
   7 | Anonymous #970403         |     0 | (0, 0)
   8 | HyTurtle                  |     0 | (0, 0)
   9 | Robin                     |     0 | (0, 0)
  10 | brad90four                |     0 | (0, 0)

The leaderboard is refreshed every 30 minutes.
Last Updated: <t:1669870200:t>

Number of Participants

867

Full Leaderboard
nocturne blaze
#

&aoc lb

shut trellisBOT
#

Here's our current top 10! πŸŽ„πŸŽ„πŸŽ„

     | Name                      | Score | ⭐, ⭐⭐
--------------------------------------------------
   1 | dawn                      |     0 | (0, 0)
   2 | nedbat                    |     0 | (0, 0)
   3 | Anonymous #1291621        |     0 | (0, 0)
   4 | Jack92829                 |     0 | (0, 0)
   5 | Bradley Reynolds          |     0 | (0, 0)
   6 | fiskenslakt               |     0 | (0, 0)
   7 | Anonymous #970403         |     0 | (0, 0)
   8 | HyTurtle                  |     0 | (0, 0)
   9 | Robin                     |     0 | (0, 0)
  10 | brad90four                |     0 | (0, 0)

The leaderboard is refreshed every 30 minutes.
Last Updated: <t:1669870200:t>

Number of Participants

867

Full Leaderboard
undone quarry
#

wow, the prettiness board changed a lot in the last 20 minutes

#

some people went and showered & put makeup on

livid gull
#

its rigged

placid lake
#

it's cached

mossy basin
#

my youthful good looks are fading fast

earnest forge
#

I'm literally in the PythonDiscord leaderboard why am I 229th ;-;

sharp panther
#

it'll all iron itself out in 5 minutes

placid lake
#

i wonder if the AoC API will crash once more

earnest forge
#

Hopefully not

livid gull
#

i wonder if AOC will go down

hidden musk
#

i really just want aoc stickers tbh

placid lake
#

good to see you again starwort

#

same

earnest forge
#

o/

hidden musk
#

7

earnest forge
#

I've done the classic AoC thing of 'guess what the first puzzle is going to be before it unlocks'

torn thorn
#

3 more minutes whooo

earnest forge
#

My answer is 'sum the integers in the input'

hidden musk
#

i also hope for pathfinding this year

placid lake
#

i'm guessing you'll need two for loops and that's about it

torn thorn
#

how about an array!

placid lake
#

pathfinding would be fun

hidden musk
#

my guess is min absolute difference in list of numbers

mossy basin
#

pathfinding day 1 would be funny

placid lake
#

that would be pretty bad lmfao

humble copper
muted aurora
#

will be on VC0 solving if anyone wants to hang out while solving!

sharp panther
earnest forge
sharp panther
#

i want to make it through at least 3 days

placid lake
#

1 minute!

humble copper
#

1 minute!!

earnest forge
#

aoc_helper.dijkstras says hello

hidden musk
#

i haven't set up numpy or networkx in my venv so i hope that's a later date

torn thorn
#

where's our 2020 opcode programming πŸ˜”

woven solar
#

will be using aoc as an excuse to polish my smart_iterator πŸ₯΄

mossy basin
#

networkx optional dependency

placid lake
#

wasn't that 2019

livid gull
#

2019 int code loved that

torn thorn
#

oh

#

i forget πŸ’€

#

30 seconds

humble copper
#

2021 scanners my beloved 😍

earnest forge
#

I want another intcode-like set of puzzles

#

Intcode was amazing

placid lake
#

good luck

#

have fun

sharp panther
#

15!

tulip elbow
#

gl hf

humble copper
#

good luck everyone

torn thorn
#

10!

earnest forge
#

GLHF

torn thorn
#

wheee

minor cave
#

&aoc c

shut trellisBOT
#

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

earnest forge
#

Stupid typo means I probably won't get lb

torn thorn
#

done

#

not top 100 :(

humble copper
#

116 ON THE LEADERBOARD

torn thorn
#

183, 107

minor cave
earnest forge
pine tiger
#

BRO HOLLY CRAP

#

I DIDN'T THINK AOC WOULD START TODAY

#

I THOUGHT IT WAS 12/1

muted aurora
#

rank 199 and 113, probably best I'll get all season

#

shouldn't have actually tried to read the first paragraph before i realized lol

placid lake
#

that was wuick

#

F

tulip elbow
#

I read the question wrong for part one and had to wait to answer again

#

pain

placid lake
#

i fucked up for a sec

pine tiger
#

i just barely squeaked in top 1000

earnest forge
flat sequoia
#

how do you view the leaderboard here

muted aurora
flat sequoia
#

.aoc lb

earnest forge
torn thorn
#

oh nvm i found it

muted aurora
#

yep

earnest forge
#

Yep

pine tiger
# muted aurora

hey sorry if i'm being creepy here, but were you the same person who gave me the cursed cube code last year?

muted aurora
#

probably

#

I remember you and I remember a cursed cube

sharp panther
#

gosh, it's been a while. i don't do well under stress.

tulip elbow
#

oh god the cubes

torn thorn
#

best im gonna do all season g.g..gg.g..g

muted aurora
livid gull
#

messed the second one completly

humble copper
#

117, 116 god damn nvm

muted aurora
#

ayyy saimonyo hello again

livid gull
#

hey πŸ™‚

muted aurora
#

old crowd's back

late frigate
#

missed one character while copying, 500 positions gone 😭

naive stone
# livid gull

damn well done. I can't believe how quick people are

muted aurora
late frigate
#

yeah

pine tiger
#

wha

late frigate
#

im not going full competative this year

pine tiger
#

do yall not co ctrl + a?

naive stone
#

less than a minute later and i barely make it in the top 1k

late frigate
#

so hopefully going to spend the extra time creating some custom scripts

muted aurora
#

I do some smart scraping to usually also find and save the sample input

humble copper
#

is this good?

late frigate
#

ive see people who do like submit(n) as it auto submits to aoc straight from the code

torn thorn
late frigate
livid gull
#

faster

muted aurora
#

faster, less error prone, he said he missed a character while copying πŸ˜›

muted aurora
livid gull
#

not as good as last year had to many erros lol

muted aurora
#

i had no syntax errors everything first try, I'm happy with myself

sharp panther
muted aurora
#

considering I'm lying down in bed coding lmao

mossy basin
#

my submits are:

aoc_lube.submit(year=2022, day=1, part=1, solution=part_one)
aoc_lube.submit(year=2022, day=1, part=2, solution=part_two)

which is more verbose than last year, but they're already templated

livid gull
#

i dont like submit in case you have a 0 then you might have to wait a min

misty salmon
#

$aoc join

mossy basin
#

my submits will sanity check

misty salmon
#

&aoc join

muted aurora
#

cool! I usually just end up panicking and print results instead of returning haha

sharp panther
#

i run it first without submitting, and then have a submit command that runs it

late frigate
#

yeah i want to set something up like that

#

mayb a vscode extention

sharp panther
#

mine is literally just a CLI, with a list of functions for part 1 and part 2

torn thorn
#

damn everyone here so fancy and me over here just unga bunga with chrome πŸ’€

feral hazel
humble copper
#

nice

naive stone
humble copper
#

had a bit of a slip up on part 2, unfortunately

placid lake
#

same

naive stone
#

me too

torn thorn
#

everyone who did part 1 so fast πŸ˜”

gentle dust
#

submitted almost like immediately, still only 1000 place πŸ˜”

paper sundial
#

its always like that

muted aurora
#

im so sad I won't be able to stay up and do these everyday

#

like last year

hollow wharf
#

damn @woven sable you did it before me

sharp panther
#

i took too long reading lemon_pensive and the stress got to me

muted aurora
#

unfortunately i have adult responsibilities like $job and stuff 😒

gentle dust
#

also forgot a reverse=True in my sorted part 2 and rate locked myself 30s 😩

undone quarry
#

wew

unique osprey
woven sable
gentle dust
#

should probably have read from the end, front part is so useless

sharp panther
muted aurora
hidden musk
#

use the spoilers channel, not this one

hollow wharf
#

anyways

paper sundial
hollow wharf
#

aoc done for the day, gnight yall!

livid gull
#

5am in the morning, too cold

hollow wharf
#

1116 pm

undone quarry
#

is there a way to see how many total people are in the group? πŸ‘€

hollow wharf
livid gull
#

yeah

daring bobcat
#

Let's gooo 15 minutes late WOO

crystal river
minor cave
undone quarry
#

nice

crystal river
#

can i use modules tho? like outside packages?

undone quarry
#

sure

#

why wouldn't you be able to?

sharp panther
#

it has a pretty convenient api

undone quarry
#

all you really need to do is come up with the solution

crystal river
#

just making sure

sharp panther
#

mhm

hollow wharf
#

first day is always pretty easy, excited to see how it picks up

daring bobcat
#

Elf Mi6 goes to South America for covert operation πŸ‘οΈ

sharp panther
#

errr, i dunno

#

i have them somewhere in my code somwhere, but i'm too lazy to dig it up

plain sable
#

what is advent of code lol

torn thorn
plain sable
#

thanks

hollow wharf
#

70th πŸ˜”

humble copper
#

i completely forgot to read the story that was on the challenge πŸ’€

undone quarry
humble copper
#

😎

hollow wharf
#

Consistent sleep schedule < aoc day 1

humble copper
#

honestly no clue

#

i didnt even automate getting the input

#

i just pasted it right into a file

undone quarry
#

I was gonna do that at first kekw

torn thorn
#

if you did part 1 part 2 is really easy

undone quarry
#

I didn't check it out afterwards 😐

humble copper
#

leaderboard > personal stats

torn thorn
undone quarry
#

ahhh ty ty

humble copper
#

^ that

torn thorn
#

rip

flat sequoia
#

nbnb

humble copper
#

gg

torn thorn
# flat sequoia

how'd you parse all the information so quickly? do you have macros or something to auto submit/fetch inputs?

flat sequoia
#

i don't have macros

earnest forge
#

Most (fast) people use something like aoc_helper or aoc_lube or aocd which will fetch/submit from Python

#

(if you're writing such a library, you have to be careful to not over-request the API)

flat sequoia
#

i just have a simple run script that imports my code and automatically opens the right input file

#

so i just have to write def p1(f): for my sol

#

but that's it

#

i don't really think auto fetching inputs / submitting helps

earnest forge
#

I mean it lets you take a stab at part 1 before it even exists

#

I mean I guessed wrong but still

torn thorn
#

lmao

flat sequoia
#

lmao

naive stone
# flat sequoia

takes me this long just to read and figure out the prompt! you're a machine!

flat sequoia
#

yeah for me reading is the slowest part honestly

#

i prob could've gotten faster if i hadn't spent time reading the useless first few paragraphs

#

but last year i kept reading the problem wrong so i started spending more time on reading

naive stone
#

haha, damn, i can't believe you were still that fast considering that

#

yea as the problems get harder i find i can't skip as much of the text

outer quartz
#

Hello .. bit late .. but this is my first year of participating the advent of code

placid lake
#

welcome welcome welcome, it’s quite a fun ride

#

but wow, it’s so good to see some of the same people come back here together every year for AoC.. so many familiar faces

nocturne blaze
#

do you use any api wrapper to get the input data?

naive stone
#

i certainly do

placid lake
#

yeah, me as well

naive stone
#

most of the fastest people here do i think, some of whom even roll their own

nocturne blaze
#

is it on pypi?

naive stone
nocturne blaze
#

ty

naive stone
#

sure np

woven oriole
#

helllo

#

dennis

#

and others

#

m back :D

torn thorn
#

hi back

placid lake
#

heyy

woven oriole
#

where did the spoiler channel go

torn thorn
woven oriole
#

oh

#

alr

#

forum this time

placid lake
#

forum thread!

#

yep

torn thorn
#

gn all

minor cave
#

mhm, trying out per-day spoiler threads. Hopefully it helps later on when people can skip a day or two and not be super worried about being spoiled

tepid cairn
#

gah, I can't do it until after school

torn thorn
#

just do it in school it's like 5 minutes grind

woven oriole
crystal river
#

yes i did it

polar sand
#

&aoc join

timid mantle
#

&aoc join

zealous brook
proper gyro
#

&aoc join

earnest forge
#

I maintain the old version of that package on PyPI (aoc_helper) and salt wrote a new version (I think he's done that most years lol) which is aoc_lube on PyPI

naive stone
#

anything notable that salt's package does differently?

proper gyro
#

so sorry if this is in the wrong spot but how do I use the input? is it a file, if so where is it?

cunning scarab
#

Puzzle input is at the bottom

#

Its a url

proper gyro
#

ohh yep

#

very new to programing lol kinda fogot that you can just get it from the url

cunning scarab
#

Most casual players just copy paste it in a txt

proper gyro
#

thats a good idea!

earnest forge
#

I know it has some networkx stuff

#

But it also doesn't seem to have the fluent list/iter classes

naive stone
#

gotcha, cool!

vital beacon
#

&aoc join

earnest forge
#

I've just realised that my private lb is more than half trans people πŸ³οΈβ€βš§οΈ

#

we're taking over the world

#

one aoc lb at a time

vital beacon
#

how do you submit aoc? Do you have to put in code and run test case or what

earnest forge
#

Your code on your input will give you an answer (e.g. 1234)

#

Find the box on the puzzle page and enter your answer

stable charm
#

&aoc join

vital beacon
earnest forge
#

Nope

#

As long as you get the right answer

#

People have solved puzzles by hand, with excel sheets, you name it

#

That's the primary reason why you can't submit code; aoc is extremely free-form

real pine
#

On the later days the algorithm is more important. First part can often be done by brute-forcing in, second part needs more thought

magic nebula
#

Yo, what is the leaderboard based on? Who can solve the problem the fastest? Or like which code is the fastest?

#

&aoc join

wispy glacier
#

submission time

terse wraith
#

Hmm, ran the 'join', but definitely not seeing myself in the leaderboard.

real pine
naive python
#

Did you also enter the join code you received in a DM on the Advent of Code website?

woven solar
visual raptor
#

&aoc join

shut trellisBOT
#

:x: @visual raptor, please (temporarily) enable DMs to receive the join code

visual raptor
#

&aoc join

proud cosmos
#

Lets go advent of code again

fluid zealot
#

too bad the leaderboard works that way, I'm not waking up at 5am for this

proud cosmos
#

Same

proud cosmos
#

Just do it for fun I wouldn't care about the leaderboard too much

#

People ont here kind of insane anyway

fluid zealot
#

right

winged trellis
#

another year another advent of code πŸ˜„

craggy galleon
#

this is amazing cant wait till next year so i can participate. It's way above my paygrade atm

earnest forge
#

Give it a go!

#

The problems often aren't that hard

#

Especially near the beginning

naive python
craggy galleon
#

i been coding for 3 weeks i see alot of ppl solving it with comprehensions which is a section im only just learning about

earnest forge
#

Plus, it's all practice :)

elder wigeon
#

Why must it start at 5:00 ☹️

earnest forge
#

Yeah I feel that lmao

#

4:30 start isn't great

craggy galleon
#

yea it amazing im gonna follow it i learnt alot just reading ppls solutions

earnest forge
elder wigeon
earnest forge
#

evidently I care more about fake internet points than you do

naive python
#

I have a private leaderboard with other people from my area/timezone

#

That helps

gloomy kernel
#

has it started?

craggy galleon
#

haha il try tomorrows one i was weak today

elder wigeon
earnest forge
earnest forge
naive python
#

It's 6AM for me, which is when I normally get up, so that works (as long as I'm working from home)

elder wigeon
#

Id be a zombie at 4:30

winged trellis
#

but im sure it should be ok

naive python
#

Ah, yeah, I'm not sure how long I'll cope. We're preparing a first prod release next week.

winged trellis
#

i have a long commute, so i can invest some time into doing it

wooden jewel
#

Long time no see all

narrow cloak
#

do i need to specfy the callorie count

wooden jewel
earnest forge
#

You don't need to write kcal or cal, if that's what you're asking

#

Just the number will do fine

narrow cloak
earnest forge
#

It doesn't ask for the elf, so no

narrow cloak
#

or add all calories

#

of the elf

earnest forge
#

Go reread the puzzle statement

narrow cloak
#

thanks

cyan sleet
#

I happened to go into the rust aoc channel and was surprised about the amount of rust users. Took me a decent amount of time to realize I hadn't gone to the pydis one

#

&aoc join

narrow cloak
#

making a list with each element in a new line
l
i
k
e

t
h
i
s

in python

nocturne blaze
#

are you asking how to do it or doing it?

narrow cloak
cyan sleet
#

wdym making a list with one element on a new line?

#

printing a list like that?

acoustic blade
#

Might sound dumb but where is the question ?

narrow cloak
narrow cloak
#

how do i do that

acoustic blade
cyan sleet
#

!e this is close to what you want

print('\n'.join(map(str, [1, 2, 3, 'four'])))
marsh currentBOT
#

@cyan sleet :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 1
002 | 2
003 | 3
004 | four
narrow cloak
cyan sleet
#

lists don't have a concept of lines pithink

#

if you are printing a list, then sure

#

if you're printing you can do something like what I showed

#

or loop over the list and print elements

narrow cloak
#

so do do i have to painsakilnt do and fix the list my self

cyan sleet
#

!e

import pprint
pprint.pprint([1, 2, 3, 'four']*3)
marsh currentBOT
#

@cyan sleet :white_check_mark: Your 3.11 eval job has completed with return code 0.

[1, 2, 3, 'four', 1, 2, 3, 'four', 1, 2, 3, 'four']
cyan sleet
#

err

#

I expected pprint to do this by default

earnest forge
#

Not long enough

#

Try *5

hollow wharf
#

!d pprint.pprint

marsh currentBOT
#

pprint.pprint(object, stream=None, indent=1, width=80, depth=None, *, compact=False, sort_dicts=True, underscore_numbers=False)```
Prints the formatted representation of *object* on *stream*, followed by a newline. If *stream* is `None`, `sys.stdout` is used. This may be used in the interactive interpreter instead of the [`print()`](https://docs.python.org/3/library/functions.html#print "print") function for inspecting values (you can even reassign `print = pprint.pprint` for use within a scope).

The configuration parameters *stream*, *indent*, *width*, *depth*, *compact*, *sort\_dicts* and *underscore\_numbers* are passed to the [`PrettyPrinter`](https://docs.python.org/3/library/pprint.html#pprint.PrettyPrinter "pprint.PrettyPrinter") constructor and their meanings are as described in its documentation above...
hollow wharf
#

You can change the width argument

#

!e

import pprint
pprint.pprint([1, 2, 3, 'four']*3, width=20)
marsh currentBOT
#

@hollow wharf :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | [1,
002 |  2,
003 |  3,
004 |  'four',
005 |  1,
006 |  2,
007 |  3,
008 |  'four',
009 |  1,
010 |  2,
011 |  3,
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/ogikihufeb.txt?noredirect

cyan sleet
#

ah, it's trying to be clever

silver karma
#

Am I allowed to ask for help with the puzzle in this channel if technically it can spoil the solution for other people?

#

(If not, where should I do that)

cyan sleet
#

in any case this is probably what @narrow cloak needa

silver karma
#

I dont want the solution spoiled, I just want the answer to one basic question

pearl needle
#

you can ask for clarifications here

nocturne blaze
silver karma
#

How do I detect the end of multi line input

#

Like the question is very straight-forward, but I dont know how to detect when to say the answer in the code

earnest forge
#

Don't use input, read from a file or paste it into the source code

silver karma
#

oh

#

alr

#

ty

magic scaffold
#

&lb

shut trellisBOT
#
Command not found

Command "lb" is not found

magic scaffold
#

&aoc lb

shut trellisBOT
#

Here's our current top 10! πŸŽ„πŸŽ„πŸŽ„

     | Name                      | Score | ⭐, ⭐⭐
--------------------------------------------------
   1 | Oliver Ni                 |  1786 | (1, 1)
   2 | Cefqrn                    |  1783 | (1, 1)
   3 | TriG                      |  1781 | (1, 1)
   4 | Defelo                    |  1777 | (1, 1)
   5 | Oof                       |  1777 | (1, 1)
   6 | mustafaquraish            |  1775 | (1, 1)
   7 | Anonymous #1087784        |  1775 | (1, 1)
   8 | artcz                     |  1774 | (1, 1)
   9 | Zeyu Chen                 |  1770 | (1, 1)
  10 | asishm                    |  1770 | (1, 1)

The leaderboard is refreshed every 30 minutes.
Last Updated: <t:1669888871:t>

Number of Participants

893

Full Leaderboard
cyan sleet
#

though you might want to sys.stdin.read() in this case

#

and then work with that

earnest forge
modern terrace
#

it's the challenge of the year again

cyan sleet
#

I guess to be fair, reading from file and reading from stdin is basically the same

#

input() is the culprit here

earnest forge
#

Yes

#

Which is why I said 'don't use input'

cyan sleet
#

the comment was about "don't use input, use a file"

earnest forge
#

don't use input

#

The suggestions using a file and pasting into source were easy ways of avoiding input lol

thick bluff
#

&aoc join

tidal mist
#

Advent of Code started! 😳

earnest forge
#

Yes, about 7 hours ago

tidal mist
#

&aoc join

gloomy kernel
#

&aoc join

shut trellisBOT
#

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

gloomy kernel
#

&aoc join

hollow wharf
#

&aoc join

#

Hate my timezone for advent of code. They all come out in the middle of the night.

earnest forge
#

Can't be much worse than 5AM lmao

hollow wharf
#

Too early for me anyways!

peak dock
#

its during uni hours for me πŸ˜”

silk owl
#

I just finished it aaaaaaaa

#

I think

blazing terrace
#

.about

#

.aoc

#

&aoc join

young tree
#

&aoc join

#

&help aoc

shut trellisBOT
#
&[adventofcode|aoc]

All of the Advent of Code commands.

Commands:
  about       Learn about Advent of Code
  countdown   Return time left until next day
  dayandstar  Get a view that lets you filter the leaderboard by day and star
  global      Get a link to the global leaderboard
  join        Learn how to join the leaderboard (via DM)
  leaderboard Get a snapshot of the PyDis private AoC leaderboard
  link        Tie your Discord account with your Advent of Code name.
  stats       Get daily statistics for the Python Discord leaderboard
  subscribe   NOTE: This command has been moved to &subscribe
  unlink      Tie your Discord account with your Advent of Code name.

Type &help command for more info on a command.
You can also type &help category for more info on a category.
tidal mist
#

&aoc countdown

shut trellisBOT
#

Day 2 starts <t:1669957200:R>.

tidal mist
cunning scarab
#

&subscribe

shut trellisBOT
#
Command not found

Command "subscribe" is not found

cunning scarab
#

&aoc subscribe

shut trellisBOT
#

Sorry, an unexpected error occurred. Please let us know!

CommandInvokeError: Command raised an exception: MovedCommandError: &subscribe

cunning scarab
#

&subscribe

shut trellisBOT
#
Command not found

Command "subscribe" is not found

cunning scarab
#

&aoc join

marble grove
#

do the puzzles get gradually more difficult as days go?

cyan sleet
#

roughly

#

I guess I'm doing rust this year too to continue learning that pithink

#

unless anyone has convincing opinions on what else to try to learn

#

inb4 ||haskell||

shadow dome
#

do it in Carbon πŸ—Ώ

cedar stone
#

SQL galaxybrane

cyan sleet
#

do they even have a viable compiler for carbon?

shadow dome
#

dunno Β―_(ツ)_/Β―

modern terrace
unique remnant
#

hey guys, how can i read the contents of the input.txt file into a numpy object array? or alternatively straight into an array of sums

#

on another note, how could you approach this day without loading the entire file into an array, with something like numpy?

unique remnant
#

i'm looking for a lazy evaluation approach πŸ˜”

modern terrace
rapid wolf
#

parsing things in fortran is scary

#

unless it happens to work well with the builtin parsing facilities

modern terrace
rapid wolf
#

well, the default for fortran are fixed records

#

though I believe some newer revision has scanf-style facilities as well

modern terrace
#

i forgot scanf()/sscanf() existed

#

or maybe i just wanted to do raw parsing

hidden musk
rapid wolf
#

I would be shocked if any language wasn't nice for today

hidden musk
#

yeah but the functional solutions for python are all ()((()) yk

iron peak
#

Who is nim-ka?

#

And bro had to hack it or smth. Bro got a perfect 200

earnest forge
#

Today wasn't actually that hard

iron peak
#

I haven’t checked it out yet.

hidden musk
#

it's basically a tossup the first few days

modern terrace
hollow wharf
#

I'm getting "203194" but its wrong answer

modern terrace
#

i just watched the total completed decrease every day

hidden musk
#

yep

hollow wharf
modern terrace
hollow wharf
hidden musk
#

there are only a few different inputs i thought

peak dock
#

plz delet

hollow wharf
wind wasp
#

&aoc join

peak dock
tepid cairn
#

qhahqhahq I'm still in school

broken cradle
tepid cairn
#

no I refuse I want my fancy aoc setup

#

I also bet I'd have a hard time typing out Rust code on my phone

hidden musk
#

oof

broken cradle
#

Damn

hidden musk
#

get up earlier and do it

tepid cairn
#

lol, I can wait till after school :p

wooden jewel
broken cradle
tepid cairn
#

but muh aoc cli

hidden musk
#

is that a chromebook

broken cradle
#

Yeah

iron peak
#

Is part of the challenge to format the input?

modern terrace
#

all you have to do is to just provide the expected result

iron peak
hidden musk
#

you need to parse the input, yes

iron peak
#

Is part of the challenge to format that?

modern terrace
iron peak
low condor
#

IMO it's better just to download the file and read it into Python

modern terrace
iron peak
#

No.

#

Like when I copy and paste the inputs into pycharm, it created 2000 new lines.

#

I found a website tho that formatted it into oneline.

#

How did u guys get around it?

iron peak
#

Oh

#

Wait

#

how do u download the file?

broken cradle
#

You can right click on the input page and click Save as, or you can just copy paste to a text file

iron peak
#

DAMN. I didnt realize that worked tysm

lime elk
#

Is there a way to download the data file from the url with requests or something? I tried it and it just gives me "Each Data is generated per user" or something of the sort.

hidden musk
#

yes, you just need to get your session cookie

broken cradle
#

Is there an API for the AoC website?

hidden musk
#

there's an "API"

#

you just go the the page that clicking the input button gives you

gleaming cedar
sleek cave
#

AOC POGGGGGG

tepid cairn
#

aoc aoc

north silo
#

Then you can load it into your program in the usual way: ```py
with open('input.txt') as file:
text = file.read()

#

input.txt has to be in the folder that you run your code from (the current working directory) for this to work.

stable shale
open ice
#

I have to admit, I spend way too much time just trying to pre-process the data in a single list comprehension

#

but also I forgot to use file.read(), which is much simpler, I was using file.readlines() which already splits the lines up

fluid zealot
#

I can't get over the fact that the list comprehension using built-in functions is way faster despite having a bigger complexity than the hand written forloop approach.

#

I feel like I'm discovering python all over again

pine ravine
#

How does the leaderboard work?

#

&aoc join

mellow pike
#

&aoc join

woeful wolf
#

&aoc join

pearl flare
#

&aoc join

past lark
#

&aoc about

shut trellisBOT
#
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.

#

You have not linked an Advent of Code account. Please re-run the command with one specified.

past lark
#

&aoc join

halcyon pulsar
#

&aoc join

hidden musk
#

didn't we have an #aoc bot commands

minor cave
#

it's #aoc-bot-commands, I'll unshorten the name soon

ripe meteor
#

What are people using for aoc this year

hidden musk
#

python, haskell

ripe meteor
#

Haskell hm

hidden musk
#

I want to learn Go so probably that

#

or c#. one of those

#

trying to be employable ykhii

ripe meteor
#

Debating rust/f#

#

Probably not gonna make it to later stages with them but i can practice for now

hidden musk
#

both

ripe meteor
#

Are inputs always lists of numbers

hidden musk
#

no, sometimes letters

ripe meteor
#

Heck

#

Might still write some util stuff, parsing is annoying

tepid cairn
#

and some python, I'll do the solutions in rust first and then figure out how to golf it in python

peak dock
#

maybe i should try doing it in c++

#

i dont even know c++

tepid cairn
#

you misspelled "rust"

#

common mistake

peak dock
#

but its not like im competing for a rank anyway

tepid cairn
#

skill issue

carmine slate
#

guys, how to fix this problem?pls help(I cant post in forum)

tepid cairn
carmine slate
#

thx

tepid cairn
tepid cairn
#

did you create a title and add content?

faint pivot
#

&aoc join

unique osprey
#

&aoc lb

shut trellisBOT
#

Here's our current top 10! πŸŽ„πŸŽ„πŸŽ„

     | Name                      | Score | ⭐, ⭐⭐
--------------------------------------------------
   1 | Oliver Ni                 |  1822 | (1, 1)
   2 | Cefqrn                    |  1819 | (1, 1)
   3 | TriG                      |  1817 | (1, 1)
   4 | Defelo                    |  1813 | (1, 1)
   5 | Oof                       |  1813 | (1, 1)
   6 | mustafaquraish            |  1811 | (1, 1)
   7 | Anonymous #1087784        |  1811 | (1, 1)
   8 | artcz                     |  1810 | (1, 1)
   9 | Zeyu Chen                 |  1806 | (1, 1)
  10 | asishm                    |  1806 | (1, 1)

The leaderboard is refreshed every 30 minutes.
Last Updated: <t:1669917470:t>

Number of Participants

911

Full Leaderboard
unique osprey
#

&aoc lb Meltz014

shut trellisBOT
#

Here's our current top 10 (and your personal stats compared to the top 10)! πŸŽ„πŸŽ„πŸŽ„

     | Name                      | Score | ⭐, ⭐⭐
--------------------------------------------------
  52 | (You) Meltz014            |  1721 | (1, 1)
   1 | Oliver Ni                 |  1822 | (1, 1)
   2 | Cefqrn                    |  1819 | (1, 1)
   3 | TriG                      |  1817 | (1, 1)
   4 | Defelo                    |  1813 | (1, 1)
   5 | Oof                       |  1813 | (1, 1)
   6 | mustafaquraish            |  1811 | (1, 1)
   7 | Anonymous #1087784        |  1811 | (1, 1)
   8 | artcz                     |  1810 | (1, 1)
   9 | Zeyu Chen                 |  1806 | (1, 1)

The leaderboard is refreshed every 30 minutes.
Last Updated: <t:1669917470:t>

Number of Participants

911

Full Leaderboard
unique osprey
#

oh sorry thought i was in the bot channel

torn palm
#

&aoc join

cyan sleet
cyan sleet
hidden musk
#

in...vimscript?

rocky kindle
#

&aoc join

half tree
#

&AOC lb

shut trellisBOT
#
Command not found

Command "AOC" is not found

half tree
#

&aoc lb

shut trellisBOT
#

Here's our current top 10! πŸŽ„πŸŽ„πŸŽ„

     | Name                      | Score | ⭐, ⭐⭐
--------------------------------------------------
   1 | Oliver Ni                 |  1826 | (1, 1)
   2 | Cefqrn                    |  1823 | (1, 1)
   3 | TriG                      |  1821 | (1, 1)
   4 | Defelo                    |  1817 | (1, 1)
   5 | Oof                       |  1817 | (1, 1)
   6 | mustafaquraish            |  1815 | (1, 1)
   7 | Anonymous #1087784        |  1815 | (1, 1)
   8 | artcz                     |  1814 | (1, 1)
   9 | Zeyu Chen                 |  1810 | (1, 1)
  10 | asishm                    |  1810 | (1, 1)

The leaderboard is refreshed every 30 minutes.
Last Updated: <t:1669919306:t>

Number of Participants

913

Full Leaderboard
half tree
#

&aoc lb Iggymojungle

shut trellisBOT
#

Here's our current top 10 (and your personal stats compared to the top 10)! πŸŽ„πŸŽ„πŸŽ„

     | Name                      | Score | ⭐, ⭐⭐
--------------------------------------------------
 160 | (You) Iggymojungle        |  1506 | (1, 1)
   1 | Oliver Ni                 |  1826 | (1, 1)
   2 | Cefqrn                    |  1823 | (1, 1)
   3 | TriG                      |  1821 | (1, 1)
   4 | Defelo                    |  1817 | (1, 1)
   5 | Oof                       |  1817 | (1, 1)
   6 | mustafaquraish            |  1815 | (1, 1)
   7 | Anonymous #1087784        |  1815 | (1, 1)
   8 | artcz                     |  1814 | (1, 1)
   9 | Zeyu Chen                 |  1810 | (1, 1)

The leaderboard is refreshed every 30 minutes.
Last Updated: <t:1669919306:t>

Number of Participants

913

Full Leaderboard
elder wigeon
#

&aoc lb DJJ05

shut trellisBOT
#
Bad argument

Sorry, your profile does not exist in this leaderboard.

To join our leaderboard, run the command .aoc join. If you've joined recently, please wait up to 30 minutes for our leaderboard to refresh.

covert fern
#

&aoc join

shut trellisBOT
#

Here's our current top 10 (and your personal stats compared to the top 10)! πŸŽ„πŸŽ„πŸŽ„

     | Name                      | Score | ⭐, ⭐⭐
--------------------------------------------------
 118 | (You) ScientificGuitar    |  1599 | (1, 1)
   1 | Oliver Ni                 |  1834 | (1, 1)
   2 | Cefqrn                    |  1831 | (1, 1)
   3 | TriG                      |  1829 | (1, 1)
   4 | Defelo                    |  1825 | (1, 1)
   5 | Oof                       |  1825 | (1, 1)
   6 | mustafaquraish            |  1823 | (1, 1)
   7 | Anonymous #1087784        |  1823 | (1, 1)
   8 | artcz                     |  1822 | (1, 1)
   9 | asishm                    |  1818 | (1, 1)

The leaderboard is refreshed every 30 minutes.
Last Updated: <t:1669922267:t>

Number of Participants

917

Full Leaderboard
latent mesa
#

&aoc join

hollow wharf
#

&aoc join

shut trellisBOT
#

:x: @hollow wharf, please (temporarily) enable DMs to receive the join code

hollow wharf
#

&aoc join

#

can I know how many minutes it took the first 100 one to solve today challenge ?

earnest forge
#

About 2

hollow wharf
#

after getting your help about \n , it took me 30 minutes

#

I can't find the puzzles

hollow wharf
hollow wharf
#

29 seconds to solve the first part

#

woow

#

it took me 15 minutes

#

15 * 60 = ? maybe 900 seconds

#

but to be honest I rarely write code

hollow wharf
hollow wharf
#

Yeah

outer mural
#

&aoc join

hollow wharf
#

?

minor cave
hollow wharf
#

ty

bright creek
#

so I know I think how to resolve the math problem, but I'm having trouble finding out how to grab the input given in to my code. I've put it in to a .txt file, but I'm unfamiliar on how to grab it from there. Is that an appropriate question for here, or should I go to #1035199133436354600 , or should I avoid asking here altogether lol

#

I know also about workinmg with files but again, the way it's formatted, etc. Anyone have some resources or something?

minor cave
#

For instance, last year this is generally what I did:

with open(r"day6/input.txt", "r") as f:
    data = f.read().splitlines()

and I may add additional parsing after to get into the format I want. Like:

data = [int(x) for x in data[0].split(",")]
bright creek
#

I think splitlines is exactly what I was wondering about. That separates them if there are line breaks?

minor cave
#

mhm

bright creek
#

ty ty >3

#

❀️

gleaming cedar
#

@low condor lets move here, don't want to end up cluttering the solutions channel

#

wouldn't different problems have different algorithms though?

#

and even if they were reverse engineered, wouldn't it be just for that one particular problem and one particular year?

low condor
#

I agree, but aren't those arguments in favour of just collecting all the input.txt files if you could?

#

no reverse engineering or anything. Just grab the files and grab the problems

gleaming cedar
#

i'm not sure i'm following, its a bit late here <_<

low condor
#

I think we might be thinking of different things in the term "reverse engineering"

#

I was thinking you were referring to trying to generate a valid input for a particular day

gleaming cedar
#

yes, what i got from the reddit thread was somehow you could grab a bunch of inputs along with the problem and obtain the algorithm that was used to generate the input, which.. doesn't really make any sense

low condor
#

Right. So I guess even if you have the inputs, you still need to know what the algorithm was for a particular day to be able to copy that puzzle

#

But, just having the input is advantageous over not having it

#

if you don't have the input, you still need to figure out the algo, but on top you now need to work out the inputs that are valid for it

dense osprey
#

damn todays one was pretty fun bcs it wasnt hard

cyan sleet
dense osprey
#

is it only possible to solve problems on the day they are revealed or can i miss some and solve them a few days after

night mural
#

Looks like a harder-than-usual Day1

night mural
dense osprey
#

ah

night mural
#

You can solve AOC 2015 now too lol

dense osprey
#

oh

night mural
#

I will be doing this year in Julia as usual

#

but doubt I do it completely

#

I've not completed any year

dense osprey
#

i think most free certificates arent worth anything

hidden musk
cyan sleet
#

or what's the question exactly?

#

all keyboard stuff works as usual, touch even works for mouse stuff if you want that

hidden musk
#

huh. is there an esc key?

night mural
#

There honestly should be an AOC standardised component that does the necessary grab-once-and-save portion

cyan sleet
#

with the right keyboard, there is πŸ˜›

hidden musk
#

that's horrible

cyan sleet
#

it's amazing and terrible

gleaming cedar
#

oh boy

cyan sleet
#

small buttons, but it's a full keyboard with the keys where you expect them

#

so nice for programming, because special symbols

gleaming cedar
#

your finger tips must be smaller than mine, and mine are SMOL

cyan sleet
#

I typo a vunch, especially of I'm walking atthe sme time, let's post this thing unedited ad an ecamplw

#

so I tend to need a second pass if I write regular text πŸ˜›

dense osprey
#

are aoc questions normally harder or easier than todays one?

cyan sleet
#

harder

gleaming cedar
#

they tend to get difficult as the days go on

dense osprey
#

ok

night mural
#

Day1s are usually easier

#

Than today's

cyan sleet
#

there is some variety though

hidden musk
#

last year's was harder I thought

gleaming cedar
#

idk about last year but 2015 was definitely harder than todays

#

(()()( basements

night mural
#

I did a naive approach for last year

cyan sleet
#

there are a few genuinely hard each year

night mural
#

This year the 'challenge' is to keep to an O(1) or O(k) memory solution

#

i.e. not storing all n elves

cyan sleet
#

beacons from last year as an example

night mural
cyan sleet
#

this is also why I picked up a new language for last year

gleaming cedar
cyan sleet
#

to not grow bored by easy problems, easy problems in a new lang is very good practice

gleaming cedar
#

me doing them in rust wasn't exactly a bright idea since i keep dropping the language like a hot potato

cyan sleet
#

very much "I know exactly what to do, but how do I spell it in rust" for me

gleaming cedar
#

xD

cyan sleet
#

also, "omg, I just want a useable linked list"

gleaming cedar
#

i used to do them in python first then move onto rust

#

ended up ditching rust halfway

#

again

#

already made that mistake for leetcode but decided it would be good to make that mistake again 😭

cyan sleet
#

that's why you do them only in rust πŸ˜›

#

smack your face into the rusty wall until learning happens

pure saddle
#

LESGOO AOC

gleaming cedar
#

@strange zinc don't worry about it, i feel like it's almost borderline fearmongering on something that's trivial as input files

#

add it to gitignore and call it a day, it isn't actively discouraged which is why you see no mention of it on the website itself

hollow wharf
#

already quit the advent of code couldnt figure the first one out πŸ’€

strange zinc
#

What are you struggling with? Input? Writing the code?

outer cloud
#

I have already ditched my self-imposed challenge to do the whole month in Groovy, time to switch to either Fortran 77 or Deno

hidden musk
cyan sleet
hidden musk
#

huh, that's pretty bad

cyan sleet
#

I think there is development going into that, but I can't remember what the state of it is

#

basically, that kind of thing doesn't play well with rust at all

#

maybe I should go back to last year to optimize one of my solutions with it pithink

#

I ended up doing O(n) operations on a Vec instead

rapid wolf
#

Finger trees would work for rust, but I doubt anyone made those

#

Maybe in im, who knows, really

hollow wharf
#

6 hours and 23 mins left

#

What

#

I saw that dawn

sharp panther
#

gankra, the person who trimmed down std::collections before 1.0, tried

#

but people for some reason wanted a linked list

#

your best bet might just be copying an implementation from too many linked lists. some of them should be pretty good.

hidden musk
#

is that the person that wrote learning rust with linked lists

sharp panther
#

yes

sharp panther
#

the last one has cursor for that

#

maybe it was reimplemented from the book to the stdlib

#

or something like that

hollow wharf
#

ik it's not the best

#

but this was fun

cyan sleet
hidden musk
#

^

hollow wharf
#

oh sorry

cyan sleet
#

having something like a cursor interface is basically the one reason I would reach out to a linked list specifically

#

basically all else can be abstracted away from my behind a deque interface

#

so a linked list without it is kinda...useless

#

thankfully maybe rust will get one someday

plucky jewel
#

i missed the start of this AOC

#

can i still use challenges somewhere?

hidden musk
#

yes

plucky jewel
#

is there different leaderboards (not that i think i would have a chance)

#

but i assume by the time its made for americans?

hybrid granite
#

&aoc join

hidden musk
#

it's for anyone. the time is because the person that hosts it chose the time to be easy for him

hybrid granite
#

how do I post in spoilers

tepid cairn
#

wooo, starting on the first day of aoc

tepid cairn
hybrid granite
#

k

modern terrace
tepid cairn
#

school >.>

#

maybe I'll wake up earlier to do these

modern terrace
#

so right as i wake up for school you just finished school

tepid cairn
#

lol

#

ok now to write fancy tools

normal mason
#

@tepid cairn i need help

tepid cairn
ivory venture
shut trellisBOT
#

Day 2 starts <t:1669957200:R>.

ivory venture
#

off by 1

hollow wharf
#

Oop

modern terrace
spice robin
#

Hi everyone

#

I'm late for AOC πŸ₯²

#

Can I still attempt Day 1?

#

&aoc join

wintry gust
#

Hi, has advent of code begun

silver karma
#

How do you do you do that fancy thing that colours your code nicely in discord?

silver karma
wintry gust
#

!code

marsh currentBOT
#

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

silver karma
#

ty

silver karma
#

np

rustic cobalt
viral grotto
#

hat does this mean in advent of code "@##@@#@@#@@@@@###@#@@##@@@@##@@@@@@@###@@#@@#@@#@"

#

like the thing we see on main page

rustic cobalt
#

The unexplored areas..each day, a new line is revealed

viral grotto
#

ahh i c

bleak sable
#

The shape is usually connected to the story about collecting stars that year. Last year it was a submarine looking for Elves' lost keys. The shape is also clear. https://adventofcode.com/2021

tepid cairn
#

I'd delete the message too, since people might still be working on it

silver karma
tepid cairn
#

it's all good :p

viral grotto
#

waow there is a part 2

gentle cape
#

yes MAAM

#

my program was probobly the most inefficient garbage, but i still did it

#

its all on my github

viral grotto
#

y does python give up on me when i am in hurry lmao

#

is there a reason simple sort is returning none

mossy basin
cyan sleet
#

now, you could also solve this without sorting in O(n) time

#

even if the number was not 3

#

keyword to anyone interested: ||quickselect||

quiet pecan
#

!paste

marsh currentBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

dark turret
#

hey

#

so i'm trying to figure this out

gentle cape
#

un huh

glad wigeon
hidden musk
cyan sleet
#

partition is an awfully general term for that operation

#

C++ uses partition for "partition by this predicate" which feels more sensible pithink

hidden musk
#

that's what it is

cyan sleet
#

speed 1

hidden musk
#

huh

cyan sleet
hidden musk
#

yeah

#

i wonder what they wanted that to say πŸ€”

torn thorn
#

&aoc countdown

shut trellisBOT
#

Day 2 starts <t:1669957200:R>.

narrow cloak
#

how do i sum all list at once and make python

#

rank from the highest?

hollow wharf
#

&aoc c

shut trellisBOT
#

Day 2 starts <t:1669957200:R>.

torn thorn
narrow cloak
narrow cloak
torn thorn
#

no

#

!e

print(sum([1, 2, 3, 4]))
print(sorted([4, 2, 3, 1]))```
marsh currentBOT
#

@torn thorn :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 10
002 | [1, 2, 3, 4]
narrow cloak
torn thorn
#

well that's how you get the sum of the list all at once

narrow cloak
torn thorn
#

sure

#

uhh

#

yeah that probs works

#

!e

print(sum([3386,4242,3179,7596,1099,1223,6241,1020,4869,4247,4906]))```
marsh currentBOT
#

@torn thorn :white_check_mark: Your 3.11 eval job has completed with return code 0.

42008
narrow cloak
lime elk
#

yes

#
nums = [[127, 29812, 2893], [21783, 2189, 478, 578], [378, 23874]...]
#

but then you can have to acces it with a second index

#

like nums[0][:] = [127, 29812, 2893]

#

and nums[0][0] = 127

hidden musk
#

nums[0][:] is just nums[0]

narrow cloak
#

i cant just do [list1 , list2]?

lime elk
#

just as an example

lime elk
#

you can jut assign the lists to another list or append them to it

narrow cloak
#

like list1 [list2 = sum([1,1,1,1])

lime elk
#

um, then list2 isnt a list

narrow cloak
#

sooo sum is not a list?

mystic sky
#

15 minutes left
woot woot

lime elk
#

no sum(list) gives the sum of the elements of the list

narrow cloak
#

can i still do list1.sorted

lime elk
#

yeah you can

narrow cloak
#

so list inside a list then i do sorted solution done

lime elk
#

I've been waiting all night for this ;-;

lime elk
#

not sure if sorting the first list will give you the correct sorted list

#

I'll try it, sec

livid gull
#

sorting the list would give you them in increasing values

narrow cloak
torn thorn
#

&aoc lb

shut trellisBOT
#

Here's our current top 10 (and your personal stats compared to the top 10)! πŸŽ„πŸŽ„πŸŽ„

     | Name                      | Score | ⭐, ⭐⭐
--------------------------------------------------
   5 | (You) Oof                 |  1865 | (1, 1)
   1 | Oliver Ni                 |  1874 | (1, 1)
   2 | Cefqrn                    |  1871 | (1, 1)
   3 | TriG                      |  1869 | (1, 1)
   4 | Defelo                    |  1865 | (1, 1)
   6 | mustafaquraish            |  1863 | (1, 1)
   7 | Anonymous #1087784        |  1863 | (1, 1)
   8 | artcz                     |  1862 | (1, 1)
   9 | asishm                    |  1858 | (1, 1)
  10 | Zeyu Chen                 |  1857 | (1, 1)

The leaderboard is refreshed every 30 minutes.
Last Updated: <t:1669955717:t>

Number of Participants

937

Full Leaderboard
torn thorn
#

oops

#

wait