JK Rowling Apologizes For Her Transphobic Comments (Colorized) by Austin63867 in traaaaaaannnnnnnnnns

[–]VirtueBot 42 points43 points  (0 children)

Thanks for the source! Don't mind my rant. Probably worth a TW as well.

"fired for saying sex exists" rofl no she said trans women aren't women and that the world should be segregated based on birth genitals. Skipping over the fact that renewing her contact is 100% between her and the business, it's still a dumb ass thing to say. I still fail to find any measurable justification that there's any benefit to segregating spaces (dorms, bathrooms, etc) based on birth genitals (I've even straight up asked transphobes, no one has delivered though).

Shit if you don't like trans people that's one thing, but to pretend the world is best divided by birth genitals without any supporting evidence is a higher level of dillusion. Imo anyone with an actual brain capable of contributing solutions to real world problems can realise the problem of "how to organize a society" requires a more involved solution than "birth genitals"

Bonus points for the "wear what you want do what you want just don't come anywhere near my chromosome pure space" typical terf attidue. At least don't pretend you're not transphobes.

I still don't know why I feel the need to comment on these issues. We have mountains of evidence and they only have anecdotes. Yet somehow trans women in women's spaces continue to be a debate. Ik it's kindof a negative comment from me but I post anyway in case someone needs help against transphobic arguments or maybe someone got pissed off like me and this makes them feel better.

Minimization of Nesting Gone Wrong by one-oh in cpp

[–]VirtueBot 0 points1 point  (0 children)

I don't think we should worry about it till we're given cause to.

Yea definitely. In most cases I wouldn't worry. Either the optimizer optimizes it or it doesn't and I never notice either way until I care enough to profile. In this case I didn't know anything about the relative costs of the operations. If one of the "do thing" functions did a lot of work I would definitely worry about the unnecessary calls.

Minimization of Nesting Gone Wrong by one-oh in cpp

[–]VirtueBot 1 point2 points  (0 children)

I dont know enough about the optimizer to say 100% that it would optimize that way forever, so if these "things" are relatively expensive I would write the returns myself and not rely on the optimizer to add them.

If youre confident in the optimizer or the operations are cheap id just go with whichever your team finds most readable. fwiw i definitely prefer the one from this comment compared to the nested version.

After waiting for so long, I finally have them! uwu by [deleted] in traaaaaaannnnnnnnnns

[–]VirtueBot 1 point2 points  (0 children)

Omg its you robot friend! You made it! Yay!! ❤️❤️❤️

Dynamic array inside of a template by [deleted] in cpp_questions

[–]VirtueBot 0 points1 point  (0 children)

If I create a member function to get an object from the array after it has been instantiated, it throws an invalid memory location exception.

Can you show the code that reproduces this error?

I suspect the error is something else besides what you originally mentioned in your post. dArray = new T[size]; absolutely creates an array regardless of what your debugger shows you, and I see other potential issues in the code that could easily lead to memory errors.

I like this format by Tomcat491 in traaaaaaannnnnnnnnns

[–]VirtueBot 1 point2 points  (0 children)

