#advent-of-code
1 messages Β· Page 3 of 1
For day one, how do I take all my input numbers and put it into code?
save/download it as a text file, then open that file using with open(...) as file: and use one either of A, B, C (the with line is required no matter which you go for) to read it```py
with open('file.txt', 'r') as file:
# A
for line in file:
...
# B
data = file.read()
# C
data = file.readlines()
see the channel description though
what aoc helper do yall use?
I think you know my answer and salt's answer π
aoc_lube? Maybe I'll go for that as well :p
I'm considering installing aoc_lube for its extra stuff tbh
The graph parsing looks nice but I don't understand networkx
well, I'll bring in more-itertools
trying to do a one-liner on the 2nd day problem
I can't justify using any of them but my own π
haha, fair enough
I'd like not having to download or copy+paste the input file, at least. A few commonly used utility functions will be nice to have as well, but thats sort of where more-itertools comes in
I just have a simple run script that checks what day it is and runs the right file
Yeah I find that most often all I use of aoc_helper is fetch() (part of the template), extract_ints() (imported by default in the template), lazy_submit() (part of the template), and the fluent utils (list, iter, range, irange, imported by default in the template)
I don't really get it
Is it that hard to type [int(x) for x in f.read().splitlines()] or something
maybe I'll do something wacky to get method chaining
Maybe I'll give an input fetcher a try
yoo my generator works
man, had I known this existed I would have used it today
Both took me ~30 min
Yeah it's hard to focus through all the unimportant stuff
I usually just jump down to the examples and read a bit up from that
i'm worried ab day 4 tbh lmao
your AoC helper?
i took mine way too seriously and now i'm writing a whole ass framework
nah, I scrapped that
I just wrote up a small script to generate the boilerplate for a solution
What is an AoC helper?
my servant. they help me with the problems
scripts and other things to help with AoC tasks you don't want to waste time on, like downloading the inputs
a script/library that'll automatically fetch inputs and submit solutions for you, mixed in with some other utilities
Ah, cool
I've managed to setup mine so I just need to run pdm test and it'll run the solutions for the current day
idk if I want to take the time to figure out how to make it actually test it against examples though
i'm going all out with it
it'll have a CLI for it, fetch the inputs for you, and submit for you as well
I ended up deciding decorators weren't great for this, and I was too lazy to bring in bs4 for fancy parsing
iremember day 4 last year was horrible for me
nothing beats that day with the beacons tho π
prediction for tomorrows problem?
bingo
just
it will have something to do with elves
they probably screwed something up again
they seem to do that a lot
unreliable idiots
i hope something big happens, they seem to have not done much yet
santa should find some new workers
maybe he should pay them
maybe tomrrows problem will be us helping santa hire new elves because these current ones are not the best
TRUE
maybe they'll be more reliable if they got paid and got benefits
Something like that :p
they probably don't even get insurance
robot chicken elf training video
but they get to play with toys all day
crazy
Also a heads up to anyone who installed aoc_helper today (1.6.10, 1.6.11) I accidentally pushed a version that crashed on launch
(fixed in latest)
oh, do you maintain it?
Apparently today's input was a tenth the size of the other two days
Yeah
ooh, cool
Salt and I rewrote a very old version of his library (I wanna say in 2019?) and he made a new version (aoc_lube) and I'm just updating the old one
(also if you're using the library for the first time, run it before tomorrow so you can set up the token stuff)
i can imagine y'all finish the puzzles fast knowing everything you wrote in your utils library π at first i was so confused with all the utilities functions there
Top 1k-ish mostly use libraries like this yeah
Every conceivable thing a puzzle might need
(why do you think it's in the library?)
decorative
Lmao
&aoc
&[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.
Here's our current top 10! πππ
| Name | Score | β, ββ
--------------------------------------------------
1 | Oliver Ni | 5830 | (3, 3)
2 | Zeyu Chen | 5805 | (3, 3)
3 | Defelo | 5783 | (3, 3)
4 | BoomydayCoder | 5776 | (3, 3)
5 | RadioactiveHydra | 5764 | (3, 3)
6 | Kevin Sheng | 5764 | (3, 3)
7 | RundownRhino | 5761 | (3, 3)
8 | Cefqrn | 5760 | (3, 3)
9 | Artemis | 5756 | (3, 3)
10 | Anonymous #1087784 | 5751 | (3, 3)
also everytime i make a function for some problem and i think it might be used again some year, in it goes
i keep the code just to remember someday :p
i think ill always be proud of seeing my solution for today, it was extremely clean
Would you like to post your solution on the solutions channel? Iβm interested to see this extremely clean solution :)
how do i join?
why tf are these elves up to some dumb shenanigans every year
like we were saying earlier, santa should find some paid helpers
or maybe he'll just keep leaching off of us to fix the elf's problems
we should charge santa for the work we're doing
How is your score on the leaderboards calculated?
Sweet it isn't time based. Thanks.
I wish i was better at this lol. A lot of if statements doesnt seem like the best way to attack problems.
While they're definitely possible with if statements, there are many ways that these problems can be solved
All i can think of is step by step processing so statements. I need to practice list comprehension as that more than likely will help me in life overall lol.
be sure to check the spoiler channels once you figure it out on your own. A lot of little tricks and cool features you can learn from there
Can I ask a question about my code for day 3 here if it doesnt work, or should that still go to spoilers? lol
probably spoilers
there's no solutions you can see there without scrolling right now
Sorry, an unexpected error occurred. Please let us know!
CommandInvokeError: Command raised an exception: NotFound: 404 Not Found (error code: 10008): Unknown Message
I have no idea what to check for in the response to see if it's right or not so I'm doing it manually ig
def submit(year, day, part, answer):
if _check_answer_cache(year, day, part, answer):
print("Answer incorrect (cached)")
return
if not os.getenv("SESSION"):
raise RuntimeError("No session token provided. Cannot fetch input.")
req = session.post(BASE_URL + f"{year}/day/{day}/answer", json={"level": part, "answer": answer})
req.raise_for_status()
print(req.text)
if input("Correct? Y/n").upper() not in ("Y", ""):
_cache_wrong_answer(year, day, part, answer)
https://github.com/Starwort/aoc_helper/blob/master/aoc_helper/interface.py#L238
Here's how aoc_helper does it
It uses bs4 to extract the main body of text but I think Salt figured out that a regex will do the trick just fine
aoc_helper/interface.py line 238
if msg.startswith("That's the"):```
bloody hell 10 more minutes and we're off to the races
i still use bs4, but you can regex the response. I might do that later, but i may not. Keeping html parser means I can add other things later. Might want to scrape examples or star-count or something
Fair enough
The content of the page is just between article tags or something?
Wait why would you regex if you're still using bs4 lmao
Yeah basically
i wouldn't
I swear you said you were regexing to save on loading bs4 or something
Anyway I don't know if you saw the ping from earlier but is it ok if I steal your Chinese Remainder Theorem function from aoc_lube lmao
yeah, everything is using Unlicense, so free to use and do w/e with
can steal it and sell it off as your own even
Day 4 starts <t:1670130000:R>.
omg crt
i remember that it was painful
that's why I'm stealing Salt's code
what problem was it on though π
A hard one
the train one
extra challenge: solve problem with only the input
you can do it every day if you try hard enough
I mean I distinctly remember binary searching at least one answer at one point
people cheesed day 1?
I had code ready to go on puzzle launch that just tried submitting the sum of the input
π π π π π π
2 mins
wth is a cheese
It was the wrong answer but it was worth a try
heyo
π
good luck y'all
2 minutesss
GLHF
Cheap shot at solving a puzzle an unintended way
E.G. binary-searching an answer when it tells you higher or lower
generally it's more of a cheap shot to solve something, not just a puzzle
GLHF everyone!
usually used in gaming
1 minute
There's also that one puzzle people just looked up on OEIS
oeis?
it's like a site for all sequences
*integer sequences
the build up is great
fr
<@&518565788744024082> Good morning! Day 4 is ready to be attempted. View it online now at https://adventofcode.com/2022/day/4. Good luck!
man, the elves are at it again with their bad planning
Day 4 day 4
Oh noooo
I'll wait till tomorrow to do it, I imagine midnight isn't the best time to crank out a solution
65/58 :D
True
good night everyone
WOOOOOO
IM BACK
how do people do it so quickly?
Fuckin cheater
a lot of experience and practice
damit
wait are gifs allowed
Toxic fuck
(that was meant to be sarcastic)
Bro this is hard
lolol, good job
Is there a website where I can do simple word problems?
for python
I want to excersice
mm, maybe exercism?
that's good!
Dang, 13 seconds and 6 seconds
well done!
kk thx
welp
I'm embarrassed by my ~1m delta, that's me struggling to interpret the question lmao
skill issue
Also forgetting how to actually do the operation required lmao
The struggles of 5AM puzzle solving π
extract_ints gave me negatives lol
cya guys gn
what time zone is that
Lmao rip
24 seconds fuck
took me way too long to actually read the problem π₯΄
Yeah same here
my delta was 21s lol
I didn't feel like I spent a minute doing part 2 but apparently I did
Wow i feel like that was easier than yesterday
Yeah
time to stare at 5 digit ranks for the next 5 days π
yeah cause yesterday involved assigning a score to the overlapped element
this one you just count the overlaps
ah that's true
that was mucheasier than yesterday
done, advent of code
wall of text. why isn't there a tldr.
i didn't realize rate limits were per-level and not sitewide so my submit func knocked me off the leaderboard (missed leaderboard by 3s exactly)
It shouldn't limit on correct answers at all
Yeah submitting a correct part 1 gives no RL for part 2
there's no ratelimit after a correct response AFAIK, allowing one to solve part2 in below a minute
I mean this can be tested with a burner account on an old puzzle
ya it's per level, and the second part counts as a separate level so u always start without a rate limit
tldr is highlighted phrases
hm. maybe it could work.
Ah I fell off the leaderboard
tldr solve problem; submit answer
thank me later
didnt know there were rate limits
learned the hard way
needed to wait 4min55 sek to submit a correct answer
Pro tip: just submit the right answer the first time
wow
i always run my code on the test case they provide - if it doesn't pass, don't try submitting the answer
it did pass the example
ah
I'm almost always faster to just submit my initial answer and check the examples only if I'm wrong lmao
pro
i worry about that, but since copypasting the test cases takes me 5-10 seconds and failing takes 60 seconds, it's profitable if the test lowers chance of failure by at least 8-17%, which I think it does
lol unlucky
lmao
i didnt account for the times, where the second one is exactly one cell, and thats the top one of the first, smt like 4-6,6-6 wouldnt be counted, the example had 6-6,4-6 which was corretly counted
were you logged in for someone else
π π π π
It's probably worth me writing an actual method of using the examples but for now how my template works it's one set of data per run and so it's generally not worth dealing with test cases
Also fixing whatever went wrong usually takes a minute anyway lol
question: how do you cache the actual data
just in a random file?
made the mistake of thinking that xddd, realized the error in seconds
Stored in plain text files in the user's .config directory
$HOME/.config/aoc_helper/YEAR/DAY.in
do you just look at the question for how the input looks then?
Printed on first fetch as of a moderately recent version of aoc_helper; before that, I just opened the input file manually to look at it
(in browser, not in editor)
damn
it was 1 off of the real answer π
I'm so confused
but it's ok
lmao
I'm definitely making it so I can test my code with the examples, I can't keep waiting for ratelimits
i think aoc's example data is always put a certain way html wise, so if you use bs4 you can parse the test data and always get it wrong
i made it work automatically for my helper but my helper had a lot of other issues π
Would you be interested in trying to add this to aoc_helper? It would require a slight rework of the default template but it probably wouldn't be too bad
yeah fs! would you want test data to be automatically tested when submitting or a separate function to test each solution added to the template?
Probably just changing the signature of the runner functions to take data, then adding a test_data function
most of the wall of text is not necessary at all, I literally just skipped to the code example and the bullet points below it
i have read absolutely none of the 'story' for any of the days
maybe I should, they're cute
only issue would be that i think once you unlock part 2 you can't test part 1 bc it uses the part 2 solution since it can't find the part 1 solution anymore (or we could j cache it and it'll still be there), or you could just have them enter the expected solution
Here's the idea I had
We're already caching a load of stuff, it makes sense to cache the test data too
sounds good -- what would lazy testing entail tho compared to just normal testing? or is that j the naem of the function
name*
Lazy testing => skip if the correct answer has already been submitted for that part
That's true but we also don't want to be requesting the same test every time we run the file
Also make sure that any requests call you add uses HEADERS (global headers that declare the library name)
yeah true
alr i'll start working on it
Tag me once you've made a PR for the maximum chance of me noticing quickly π
@earnest forge i found some issues with the algorithm to retrieve test data π i tested it with last year's data and it worked for every day but one -- would it be fine if it doesn't work for some days and test data will have to be entered in manually
lemme see if i can try and fix it rq
yes, there was a one-line input before: 2018 part 5
Even one-line inputs have the /input endpoint to retrieve them
for el in Path(".").glob("**/*.in"):
if len(el.read_text().splitlines())==1:
print(el)
2018\5.in
for me it's just it but I don't have all inputsπ₯΄
οβ― fd .*\.in | xargs wc -l | sort
0 2015/20.in
0 2015/25.in
0 2019/25.in
0 2019/2.in
0 2019/4.in
0 2020/15.in
0 2020/23.in
0 2021/16.in
0 2021/17.in
0 2021/6.in
0 2021/7.in
fancy, but why do they have 0 lines
(wc -l likes to count single-line inputs as 0 line files)
ah
What -l technically means is 'count the number of \n characters in the file'
huh?
I don't think so.
oh The wc utility displays the number of lines, words, and bytes contained in each input file, or standard input (if no file is specified) to the standard output. A line is defined as a string of characters delimited by a β¨newlineβ© character. Characters beyond the final β¨newlineβ© character will not be included in the line count.
Usually, how much time did it take after puzzle reveal, for 100 answers ( Global points ) to be submitted?
first part, or both?
i guess both
you can see, day 4 for example, here https://adventofcode.com/2022/leaderboard/day/4
3 mins 22 seconds
oh right there are time completion on leaderboard...
totally forgot.. thanks
Bruh, one dude submitted the answer in 16 seconds!
Tastes like cheating to me... although i'm a peasent coder...
Then you see on his git page he made GPT-3 algorithm to solve AoC
ooook
You can see the times on a plot on https://www.maurits.vdschee.nl/scatterplot/
man i can't simulate a python REPL π
ok what the actual heck
oh my god i was supposed to post this in ot
XD
damn
a poem of python one-liners
Who said they had some pypi package that automatially submits the result?
is it just me or was todays challenge way easier than yesterdays
i agree
!pypi aoc-lube
!pypi aoc_helper
Just looking at the leaderboard, it took 3:22 to fill up today compared to 5:24 yesterday
thanks
truee
so yeah, I guess you can say it was easier
took me 10 minutes to do both compared to 30 yesterday lol
run &aoc lb for the overall rank in python discord
you can't see the overall global rank unless you're in the top 100 but you can see it for individual days at https://adventofcode.com/2022/leaderboard/self
ah, i see, thanks
what do the numbers mean? at first i thought it was how many completed it, but the silver nunber contradicts that
silver is people who have done part 1 but not part 2
i feel like i need a hint for this one, tried like 3 approaches but still getting the wrong answers π
For day 4?
I'm going to have to wake up earlier if I want to aim for a top 100 spot on the local leaderboard xD
yeah
I have an approach idea for you. Iβll have to post it in the spoiler chat though. Would you like me to tell you it there?
i didn't want to jump in there to accidentally stumble upon a solution, would you mind dming me?
I can do that sure
appreciated, thanks
As an aside having a channel that is for discussion but not full spoilers would be good
Agreed
Though I think that's what this channel is intended for
i thought this was the channel for that but guess the description says otherwise
No solution discussion is allowed here
Oh you want -- I see
Yeah, that could be useful
I need to add you as a friend to DM you, please accept
oh right the new message system is ab ugger
The magic spell of open().read().strip().split()
strip is optional on the aoc inputs but yes
What a shame, living in Europe means I'll never be top anything.
I've tried day 4 puzzle too many times and now it doesnt tell me if im too high or too low. Am i allowed to run my data through someone else code to debug?
pls help in line 18
&aoc join
!paste
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.
If not, heres my code. Works for the sample data but not mine https://paste.pythondiscord.com/awunejuyuz
Shouldnβt you strip the β\nβ from each line?
if you split on "\n" that happens
isnt that the split function
strip removes whitespace from the start and end of the string
and the AoC inputs dont have any whitespace
at the start and end
but there is sometimes a spurious newline at the end
ah fair
idk ive done 4 of them so far and didnt use .strip and it worked but ur probs right then 4 isnt the best sample size
I feel if you know your python you wonβt need it. But Iβm personally a novice. That list comprehension in my paste bin code is like Elmo saying balsamic vinegar for me lol
maybe ask about this stuff in the spoiler channel #1048826930759204864
or wait, you haven't solved it yet
Yeah, it works for the sample data but not mine and AOC doesnβt tell me if Iβm too high or low anymore lol.
Result:4 29 TrueCode:```py
print(c[1])
print(d[1])
print(c[1] >= d[1])
Welcome
Da f, today's second place is actually Chatgpt solve
Solved it in 10 secs β οΈ
yeah ig cool from a tech perspective but idk
It doesn't really matter but thats cheating yourself. Like the point is to be a coding challenge, make ya think and problem solve. I have the answer to my puzzle from someone else solution but refuse to use it until my own code works. Im missing like 6 cases lol
feels like a chess engine playing a against humans and the engine being ranked in the same leaderboard as humans
But then there is no point of having a leaderboard
he should be removed from the leaderboard imo
why?
i mean he didnt solve it by himself
gpt model made the code and submitted it
so?
thats like using a chess engine to rank high on the leaderboard
it's like a chess engine, but with one difference: it's not disallowed by the rules
Test your skill?
What is the point of having his name on rank 1 on leaderboard
And complete with a bot β οΈ
so he can be rank 1. that's the point of a leaderboard
Itβs like real life.
it's a cool technical thing and I am sure this will be handled better next year. Also, the bot is by no means infallible.
it can be done in <1 second, but there was much delay in API call to openAI.
Tell me a sport where a robot is on the same leaderboard as humans
oh
i thought it wasnt allowed
nvm
I presume it'll start having trouble in later days
tell me a sport where robots are actually playing, other than chess
Idk it learns fast
it failed day 2 IIRC
This isnβt a sportβ¦ itβs a challenge to test problem solving skillsβ¦
honestly i think the leaderboard should be for human competition only
i doubt well be hurting openAI's feelings for not allowing them on the leaderboard
No there is a competitive side to it
Matter of fact it's very important
and i wanna know who the best human programmer is its not rly interesting that the ai crushes humans in competition
^
Thereβs a competitive side to a lot of things. That doesnβt automatically make them a sport. Take usFIRST for example.
Which Iβm still mad about
No worries, the bots are going to fail later in the month.
honestly, I am pretty confident the AI just got lucky and first tried it
well yea but also if the top 100 this week are all gonna be robots whats the point of the leaderboard in the meantime
again, day 2 was too hard for the AI
? Sport was just an example, real thing is leaderboard
In fact gettting to the leaderboard for bots is not trivial at all.
Day 4 got me stuck lol
obviously not but that doesnt mean they should be allowed to take away from human achievement
This year sure, what about next,
I don't see any way to check if a code is handwriting or by bot
sure, it's impressive technologically, and I am not a fan of allowing bruteforce solutions in general, but ehhhhh, shouldn't be too hard to later adjust puzzles to make them nigh-impossible for the AI
unless it is disallowed.
it is not bruteforce.
It is, model trains like that, it's just gotten good at it
it is more or less a bruteforce. The AI cannot consistently produce a solution, just sometimes manages and then you get a good placement
just trying algorithms until something sticks
But the problems are very descriptive, i think it will only get better at it over time
sure, but later there will also be better tools and best practices to handle this
Let me try to solve day 17 ,2022 with it β οΈ
The packet challenge
I think just having a rule would stop a lot
But then a lot will say copilot is the same
how though
put a captcha on the submission bar π
exactly
it's literally impossible to verify where an answer came from just from the answer
Generosity and sportsmanship
that has been conqured as well.
but muh aoc helper
We all know we can do it to, but we don't right?
I mean, sure, but that isn't a very foolproof way to stop it
yes, "we", the people who don't generally cheat
haha
and then a lot will say brain implants aren't allowed.
now that's ...
I mean, at that point the larger problem is "how will online competitive programming cope with AI generated code"
No nurolink lol
which will be interesting to see
Like i tried a bunch of lc challange last night, it absolutely destroyed them, but only got a AC on one
So i think edge case are the true hero here
Are the datasets generated per person or is there a limited number of datasets that are recycled?
I actually think the bots is the most interesting thing this year's AoC.
there are a few
So some people will have the same answers. Alright.
generally no afaik
you bet.
i would assume no, that kind of detracts from the point of them
Last quarter 25% of code at Google was written by copilot β οΈ( but only 1-2% made it in after audit)
Although the input is given by human, this is going to change many things
that's pretty bad. i would guess most of that code wasn't anything critical, only boilerplate, too
Who knows, time to add as many skills as you can
I don't think pure dev jobs are gonna be that safe in the near future
Although it's hard to get quality code from these ai
Garbage in, garbage out
ye. why have someone write code when you can generate something that's indistinguishable from code.
Luckily dev jobs don't have small clearly defined problems as their everyday job and instead you have clients in non-technical roles and you have to go back and forth with them to try and clearly define project requirements
Ohh yh people suck at describing what they want, and i don't think that's going away anytime soon π
I more want to see whether this scales to generating whole programs eventually, instead of just snippets.
Like what an ai gonna do, if IT department doesn't Authorize the request for weeks on end π
I think it won't be able to, like even a small scale app has so many services nowadays
We sure like to over engineering stuff
Atleast not in near future
can someone help me a little with my coding? i got a question for homework but I tried and cannot understand what I have done wrong. I am not asking for a full answer rather a little help to the code I wrote, any help is appreciated, thanks ^^
I want yodafone
please read #βο½how-to-get-help
Let's see if tomorrow we get a human at the top π
I do wonder tho, will there be a listing called "prompt engineering" in a few years π€
Yh i can see this on someones resume
Lo and behold
https://github.com/ostwilkens/aoc2022
Well here is what gpt-3 thinks about this π
GPT-3 thoughts on the subject
"It is generally not considered ethical to use a large language model like me to solve competitive challenges or contests that require original thought or creativity. These challenges are typically designed to test the skills and abilities of the participants, and using a language model like me to generate answers or solutions would give an unfair advantage over other participants who are solving the challenges on their own.
Furthermore, using a language model like me to solve competitive challenges could potentially violate the terms of service or rules of the contest, and could result in disqualification or other consequences. It is important to respect the rules and guidelines of the contest, and to compete fairly and honestly.
In general, it is best to avoid using a language model like me to solve competitive challenges, and to focus on using your own skills and abilities to solve the challenges in a fair and ethical manner."
Even the ai knows it's not ethical π
damn i thought we were done with the topic
Wow today 1st is also gpt
man I hate it when my code passes the example test but not the actual input. Day 4 part 1...
Ahh sorry, i just got carried away
edge cases!
did you run your code on the individual pairs of the test input and check that each one matches the expected result?
was just doing that and I think I found my mistake
but I have to wait 5 minutes because I answered incorrectly
oh that will work?
les go 
https://www.maurits.vdschee.nl/scatterplot/, very interesting.
I would like the see the time for the top 5 people, not top 100.
that's done by chatGPT, the new fancy general purpose AI from openAI.
Impressive AI
damn
now there's gonna be 100 people under 30 seconds π
i wonder if they'll remove these kind of scores or not
there's no good way to detect it
other than "that guy was too fast"
and even then, the ai user could just delay their answer
potentially shadow banning and comparing times with others π€·ββοΈ
sure, if times are bimodal, then you could do comparisons
also potentially comparing between "trusted" users idk
Similar times to in previous years?
so newbies aren't allowed to top leaderboards?
π€·ββοΈ
yeah
it's just a ping issue at that point
i think the only way it might be prevented in future aocs is through a captcha system
but even then, you'd be able to paste the stuff into a code generator
yeah
ok but captchas
are like
breh moment
takes so long
And that punishes people using stuff like aocd or aoc_helper
^^
true
how do things like codeforces/usaco handle this? or do they not π
the problems are just harder
ah
to the point that code generators don't make good enough solutions
you submit code, they review the code if necessary
so will openai and co be able to solve the later days π€
if there's problems that build off of previous days as well
at its current level, i doubt openai would work for anything beyond a usaco bronze
maybe a silver if i'm generous
im guessing easier silver ones?
yeah, probably low silver
those basically are just a bit harder bronze
but anyone can solve those, so it's still pointless
anyone with like some programming experience*
doesn't matter whether it takes 10 seconds or 3 hours for usaco, so there's no incentive to use code gen for those
unless you can't solve it at all
yeah
skill issue
π
getting to silver doesn't mean anything lol
makes it so you can get to gold π
gold is not too impressive either
good enough for the average joe
maybe
don't think anyone in my school has plat
damn wtf
&aoc join
that's quite impressive
yeah
what hs
what kind of sweaty ass school kek
it's public too so ig just zip code diff
lul
probably don't want to doxx themselves π
i'm not into doxxing myself
whats advent of code about?
tj?
guys I have a question...
I'm making an amazon Alexa skill, and I'm trying to control my pc over WIFI (with alexa commends)
do you guy know a way / python lib that could be usefull to control my pc
tbf my school sees a lot of biomed kids
wrong channel
a problem a day
2*
1 probelm 2 parts :>
2 *s
lmao
there might be a lot of sweaty cs underclassmen actually hmm
i haven't really interacted with them tho
cs is either the most cracked people in the school or someone who couldn't decide on a major
cs is one of the few fields that's easy to start before college
for other stems, you generally don't have access to lab equipment
math is an exception because there's stuff like amc
yeah stats too
afaik it's like
actually
i'm not too sure π
but the internet is there and a lot of programs are free π
probably ml stuff?
yeah
ig depending on whether you're looking at theory or praxis
how about things like cybersec
Is it just me or if the code isn't really hard, the text explanations are overly complicated ?
these are early days
ye
though later days aren't too bad either
i feel like kids
can definately
get like a lot of exposure with web/online stuff
yeah, people can definitely get into cybersec early on
not really hardware though
ctfs are a thing
yeah
other half is actually dealing with real world stuff :L
i guess tldr a lot of things you do with computers is easy to start pre college
or don't need physical equipment
cs is one of the easiest to get into, but ironically, that's exactly what makes it the most competitive
brilliantly summed up kek
i still do think like business is easy to get started in with startups
idk if i worded that right
maybe why it's also really popular
yeah
hs kids can definitely create their own startups
business is also competitive, idk about the academic aspect of it, but in the real worldβ¦
academically it is pretty competitive
one of the "hot" majors afaik
alongside engineering and cs
i see
or at least based off of the things i've seen at different colleges
still π€·ββοΈ
Β―_(γ)_/Β―
gonna go eat lunch now peace
cya
huh?
did you do a good solution or the solution that happens to be fine because the input is way too generous size wise?
I think my solution should hold up fine with a larger input
algmyr is mad the problem wasn't hard enough
I didn't realize that scaling the size of the input would be an issue on this problem
write a generator that'll triple the size π€
That's what I'm doing now haha
triple? that's pathetic.
100x
raise it to the 13th power
multiply all numbers by 10**9 π
give me a few gigs, or at least a few mb
inb4 next puzzle has a three terabyte input
to be clear, I don't mind the input being small, I'm disappointed the ranges are small
i want everything to be bigger
since there is a nice lesson to learn with big ranges
it goes lost if you can just brute force it
Ah, I see what you mean now
my solution would probably be slower with large ranges
solution doxxing
"no, anything but my solution!"
I hope it doesn't scale linear with the size of the range
pshhht, if it works it works
wtf
oh yes, sorry
m
I tried range too but end up with just math.
My solution shouldn't get affected by large ranges at all, just used some math logic
algmyr is proud of you
Who's algmyr?
fiery festive fenix
A wizard
inb4 people manage to solve it on an apple 2 with 10kb memory regardless
predictions for next problem
i imagine this one will take a little bit more thinking then the last 4
pathfinding
oh no
i should catch up on the story tbh
i don't know how to implement graph theory or dijkstra's algorithim or anything
if it is i will probably just die
there's gotta be a day where we get lost in the grove
If thereβs any pathfinding Iβm going to load up networkx and cross my fingers
lolol
Worked gloriously for one puzzle last year
And was pretty much useless for everything else path-related
But for one puzzle I managed to do a path problem in basically one function call after data parsing π
what is networkx
Python third-party graph package
I expect my solutions to gradually get more and more hacky
my solutions have been python hacky since day 1 π
how do i install third part packages and get access to them in pycharm?
just using the cmd?
pip install
make sure you're in a virtual environment or you'll be wondering what is taking up space in your c drive
pip does not work for me but i found that py - m does actualyl run
yeah you can do it that way too
Yeah you need to do this for Windows because Python isnβt added to the PATH by default
it actually is, you also get an option to add/not add it to path after installing it, i had to use that on wsl though
Right, you have the option but itβs not ticked by default
aye
on wsl? you got py in wsl?
don't remember but it was quite a mess, two python versions were fighting for it and i might've alised python3.8 to py
bruh
Two Python versions often fight on Windows machines even if not using WSL e_e
just use py on windows and pyenv on linux. porblem solved
Far too many people in help channels install from python.org, run python instead of py and then end up installing a second MS store version
And then wonder why they can never run anything they pip install
in wsl it's very easy if you're using a regular distro with pyenv
i haven't figured out how to build from source on nixos though 
this is actually a huge problem
i don't know why windows does it
might as well just ship it with python
That would be amazing tbh. Fortunately because of the win store I was able to install python on my work laptop after my job installed it wrong. Then the regional manager guy basically told me to F off so I have python for no reason lol.
Hi, beginner here. I installed everything in my c drive. Do you know how I can remove them?
If you used an installer for python from the website, you can run the uninstaller to remove everything. If you installed python from the windows store you can uninstall it from the app mangager within windows. If you are wanting to uninstall individual packages, I personally don't know how to do that.
gotcha ty
Welcome
I found my packages in my computer folder, but I'm guessing simply deleting the folders won't do anything?
It might, no idea lol
where is everyone?
&aoc
&[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.
&aoc leaderboard
Here's our current top 10! πππ
| Name | Score | β, ββ
--------------------------------------------------
1 | Oliver Ni | 7869 | (4, 4)
2 | Zeyu Chen | 7833 | (4, 4)
3 | Adavya Goyal | 7813 | (4, 4)
4 | Defelo | 7808 | (4, 4)
5 | Kevin Sheng | 7800 | (4, 4)
6 | RundownRhino | 7773 | (4, 4)
7 | Starwort | 7769 | (4, 4)
8 | Anonymous #1087784 | 7766 | (4, 4)
9 | Daniel Gu | 7766 | (4, 4)
10 | RadioactiveHydra | 7764 | (4, 4)
we go again
in 5 minutes
Day 5 starts <t:1670216400:R>.
Get ready all you elves
where is everyone :(
pr of aoc_lube?
Oliver's already done
aoc_helper, I'm not a maintainer of aoc_lube
Day 5 starts <t:1670216400:R>.
omg ! ! ! !
oh boy
30 seconds
π
5
<@&518565788744024082> Good morning! Day 5 is ready to be attempted. View it online now at https://adventofcode.com/2022/day/5. Good luck!
omg how on earth is this input gonna be taken
today questions sound difficult to understand for who English is not advanced or native
damn top 100 again!
hMMM
Silly typo cost me like 2 minutes :(
how are y'all taking the input today? π
thinking of a ||stack implementation, but storing it is gonna be painful ||
||list will do fine?||
guysss is it cheating if we change the input? lol
??
Of course not
ok lol
You might get the wrong answer though
Formatting your input file is totally fine
for the crates "ascii drawing"
Anything to solve the puzzle
would be a pain in the butt to format that input as is (to me)
(although parsing the input isn't actually that bad)
(my slowdown was because I'm a dummy who used similar variable names and mistyped one)
idk i wanna ||make a dictionary to store the crates but the input is sooooo goofy so idk how imma do it||
||like a list of list? ||
it's easy without the parsing inputs part
And I want to do it right
cringe
lol i did line.strip() to strip off the newline
but there were spaces at the start that got stripped off too
fml it took me like 5 minutes to figure that out
Yikes
also cuz my hands were cold and stiff cuz i'm outside at a party LMAO
phew that took me forever
||stuff[-x::-1] is not the same as reversed(stuff[-x::])||
wait where do you see this
props for not letting part 2 trip you up for longer than a minute
lol i didnt let it trip me up because i accidentally did part 2 in fucking part 1 for like 7 minutes
hahaha
we got similar times, but i was way too slow to do part 2
This was one of those "saw it coming"s in part 2. Actually more of a "should have seen it coming"
Beat me by a minute
really bad joke
idk wtf that is lol
lol well done on your part 1 time though
shitty persona 5 joke
the lyric in that moment is "you never see it coming"
this held me up
gotcha
Day 5 is typically a bump in difficulty
took me 45min for both parts
rip
yesterday 12
did you manually parse inputs
rip
Yes
how long did that take
took me 20 min to setup both parsing functions
There should only be one
how can i spoiler codeblocks?
did by hand π
Default dict was clean here yea
U can do that with a normal loop smh
Just make the step 4
π
please post implementation tidbits in the spoilers channels
if you want to spoiler tag, you can use ||
i think ||yeah||
also /spoiler
good job
I guess the entire challenge is about input parsing π«
Once that is done it's easy 
welllllllllllllllll
you could technically just parse it yourself or change the input so its easier to parse 
I did it by hand.
me too π
wait what do you mean by that haha
That's exactly what I've done
π§
Just to stay first in my private leaderboard 
Will make proper input parsing later during the day
yeah hahahahahhaha
we have a private leaderboard for work, and I am not even a dev (I do cybersecurity) and am beating some devs
Exactly the same here, which is pretty cool
So I just do everything to not get too low, including copying the input manually 
.
for part1 am i not supposed to have an empty stack for my answer
There are 5 days that have a part 1, ask in the thread in #1047673173447020564
can u seriously not tell which day im on about ? lol
I do know, my point is: ask in the appropriate thread in case you haven't realized it
You're still giving out hints to others by saying if something may be empty or not
I mean, just submit what you got and the almighty backend will judge you
I'm coming for you Chris.
its ok i eventually got it thx
the guys who solve the challenge in less than 5 minutes, tall me your secrets how can you do it π
Gaming chair, good keyboard, and just hyperfocus
Honestly, it comes with time. You just...stop....reading text and just read for keywords tbh. As for programming, again, with time
Hey guys, I'm new to this discord, but is there a place I can peck someone's head for some Python help at all? π
Been stuck on an error for weeks and i'm losing my head haha
tysm!
what's the best library to use if i wanna build a mobile app? i'm considering using kivy, but ppl say it has performance issues
7. Keep discussions relevant to the channel topic. Each channel's description tells you the topic.
tfw i click here thinking its off topic π
but yah i think going mobile native would be the best option, perhaps kotlin?

Oh no, darling, I'm out to get Chris
For they server staff
We must defeat the server staffs for the glory of the members
On it
this burns my eyes
huh, wish I knew regex for day 5 :P
I haven't even checked aoc yesterday or today ._.
yea but it seems ideal for this one
Regex is most often not needed for stuff. There are some valid usecases for regex in the world, but aoc is easily doable with just string operations
regex seems better suited for todays one
hey
spoiler channel!!
yeah i meant this whole discussion
I only used regex via a helper function that always uses regex even when it's really not necessary π
how tf do you read the input
that is a discussion for the spoiler channel :) we can give some hints there if you wish
ok
This is the first time this has happened.... I got the answer right on my first try..... Am I even a programmer if I don't have to fix stupid bugs and figure out what's wrong with my program? I doubt it.
No, you're just following the guidance of RFC 9225


