This is the advent of code day 4 thread for bragging about your solution and bullying people who haven't gotten it yet
Advent of code day 4
- 58
- 35
Now playing: Donkey Kong Country Theme (DJ AG Remix) (DKC).mp3
Top Poster of the Day:
911roofer
![](https://i.rdrama.net/images/163936841726r.webp)
![AI Core - Thought this said AL Core for a minute like Al gore but no it's ai like the robot thing and apparently it's from a vidya so here we go description done 🤌](https://i.rdrama.net/i/hats/AI Core.webp?h=10)
Current Registered Users: 30,841
![sidebar image](https://i.rdrama.net/images/17001765197247353.webp)
tech/science swag.
Guidelines:
What to Submit
On-Topic: Anything that good slackers would find interesting. That includes more than /g/ memes and slacking off. If you had to reduce it to a sentence, the answer might be: anything that gratifies one's intellectual laziness.
Off-Topic: Most stories about politics, or crime, or sports, unless they're evidence of some interesting new phenomenon. Videos of pratfalls or disasters, or cute animal pictures. If they'd cover it on TV news, it's probably lame.
Help keep this hole healthy by keeping drama and NOT drama balanced. If you see too much drama, post something that isn't dramatic. If there isn't enough drama and this hole has become too boring, POST DRAMA!
In Submissions
Please do things to make titles stand out, like using uppercase or exclamation points, or saying how great an article is. It should be explicit in submitting something that you think it's important.
Please don't submit the original source. If the article is behind a paywall, just post the text. If a video is behind a paywall, post a magnet link. Fuck journos.
Please don't ruin the hole with chudposts. It isn't funny and doesn't belong here. THEY WILL BE MOVED TO /H/CHUDRAMA
If the title includes the name of the site, please leave that in, because our users are too stupid to know the difference between a url and a search query.
If you submit a video or pdf, please don't warn us by appending [video] or [pdf] to the title. That would be r-slurred. We're not using text-based browsers. We know what videos and pdfs are.
Make sure the title contains a gratuitous number or number + adjective. Good clickbait titles are like "Top 10 Ways to do X" or "Don't do these 4 things if you want X"
Otherwise editorialize. Please don't use the original title, unless it is gay or r-slurred, or you're shits all fucked up.
If you're going to post old news (at least 1 year old), please flair it so we can mock you for living under a rock, or don't and we'll mock you anyway.
Please don't post on SN to ask or tell us something. Send it to [email protected] instead.
If your post doesn't get enough traction, try to delete and repost it.
Please don't use SN primarily for promotion. It's ok to post your own stuff occasionally, but the primary use of the site should be for curiosity. If you want to astroturf or advertise, post on news.ycombinator.com instead.
Please solicit upvotes, comments, and submissions. Users are stupid and need to reminded to vote and interact. Thanks for the gold, kind stranger, upvotes to the left.
In Comments
Be snarky. Don't be kind. Have fun banter; don't be a dork. Please don't use big words like "fulminate". Please sneed at the rest of the community.
Comments should get more enlightened and centrist, not less, as a topic gets more divisive.
If disagreeing, please reply to the argument and call them names. "1 + 1 is 2, not 3" can be improved to "1 + 1 is 3, not 2, mathfaggot"
Please respond to the weakest plausible strawman of what someone says, not a stronger one that's harder to make fun of. Assume that they are bad faith actors.
Eschew jailbait. Paedophiles will be thrown in a wood chipper, as pertained by sitewide rules.
Please post shallow dismissals, especially of other people's work. All press is good press.
Please use Slacker News for political or ideological battle. It tramples weak ideologies.
Please comment on whether someone read an article. If you don't read the article, you are a cute twink.
Please pick the most provocative thing in an article or post to complain about in the thread. Don't nitpick stupid crap.
Please don't be an unfunny chud. Nobody cares about your opinion of X Unrelated Topic in Y Unrelated Thread. If you're the type of loser that belongs on /h/chudrama, we may exile you.
Sockpuppet accounts are encouraged, but please don't farm dramakarma.
Please use uppercase for emphasis.
Please post deranged conspiracy theories about astroturfing, shilling, bots, brigading, foreign agents and the like. It degrades discussion and is usually mistaken. If you're worried about abuse, email [email protected] and dang will add you to their spam list.
Please don't complain that a submission is inappropriate. If a story is spam or off-topic, report it and our moderators will probably do nothing about it. Feed egregious comments by replying instead of flagging them like a pussy. Remember: If you flag, you're a cute twink.
Please don't complain about tangential annoyances—things like article or website formats, name collisions, or back-button breakage. That's too boring, even for HN users.
Please seethe about how your posts don't get enough upvotes.
Please don't post comments saying that rdrama is turning into ruqqus. It's a nazi dogwhistle, as old as the hills.
Miscellaneous:
The quality of posts is extremely important to this community. Contributors are encouraged to provide high-quality or funny effortposts and informative or entertaining comments. Please refrain from posting the following:
Boring wingcucked nonsense nobody cares about that belongs in chudrama
Normie shit everyone already knows about
Anything that doesn't gratifify one's intellectual laziness
Bimothy-tier posts
Anything that the jannies don't like
Jannies reserve the right to exile baby ducks from this hole at any time.
We reserve the right to exile you for whatever reason we want, even for no reason at all! We also reserve the right to change the guidelines at any time, so be sure to read them at least once a month. We also reserve the right to ignore enforcement of the guidelines at the discretion of the janitorial staff. This hole is a janny playground, participation implies enthusiastic consent to being janny abused by unstable alcoholic bullies and loser nerds who have nothing better to do than banning you for any reason or no reason whatsoever.
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
/h/slackernews SETTINGS /h/slackernews MODS /h/slackernews LOG /h/slackernews EXILEES /h/slackernews FOLLOWERS /h/slackernews BLOCKERS
Jump in the discussion.
No email address required.
I ranked (((109))) on the global leaderboard for the first star. So close![:marseygiveup: :marseygiveup:](/e/marseygiveup.webp)
Jump in the discussion.
No email address required.
Most of the top 100 are probably AI at this point.
Jump in the discussion.
No email address required.
this was the number one for the first few days, https://github.com/nim-ka
the top players according to the guy who runs it are people with pre-optimied libraries that don't even read the prompt and guess what they have to build, lots of them are involved with maintaining the site.
Jump in the discussion.
No email address required.
The west has fallen
Jump in the discussion.
No email address required.
More options
Context
no brakes on the train!
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Even "people" can't pass the turing test, these days
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Man that string parsing functionality makes shit so easy.
Jump in the discussion.
No email address required.
More options
Context
lol, i have a life - i don't have time to sit around waiting for the clock to tick past to pound it out right that second.
Jump in the discussion.
No email address required.
More options
Context
Jump in the discussion.
No email address required.
More options
Context
More options
Context
my solution was so bad that im gonna rewrite it before posting so i dont look like even more of a mouthbreather than ppl already know i am
Jump in the discussion.
No email address required.
Jump in the discussion.
No email address required.
More options
Context
I do this![:marseyderp: :marseyderp:](/e/marseyderp.webp)
Jump in the discussion.
No email address required.
More options
Context
I'm just not gonna post mine at all!
Jump in the discussion.
No email address required.
More options
Context
More options
Context
here was mine. i was off on a goose
chase for about 40 minutes finding a off by one error
(yes i was missing
a + 1 in range())
Jump in the discussion.
No email address required.
C++ doesn't have this problem![:marseynails: :marseynails:](/e/marseynails.webp)
Jump in the discussion.
No email address required.
More options
Context
More options
Context
This day was a bit boring but here's my sir, do the needful solution
Jump in the discussion.
No email address required.
More options
Context
Jump in the discussion.
No email address required.
Hi mimwee
Jump in the discussion.
No email address required.
Hey bud!
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
i would have finished both parts in a couple minutes but ranges excluding the end fucked me up for so goddamn long, i just couldn't figure out what was wrong![:marseyraging: :marseyraging:](/e/marseyraging.webp)
Jump in the discussion.
No email address required.
this got me for... way too long
as well ![:marseyclapping: :marseyclapping:](/e/marseyclapping.webp)
Jump in the discussion.
No email address required.
More options
Context
i lost 10 minutes because python didn't parse out the![:marseyrope: :marseyrope:](/e/marseyrope.webp)
\n
Jump in the discussion.
No email address required.
hint: use
splitlines()
instead ofsplit('\n')
Jump in the discussion.
No email address required.
More options
Context
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
Not difficult yet. Misread the problem per usual and sunk 20 minutes into a problem that didnt exist though.
Part 1
Part 2:
Jump in the discussion.
No email address required.
More options
Context
Jump in the discussion.
No email address required.
Ranges
Regex
Jump in the discussion.
No email address required.
Very nice, let's see your implementation
Jump in the discussion.
No email address required.
felt to unmotivated to join this contest thing![:marseygiveup: :marseygiveup:](/e/marseygiveup.webp)
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
More options
Context
woke up early at 1PM today for this.
https://fsdfsd.net/cyberdick/AdventOfCode2022/src/branch/master/AOC2022/Puzzles/Day4.cs
Jump in the discussion.
No email address required.
More options
Context
had to think hard and draw a diagram to figure out
overlaps()
, ngmiJump in the discussion.
No email address required.
More options
Context
Anyone else doing Rust?
Jump in the discussion.
No email address required.
Why even use rust at this point? folds without named functions make code almost unreadable (readable, but you have to spend more time to understand it)
Anyway, here's mine:
Jump in the discussion.
No email address required.
I like the language
for loops are evil
Jump in the discussion.
No email address required.
More options
Context
More options
Context
I'm not a masochist, it felt like I was staring at black boxes hidden in more boxes looking at stdlib. might just be r-slurred though
Jump in the discussion.
No email address required.
Filtered
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
with range and set its easy. Don't care about performance
Jump in the discussion.
No email address required.
sets in python are so unoptimized it's hilarious how slow they are in basically anything
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Jump in the discussion.
No email address required.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
c++
Jump in the discussion.
No email address required.
Mommy is soooo proud of you, sweaty. Let's put this sperg out up on the fridge with all your other failures.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Jump in the discussion.
No email address required.
More options
Context
Part 1:
Jump in the discussion.
No email address required.
More options
Context
Solution with no comparisons, only bitflips and abuse of casting![:marseytroll: :marseytroll:](/e/marseytroll.webp)
Jump in the discussion.
No email address required.
Please keep yourself safe
Jump in the discussion.
No email address required.
Why?
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
yes I stole the intersection function, no I don't care
Jump in the discussion.
No email address required.
I don't know what you said, because I've seen another human naked.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Ban all pythoncels from Advent of Code, we can't trust them
Jump in the discussion.
No email address required.
it never even began for bots
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Do they get harder at some point? Since the timing format is very euromisic I'm just aiming to complete every challenge before the next one drops.
Jump in the discussion.
No email address required.
More options
Context
had important business to attend to today sorry I'm late boss here's the homework. Bodged together at 11:30pm as usual
Jump in the discussion.
No email address required.
More options
Context
I'm never sure if calling the same function with the same args twice in the same line makes it compute twice of if it's optimized away, so added another functional composition layer on top. This way is faster for part 2 than just intersecting ranges. in matlab (
)
Jump in the discussion.
No email address required.
Jump in the discussion.
No email address required.
CLEAN IT UP CODEJANNY
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Wait I can just do
comp2 = @(x) ~((x(2)<x(3))||(x(1)>x(4)));
and chuck out the aux lmaoJump in the discussion.
No email address required.
More options
Context
More options
Context
Jump in the discussion.
No email address required.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Frick me I keep forgetting to do these each day![:marseybangfast: :marseybangfast:](/e/marseybangfast.webp)
Current HP: 8/75
Current Mana: 130/250
Inventory:
* 50 Gald
Jump in the discussion.
No email address required.
More options
Context
People always talk about how poorly written and unrealistic female characters are but even in real life women are poorly written
Jump in the discussion.
No email address required.
More options
Context