Unable to load image

[Join the rDrama leaderboard] Don't forget Advent Of Code! :marseychristmaself2: Santa needs YOU to save christmas:marseypresents:

https://adventofcode.com/

Advent of Code is an annual coding competition/event with daily challenges. Even complete beginners can keep up for the first few days as the difficulty slowly ramps up.:marseymarseylove:

Join the rDrama leaderboard and see how you compare to your fellow dramanauts with the following code:

632268-20c7d1d5

Enter it here https://adventofcode.com/2022/leaderboard/private

99
Jump in the discussion.

No email address required.

I was one click away from joining the leaderboard with my real name and a link to my Github.

Jump in the discussion.

No email address required.

Gotta keep that shit in a different browser.

Jump in the discussion.

No email address required.

:thistbh: :marseyagreestill:

Jump in the discussion.

No email address required.

I almost did that and then I remembered we have our own git hosting now

Jump in the discussion.

No email address required.

Pretty much the reason I'm not joining. I'm already participating in a separate leaderboard; creating another account + resubmit solutions is way too much of a hassle. :marseytypinglaugh:

Jump in the discussion.

No email address required.

we have the most secure codecels dont we folks?


Follower of Christ :marseyandjesus: Tech lover, IT Admin, heckin pupper lover and occasionally troll. I hold back feelings or opinions, right or wrong because I dislike conflict.

Jump in the discussion.

No email address required.

Reported by:

If I was a straggy computer nerd I would somehow dox everyone who participates in this and then track each person to their house and give them a lethal swirly before committing suicide

Thankfully for me and you I am not a straggy computer nerd so I can't find you but I want you all to know that one day me and everyone else who has a real job are going to hang you guys from the streetlamps

Jump in the discussion.

No email address required.

>he couldn't work out which elf had the most calories :marseysmug2:

Jump in the discussion.

No email address required.

>filtered on day ONE

Shameful :marseysneed:

Jump in the discussion.

No email address required.

:#marseysad2:

Not my fault I don't know how to code.

Jump in the discussion.

No email address required.

I barely know how to code and it took me like 10 minutes, mainly because I did the first part in a slightly r-slurred way and rewrote it in the second part to make it easier. I could have done the second part using my original code but it would've been very ugly

Jump in the discussion.

No email address required.

Okay but no, I hate sorting and text interpretation.

Jump in the discussion.

No email address required.

Advent of Code day 1: "which of these numbers is bigger?"

@Marsey: "frick this nerd shit"

Jump in the discussion.

No email address required.

@Marsey in math class

![](/images/16699509349567223.webp)

Jump in the discussion.

No email address required.

I’ll just steal the capy’s code if he enters

Jump in the discussion.

No email address required.

>puzzles unlock at midnight EST/UTC-5

It never began for eurocels

:#marseyitsover:

Jump in the discussion.

No email address required.

that's no excuse :platysalute:

Jump in the discussion.

No email address required.

Literally middle of the day at work but fine not like I had any real work to do anyways :marseycope:

Jump in the discussion.

No email address required.

Same I'm having to do them after work which is 6-7hrs before the next one

Jump in the discussion.

No email address required.

gonna see how far I can get just using excel formulas :marseyscratch:

Jump in the discussion.

No email address required.

:marseysweating: the first one made me want to use VBA :marseybrainlet:

I eventually figured out you could just sum all the numbers up to that point but subtract the partial sums that came before, something like this:

=IF(A19="",SUM(A$1:A19)-SUM(B$1:B18),"")

had to put a manual Sum(A1:A9) for the first elf on row 9 but the code drags down fine after and then a simple Max() of the range gets the answer

The second part would be super easy just by sorting the sums column but I did it instead with the Large() function (completely forgot that one existed)

Jump in the discussion.

No email address required.

lmfao ur a nerd doxxer 🤓🤓 great thighs for a codecel tho 😮‍💨

Jump in the discussion.

No email address required.

made me want to use VBA

VBA makes me want to :marseyobamarope:

Jump in the discussion.

No email address required.

Why can't I downvote

Jump in the discussion.

No email address required.

doesn't hate VBA

named Sisyphus

:marseyhmm:

Jump in the discussion.

No email address required.

And yet I am happy

Jump in the discussion.

No email address required.

I don't know how to code, i'll just hang around and hope i can bag a femboy with a coding degree or something :marseymerchant:

Jump in the discussion.

No email address required.

But I only know python

Jump in the discussion.

No email address required.

Python's actually not a bad choice, honestly. Pretty fast to write. I did AoC in C for the lulz a couple years back and got on the global leaderboard a few days, but most normal people do more concise languages like Python or esoteric codegolfing langs.

Jump in the discussion.

No email address required.

esoteric :marseyaleistercrowley: codegolfing langs.

what is it with those? like half :marseyheadcrab: the time :marseywait: these are like... either brainfrick tier languages or "implement this very specific thing in 1 character"

Jump in the discussion.

No email address required.

The latter of those are basically optimized specifically for AoC, haha.

Jump in the discussion.

No email address required.

trueee tbh

Jump in the discussion.

No email address required.

:marseysnappyautism:

