I hope this fine morning finds you well, saars.
The word of the day is collections.Counter
The rdrama leaderboard invite code is 632268-30587026
I created the ping group: !AOC, I'm sure it will be useful offseason too.
Charts! https://github.com/jeroenheijmans/advent-of-code-charts
Jump in the discussion.
No email address required.
Jump in the discussion.
No email address required.
More options
Context
@ogsambone heard you like lambdas
Jump in the discussion.
No email address required.
Lmao, I was wondering when someone would do some crazy one-liners with
zip
andmap
.Jump in the discussion.
No email address required.
More options
Context
More options
Context
It took me way longer than it should've to do this one. I feel so incompetent..
Jump in the discussion.
No email address required.
More options
Context
i am anticipating that this years word problems arent going to be as brain frickingly awful as last years
Jump in the discussion.
No email address required.
It's called
abs()
Jump in the discussion.
No email address required.
thanks im drunk
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
Jump in the discussion.
No email address required.
i WILL NOT use LAMBDAS, YOU CAN"T MAKE ME
Jump in the discussion.
No email address required.
they didn't use lambdas?
Jump in the discussion.
No email address required.
Ope, im confusing things
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
More options
Context
I'll have to try the file reading lambdas some people were using,
ah, and I had forgotten about abs()
I always wonder how much faster some of the cleaner code is, it's all doing the same stuff under the hood usually.
p2
Jump in the discussion.
No email address required.
Depends. Some features like comprehension have some optimization under the hood, but you will mainly see better memory usage than any noticeable performance gains.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
MODS MODS MODS
Jump in the discussion.
No email address required.
More options
Context
first
Jump in the discussion.
No email address required.
More options
Context
I'll try this, I created one with my twitter and not my github, opsec is gay
Jump in the discussion.
No email address required.
More options
Context
Not joining because I'm already participating in a leaderboard from work, but will keep an eye on things. Will try to do this year's questions in Zig, or at least until my patience runs out from having to handle every low-level tidbit possible.
Jump in the discussion.
No email address required.
you can join more than one private leaderboard
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Every time I have to use loops I feel like shit, because that is where you get performance bottlenecks. But then I realized I don't have to submit any actual code and just did what came most natural. I am not comfortable with Python and have to relearn shit every time I use it.
The scoring on this seems a little sleep-phobic, not gonna lie. This solution is a little ungabunga, I think I could have avoided one loop if I knew how to python better.
Jump in the discussion.
No email address required.
If you really care,
could be
or
but in principle they're all for loops. Whatever obscure performance benefits one syntax might offer isn't worth worrying about. Readability is king in python.
Jump in the discussion.
No email address required.
More options
Context
Read other people's code and learn from it. Python is a remarkably nice language, pretty much every time you feel like shit for writing verbose code, that's a red flag telling you that there's a way to write it five times shorter and more to the point.
Jump in the discussion.
No email address required.
More options
Context
dict
hasget
andsetdefault
methods that deal with nonexistent keys in a streamlined fashion. Socolumn2Dict[i] = column2Dict.get(i, 0) + 1
would work. Even better, usecollections.Counter
which does all that for you, see my code in a comment here.Jump in the discussion.
No email address required.
More options
Context
Then dont do it
Jump in the discussion.
No email address required.
I'm like this but for every language I use. I assumed this was just part of the Process?
Jump in the discussion.
No email address required.
Oh ok I thought you had some hangup on python specifically
Jump in the discussion.
No email address required.
I'm not the person in the picture.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
More options
Context
More options
Context
Wheres the APLChad from last year?
Jump in the discussion.
No email address required.
The actual APLchads are laughing at me for using
¨
instead of understanding matrix ranksJump in the discussion.
No email address required.
More options
Context
More options
Context
Jump in the discussion.
No email address required.
More options
Context
Solution:
Jump in the discussion.
No email address required.
how long did u take Spider
Jump in the discussion.
No email address required.
@Platy why do we have two of you o_O
Jump in the discussion.
No email address required.
moved from reddit to a shell github account
Jump in the discussion.
No email address required.
More options
Context
ur so smart hearts
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
More options
Context
wtf it started one hour earlier than I thought. Now I'm going to be super tired with nothing to gain
Jump in the discussion.
No email address required.
Me reading 16 morbillion parapgraphs on how to sum a number milliseconds after waking up
Jump in the discussion.
No email address required.
More options
Context
Yeah they're def cheating starting an hour early. This whole thing is officially fraudulent
Christmas is ruined.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
@X (formerly known as twitter) join the ping group. Also idk, is it better to post these into the main feed or /h/slackernews?
Jump in the discussion.
No email address required.
slackernews probably. Anyone who has blocked it wouldn't join anyways.
Jump in the discussion.
No email address required.
I love how in a span of 2 days the new site has already buck broken a bunch of jannies.
Jump in the discussion.
No email address required.
I don't get it
Jump in the discussion.
No email address required.
Jannies have always played hard ball with this website.
Jump in the discussion.
No email address required.
What do you mean?
Jump in the discussion.
No email address required.
They always go and make these new rules that they expect everyone to follow without even asking or trying to get consensus.
Now they've made a new site.
Jump in the discussion.
No email address required.
But you are a janny?
Jump in the discussion.
No email address required.
I'm a good janny, I listen to the people!
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
More options
Context
More options
Context
More options
Context
More options
Context
More options
Context
I joined the leaderboard just to spy on your GitHub accounts i think it doesn't matter, where were last year's post posted?
Jump in the discussion.
No email address required.
I kinda deleted last year's leaderboard to make place for a new one
If people use the same accounts then you can still see the results from 2023 though
Jump in the discussion.
No email address required.
Last year's was this I think: https://adventofcode.com/2024/leaderboard/private/view/2416137
Jump in the discussion.
No email address required.
yeah thats the one I created, I notice that theres only 3 new people so far on this years...
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
https://rdrama.net/search/posts?q="advent+of+code"
In the hole, so I'll continue from now on.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
@LetsUnpackThis heyooo space cowboy!
Jump in the discussion.
No email address required.
More options
Context
not gonna lie when I saw that ping group created I thought it was about the politician
Jump in the discussion.
No email address required.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Just subtract everything from the left column and add everything in the right column? Is there even a need too pair them?
It took @AnnoyinTheGoyim longer too read the bullshit story than figure out the solution.
@AnnoyinTheGoyim love sucking peepee.
Jump in the discussion.
No email address required.
You gotta sort them. Also use absolute values of differences.
Jump in the discussion.
No email address required.
Didn't read most of it. Kind of stupid too say the distance can't be negative. Is the hard part just reading all the bullshit? If they cut out the stupid story, I'd actually read the entire problem.
@AnnoyinTheGoyim love sucking peepee.
Jump in the discussion.
No email address required.
Yes, understanding the problem is the hard part usually.
Jump in the discussion.
No email address required.
They should just explain the problem and not surround it in 10 paragraphs of story then. @AnnoyinTheGoyim is trying too drink, not read a novel.
@AnnoyinTheGoyim love sucking peepee.
Jump in the discussion.
No email address required.
irl work simulator
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
More options
Context
More options
Context
More options
Context
I was first inline at a shop counter and two indigenous people behind me. The shop assistant looked at us and asked "ok who is first". I said, "they are of course, they have been here for more than 60,000 years". The two idigenous people smiled and thanked me as I stood aside.
Snapshots:
collections.Counter:
ghostarchive.org
archive.org
archive.ph (click to archive)
Jump in the discussion.
No email address required.
More options
Context