5C5C5C

joined 2 years ago
[–] 5C5C5C 16 points 3 days ago (1 children)

I think it's debatable whether RAII should be called "memory management". Whether dealing with Rust or modern C++, you don't need to "manage" the memory beyond specifying a container that will determine its lifecycle behavior, and then you just let it drop.

You could certainly choose to manage it more granularly than that in Rust or C++, but in the vast majority of cases that would be considered bad practice.

That's a qualitatively different user experience than C or pre-2011 boostless C++ where you actually need to explicitly delete all your heap allocations and manually keep track of which pointers are still valid. Lumping both under "memory management" makes the term so broad that it almost loses its significance.

[–] 5C5C5C 1 points 1 week ago

More likely it's so they can use their personal phone to show the conversation to their Russian bosses without needing to bypass security measures.

[–] 5C5C5C 4 points 1 week ago

There are several ways to achieve an effect equivalent to operator overloading in Rust, depending on exactly how you want the overloading to work.

The most common is

fn do_something(arg: impl Into<Args>) {
    ...
}

This lets you pass in anything into the function that can be converted into the Args type. If you define the Args type yourself then you can also define any conversion that you want, and you can make any construction method you want for it. It's a small touch more explicit than C++'s operator overloading, but I think it pays off overall because you know exactly what function implementation all different choices of arguments will be funneling into.

I'll admit there's one thing from C++ that I frequently wish were available in Rust: specialization. Generics in Rust aren't exactly the same as templates in C++ but they're close enough that the concept of specialization could apply to traits and generics. There is ongoing work to bring specialization into the language, but it's taking a long time, and one of my projects in particular would seriously benefit from them being available.

Still, Rust will have specialization support long before C++ has caught up to even a quarter of the benefits that Rust has over it.

[–] 5C5C5C 4 points 1 week ago (2 children)

Even with modern C++ it's loaded with seg fault and undefined behavior footguns.

The times when C++ feels more ergonomic than Rust are the times when you're writing unsafe code and there's undefined behavior lurking in there, waiting to ambush you once you've sent it to production. Code that is 100% guaranteed safe is always, and I really want to emphasize this: always more ergonomic to write in Rust than it is to write in C++.

Show me any case where C++ code seems more ergonomic than its Rust equivalent, and I will always be able to show you how either the C++ code has a bug hiding in it or how the Rust code can be revised with syntactic sugar to be more ergonomic than the C++.

[–] 5C5C5C 9 points 1 week ago (4 children)

C++ was far and away my favorite language (I used it professionally for 10 years and was always excitedly keeping up with new ISO developments), until I learned the basics of Rust..

Now it's my firm belief that the world will become a better place when C++ stops existing. C++ just has no positive role to play in a world where Rust exists at the level of maturity that it already has.

Whatever they might try to do to C++ to make it less intolerable will be in vain until they're ready to break backwards compatibility. And once they're willing to break backwards compatibility to legitimately improve the language, they're just going to end up with a messy knock off of Rust.

[–] 5C5C5C 19 points 2 weeks ago (1 children)

I think it's important to put it in context: the Democrats are hemorrhaging support from their base who thinks they should be doing more to resist this administration. That does not mean they are losing support in favor of Republicans.

Meanwhile Trump is only losing a tiny amount of support because his base is a cult of personality that worships him. They won't turn against him until he's hurting them so directly that they can't rationalize it as somehow being Obama's fault. But many of them are delusional enough that they will never abandon their fealty so matter how much he harms them.

[–] 5C5C5C 43 points 2 weeks ago (1 children)

If the security team and the operations team are willing to obey the order and revoke access then the illegal firing is very much effective.

The jackboot thugs that work security for these government agencies have repeatedly demonstrated that they're happy to listen to the children running DOGE over the members of the agency that they're supposed to be securing, so at that point what do you expect one of these beaurocrats to do? Get into a fist fight with all the mall cops that are itching to serve the fascists?

[–] 5C5C5C 16 points 3 weeks ago* (last edited 3 weeks ago)

It's the trans people who pass so well as cis who will be in the most danger. By law they'll have to use the opposite bathroom of where they obviously belong, and then a group of big burly bigots will use that as an excuse to beat them up. The bigots defend themselves from criminal charges by insisting they were "defending women from a predator", and even if the trans person can prove they were just following the law and not harming anyone, the bigots will still get off scot-free because the court will rule they had a "reasonable suspicion" for their actions. Gay/trans panic is still effective in many places where these anti-trans laws are passed. And in many cases the trans person may be too scared to even press charges.

Ultimately the point of all of this is to force trans people out of society. You can't participate in a communal space where you're not able to safely relieve yourself.

[–] 5C5C5C 36 points 1 month ago (2 children)

My read on that statement is "I think this is a bad idea but in-fighting is the last thing we need right now if we want to avoid a Trump presidency."

[–] 5C5C5C 16 points 1 month ago (2 children)

Rabid dogs are also themselves suffering so much that putting them down is a mercy.

[–] 5C5C5C 22 points 1 month ago* (last edited 1 month ago) (2 children)

This is more of a 600 year regression to pre-Renaissance if we're being honest.

[–] 5C5C5C 10 points 3 months ago (1 children)

I don't think they were suggesting that the therapist was reinforcing any of this, just that the therapist was horrified by what they went through.

view more: next ›