[-] Saizaku@lemmy.dbzer0.com 4 points 17 hours ago

Because you would be using std::shared_ptr<> rather than a raw pointer, which will automatically deallocate the memory when a shared point leaves the scope in the last place that it's used in. Along with std::atmoic<shared_ptr> implements static functions that can let you acquire locks and behave like having a mutex.

Now this isn't enforced at the compiler level, mostly due to backwards compatibility reasons, but if you're writing modern c++ properly you wouldn't run into memory safety issues. If you consider that stretching the definition then I guess I am.

Granted rust does a much better job of enforcing these things as it's unburdened by decades of history and backwards compatibility.

[-] Saizaku@lemmy.dbzer0.com 4 points 17 hours ago

There's a reason why data races aren't considered a memory safety issue, because we have a concept that deals with concurrency issues - thread safety.

Also for all it's faults, thread and memory safety in java aren't issues. In fact java's concurrent data structures are unmatched in any other programming language. You can use the regular data structures in java and run into issues with concurrency but you can also use unsafe in rust so it's a bit of a moot point.

[-] Saizaku@lemmy.dbzer0.com 4 points 20 hours ago

Arguably modern c++ ( aka if you don't use raw pointers), fits all categories.

[-] Saizaku@lemmy.dbzer0.com 2 points 1 week ago

Didn't even open the link probably

[-] Saizaku@lemmy.dbzer0.com 2 points 2 months ago

That's a fair point, I guess I used binary numbers so much i uni that I just know the small ones by heart and that's why I find it easier. Following the example, I never convert 101 as 4+0+1, I just see it and know it's 5.

[-] Saizaku@lemmy.dbzer0.com 5 points 2 months ago* (last edited 2 months ago)

Read, write, and execute are represented by the numbers 4, 2, and 1, respectively, and you add them together to get the permission

Maybe I'm the weird one here but this seems like a counter intuitive way to remeber/explain it. Each octal digit in the three digit number is actually just 3 binary digits ( 3 bit flags) in order of rwx. For example read and execute would be 101 -> 5.

[-] Saizaku@lemmy.dbzer0.com 2 points 4 months ago

They're probably being downvoted for making a huge leap just from wearing pointy highheels lol. They turned a trivial reason into a non-trivial characterization/flaw about a person.

[-] Saizaku@lemmy.dbzer0.com 3 points 10 months ago

I'm on ddg and get no such issues with the same query:

[-] Saizaku@lemmy.dbzer0.com 12 points 10 months ago

I mean if you had bothered to open the article, it's in the 2nd paragraph:

The most comprehensive study of global climate inequality ever undertaken shows that this elite group, made up of 77 million people including billionaires, millionaires and those paid more than US$140,000 (£112,500) a year

[-] Saizaku@lemmy.dbzer0.com 11 points 1 year ago

I thought you were exaggerating that part about the tone of voice. But my god that is an incredible level of annoying.

[-] Saizaku@lemmy.dbzer0.com 4 points 1 year ago

I'd recommend against using pipewire over pulseaudio, and in turn eassyeffects rather than pulseeffects. Pipewire is a much cleaner implementation, way less buggy, has a wider support. As far as I'm aware pretty much every major distro ha smigrated to pipewire aleady.

[-] Saizaku@lemmy.dbzer0.com 8 points 1 year ago

Because you're implying that it's 50x more efficient than jpeg, it's not. For similar visual quality of images webp will on average produce a ~30% smaller file.

view more: next ›

Saizaku

joined 1 year ago