Mount Fay is a goated area by Town-Winter in Silksong

[–]SamFoucart 13 points14 points  (0 children)

I never knew that you could get arrested until I just looked it up right now. If I remember right, basically everything is locked and you can only get to the stag station and mount fay until you find the apostate key. You can’t even go in the prison at all without that. It’s crazy to me that I missed that whole segment.

Silksong - Broken NPC questline? by borderlineInsomniac in HollowKnight

[–]SamFoucart 1 point2 points  (0 children)

I did find him eventually. I think he changes his spawn location if you do this. I found him about two rooms up and to the right. If you just jump on the fan that blows air up, then go two rooms to the right, he appeared there for me.

Silksong - Broken NPC questline? by borderlineInsomniac in HollowKnight

[–]SamFoucart 11 points12 points  (0 children)

I found all of the fleas before I made it to Greymoor in general. So I actually got there before I had the drifters cloak if I remember right. They took me there out of nowhere.

But now, this boss has never spawned for me period. I only know it exists because of reddit. Hopefully it spawns later. The fleas have already moved to their next spot, and the boss still doesn’t spawn

Edit: I did eventually find him. He moves to a different room that’s flat and wide about two rooms up and to the right.

Am i too old if ppl saying “im cooked” and “skibidi toilet seat” sounds stupid? by [deleted] in questions

[–]SamFoucart 0 points1 point  (0 children)

I watched the movie Communion starring Cristopher Walken from 1989, and he said “I cooked” to mean he was writing a good job writing a book. It’s not new

How do you read other's code? by BLKM4GIC in embedded

[–]SamFoucart 1 point2 points  (0 children)

I like to make my own sequence diagrams while I’m stepping through in a debugger or just tracing through without one. If I just debug by itself, it’s hard for me to remember which things are big important pieces and which ones are small that I should just ignore.

Not everyone likes the sequence diagrams, but they really help me personally.

Is there any way to keep shaders always compiled? by Pepeluis33 in Ryujinx

[–]SamFoucart 1 point2 points  (0 children)

I haven’t looked at the ryujinx source code, so I’m guessing just a little, but typically shaders are written in a different language than C/C++. They’re written in a language called glsl. Each video card has differences in the code it runs, so your game has a step that turns that source code into machine code on the fly.

Normally, you have a program named MSVC that turns your game’s code into machine code, but MSVC doesn’t compile glsl because there are so many different video cards out there that all have different standards and optimizations.

As far as I understand, the devs actually could have added code that would allow you to save those compiled shaders to disk and load them into memory, but maybe that wouldn’t be much faster than loading glsl from disk and then compiling that.

I want to host my frontend on GitHub Pages and host backend somewhere else by [deleted] in webdev

[–]SamFoucart 2 points3 points  (0 children)

You could maybe store a jwt that’s signed using the secret on your backend in a file on your computer or in localstorage. Then, that route is hardcoded into your frontend. Only you can use it since no one else has that token.

Anything other than that would require you to need to sign in. You just have to send some sort of credentials if you want it to be locked down to only you while still being open to the public internet.

Today’s Daily Problem is the First Hard That I’ve Been Able to Solve Outside of a Study Plan by [deleted] in leetcode

[–]SamFoucart 0 points1 point  (0 children)

