#advent-of-code
1 messages ยท Page 5 of 1
You can do it!
We believe in you!!
Yeah but I just don't have the time to keep spending on it
Does that include stuff like the fact that ||day 7 involves directories|| when it's stated pre-part 1?
what's "pre-part 1"?
|| Somehow my code doesnt like directories of the same name ||
Context/lore, before the problem statement
that's part 1
so yes, is considered spoiler
because you can't see it without navigating to the problem, right?
I guess that makes sense
Is the site throwing 500's for anyone else?

Correct
please spoiler your messages ||like this|| @strong loom
see here: #aoc-faq message
Is the copied description of the problem a spoiler though 
yes
that's just... the question...? you can view any question at any time though no?
check the pins
regardless of how far you are?
k
Yeah though a spoiler is defined as
a description of an important plot development in a television show, film, or book which if previously known may reduce surprise or suspense for a first-time viewer or reader.
So I guess someone could scream at you because you removed the suspense or surprise for a first time reader 
the goal is: people that are doing AoC problems at their own pace (at least, during the period of December until the AoC Completionist Role is retired) are free to come to this channel without getting spoiled as to the nature of the problems they've not opened yet
it's not just about the solutions. we've always been pretty clear about that
and it's not new policy
Just spoiler every message, at least you're sure it's not annoying anyone 
if they click on ||spoiled text|| then that's on them, of course
omw to make a whole file system emulator
Brace yourself...
I think the chances of us doing that for real is non-zero
the visualization i made mocked a pathlib.Path for the ||paths|| so i could convince my file_chooser that it was looking at real ||path||s
Have you posted it here?
yep, posted in spoilers
oooh pretty
spoil message pls
people visiting this channel that haven't looked at the puzzle yet are gonna see that it may use ||paths||
oh I see what you're saying
but it doesn't require that
but spoilered anyway
Maybe I'm just too smol brained, but (for 7-b) I'm getting ||a total size of the folder "/" that exceeds 70000000, that seems like it shouldn't be possible?||
you're right it shouldn't ... on my dataset (which is not necessarily the same as yours) the size of root was between the max disk size and the disk size - available space needed
I have no idea what I'm doing wrong then... Could someone take a look? ||https://gist.github.com/Synthetica9/9c3705477e1a9d8b44cbc0a57b6d7b5e||
perhaps they put day 17 instead of day 7
||100,000 is the biggest a directory can be to be counted||
I'm taking a look. Just ran your parser, it seems fine
What's going on here?
|| res |= cumulative||?
Here's what i found in the example data
Looks like you're ||584 too large in the root directory. Somehow you're counting dir e (the only nested dir in the example) twice towards the root size||
did people's solution had classes?
some yes
Mine did
my second solution did but i realized i was just typing more so i skipped it
Actually, my submission time solution did not, but then I refactored
i checked a few class based solutions and they were really neat
yeah i used classes
I'm just a classy guy
&aoc c
Day 8 starts <t:1670475600:R>.
ty
๐
let's hope it's an easy one
i have a feeling it's gonna be one of those types of days where you have to optimize
but p2 all of the sudden will take ages
&aoc c
Day 8 starts <t:1670475600:R>.
good luck everyone
gl!
<@&518565788744024082> Good morning! Day 8 is ready to be attempted. View it online now at https://adventofcode.com/2022/day/8. Good luck!
wow
this looks like the kind of puzzle numpy comes in handy
yeah for sure
dammit i have 3 mins 20 secs to wait
i choked again
i should really read the problem lol
wtf is this part 2
LOL, i fell off so hard
I fell on lmao, 734 -> 215
i read the problem wrong fff
@woven sable your testing code is still broken btw ยฌ.ยฌ
Only runs the first time for each part (where the answer will usually be wrong)
Oh I see why
LMAO
alright i'm just gonna need a couple more good days to score in top 100 overall again
not sure if i can do it lmao
nah i just did it really stupidly
oh
yeah i kinda messed up the caching ๐ญ
i can fix it again
sorry btw lmao
It's fine I got it
alr
You checked if the cache exists and if it does skipped testing ๐
(also you're caching the test results instead of the test data for some reason)
damn, this is the first time i feel like my code should definitely be working but i'm not getting the right answer
rip
welp, my p1 solution worked but ||it has probably zero overlap with what my p2 will be||
damn, i'm struggling to see where there could be a bug in my code
My half-asleep brain did not want to properly comprehend this puzzle lmao. Worst time out of all the days so far
i keep making my own test grids hoping my code will get it wrong but it's always right lol. What edge case am i missing???? 
That's really weird, would you like a real input to test with?
yea sure!
Logic check for p2...||all trees on edge have a score of 0, right?||
Yes, and it does say that (albeit in an easily-missable place) in the problem statement
great, thanks
https://starbright.dyndns.org/starwort/8.in ||1713|| ||268464||
interesting, thank you! my answer is far too low
my code is failing to count 42 of the trees as visible hmm.
oh bruh ๐ i was a little bit confused by the caching system but ig i didn't understand it well enough ๐ญ
I also changed the use of the cache file to store test data as opposed to attempts, given there's no need to cache test attempts
oh god dammit. A single character caused my bug. I forgot to change one <= to a <
Riiip
Because they joined and then never actually solved anything?
u think about 50%
seems a bit much imo
ยฏ_(ใ)_/ยฏ
could I do something like this for day8?
||convert input to matrix, rotate matrix to 90, and for each "tree" check if it's smaller in each array (both matrixes, rotated and normal) ? Ofc I'll need to do extra stuff to check if surrounding trees are blocking the view, but is this a good approach ?||
is day 8 easier?
Some people will find one day harder than others
Depends your knowledge is the "theme(s)" of the day, and applies for all days
I'm stuck on day 7 part 2 - it seems that my || needed size is 2036703 but I don't have any folders with a size greater than that? Do i delete multiple folders, or is something off with my code...||
|| My code works with the example ||
Nvm, we were supposed to || add subfolders still ||
God, finally done day 7. That took wayy to long
I'm going to catch up to you soon
Did day 2 to day 4 just yesterday
But I'm not getting a lot of points since I'm late
Today's aoc was very cool. I liked it
Did you guys solve it? How efficient is your solution?
Yes and it's pretty shit I guess just like all my solutions 
Exercise 8: [ PART 1 ] [ PART 2 ]
Alex: [ 0.014534 ] [ 0.016413 ]
Winners: [ buonhobo ] [ buonhobo ]
This is the benchmark result from the internal benchmarking tool I made for the AOC
time is in seconds
noice
Any command to see where you rank on the private leaderboard for a specific day?
And not just the top 10?
If you &aoc link it can tell you
lol
I lost leaderboard part 2 because i typed tj instead of j
I was 6th part 1
would have placed very high part 2 if i didn't have to spend like 8+ minutes debugging that
granted this was caused by my own shitty variable naming
Is there some leaderboard that confronts benchmarks instead of "first to submit"?
The website doesn't run your code so it's unfortunately not able to do that
First to submit is not an interesting metric imho. It's cooler to see who can make it fastest, shortest or with some sort of gimmick
The discord server's bot could do something like that
You could make a custom website/discord bot to do that
For sure there's other interesting ways to compete
I agree
If you want shortest, you're welcome to contribute to https://github.com/starwort/advent-of-golf-2022 ;) (spoilers, obviously)
I made a benchmarking tool made for this, all that one has to do is to put the right file in the right folder and it will benchmark everthing and tell the winner
Unfortunately that requires much more skill than I can hope to have :/
It's pretty much a community effor
We hang out in #1050278378801991861 trying to shave off as much as we can
Today's down to 284 and I'm not sure it can get much lower
I stand corrected we're down to 282
If you want you can send me your solutions and I can benchmark them and send the result.
All I need is first.py and second.py (either or both) and the name you want in the leaderboard
Oh, the solution must have a main function with takes the whole input string and solves the problem without printing enything. it jsut returns the solution
I'll send an example in your DMs if you want me to
My solutions are in https://github.com/starwort/advent-of-code-2022, and fairly self-explanatory
I might automate the whole thing if there are many people submitting and asking for results
My solutions+ benchmarking tool are here https://github.com/BuonHobo/advent-of-code
Along with a file of results
||im on day 3 and I can't figure out how to count the letters, im mostly new to code||
day 7 made me realize in really bad at programming
#1047673173447020564 or put spoilers around your text
sorry
same
Come on, day 7 wasnt that bad, you can do this, just take a break
i solved it but my code and implementation is trash
i created the worst tree data strucure ever
ik you dont have to create a tree i have seen some sollutions
but I wanted to be proffesional and make a tree ds anyways
which i butchered really badly
I categorically disagree that you could have made the worst tree ever, because I did that (not for AoC though, for uni)
I already have an advantage because they made me do it in Java
jokes on you, i dont know how to use java, so i automatically win ๐
No actually that makes me automatically win because it's useless to you
great now i dont feel so bad after all
Tree was the intended solution, everyone else trippin
If you ever get impostor syndrome just know that I spent the better part of a week coming up with about 5 algorithms to try to achieve the same goal
- spoiler tags
- ||I did use a tree but it was dictionaries so not really creating a tree data structure, more using one||
||i tried using a dict but i was unbale to backtrack to the parent node properly, so halfway i switched from dict to making a tree using oops which i fucked even more but at the end i got it to work||
kekw Yeah ||cd|| was the most annoying part of day 7 for sure
I am linked. It does show my overall position on the leaderboard with &aoc lb, but not your position for a specific day/part with &aoc daystar
You probably can report an issue for the bot. Unless the daily top10 are static it should be doable
@modern terrace irl
i am either a microoptimization guy or an expert code golfer
it varies between contexts
if you'd look at my day 7 "normal" solution you'd see caches
wtf, ||if my understanding is correct, this shouldn't be an issue, as list is an Iterable||
||Expected type 'Iterable[Iterable[_T1]]' (matched generic type 'Iterable[_T1]'), got 'list[list[int]]' instead||
can any1 explain this?
spoiler bc last line of my solution for day8, not much to spoil tho
Is ||score_map a nested list of the scenic scores||?
If so, ||I don't think that line of code will work unless the inner lists are already sorted||
The code already works.
I'm just confused about what pycharm complaining about.
||it has the dimensions of the tree map. But instead of the tree hight, it contains the score. ||
does it complain about:
scores = [[123, 123]]
map(max, scores)
dunno what Pycharm is smoking. VSCode + Pylance says it's fine.
smoking some pretty heavy stuff, aparently
mypy doesn't complain about it either
the error itself is a paradox
seems it doesnt know that list is iterable?
Expected type
'Iterable[Iterable[_T1]]'(matched generic type'Iterable[_T1]'), got'list[list[int]]'instead
Any tools made in python guys helpful for social media or tracking or smthg
what is the code golf channel for
for code golf solutions
gode golfing is solving a problem with the shortest amount of code as possible (usually measured in the size of the file)
ohhh
We don't yet, but that sounds like fun. We do have the daystar command, but that just shows timings and doesn't easily indicate your position. You're welcome to make an issue on our Sir Robin repo: https://github.com/python-discord/sir-robin/issues
If you'd rather someone else make the issue, let me know and I can make it as well (although no promises I'll describe it well)
You can tell I'm Italian because all my code is spaghetti
Thanks for the link, I've opened an issue ๐
i have no idea how to do day 7, tried a dict of dicts but can't figure it out correctly
Damn day 8 was a relief from yesterday
You would typically use the tree data structure
Have you learnt those?
It would be a pain to use dicts
I did day 7 just fine with dicts
yeah just 1 dict needed. No nesting
day 8 done!
I havent gotten around to doing yesterday's or today's yet ๐
Day 7 looked like it was rough based on how many 3-5 minute power naps I could take before I could open up the solutions & spoilers channel
lol, I've glanced at the problem, seems like it'll take longer than the previous ones
When do you make them?
When the global leaderboard fills up for both stars
Why... OH. The points. So no one can cheat for points. I see. That makes sense.
Anyone have a link to that chart showing the top 100 times for the problems?
Day 8 reminds me a bit of a board game that came out this year: ||Monolyth - https://boardgamegeek.com/boardgame/373759/monolyth||
Makes it look like yesterday was a doozy
Thanks
You're having a right day with the weird stuff happening ๐
ill better sleep now, before my pc starts meowing
or barking
you never know what happens next
today my feelings towards AoC are not so great
It's official. My solution is crap. I think I have to try again tomorrow ๐ฆ

