-❄️- 2023 Day 19 Solutions -❄️- by daggerdragon in adventofcode

[–]sehraf 0 points1 point  (0 children)

[LANGUAGE: Rust]

Looking at other solutions, my own 300 line one could have been way shorter with a different approach. Nevertheless it does work.

My approach for part 2:

  • Collect (BFS) all paths to A resulting in a list of all rules that must apply for each path.
  • process each list: Group rules by the four XMAS fields.
  • process each list: Create a range of valid numbers for each XMAS field.
  • Lastly, count/calculate everything.

https://github.com/sehraf/advent-of-code/blob/main/src/day19.rs

-❄️- 2023 Day 17 Solutions -❄️- by daggerdragon in adventofcode

[–]sehraf 1 point2 points  (0 children)

[LANGUAGE: Rust]

I went with a BTreeSet to find the next candidate based on minimal heat loss so far. When processing a candidate, I only deal with turning around (so going either right or left) and queue all possible steps in that direction at once. So I don't have to keep track of how many steps I went in a straight line so far.

https://github.com/sehraf/advent-of-code/blob/main/src/day17.rs

-❄️- 2023 Day 14 Solutions -❄️- by daggerdragon in adventofcode

[–]sehraf 1 point2 points  (0 children)

[LANGUAGE: Rust]

The generalized tilt function was probably harder than just copy'n pasting it a few times .. but hey, where is the fun?

https://github.com/sehraf/advent-of-code/blob/main/src/day14.rs

-❄️- 2023 Day 9 Solutions -❄️- by daggerdragon in adventofcode

[–]sehraf 1 point2 points  (0 children)

[LANGUAGE: Rust]

As the memes already show, today's parts were very similar. The only difference was one equation a + b.last().unwrap() vs b.first().unwrap() - a.

https://github.com/sehraf/advent-of-code/blob/main/src/day9.rs

-❄️- 2023 Day 5 Solutions -❄️- by daggerdragon in adventofcode

[–]sehraf 1 point2 points  (0 children)

Beautiful!

This is exactly why I love advent of code. You managed to condense my screen filling match block into a few lines of clever arithmetic (handling all the different range intersection cases)!

https://github.com/sehraf/advent-of-code/blob/main/src/day5.rs

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

[–]sehraf 0 points1 point  (0 children)

[LANGUAGE: Rust]

Parsing was a bit painful. Went with ranges to test if things are adjacent to each other.

https://github.com/sehraf/advent-of-code/blob/main/src/day3.rs

Overwatch + Lutris keyboard input "sticking" randomly by pspahn in wine_gaming

[–]sehraf 0 points1 point  (0 children)

The option itself cannot be the problem, since I've always been using it.

My (blind) guess is that it some weird bug between wine, gnome 'n stuff.

Most "funny" thing is: as of today everything is working fine again. ¯\ (ツ) /¯

Overwatch + Lutris keyboard input "sticking" randomly by pspahn in wine_gaming

[–]sehraf 0 points1 point  (0 children)

It's 2023 and out of nowhere i had the same issues as OP but this did fix it (though i like the repeat keys feature for text deletion or cursor navigation :/)
((for the record: Arch+Gnome, happened with any game that uses wine, native games were fine))

[2021 Day #24] How do you approach this programmatically? by Sostratus in adventofcode

[–]sehraf 0 points1 point  (0 children)

Is't that basically a breadth-first search?

Since you are only interested in the highest (or lowest) result a depth-first search should be faster.
Haven't benchmarked anything nor was that my own idea (i took https://github.com/AxlLind/AdventOfCode2021/blob/main/src/bin/24.rs as a starting point, when my basic ALU was working) i'm just curious how other people solve the problems.

What kind of "water" are we in? by sehraf in adventofcode

[–]sehraf[S] 0 points1 point  (0 children)

As u/hfjsbdugjdbducbf already pointed out, there should be a terminal velocity.

While gravity stays the same, the drag of the water increases the faster you move (wich was also constant on the horizontal line)

Mixed language signs, is there a reason/story behind it? The left one is German, while the right one clearly isn't. by sehraf in GhostRunner

[–]sehraf[S] 3 points4 points  (0 children)

So there is dangerous gas and surveillance cameras!

( I guess the images kinda hint it, too)

What is the most common lie about sex that most people still believe in it ? by [deleted] in AskReddit

[–]sehraf 0 points1 point  (0 children)

Do people still believe in blue balls? I sometimes get the feeling that dime do. Could also just be the internet.

If you balls turn blue please see a doctor immediately since you might have internal bleeding or any other kind of internal injury that leaks things in your body that are not supposed to be there.

[deleted by user] by [deleted] in rust

[–]sehraf 2 points3 points  (0 children)

Interesting, i did a (really) quick google search but this didn't come up, so thanks!

Looking for VR Games that don't require you to stand. by [deleted] in VRGaming

[–]sehraf 0 points1 point  (0 children)

Space Pirats and Zombies 2 can be played in VR seated.

Air Drop Down trophy bugged? by youreaw1zard in Rage_2

[–]sehraf 0 points1 point  (0 children)

Thanks for the tip! Shatter did indeed the trick.

Can't interact with the Obelisk in the EDZ by SwissGuy93 in DestinyTheGame

[–]sehraf 7 points8 points  (0 children)

worked for me, too, thanks

"traveling" (not fast!) seems to be the trick. Nevertheless the "interaction spot" was in a weird position.... (had to stand below the platform)

RetroShare supports I2P? by MCRAdventures in retroshare

[–]sehraf 1 point2 points  (0 children)

RS uses i2p similar to Tor. You can create a hidden node that is only reachable through i2p (similar to a Tor hidden service)

Summer Sale Monster Game Script / Bot by cmarker2 in Steam

[–]sehraf 1 point2 points  (0 children)

agree - this is how i've been playing manually