AlmightySnoo 🐢🇮🇱🇺🇦

Yoko, Shinobu ni, eto… 🤔

עַם יִשְׂרָאֵל חַי Slava Ukraini 🇺🇦 ❤️ 🇮🇱

  • 49 Posts
  • 117 Comments
Joined 1 year ago
cake
Cake day: June 14th, 2023

help-circle




















  • For the catching bugs part, I’m wondering whether some of those (like _GLIBCXX_ASSERTIONS and _LIBCPP_HARDENING_MODE_EXTENSIVE) would be redundant if one already runs e.g. Clang Static Analyzer or GCC’s -fanalyzer?

    For instance, this one is caught without any issues when compiling with gcc -fanalyzer -O1:

    #include <memory> // "less than" and "greater than" signs getting filtered by Lemmy 0.18.5...
    
    int main() {
        auto p = std::make_shared(42);
        p.reset(p.get()); // Incorrect use of reset
    }
    



  • Something you’ll learn to live by once enter the workplace: your coworkers are not your friends. There might be a one in a thousand case that’s an exception to this rule, but most of the time you should not think of them as more than coworkers you have to work with to get your job done. I’ve witnessed too many cases of coworkers backstabbing each other for their own professional ambitions or where a coworker dies and everyone just completely forgets about him a few days later.

    That doesn’t mean you should be overly pessimistic either. The idea is to be pragmatic. No one wants a toxic environment, so everyone will put in some effort to maintain a cozy facade, and you should too, as that minimizes tensions for everyone. The mistake would be forgetting that it’s all a facade and starting to think of them as something like a family, that’s a mistake most juniors make.

    My motto is: smile at your coworkers but guard your damn ass when you turn your back to them.








  • I don’t think their “entire C++ language” wording also includes the standard library (except maybe for algos with std::execution semantics). I’ve never written Vulkan code but I do a lot of CUDA (and now HIP) GPGPU stuff and things like template meta-programming are immensely useful to have generic kernels with stuff like compile-time strategy pattern to avoid lots of mostly duplicate kernels, unrolling and classical loop patterns like tiling etc… can be easily refactored into nice looking metafunctions with zero runtime overhead. It’s a game changer when you have access to modern C++ features to do GPU programming.