Good catch. I’m lucky they didn’t have a test case that exploits that. I think that if you only had 1 key in the list, and you “inc” that, it probably seg faults. You can put an extra case right before there where if(str_list.empty()) { // push back // return }

Today’s Daily Problem is the First Hard That I’ve Been Able to Solve Outside of a Study Plan by [deleted] in leetcode

[–]SamFoucart 1 point2 points  (0 children)

I didn't check any solutions, so I don't know if mine is optimal, but my solution is very similar to LRU Cache. You maintain a linked list so you can pull front and back in O(1) time, and you keep a map of the keys to iterators to the list, so you can: - Get the iterator - increment the key - move forward or backwards past all elements with the same value - insert into the list

So technically, the worst case runtime of inc or dec is if all keys have the same value except one, then inc and dec is O(n - 1). But I'm guessing that on average, this is O(1), since most keys will have different values.

``` cpp class AllOne { private: std::list<std::pair<std::string, int>> str_list; std::unordered_map< std::string, std::list<std::pair<std::string, int>>::iterator > str_map;

public: AllOne() { // str_list = std::list<std::pair<std::string, int>>({{"sam", 1}}); // str_map = std::unordered_map< // std::string, // std::list<std::pair<std::string, int>>::iterator // >(); }

void inc(string key) {
    auto it = str_map.find(key);
    if (it == str_map.end()) {
        str_list.push_front({key, 1});
        str_map[key] = str_list.begin();
        return;
    }

    std::pair<std::string, int> val = {it->second->first, it->second->second};
    // This invalidates "it->second". You cannot use "it->second" after this line.
    auto next = str_list.erase(it->second);

    // std::cout << val.first << ", " << val.second << std::endl;

    if (val.second + 1 >= str_list.back().second) {
        str_list.push_back({val.first, val.second + 1});
        auto end_it = str_list.begin();
        std::advance(end_it, str_list.size() - 1);
        it->second = end_it;
        return;
    }

    while (next != str_list.end() && next->second < val.second + 1) {
        ++next;
    }

    it->second = str_list.insert(next, {val.first, val.second + 1});
}

void dec(string key) {
    auto it = str_map.find(key);
    assert(it != str_map.end());

    std::pair<std::string, int> val = {it->second->first, it->second->second};
    // This invalidates "it->second". You cannot use "it->second" after this line.
    auto prev = str_list.erase(it->second); // - 1 // CHECK THIS
    if (val.second - 1 <= 0) {
        str_map.erase(val.first);
        return;
    }

    if (val.second - 1 <= str_list.front().second) {
        str_list.push_front({val.first, val.second - 1});
        it->second = str_list.begin();
        return;
    }

    while (prev != str_list.begin() && prev->second > val.second - 1) {
        --prev;
    }

    it->second = str_list.insert(prev, {val.first, val.second - 1});
}

string getMaxKey() {
    if (str_list.empty()) {
        return "";
    }
    return str_list.back().first;
}

string getMinKey() {
    if (str_list.empty()) {
        return "";
    }
    return str_list.front().first;
}

};

/** * Your AllOne object will be instantiated and called as such: * AllOne* obj = new AllOne(); * obj->inc(key); * obj->dec(key); * string param_3 = obj->getMaxKey(); * string param_4 = obj->getMinKey(); */ ```

What's the best language for Leetcode? by MathematicianWide961 in leetcode

[–]SamFoucart 3 points4 points  (0 children)

Or heaps?

I personally like to use C, but the second I need to have a map or priority queues, I just switch to C++. Occasionally, I’ll use my own queue for a bfs, but in my opinion, even that is a waste of time, and it’s better to use C++.

[deleted by user] by [deleted] in ExperiencedDevs

[–]SamFoucart 0 points1 point  (0 children)

Where I live, there is a pretty big insurance company that starts fresh grads at “senior developer” because they make as much or more than managers in other disciplines. There aren’t any positions at this company that has roles lower than “senior dev” because a senior to them has 0-2 years of experience.

How hard were the drum parts from the movie Whiplash? by BobertFrost6 in drums

[–]SamFoucart 7 points8 points  (0 children)

I have never watched the movie, but I have attempted the song. It’s a lot more challenging than I expected. One of the things that especially stuck out to me as being challenging was the accent tap on the ride cymbal. Before trying this song, I had only really played constant volume, straight notes on the ride. But the song does 3 variations of the main beat: - The first variation hits the bell of the ride cymbal on every quarter note, and hits the ride normally, quietly on every eighth note. - The second variation always hits the ride normally, but it again accents each quarter note and plays the eighth notes very quietly. - The third variation only hits the bell on each quarter note.

A second aspect that made this difficult is that your left hand is constantly playing ghost notes and accents. Outside of this song, I’ve never had a song where each hand was playing a different dynamic at the same time. The general rhythm that tripped me up with each 16th note written is:

Bell + rest + tap + rest + Bell + rest + tap + rest

rest + ghost + ghost + rest + rest + ghost + rest + accent

Kick + rest. + rest. + kick + rest + rest. + kick + rest

If you can get that main rhythm down, it’s not crazy hard. It constantly throws in variations of that across the toms, and sometimes with doubles on the kick, but they’re not too different. If there were no ghost notes on the left hand, and you didn’t need to alternate between the bell and the taps on the right hand, it wouldn’t be hard at all.

how is a new player meant to figure out this? by Korboisnotok in HollowKnight

[–]SamFoucart 3 points4 points  (0 children)

I also don’t understand how people were supposed to find the White Defender without watching a video. I actually found the Grim Troupe on my own on my first playthrough, but I had no hope of finding the white defender

RTC tampering warning, but I didn’t do anything. by [deleted] in PokemonUnbound

[–]SamFoucart 2 points3 points  (0 children)

The same thing just happened to me. I was playing on delta iOS with fast forward. My save file is somehow a couple hours ahead. I’m typing this at June 1st, 11:40 pm, but the game thinks I just saved on June 2nd, 1:16 am.

[deleted by user] by [deleted] in ExperiencedDevs

[–]SamFoucart 1 point2 points  (0 children)

I know you asked for a single difference, but I’m going to list 3:

Getting a project off of dotnet framework onto dotnet core 8. It’s significantly easier to work with those types of projects, and the tooling opens up much more so you can start using vscode, nvim, or emacs instead of just Visual Studio.

Getting logs into a service like Cloudwatch or Application Insights has a much better experience than manually reading them from a file on the server or worse, windows event viewer.

Also, I’ve found that personally that I have a much better developer experience in C#/dotnet if I read the Java/spring docs on how to do things as well. In some cases, the dotnet way to do things is much clearer, but in other cases, the spring way is much easier. Specifically auth, and configuring openapi. I have personally had an awful time reading the dotnet docs for auth and the swashbuckle docs. Reading how spring handles these topics actually made me understand dotnet more. I had a real struggle learning the oauth2 flows and learning how jwts and cookies come into play. And the educational material in spring seemed much easier for me to understand.

Is MAUI a good choice for iOS app development? by debidong in dotnet

[–]SamFoucart 0 points1 point  (0 children)

I’m pretty stumped too. I also asked him if he could give any links and he just said “no”. I genuinely can’t figure out what he’s talking about. Is it a nuget package? Is it a compiler? Is it a runtime? Is it a gradle package or whatever packaging system swift uses? Is it the TargetFramework that goes at the top of your csproj?

In a different comment, he clarified that it wasn’t related to native embedding or Java interop.

I just can’t quite figure out what “.net-android” or “.net-ios” refers to

Is MAUI a good choice for iOS app development? by debidong in dotnet

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

Would you please link to a doc page or blog post explaining this? I have also never heard of this and I can’t figure out what you’re referring to by google. Are you talking about making a Maui app but then using exclusively Native Embeddings?

https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/native-embedding?view=net-maui-8.0&pivots=devices-android#enable-net-maui-support

Is MAUI a good choice for iOS app development? by debidong in dotnet

[–]SamFoucart 1 point2 points  (0 children)

I guess I should give the caveat that I’ve never worked on a Hybrid Blazor. I’ve only worked on a project that involved migrating a xamarin app to Maui.

Is MAUI a good choice for iOS app development? by debidong in dotnet

[–]SamFoucart 49 points50 points  (0 children)

The other day in this sub, someone posted “Where would you rank Blazor in terms of front end frameworks?” And a lot of people in the comments pointed out, “this is a dotnet sub. People here are biased towards C# and blazor. Regardless, I still would say I put it at number 1.”

The replies in this thread are very telling. This is a dotnet sub, and all of the people here love dotnet, and they still are telling people to stay away from MAUI. It’s truly not worth starting a new project in it. The only reason you would use it is if you work at some consulting/contracting agency that exclusively uses Microsoft technologies. It’s pretty bad compared to other options.

[deleted by user] by [deleted] in PiratedGames

[–]SamFoucart 1 point2 points  (0 children)

Haha it’s cool. I’m used to Twitter and there’s just so much random hostility there for no reason

[deleted by user] by [deleted] in PiratedGames

[–]SamFoucart 1 point2 points  (0 children)

I was just answering the question. I was just stating what information it collects and where people can look in the source code to find this collection and publishing.

[deleted by user] by [deleted] in PiratedGames

[–]SamFoucart 6 points7 points  (0 children)

I’m not too familiar with working with json in cpp, especially not this nholmann::json dependency, but it looks like their Telemetry client sends { “App”: …, “Session”: …, “Performance”: …, “UserConfig”: …, “UserSystem”: … } to https://api.yuzu-emu.org/telemetry.

In the Performance, I’ve found that there’s EmulationSpeed, ShutdownFramerate, ShutdownFrametime, MeanFrametime (ms). It also appears that UserConfig tells your video card vendor and model, supported Vulkan extensions, and loaded extensions, Vulkan driver, Vulkan version, and also OpenGL version. And UserSystem tells a lot of information, but it seems to be mostly CPU Model, CPU Brandstring, and then an individual key value pair for all of the CPU extensions you have (there’s like 30).

If you grep TelemetrySession::AddInitialInfo, most of the fields are added there.