Jump in the discussion.

No email address required.

I solved the first two puzzles and I still don't know how the stars work.. Is that a puzzle too?

Jump in the discussion.

No email address required.

if you complete the first task on a day you get a silver star for it

if you complete both tasks on a day you get a gold star instead

Jump in the discussion.

No email address required.

I got 2 gold stars but leader board says 76?

Jump in the discussion.

No email address required.

if you are the first person to get a certain star, you get points equal to the total players in the leaderboard. if you are the second person to get it, you get 1 less point, etc

Jump in the discussion.

No email address required.

ahh got it now, so thats the leader board score. confused me for a while

Jump in the discussion.

No email address required.

I prefer SQL tbh

Jump in the discussion.

No email address required.

That's what most (including me) use:marseyblush:

Jump in the discussion.

No email address required.

Oh I thought it was Java script only for some reason :marseybrainlet:

Jump in the discussion.

No email address required.

python is a fantastic choice because youre never judged on the speed of execution. tangentially (and still in benefit of python), standardizing how you choose to do data ingest/sanitization/output formatting is braindead easy in python - being able to plop the problem data into a "data.txt" and just "data = open('data.txt', 'r').readlines()" is a lot better than most other languages. python has fantastic useability for string manipulation and typecasting, and its incredibly fast to write and iterate on (you write pseudocode and it Just Werks™). i prefer some of javascripts array methods, but then the file handling and io boilerplate is lacking (also node_modules lmao). just give it a try.

Jump in the discussion.

No email address required.

also in js you have shit :marseypajeet: like Array.sort() which defaults sorts like... this apparently

![](/images/16699286034447267.webp)

Jump in the discussion.

No email address required.

Lol shit marsifies into indiacel :marseyraging:

Jump in the discussion.

No email address required.

javascript also can't add numbers with decimal points without an add-on library (or a bunch of unnecessary inline arithmetic like multiplying and then dividing all your numbers by 1000 or some stupid bullshit). Like every other r-slurred thing about the language, they can't ever fix it because all javascript functionality has to be backwards compatible to 1995 forever.

Jump in the discussion.

No email address required.

This is r-slurred. Js uses double as its base numeric type, like 99.99% of other languages. Integer arithmetic is supported up to ~2^53, because doubles. The strategy used in many other languages to support precise decimal arithmetic is to have a separate decimal type, which js could also do without any backwards compat issues.

multiplying and dividing by 1000

not even necessary tbh. If your numbers map to physical quantities, simply change the unit of the physical quantity from U to mU or uU or nU. Walla, you have extreme precision. Since your prior choice of units was already arbitrary, this one isn't any worse.

Jump in the discussion.

No email address required.

I just use an add-on library (decimal.js) if I'm doing calculations on the frontend. I've read the articles on why decimal math doesn't work in js and I can't be bothered to write a bunch of dumb shit in my code like the geniuses on stack overflow who will do this kind of crap every time they want to write a math statement:

(Math.floor((0.1+0.2 )*1000))/1000

Sure though, adjusting your units to only be whole numbers is also fine.

Despite there being a solid reason, as you stated, for math not working out of the box in js, having not provided any solution built into the language for the last 25+ years is kind of fricking stupid, if you ask me.

Edit: even this stack overflow crap I've pasted in here doesn't actually work, btw. It "works" if you know the precision of your inputs is no more than 3 decimal places, and if you're certain the "extra" result of the innermost calculation is truly insignificant (since floor is just erasing information). What if you actually need to round some numbers in here? There are so many edge case failures with this kind of shitty kludge.

Jump in the discussion.

No email address required.

True, but in javascript, you don't need to load the file at all, you can just reference the input as document.body.innerText. You can code your solution in the browser developer tools without even leaving the site. It's the true lazy man's approach.

Jump in the discussion.

No email address required.

>not having a script to automatically download and parse the challenges and use AI to complete them

ngmi

Jump in the discussion.

No email address required.

:#marseycock:

Jump in the discussion.

No email address required.

there's no better time than now to pick up rust in solidarity with trans folks :#parrottrans:

Jump in the discussion.

No email address required.

I fricking hate that meme, not because I like :marseytrain2:, but because it's impossible to discuss the language on /g/

Jump in the discussion.

No email address required.

day of the antioxidation when

Jump in the discussion.

No email address required.

True chads go with Zig :marseygamer:

Jump in the discussion.

No email address required.

![](/images/16698414584192953.webp)

![](/images/16698414586744025.webp)

Jump in the discussion.

No email address required.

top ten not too shabby I'm #1318907

EDIT: a closer look shows 11 players......

Jump in the discussion.

No email address required.

Yeah I'm not getting the scoring on this thing. You were 10th and I was 11th just an hour ago. Now someone jumped us both and pushed us down the list. I don't think that's supposed to be possible.

Edit: Never mind, I was just being dumb. If someone finished the problem earlier, but didn't join our leaderboard until later, they'd get inserted in the list wherever their actual finish time was, so it makes sense that the list is going to shift around some until everyone joins.

Jump in the discussion.

No email address required.

No option for email?:marseyannoyed: No option to authenticate via rDrama either?😭

