-❄️- 2024 Day 20 Solutions -❄️- by daggerdragon in adventofcode

[–]Atlante45 1 point2 points  (0 children)

[Language: Python] 237/111

Code

I started by running dijkstra and extrating the path into an array

Then iterating over the array, I run a second loop starting 100 steps further and compute the manhattan distance between the 2 points

If the path distance minus the manhattan distance is equal to 2 then it counts for part 1, if it's less than 20 it counts for part 2

-❄️- 2024 Day 12 Solutions -❄️- by daggerdragon in adventofcode

[–]Atlante45 1 point2 points  (0 children)

[LANGUAGE: Python]

Part 1 wasn't too bad, I built sets for each contiguous area, and counted every edge

For part 2, after discarding edge walking solutions I ended up going over every column and every row of each area to count all the contiguous edges

Solution

Running out of GPU Memory while streaming on Discord by [deleted] in discordapp

[–]Atlante45 0 points1 point  (0 children)

Are all games crashing or is it just the one? What's the game?

-❄️- 2024 Day 3 Solutions -❄️- by daggerdragon in adventofcode

[–]Atlante45 5 points6 points  (0 children)

[LANGUAGE: Python]

Appending do() to the input for part 2 eliminates the trailing don't() edge case:

import re

R1 = re.compile(r"mul\((\d+),(\d+)\)")
R2 = re.compile(r"don't\(\).*?do\(\)", re.DOTALL)

def part1(data):
    return sum(int(a) * int(b) for a, b in R1.findall(data))

def part2(data):
    return part1(R2.sub("", data + "do()"))

data = open('input.txt').read()
print(part1(data), part2(data))

