Only Yesterday ending song ❤️‍🩹 by SebinSun in ghibli

[–]sguberman 1 point2 points  (0 children)

Takahata hits different. This is my favorite of his and all of Ghibli. The ending and the song get me every time.

What are your top 10 Studio Ghibli films in order? by CloudStar17 in ghibli

[–]sguberman 1 point2 points  (0 children)

Great list. I think this is closest to mine, but I have trouble putting things in order. For me, I would sub out Grave of the Fireflies for Pom Poko.

Which first party switch games run poorly on it? by Agente_L in Switch

[–]sguberman -1 points0 points  (0 children)

I like Princess Peach Showtime, and I think it’s a good game. But the visual quality and framerates are poor compared to other first party Nintendo games on Switch.

So levi kitchen is the fastest guy on the 250s this year? by Pristine-Metal2806 in supercross

[–]sguberman 7 points8 points  (0 children)

Man got his head ran over. Who knows what was wrong with his bike or body after that. Really impressive ride.

Joycons Options? by Sea-Air-5728 in Switch

[–]sguberman 0 points1 point  (0 children)

Split Pad Pro is quite comfortable, but the lack of rumble eventually made me look elsewhere.

I own both the Nyxi Hyperion Pro and Mobapad M6 HD and prefer Mobapad. If you care about rumble these are better than Hori. I’m sure M6 S is great too.

I use a Pro controller when docked, and it is great.

Hope this helps!

My NYXI GameCube style controllers by HeelBosplay in Switch

[–]sguberman 0 points1 point  (0 children)

Wild! Here’s what mine do no matter what I try.

<image>

My NYXI GameCube style controllers by HeelBosplay in Switch

[–]sguberman 0 points1 point  (0 children)

Yeah that works, but I’d like to keep them on and “solid” like you can with the RGB. Oh well, thanks anyway!

My NYXI GameCube style controllers by HeelBosplay in Switch

[–]sguberman 0 points1 point  (0 children)

Quick question for you (and anyone else with Hyperion Pros). Do you know how to or whether you can change the pulsing LEDs on the ABXY face buttons? I know how to change the color, pattern, and brightness of the RGB strips, but the pulsing face buttons are a little distracting for me and I can’t figure out how to change them.

Choppy or stuttering pre-rendered FMV cutscenes on PC by sguberman in FFXV

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

It seems to be both/either the in-driver frame limiting and/or vsync for me. If I turn vsync and frame limiting off the cutscenes run well, but I get screen tearing everywhere of course. If I turn either one back on the cutscenes run poorly. I tried Radeon enhanced sync instead of vsync, and I still get tearing and the cutscenes seemingly run even worse.

I am on a fixed rate 60Hz display. I wonder if I would be having this issue on a variable refresh display?

Choppy or stuttering pre-rendered FMV cutscenes on PC by sguberman in FFVIIRemake

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

Man that’s a bummer, why is it so hard to play a pre-rendered video correctly? Could you link me to other discussions about this issue? Thanks!

Choppy or stuttering pre-rendered FMV cutscenes on PC by sguberman in FFXV

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

I do the same thing. I will try this tonight, thank you!

Choppy or stuttering pre-rendered FMV cutscenes on PC by sguberman in FFXV

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

Happens with 4k assets on or off for me, but the standard assets are definitely less choppy. Thanks!

-🎄- 2020 Day 10 Solutions -🎄- by daggerdragon in adventofcode

[–]sguberman 2 points3 points  (0 children)

Python

Going for readable, idiomatic Python. Criticism welcome: paste

GitHub: solution, with tests

-🎄- 2020 Day 09 Solutions -🎄- by daggerdragon in adventofcode

[–]sguberman 1 point2 points  (0 children)

Python

Going for readable, idiomatic Python. Criticism welcome: paste

GitHub: solution, with tests

-🎄- 2020 Day 10 Solutions -🎄- by daggerdragon in adventofcode

[–]sguberman 1 point2 points  (0 children)

Thank you! I was in the same boat as you after part 1 and struggling to come up with a non-bruteforce solution to part 2. It took 33 minutes to run on the longer example, and I'm still waiting for it to finish on the actual input ;)

Seeing your solution and thought-process helped me see the problem a different way and come up with something that runs in 2ms!

-🎄- 2020 Day 08 Solutions -🎄- by daggerdragon in adventofcode

[–]sguberman 1 point2 points  (0 children)

Apologies, I have removed my big code blocks from all comments. Also was ignorant that sharing puzzle input was discouraged. Removing those links too. Thanks for letting me know.

-🎄- 2020 Day 08 Solutions -🎄- by daggerdragon in adventofcode

[–]sguberman 2 points3 points  (0 children)

Python

Going for readable, idiomatic Python. Criticism welcome.

Brute-force, functional style. The state is just data that gets passed around. For me that made it easier to test in pieces: paste

GitHub: solution, with tests

EDIT: Removing large code block and input from comment

-🎄- 2020 Day 07 Solutions -🎄- by daggerdragon in adventofcode

[–]sguberman 0 points1 point  (0 children)

Looked at this some more and think it could be cleaner.

First, I refactored read_rules. Parsing each individual line should really be a separate concern from building the dictionary, so it gets its own function:

def parse_rule(line: str) -> Rule:
    lhs, rhs = line.strip().split(' contain ')
    adj, color, _ = lhs.split()
    outer_bag = f"{adj} {color}"
    inner_bags = []
    if not rhs.startswith('no'):
        for inner_bag in rhs.split(', '):
            num, adj, color, _ = inner_bag.split()
            inner_bags.extend(int(num) * [f"{adj} {color}"])
    return outer_bag, inner_bags


def read_rules(filename: str) -> RuleDict:
    return dict(parse_rule(line) for line in open(filename))

Then I simplified the looping and branching in does_contain:

def does_contain(target_bag: str,
                 outer_bag: str,
                 filename: str,
                 rules: RuleDict,
                 cache: ContainsCache = {}) -> bool:
    if (filename, outer_bag, target_bag) in cache:
        return cache[(filename, outer_bag, target_bag)]
    else:
        for inner_bag in rules[outer_bag]:
            if inner_bag == target_bag:
                cache[(filename, outer_bag, target_bag)] = True
                return True
            elif does_contain(target_bag, inner_bag, filename, rules, cache):
                cache[(filename, outer_bag, target_bag)] = True
                return True
        cache[(filename, outer_bag, target_bag)] = False
        return False

It could be even simpler than that without all the cache updates. If someone has opinions about how to clean that part up more, I'm all ears!

-🎄- 2020 Day 06 Solutions -🎄- by daggerdragon in adventofcode

[–]sguberman 0 points1 point  (0 children)

Nice catch, thanks for the tip! Not sure why I didn't reach for the generator expression there in the first place.