![](/images/16698556564930289.webp)

Should I pick globohomo 1, globohomo 2, globohomo 3 or globohomo 4?

Jump in the discussion.

No email address required.

Just pick one citizen

:marseynotesglow:

Jump in the discussion.

No email address required.

Just use a reddit burner and register as anonymous user

Jump in the discussion.

No email address required.

so glad :marseysatisfiedmarcus: we have /u/DarrellBGrouns on the leaderboard

Jump in the discussion.

No email address required.

:#marseyrespect: itsa me

Jump in the discussion.

No email address required.

yeah I'll probably end up doing that

Jump in the discussion.

No email address required.

I took Java 101, let's see how far I can get.

Jump in the discussion.

No email address required.

Do you have to do these super fast or is it based on how good your code is

Jump in the discussion.

No email address required.

You get scored based on how fast you do them. Though most of the fun is just solving the challenge daily and keeping up for 25 days (and of course shitposting about it)

Jump in the discussion.

No email address required.

It's how fast, just not actually how fast you write it, but whether you submit your answer before other people. I did it when I woke up this morning and I'm way behind because they release these things at midnight and there's no way I'm staying up that late.

Jump in the discussion.

No email address required.

just spent quite a long time hardstuck on day 1 exercise 1 because i misunderstood

>Find the Elf carrying the most Calories. How many total Calories is that Elf carrying?

as

>Find the Elf carrying the the food with the most Calories. How many total Calories is that Elf carrying?

how am i ever going to make it bros :marseydepressed:

Jump in the discussion.

No email address required.

That's practically the same code anyways

Jump in the discussion.

No email address required.

yeah it took like 15 seconds of changing it to get the solution once i realised what i was actually supposed to do but it was still a dark moment feeling like i was getting filtered by day 1

Jump in the discussion.

No email address required.

If I have time I may do some

Jump in the discussion.

No email address required.

Will first year uni level of c++ suffice

Jump in the discussion.

No email address required.

You could spend 10 minutes looking at a programming tutorial and breeze through the first week

Jump in the discussion.

No email address required.

What determines the number of points you get? Is it just how many people solved it before you did?

Edit: figured it out. I was confused as to why the top guy only has 48 points, but I guess it's because there are only 24 registered users. So for anyone wondering, the scores will change as people register, but the placements won't.

Jump in the discussion.

No email address required.

Christ OpenOffice fricking sucks. I want to play and this would be fricking easy even in Excel but OO is throwing me bullshit errors and I can't buy Excel because of a one-way feud with Microsoft. (the solution is way easier than what @BasicallyADoxxer is doing)

What's the basic b-word freeware that lets me enter some goddarn if statements?

Jump in the discussion.

No email address required.

I think google sheets has similar formulas and works well

Jump in the discussion.

No email address required.

>with a gmail.com address

I HATE THE ANTICHRIST

Thanks anyway. I saw your solution and I think mine might be a little more elegant (I'm very drunk so there could easily be an infinite loop I'm missing):

![](/images/16699623814697645.webp)

Jump in the discussion.

No email address required.

You can make a throwaway gmail

Also looking at your sheet, that will just keep summing up the total calories of all the elves, not the total calories of each elf

With a slight edit tho

for B cells: =if(A9>0,B8+A9,"") for C cells: =if(B9="",B8,"")

it should work, and I agree it is much simpler than my solution just requires an extra column

Jump in the discussion.

No email address required.

Hi pls ping me every day to remind me because I'll forget and people will pass me :(

Jump in the discussion.

No email address required.

What if I don't want to link anything I use to an rDrama leaderboard?

Jump in the discussion.

No email address required.

There's literally a reddit account option. Just make a burner

Jump in the discussion.

No email address required.

There's an option to be anonymous so no need actually.

Jump in the discussion.

No email address required.

Not risking it lmao

Jump in the discussion.

No email address required.

DM me your real name and work address and I'll submit answers for you.

Jump in the discussion.

No email address required.

Jump in the discussion.

No email address required.

I know a bit of arduino and minimal php

Made a knockoff version of Chips Challenge in Macromedia Flash for class once, too. Is ActionScript still a thing?

Jump in the discussion.

No email address required.

This thing doesn't make you write your code in the browser (like codewars and all those kind of sites). You could do the first day's challenge with a calculator if you really felt like it, and you'd still get points for it.

Jump in the discussion.

No email address required.

How do i join the drama leaderboard with that code? Do i have to wait till tmrw?

Jump in the discussion.

No email address required.

Go to "leaderboard"then "private leaderboard" and you can enter the code

Or just here https://adventofcode.com/2022/leaderboard/private

Jump in the discussion.

No email address required.

Jump in the discussion.

No email address required.

/leaderboard/private redirects to /leaderboard. does this mean im too late to join? :marseyitsover:

Jump in the discussion.

No email address required.

you have to be logged in

Jump in the discussion.

No email address required.

You should be able too join whenever. Click [private leaderboard] on the leaderboard page

trans lives matter

Jump in the discussion.

No email address required.

Link copied to clipboard
Action successful!
Error, please refresh the page and try again.