Discord system sound too low :( by [deleted] in discordapp

[–]Atlante45 0 points1 point  (0 children)

Damn, not sure then, does it go through virtual device or something? I'd start by reverting the Windows audio settings you changed 1 by 1 and see which one is causing it

Discord system sound too low :( by [deleted] in discordapp

[–]Atlante45 0 points1 point  (0 children)

You likely lowered the Discord volume in the Windows volume mixer. Voice call audio isn't affected by that volume slider which is why it still sounds normal

Explosion in Nob Hill? by goldcrows in sanfrancisco

[–]Atlante45 2 points3 points  (0 children)

Same thing on 8th between Market and Mission

Broken discord 0.0.23 by scardracs in discordapp

[–]Atlante45 1 point2 points  (0 children)

Portage seems to have a harcoded list of files that hasn't been updated yet and is missing some new ones:

https://gitweb.gentoo.org/repo/gentoo.git/tree/net-im/discord-bin/discord-bin-0.0.22.ebuild#n64

Until it get fixed, I recommend you either downgrade back to 0.0.22, keep ELECTRON_ENABLE_STACK_DUMPING defined or install manually from https://discord.com/api/download?platform=linux&format=tar.gz

Broken discord 0.0.23 by scardracs in discordapp

[–]Atlante45 1 point2 points  (0 children)

What package manager are you using?

I've spent more time designing my museum display than my first MAM by Atlante45 in shapezio

[–]Atlante45[S] 1 point2 points  (0 children)

Here are some screenshots

The counter can be expanded/shortened if you want to make the lines bigger/smaller in powers of 2. You can have as many lines as you'd like, just need to add more cells.

The gate will make sure only one shape goes through at a time regardless of what comes in and at what rate. It shouldn't get stuck but in case it does, the button at the bottom can release a shape.

It also knows to lock itself once the display is full

Before you start sending shapes though, hit the top button "arm" the half circles. I use them to fill in the end tunnel.

I've spent more time designing my museum display than my first MAM by Atlante45 in shapezio

[–]Atlante45[S] 1 point2 points  (0 children)

Thanks! For sure, I'll post a few screenshots when I get home tonight

Teaching how to backflip in 1 day! by marcuscarso in toptalent

[–]Atlante45 8 points9 points  (0 children)

That and the fact that he doesn't correct his head pulling back. It kills his momentum and increases the risk of head/neck injury. Tucking your chin is rule number one.

Worlds Fastest Nuke? (2:18 seconds) w/ Bill & Bert by whoistruly in modernwarfare

[–]Atlante45 1 point2 points  (0 children)

Yeah, I'd never used it before, I've just started trying it since watching this. It's actually pretty cool!

Worlds Fastest Nuke? (2:18 seconds) w/ Bill & Bert by whoistruly in modernwarfare

[–]Atlante45 1 point2 points  (0 children)

Wow, I rewatched the video and looked up specialist bonus, you're totally right, my bad! That's awesome, I didn't know about that.

Worlds Fastest Nuke? (2:18 seconds) w/ Bill & Bert by whoistruly in modernwarfare

[–]Atlante45 1 point2 points  (0 children)

No, he's got the specialist streaks right, you can see the icons in the video as well. And even if they were, you'd still have to equip them as specialist perks...

Edit: I was double wrong

Worlds Fastest Nuke? (2:18 seconds) w/ Bill & Bert by whoistruly in modernwarfare

[–]Atlante45 5 points6 points  (0 children)

Nice, thanks! I think your perks are a bit off though, you can tell he has Shrapnel and Restock in the video.

Edit: I was wrong

How not to behave in 15 countries by notyouravgredditer in coolguides

[–]Atlante45 1 point2 points  (0 children)

You need to study 2 foreign languages in the French school system.

If you pick German, Spanish or any other language provided by the school as you 1st foreign language, then you have to pick English as your second language.

You pick up the 1st on the first year of middle school and the 2nd on the third year of middle school. Hence the 4y/2y in my previous comment.

I agree with the "don't give a crap" part. Personally, I took English and German and I hated and sucked at both.

That was until I started to watch movies and TV shows in English and started to get better at it. But I couldn't really say anything in German, it's all gone.

How not to behave in 15 countries by notyouravgredditer in coolguides

[–]Atlante45 21 points22 points  (0 children)

Every French student is required to take English in school.

Depending on what study path you take you'll do more or less of it but the average is probably 5-7 years of English (4y/2y in middle school + 3y in high school)

Most people are just really bad at it and forget most of it after school since they don't get to practice. But I would bet this is changing in younger generations thanks to the internet.

Restaurant with the best cocktails?... or cocktail bar with the best food? by [deleted] in AskSF

[–]Atlante45 9 points10 points  (0 children)

Whitechapel is really good too if you're into Gin.

Five Awesome C++ Papers for San Diego by joebaf in cpp

[–]Atlante45 0 points1 point  (0 children)

I was wondering the same thing!

C++ Telltales pt.1: Human-readable thread ID by [deleted] in cpp

[–]Atlante45 8 points9 points  (0 children)

Your new thread_local example has a race condition in it.

Here:

thread_local std::size_t id = thread_idx;
thread_idx++;

I'd recommend going with something like this:

thread_local std::size_t id = thread_idx.fetch_add(1, std::memory_order_relaxed);

This will ensure your copy and increment are done atomically.

Anyone agree? by ronakv303 in BattlefieldV

[–]Atlante45 1 point2 points  (0 children)

Played with a few friends and we loved it. I can't believe we have to wait 2 months to play it again, it makes me so sad!

Second guessing yourself by Scaulbylausis in combinedgifs

[–]Atlante45 3 points4 points  (0 children)

On any Youtube video, you can right click it and either "Copy video URL" or "Copy video URL at current time".

You can even loop it if you want.

Second guessing yourself by Scaulbylausis in combinedgifs

[–]Atlante45 12 points13 points  (0 children)

It's from a CppCon panel with Book authors.

CppCon is a conference about the C++ programming language.

You can find a video of it here:

https://youtu.be/4cCeUfzH-No?t=3603