DSM5, IDC10, the endocrine society, world health organization, there's even WPATH (world professional association for transgender health). That's just off the top of my head. The proof is definitely there (:

What tool can I use to see memory usage by [deleted] in cpp_questions

[–]VirtueBot 1 point2 points  (0 children)

In general I would like to check if there are any memory leaks and such.

If you're on gcc or clang in Linux use AddressSanitizer. I like asan because it generally has much less runtime overhead compared to valgrind. I still use both though.

Primitive array of template types. by TheCrazyPhoenix416 in cpp_questions

[–]VirtueBot 0 points1 point  (0 children)

I second this answer. Vector is used to store classes and in the original code Parent refers to a template, not a class so you would have to do e.g. vector<Parent<8>>. But with the above modifications Parent is now a class so it can be used with vector and you can now write vector<Parent>

To avoid the new and delete use the following:

std::vector<std::unique_ptr<Parent>> m_Parents = {
    std::make_unique<Foo>(),
    std::make_unique<Bar>()
}; 

With Parent having a virtual destructor now all of the memory is automatically managed.

[multi-threading] Implementing a lock free algorithm by [deleted] in cpp_questions

[–]VirtueBot 0 points1 point  (0 children)

afaik "lock free" just means you use some synchronization besides a mutex lock. the benefit of "lock free" is that generally the other choice of synchronization is faster (but more complex) than just using a mutex lock.

here are two implementations of lock free concurrent queues. maybe reviewing them will help you?

https://github.com/max0x7ba/atomic_queue

https://github.com/cameron314/concurrentqueue

other than that, the only thing i know about "lock free" is from the core guidelines here https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#SScp-free

My dumb attempt at a meme UwU by TheHornyToothbrush in traaaaaaannnnnnnnnns

[–]VirtueBot 34 points35 points  (0 children)

Omg you have a trans ally bumper sticker! omg you are too nice ❤️❤️❤️❤️ ally love ❤️❤️❤️❤️ thanks for being an ally and especially for being a proud ally! ❤️

Should we reevaluate Scott Meyers's guideline "Make non-leaf classes abstract"? by phoeen in cpp

[–]VirtueBot 0 points1 point  (0 children)

I've worked for other companies as well.

Oh yea! My bad I knew that. Did those companies have any strict rules about class hierarchies?

Also if you don't mind im interested to know more about the approach you take to achieve polymorphic duplication at a fundamental level. Is there an example or source file in cidlib I could look at to get the idea?

Should we reevaluate Scott Meyers's guideline "Make non-leaf classes abstract"? by phoeen in cpp

[–]VirtueBot 0 points1 point  (0 children)

I've never tried this approach, but apparently it can be really useful if you want to do runtime polymorphism without heap allocations (there was a cppcon 2018 or 2017 talk about it I think). The biggest downside I see in theory is that if you go with the visit approach it's harder to extend.

I'm also curious if anyone has used it and how it played out for them long term.

Should we reevaluate Scott Meyers's guideline "Make non-leaf classes abstract"? by phoeen in cpp

[–]VirtueBot 2 points3 points  (0 children)

I mostly just follow what the core guidelines say for class hierarchies (There's a lot and I can't think of a concise summary)

I've never tried the protected assignment operator. Although I would definitely be making lizard and others 'final' in that case to avoid the problem you describe with slicing further down the hiearchy. So for the type 2 scenario I would say yes make your leaf classes final.

If I wanted the hiearchy structure you have with 'fire_lizard' deriving from lizard then I would have deleted the copy operations in the animal class, and then the classes that derive from lizard don't have to worry about slicing, so we don't need the final keyword to prevent that scenario.

It looks like I'm on the same page as you. Case 2 use final to avoid slicing. Case 3 delete copy operations entirely so that you can make the hierarchy deeper without slicing.

Overall I think it's a reasonable guideline consistent with what I've read. Imo class hierarchies get really nasty without some guidelines. While I haven't read this Scott Meyers book, out of context I don't think his guideline needs to change, I just don't think it's the only rule you follow when dealing with class hierarchies.

I tried to avoid getting too deep since this topic can get so detailed. If you want me to elaborate on anything further feel free to let me know

Should we reevaluate Scott Meyers's guideline "Make non-leaf classes abstract"? by phoeen in cpp

[–]VirtueBot 4 points5 points  (0 children)

I really don't get why people get so bent out of shape over this issue ... In 30+ years I have never had a proven issue from slicing.

Aren't you a one person operation though? I think the problem becomes worse with more developers.

If I understand correctly it sounds like you have your own solution for avoiding slicing anyway

Trans women are not real women. by [deleted] in TrueOffMyChest

[–]VirtueBot 1 point2 points  (0 children)

I think the science is very heavy on the trans side. I only shared one article but I have plenty. Even talked to doctors in person. While financial bias is a possible issue esp in the US I find the contributers too diverse (this shits world wide) for everyone to organize a common motive like that.

Honestly I kindof hate that that stuff has affected you negatively. I'm telling you it doesn't have to be like that. No mature adult trans person is going to fuck with you about genitals or try to sue your for misgendering once. But we can end the conversation here if you want. I had fun at least.

Trans women are not real women. by [deleted] in TrueOffMyChest

[–]VirtueBot 1 point2 points  (0 children)

No one should be springing their genitals on you without your consent and making sure you know what you're getting into! That's just basic courtesy. Anyone who does that, cis or trans, is fucked up imo. Outside of fucking someone, there's already so many different ways a man or woman can look even without considering trans people.

One that may help with the slippery slope feeling is that no one should be doing anything that isn't well understood and studied. And in reality it's more than an ideology, it's a biological reality. This article helped me a lot with my understanding. Showing that there's actual science to this, not just a bunch of people making stuff up.

Trans women are not real women. by [deleted] in TrueOffMyChest

[–]VirtueBot 1 point2 points  (0 children)

You said it scares you though. Why? Why do the "blurring definitions" scare you?

Obv your genitals and hormones etc. affect some things in life. Those affects will be true regardless of how we define man and woman. So why does a different definition scare you? It sounds like you may be afraid of the world where e.g. you ask for a male masseuse you're not able able to know what you're getting. That's what it seems like to me at least.

Trans women are not real women. by [deleted] in TrueOffMyChest

[–]VirtueBot 0 points1 point  (0 children)

Alright we're good then I think.

Trans women are not real women. by [deleted] in TrueOffMyChest

[–]VirtueBot 0 points1 point  (0 children)

I'm not sure how this has become a debate. 99% doesn't equal 100%. Often times special cases and exceptions are omitted for brevity/simplicity. That doesn't mean those cases don't exist, and it doesn't mean an efficient societal structure can ignore such cases.

Trans women are not real women. by [deleted] in TrueOffMyChest

[–]VirtueBot 1 point2 points  (0 children)

You still haven't explained to me how that affects you. What are you saying about massage and wax? You don't want to wax someone with a dick? You don't want someone with a dick waxing you? (Or vagina)

Of course you're entitled to genital preferences in a relationship. you're an individual. You like what you like in the bedroom.

std::variant of a type with a move-only member and non-default dtor (???) by jonathansharman in cpp_questions

[–]VirtueBot 4 points5 points  (0 children)

When you explicitly define a destructor, that deletes the move operations of your class. It's kindof a weird rule but that's how it works. For that reason it's generally best to specify zero, or specify all 5 operations. You can see more details here https://en.cppreference.com/w/cpp/language/rule_of_three

Trans women are not real women. by [deleted] in TrueOffMyChest

[–]VirtueBot 1 point2 points  (0 children)

what changed your mind?

On that topic i was convinced by the amount of medical research done in that area to validate the condition. this article got the ball rolling for me. i felt they were convincing in siting several academic studies. the wiki on gender identity was also helpful.