is this a bug
yeah I thought the same
im sure the ascii art thing shouldnt be displayed
probably
Ha, weird
wait always released at same time?
mhm, midnight east coast US is the release time
doesnt seem likr best system
almost 24 in total
could prob just decrease each day by 1hr so everyone geta a nice time
or smthing simliar
the creator chose it because that's when they're available in case anything goes wrong
although "rolling releases" might be kind of cool
yeah im just wrong timezone :(
ig it make it more casual for me
so idm skipping days if i cant be bothered
might focus more on golfing than speed then
be competitive in another way :p
ive decided, timezones are annoying we should just remove them and get half the world to wake in the dark
best solution
cool but easy to abuse
.-.
set time zone to est -> get and solve problem -> set time zone to another time zone -> login to another account -> solve
oh no not like that
what they were saying was that it would release at a different timezone each day
but obviously that makes the creator unavailable
ah
seems like it'd be harder to plan around then
@topaz summit ^^
<@&831776746206265384>
!ban 984879138265505822 Just here to post spam advertising.
:incoming_envelope: :ok_hand: applied ban to @lost kindle permanently.
So... are we going to get killed by difficulty this weekend?
hmm let's see
the puzzles on the weekend were the hardest last year iirc
Yeah, i'm looking forward to learning new things.
I wrote a code that works perfectly fine with the example (day 7), but doesn't with the input file, I don't get it lol
I hate it when that happens. Sometimes I write my own test input to make sure I can test all cases.
owo you can already see day 9's pattern coloured
of course im too ethical to click on it and check whether they made the question accidentally visible too
spoiler ||it's not||
youre in a treehouse, you can see further
lol
woah
frozen fingers
&aoc c
Day 9 starts <t:1670562000:R>.
whee
what's it gonna be tonight
more grid? more trees?
p a t h f i n d
please no
maybe not today
I hated yesterday's puzzle
that's like day 14 material
i don't want to code up a floodfill
does it keep getting difficult?
of course ๐
more or less
yep! are you excited :D
I have pathfind ready to go ๐
same
wow
everything is already implemented
the later levels are consistently very difficult every year
lmao
i died at day 20
1 min 30 secs
๐ ๐ ๐ ๐
Fail to prepare, prepare to fail
cute
&aoc c
Day 9 starts <t:1670562000:R>.
I guess so, this is the first time in nine days that I'm waiting for the puzzle to begin
i refuse >:(
โ๏ธ
get ready you little elves
preparation defeats the whole fun of it all
gl
freezing freezing freezing
hmm it says 40 smth for me
get that heart goin
Good luck everyone
my fingres
&aoc c
Day 9 starts <t:1670562000:R>.
<@&518565788744024082> Good morning! Day 9 is ready to be attempted. View it online now at https://adventofcode.com/2022/day/9. Good luck!
AoC Code Golfing Policy
I'm going to piggy back off of this ping and let y'all know that we have a dedicated channel for code golfing! #1050425859225436241
For those that really want to golf down the Advent of Code solutions, we ask you use this dedicated thread to collaborate rather than the day-of solutions & spoilers channel.
If you have any questions or want to provide some feedback, feel free to reply to this message or post in #community-meta!
oh my god
not even gonna try to do this problem rn ๐ญ
reading comprehension is too much work
Can someone make the spoiler channel? I got a question to ask..
It won't open until the global leaderboard fills
81 / 17 ๐
Also Eric changed the format of the 'you got rank' text so now aoc_helper doesn't parse it ๐
wow
Also also the test code crashes for this puzzle
i am doing so bad
grids again ๐ญ
I want to give advice but the lb hasn't filled up yet lmao
eh?
Lb is currently at 100/46
yeah there are too many examples lmao
not sure if there's a way to check for that though
does it crash or raise a warning?
yikes
I've just moved more stuff into a try lol
wtf does part 2 want
||part 1 but 10 layers deep||
wait this is so weird
part 2 stuff ||i'm confused as to how all 4 numbers are moving up...?||
god, that was abysmal
||i don't think they are?||
||every other movement i understand, but how is all of 4321 shifting over to be directly underneath the H?||
||so h moves up, right?||
||then 1 moves up & right to be under h||
||then 2 moves up to be beside 1||
||so on & so forth||
||i just missed this part of the description
||
ffff
My best rank yet, heh
kids, this is why you read the entire problem description ๐
got lucky with part 1
||thought that if they were too far apart, the tail end should just go to where the head was before, which worked for part 1, so i thought it would work also for part 2||
kekw no
oh that's bad
hell yeah bro!
top 20 problems:
I mean it still works right? Just if you ||treat each pair as a separate head and tail||
It doesn't work, I'll show you an example in the spoilers channel if you want
yeah go ahead. I'm curious
Done with todays' AoC ๐
I forgot I have XKCD substitutions on
really misread that part 2 with what it was asking for...
Rip
Iโm still stuck on day 2 lol
As I am a moron who who canโt do anything
true, rn i dont need plan cause its at like 3am ๐
&aoc join
sudden 300 point diff between #1 and #2 ๐
does shell have benefits or its just personal preference
When gp3 is slow 
w..wow
i told it to count overlapped positions too and boy the answer is correctamundo
not quite
in the task you move one step at a time
13
oh ok that's probably because its missing the initial point
wait, where does it say 12?
Is the coordinate system Cartesian in arcade?
or is it like pygame, where top left of the screen is 0, 0
pygame is really problematic for me because of that
if arcade is follows the cartesian system I'll move on to it
oh shit this is aoc not py-gen
surprised i haven't dropped ๐
but I thought that's the default for most screen renderers
well that's not forboding
my god, my solution for part 1 is no where compatible with part 2 lol
I'll have to rewrite
ack, ceil doesn't work for negative numbers the way I want it too!
Yep - fell for that too
I find that I try to guess what the extension for pt 2 might be and try to make the code as general as possible to help
nvm
my day 9 part 2 code works with the examples but not with the actual input
I hate this
both examples, yeah?
yeah
hmm. I have no idea how you can get second example right without you know, having the right code :/
me neither
I remember having a few weird cases on part 1 that gave the right answer but not the right way
But with part 2 it's harder to find those ๐
hmm
Today's exercise was my least efficient solution yet lol
[STARTING BENCHMARK]
Anno 2022:
Esercizio 1: [ PART 1 ] [ PART 2 ]
Alex: [ 0.000399 ] [ 0.000431 ]
Esercizio 2: [ PART 1 ] [ PART 2 ]
Alex: [ 0.000842 ] [ 0.000592 ]
Esercizio 3: [ PART 1 ] [ PART 2 ]
Alex: [ 0.000573 ] [ 0.000460 ]
Esercizio 4: [ PART 1 ] [ PART 2 ]
Alex: [ 0.001790 ] [ 0.001842 ]
Esercizio 5: [ PART 1 ] [ PART 2 ]
Alex: [ 0.000578 ] [ 0.000515 ]
Esercizio 8: [ PART 1 ] [ PART 2 ]
Alex: [ 0.014450 ] [ 0.016115 ]
Esercizio 6: [ PART 1 ] [ PART 2 ]
Alex: [ 0.000437 ] [ 0.001028 ]
Esercizio 7: [ PART 1 ] [ PART 2 ]
Alex: [ 0.001167 ] [ 0.001187 ]
Esercizio 9: [ PART 1 ] [ PART 2 ]
Alex: [ 0.004558 ] [ 0.024639 ]
this is the output of my benchmark tool
Was it slower for you too?
by taking a completely wrong path that just so happens to touch 13 unique tiles maybe
i'm scared of day 10
Bro day 9 is atually killing me
Ive been drawing so many diagrams and i cant understand how to make the tail curve in the right way
Can anyone give me a topic to research so I can complete this bloody day?
I can't for the life of me figure this out
you should ask in #1050641552524976129 probably
Much more head pounding and I finally solved it. I used someone else's solution to try to find the smallest test case which my answer fails for. Turns out I just hadn't accounted for (N|N|N). I thought my stack solution was pretty slick, but ultimately it didn't account for anything that wasn't just a binary operation (or break that into binary operations).
if you're talking about betaveros' solutions, I'm pretty sure they're using their own language (see the readme) and since that language isn't recognized on github, it only shows Shell (100%) in the language breakdown
GL everyone
gl
<@&518565788744024082> Good morning! Day 10 is ready to be attempted. View it online now at https://adventofcode.com/2022/day/10. Good luck!
Poggers
good morning haha
utc
is it already midnight ๐
Got my best rank today so far this season, part 2 global rank of 156
I think I broke ||aoc_helper.Grid.decode_as_text|| ._.
I also definitely broke something test-related
Today was so much simpler than I thought, overthought/overcomplicated P2 by so much
Somehow I misread my output for P2 though lmao
Is it me or day 10 seems easy
Quite easy surprisingly
Day 9 seems hard
I am stuck on day 8 part 2
Though I have a solution
It's just a core logic that's bugging me
I can't even do simple comparison
why is my display kinda glitched
i accidently fell asleep fun
Looks like OBOEs
Make it spoiler
I think I had the same problem. I had to change ||cycle % 40 to (cycle -1) % 40 because the screen index and cycles are off by 1.||
That problem is more accurately fixed by ||rendering before the CPU tick||
||because sometimes counter was -1 and that made it 39||
That sounds like the same bug but manifesting differently
Woke up late, can't understand what p2 is tryna say. am I just sleepy or is it actually hard to understand?
actually hard to understand
How is Current CRT row updated?
You should be able to ||use y, x = divmod(cycles, 40)||
This is kinda spoiler discussion, do you wanna just move to the spoiler channel?
Huh. I thought I was doing that? Oh well it works anyways.
What is chatGPT doing these days ๐ค
The problem with the spoiler channel is sooo much talk about code golf you can't get a word in.
The problem with ||just subtracting 1|| is that ||your top left pixel is usually wrong||
Wrong! They gave us a dedicated code golf channel so it happens there
Can it atleast read today's output and give letters in it?
Hey! Neat.
oh i see thats why the language was so readable being shell lmfao
Day 8 I was half asleep and it took me 2 hours for both parts.
I thought todays was easier then last 2 days too. I just checked the stats, and a lot of people are struggling with day 09 part 02.
Problem looks easy, but I have wayyyy too little sleep to understand what part2 is even telling me xD
Weekend puzzles are normally easier
i thought it was the other way around
that weekend puzzles ar harder because ppl got more time to think about them
They're easier to give you more time to relax
I want play some board games and spend time with family on a weekend. Not sit in front of the computer coding for a few hours xD
if i remmebrr correctly, last year day 18 and 19, both weekend days
hard af
the one was the task with the beacons in 3D space
oh yes
took me ages to figure out that one...
can any1 give me a hint to what i may be understanding wrong in day 9 part 1
my code works fine for example i think but i cant get the code to work for my puzzle input
Day 10 part 2 is interesting, I like it
is it possible to solve AoC problems after day is finished?
I liked that problem
it took me a while to even realize how I could start to approach the problem
Can anyone confirm that they think that reads ||RZMFGJCB||
yes
||Or H for the M ?||
Ill try that
it'd be easier to read if you print it the same way as the examples
It's not easy to read anyway
tbh Im not entirely sure how to convert it to that form
It was that, thanks
u could format it that way:
|| for row in list_with_rows: ||
|| print("".join(row)) ||
- for me it helped if i used whitespaces instead of
.for empty fields
yep
my stupid mistake was to misread R with A
took me 3 invalid try's to find my mistake (reading, not codewise)
Took me ages to work out exactly how it picked out what was empty and what was #, appreciate the help everyone
todays challenge was fucking brilliant i love advent of code
I'm gonna have so many off by 1 errors on this one
i love how someone on my schools leader board has time taken between p1 and p2 from day 7 onwards of 14s, 16s, 8s!, 31s
I smell cheating xD
Guys I can't figure out if I can't read the ASCII characters properly or my code is wrong. Possibly the latter. But surprised how I can see still the characters (maybe I'm looking for something which doesn't exist lol). Can I post the ASCII result I get here?
#1051003846014554142 post it here
Oops
Day 10 was fun.
The positions range from 0 to 39, starting at 0
X=1 at start.
Ah hm, sorry if I misunderstood the question.
ok ty
part1 was easy today
what am i supposed to do in part2
You are supposed to print pixel according to your part 1 output.
||X value at each cycle is the position of 3 pixels on the row.||
||So your X value will always be between 1 and 39.||
||The screen is 40 pixels wide and 6 pixels height.||
Please spoiler those messages or move it to #1051003846014554142
All right!
But all I said was inside the description though. ๐
thanks this really helped lmao
Is this advent of code related?
Please look at the channel you're in before posting.
ah ok ty
todays one was great and fun to do
and it was way easier compared to yesterdays, i've yet to do that one sadly ๐ฆ
yesterday's was simply but really just confusing tbh
and i dont mean tricky but just very unclearly written
yeah i had to do this too
i honestly didn't like today mostly bc i hated my solution it was ust for loops and an if statement
i've used ||match/case|| for like half the days this year tho, nice for ||command parsing||
id rather have an ugly solution after idk how long it took me than having an EXTREMELY UGLY solution after trying to figure out some solutin for hours
i hated yesterdays one
i still didn't figure it out ๐ญ
in pt2 i just tested every tree for the score and outputted the max value
yesterday was the tree house problem right?
or was yesterday the bridge one
bridge part2 wasnt easy
the rope bridge yes
tree house was fun but not.. good looking
bunch of for loops
yea i think i had something like
with ...:
if ...:
for ...:
if ...:
if ...:
it's fun to optimize the solutions after you're done
I only optimized p1 for day 8, though
im scarred of breaking my code after finally making it work
that's why I make a copy
ok
gitโข๏ธ
yeah I put them all on git, too
oh wow thats really good
no
why not
the "no" was for the "are you greek" thing that you deleted
kewl, my code would only move the children of a knot lol
what library are you using for the graphics?
It's a custom graphics library which is built on top of SDL
well, that is what I'm doing
if you move the middle, I just treat it like 2 ropes basically
well yours has neighbors, mine just has children
and mine would turn to crap if I were to move anything but the parent
yeah it's not a big change
imagine how performance intensive cloth simulations are considering the operations required for this 2d simulation alone
instead of
for i in range(1, N):
update(i, i-1)
I just do
for i in range(m+1, N):
update(i, i-1)
for i in range(m-1, -1. -1):
update(i, i+1)
I have implemented cloth simulations in the past, I do not have to imagine ๐
to be fair this is not that comuptationally expensive
oh?
I mean the rope simulation thing, cloth gets out of hand very fast, mostl;y because you want 2-way coupling for it to be nice
here children are effected by parents but not the oother way around
so it's not too bad, just "1 pass" so to speak
I'm having way too much fun with this
I should compile it to WASM and put it on the web
my own language ๐
wheeeeeeeeee x2
If you're curious: https://github.com/mustafaquraish/aecor/blob/master/examples/daecor/rope.ae
damn
it's not actually rust
I just marked it as rust to get syntax highglighting
the language is written in itself
yep haha when I first looked at it it just looked so painful, but turned outt o be mostly straightforward
true
I solved first part pretty easily
but my first part was completely hardcoded for 2 knots
I misread the edge case for diagonals for the first part, so that took me a while
my new solution can solve any number of knots
second part was just throwing a loop
yeah true
I think I got lucky and made my code general enough from the start
also wasnt as impressed by the idea of using complex to represent points
I thought it would be really good but, eh
it's good for golfing but that's about the only place I'd use it instead of a tuple ๐
also love your name lmao
thanks lmao
you might like my continuous version of day 9
damn
I actually didnt think this is what I just coded
wow
except mine is only for start and end
that sim is very cool
yeah but that's a simple enough change
^^
yeah just loop in both directions if knot not at ends?
basically yeah
go for it! Actually pretty fun
I think I'll try it after I do day 10
and day 10 reminds me of redstone lol
also day 9 is the first day where I imported something
and thats only because I used complex instead of tuples and needed phase from cmath
I see people doing lengthy numpy ops and get scared lol
we managed to get down to 135 characters for day 10 golfed solution so how hard can it be? ๐
with numpy?
no imports
part 2 is a bit trickier but mostly because of how long the text is, understanding took longer than implementing for me at least
lol
i never liked the idea of using complex for a pair of numbers.
nor do I, now
its nothing special
my code for example of part 1 fails on the last condition ๐ญ
how do I debug this lol
acc to example, value should be 18. Mines 19
board?
just every cycle print out the x value
I kinda have that already
then for every 20 cycles check ๐คทโโ๏ธ
https://twitter.com/ericwastl/status/1601722164310593537?s=46&t=frKDcIkSp43tyNr-eyCwew is this me or does this shirt look kinda like the illustration you get when finishing puzzles
like it's not the same but you can make out the path ig
It appears to be of that style.
i meant more as in this year's illustration up to day 10 so far
||kinda looks like a hot air balloon lifting off||
or glรผhbirne in english
pydis aoc merch is superior ๐ค
idk how its called in english
a ๐ก ?
Hot air balloon?
hot air balloons are just opaque lightbulbs
pydis aoc merch!
wait is that an actual thing?
How comfy would you say it is? I've been hesitant to order anything from redbubble because I don't want to get it and never wear it because it feels weird
That may not be from our redbubble store actually. I'm trying to remember which platform had the internal label thing
yeah, on redbubble, but not exactly the same hoodie
printful!
the thing for prestashop
okay, so it was from our other system, yeah
I see I see
Yeah, that's the system we can't take purchases through so we only use it for prize distribution atm ๐
i'm not sure about the red bubble hoodie, since this one is from a different supplier
it is quite nice though
I see
can i get a hoodie prize for uh...
I'll get back to you
can I get a prize for being in the top 1013 on the pydis aoc leaderboard?
I'm 69 on pydis leaderboard, that has to be worth something
At least 69, I'd say.
hoodie!
&aoc c
Day 11 starts <t:1670734800:R>.
6 mins ! ! !
I have to start late today since I'm not home yet
where's everyone for the countdown ๐
pydroid
python is just a text file.
hi
you can write python. It's running it that becomes a issue
๐
I'm just gonna read the problem and write pseudocode in my head ig
@torn thorn :white_check_mark: Your 3.11 eval job has completed with return code 0.
the answer is:
eta 2m 5s
hello hello hello
1 minute
GLHF everyone
Glhf
glhf
GLHF!
glhf
Day 11 starts <t:1670734800:R>.
5s
<@&518565788744024082> Good morning! Day 11 is ready to be attempted. View it online now at https://adventofcode.com/2022/day/11. Good luck!
Me when I placed a bracket in the wrong place and spent ages debugging why sorted wasn't working
how do you understand this
With difficulty
๐
fuck ||worry levels divided by 3|| it made me lose like 10 minutes
Yeah they're self-causing imo
lmao
zoom read solution ๐
lowkey though part 2 i just guessed and it worked ๐ ๐ ๐
booo ranks
I'm still stick on Day 7 - have been trying to get this to work and I am about ready to throw in the tower. I got part one, but part two keeps eluding me - and I don't understand why. Is anyone willing to look at my code - and see what might be going on?
ffs
lmao rip
lol
usually just unlucky but yeah rip
i am completely lost as to how to get through part 2
my part 2 is super quick somehow even tho it's unoptimized it's just the wrong solution somehow?
๐ข _ _
are you dividing by 3 lol
Man I got fucked by closures today
LATE BINDING !!!
yeah
yeah that's the problem
the division is removed in part 2
yeah that's what makes it harder
since you now have to ||find a way to prevent the numbers from getting super large|| @left yew @humble copper hint for you guys too
fans going brr
closures?
||you're testing for divisibility by a fixed set of numbers, can you think of a way to cut down on the size of the numbers while still being able to test for divisibility correctly?||
||thought experiment: if you're testing for divisibility by 3, 5, 7, do the divisibility patterns start repeating eventually?||
||how can you use this to your advantage to determine whether a big number is divisible by 3, 5, and 7?||
||if you're having trouble with this, what about just 3 and 5? that's small enough that you can just try starting from 1 and look for patterns||
||once you've figured out this puzzle try applying that to your problem||
||fizzbuzz!||
functions that capture variables from the environment
nah
like i got fucked because ```py
value = 1
def test():
return value
value = 2
test()
here test is a closure and test() will return 2
it's less obvious when you have lambdas
also i caught my issue but i only fixed it for the operation and not the test by accident
hmm interesting
i think a few others ran into an issue like that
thanks for sharing
yeah it's because i was making lambdas in a loop
the worst part was that i printed out some debug statements and accidentally thought it was a whole different issue
but turns out i was just looking in the wrong place in the debug output
aoc 2020 day 13 spoilers
welp, at least this one didn't force me to look up ||chinese remainder theorem||
what you're saying is making sense but i have no idea how to apply it
have you learned about ||modular arithmetic|| yet?
||if you're testing for divisibility by 3 and 5, how often does the pattern repeat?||
i'm actually asking for a response btw
then i will ask โจ follow up questions โจ
||kinda confused still, would you be able to give another hint||?
||the two factors mulitplied||
ohhw ait
i think i see it
||do you js multiply all of htem?||
||yeah, in the aoc problem you're basically doing the same thing, since the set of #s you're testing for divisibility by is fixed||
||if they repeat every X times, then is there any point in keeping numbers above X?||
you got this
||yeah you should be able to take the lowest common multiple (lcm) but all of the tests are primes so the lcm is just the product||
do you just ||ignore every number above X||
||you don't want to just ignore them since you still need to test them for divisibility||
||so just pass them?||
||if you know that 5 is divisible by the same things as X + 5 and 2X + 5 and 3X + 5, etc, what can you do to numbers above X to keep them small||
nice
yoooo
tysm @flat sequoia!
nice
np
did any of u parse the input or did u just write it out manually lmao
parsed it
parsed
mine looks like this
do you know about ||modulus|| or ||remainders||
SCP Foundation meetings be like ๐
no
@modern terrace read this msg
||just minus them by X?||
yeah close
||what if it's 2 * X + 5, or 3 * X + 5||
||or just get the prime?||
||you want to get what's left over after you keep removing X right||
This is the right way of thinking, but as Sevoi said ||what if it's 2X + 5, or 3X + 5, etc.||
||15? sorry my brain is a little fried rn||
yes
now what if ||you're testing for divisibility by 3, 5, and 7||
||then how often does it repeat||
||modulo X||?
||every 105||
kk
right
now think about the aoc problem
||you already know in advance what numbers you're testing for divisibility by||
||the problem is that the numbers you're testing keep getting super big||
any reason why you do string slicing instead of .split?
||since you know that the divisibility pattern repeats eventually can you do anything to cut them down||
easier
what am i going to split on
commonly if i see things like : or - it's safe enough to split on those
wait i think this makes sense now
omg
easier to deal with than to find the amount of characters for me
ty
||and those #s never change throughout the problem *this is also key||
ah
well i just click my cursor and look at the bottom in vscode
nice! you got this
you can just see how hard day 11 is compared to day 9
it took so long to realize ||the division will eventually repeat itself||
@flat sequoia thank you
congrats
yooo gg
despite part 1 taking just 42 minutes on day 9, i got rank 6178
then part 1 took 54 minutes on day 11 and i still got rank 5172
lol



