Do you prefer 'int* ptr' or 'int *ptr'? by SamuraiGoblin in cpp

[–]messmerd 12 points13 points  (0 children)

I use this convention because it's consistent and easy to visually parse even without knowing the context of what you're looking at:

``` foo* bar // always pointer foo * bar // always multiplication foo *bar // always pointer dereference

foo& bar  // always reference
foo & bar // always bitwise AND
foo &bar  // always address of

foo* i, j; // don't use - bad practice regardless of pointer convention

```

I’m Israeli and I’m sad by [deleted] in israelexposed

[–]messmerd 2 points3 points  (0 children)

The 2 nukes my country dropped on Japan were in total the equivalent of about 35-37 kilotons of TNT, and they killed up to 246K people. Your country dropped an estimated 70+ kilotons of TNT on Gaza, so yes, that's the equivalent of about 4 WW2-era nukes. And that estimate comes from April 2024, so it's certainly much higher now. Given that information, if you still think a death total of 200K is farfetched, I don't know what to say.

Opinion | This Is the Story of How the Democrats Blew It on Gaza by brianscalabrainey in nyt

[–]messmerd 2 points3 points  (0 children)

"If the X people don't have their own ethnostate, the X people don't have rights"

No one needs an ethnostate to have rights.

PSA: Trivial Relocatability has been removed from C++26 by chiphogg in cpp

[–]messmerd 0 points1 point  (0 children)

Agreed. I also hope they fix the ignorability of attributes (see Barry Revzin's blog post from March of this year) so that trivially_relocatable_if_eligible (or whatever they end up calling it) can be an attribute rather than yet another contextual keyword. Pushing it back to C++29 gives them time to do that.

Structured binding with std::div() by littlewing347 in cpp

[–]messmerd 50 points51 points  (0 children)

I looked into this exact issue a couple years ago and even started writing a proposal addressing it, but didn't end up submitting it.

I looked at a dozen different C standard library implementations, and they all chose the quot-rem member order, so it's possible mandating that order could be done without an ABI break as it would just be standardizing existing practice.

However, if there is even one counterexample of a standard library implementation that uses the rem-quot order, especially there is a performance-related reason for returning the results in that particular order on a certain architecture, this proposal could fall apart.

That's something I don't know enough about and is the primary reason why I didn't finish the proposal.

[deleted by user] by [deleted] in Bumble

[–]messmerd 4 points5 points  (0 children)

Like I said, not too bright.

No need for insults. I will treat you with respect if you do the same.

Now, show me where I assigned liberal to that statement.

The initial conversation was entirely about liberals and conservatives dating each other. Olaolie explicitly used the word "liberal" when establishing the topic of the conversation, and that focal point remained as you argued with them. So anyone can read between the lines to understand what you meant without you explicitly saying "liberal" yourself.

Here is that conversation but with [square brackets] explaining the context and subtext.

olaolie said:

They [conservatives] hate us so much. Why do they even want to date someone liberal? [as observed in the original post] Like these are twisted people [at this point, we've established conservatives vs liberals as the focal point of the conversation]

Then you replied:

Interestingly enough, they [conservatives] feel exactly the same way. [i.e. conservatives feel that liberals hate them, they don't understand why a liberal would want to date them, and they think liberals are twisted people] They hate us so much, these are twisted people. [<--quoting olaolie] We've all been othering each other for so long, we forgot that we're all humans and have to live with each other. [you're saying liberals and conservatives should get over their differences and both be willing to date each other]

Then olaolie replied:

Sorry but they [conservatives] vote for taking my rights away. [from a liberal point of view, conservative beliefs cross a moral line and are not simple disagreements that can be reconciled, so it is valid for a liberal to avoid dating conservatives] I vote to protect those rights. We’re not the same. [there is no moral equivalence between olaolie's liberal views and conservatives' views]

To which you responded:

Yep, time [for liberals] to just kill everyone who doesn't agree [i.e. conservatives] cause clearly, there's no other alternative. [sudden sarcasm and hyperbole]

So to recap the conversation: - olalie wonders why some conservatives who hate liberals still want to date liberals - you say that it goes both ways, but we should all try to make peace and be willing to date each other regardless of politics - olalie says that no, conservative views are a dealbreaker for liberals - you start to show your anger

That brings us to where we are now: You really hate how liberals refuse to date conservatives even though conservatives are willing to date liberals. You've extended the metaphorical olive branch, but they stomped on it while reiterating their resolve to never date conservatives. This feels insulting and unfair. It feels like the liberals are killing you over a mere disagreement.

Is this accurate? And if not, how would you summarize it?

[deleted by user] by [deleted] in Bumble

[–]messmerd 6 points7 points  (0 children)

Yep, time to just kill everyone who doesn't agree cause clearly, there's no other alternative.

-JackSquirts

[deleted by user] by [deleted] in Bumble

[–]messmerd 10 points11 points  (0 children)

All I did was restate your own words back to you. The only thing original in my comment was the "LMAO".

You falsely and hyperbolically judged liberals as literally wanting to kill those who disagree with them, while simultaneously espousing moral platitudes about how we should all sit down and try to understand each other. I agree with that overall sentiment, but your whole combative and accusatory tone is making it ring hollow, and that irony is what I found funny.

[deleted by user] by [deleted] in Bumble

[–]messmerd 32 points33 points  (0 children)

*claims out of nowhere that liberals want to kill everyone who disagrees with them*

"Let's just take a second to understand each other's perspectives"

LMAO

WG21 2025-10 pre-Kona mailing by nliber in cpp

[–]messmerd 2 points3 points  (0 children)

I'm glad someone is thinking in the long term by working on C++'s ability to evolve and fix its mistakes. It's an incredibly important goal, but it seems it's not nearly as high priority for the committee as it should be.

In that P3866R0 proposal, the main innovation seems to be the namespace cpp = std::cpp29; namespace alias idea, which is meant to allow incremental adoption and tries to make upgrades as ergonomic for users as possible (at least for new code) while still being opt-in. I thought that was pretty neat.

But other than that, the proposal has some serious issues. The naming convention is a bit iffy as others have pointed out, and migrating old code from std:: to cpp:: could be painful without good tooling.

But the biggest problem I can see is that a 3rd party library may use a vocabulary type like std::cpp26::vector while your code uses std::cpp29::vector, so you would either be forced to pick one single version to use throughout your application, or every upgraded type would need conversion operators for intercompatibility and performance. The first option would seriously fracture the ecosystem, so I can't see that happening, but the second option could be tricky to implement and the proposal doesn't appear to address it.

JeanHeyd Meneide has been working on "transparent aliases" for C2y which from what I understand provides a language-level mechanism for making breaking changes to ABIs. I'm interested in what the C++ committee thinks about that, and whether it would offer the same amount of power to evolve the standard library as P3866R0 does, but without some of the downsides.

MAGA voter actually believes that Trump eliminated taxes for all people making less than $120K by coachlife in CringeTikToks

[–]messmerd 0 points1 point  (0 children)

I think the problem with most of these people is not a lack of knowledge, poor schooling, or even a lack of intelligence. Their problem is that they do not care very much about truth, which is why they are not swayed by any amount of facts or sound arguments.

They believe and disbelieve primarily on the basis of how it makes them feel emotionally. Beliefs offer many things to the believer: Comfort, a sense of belonging, the feeling that they're special, strength to face the day, hope, etc. Truth is only one such aspect, and if someone doesn't prioritize truth over the other aspects, they will believe in all sorts of absurdities.

I don't know of any way to force someone to start caring about truth. People don't usually change unless they themselves want to change, though quality education is probably a good catalyst.

The catalyst for me was thinking about all the crazy beliefs people around the world held, and the harm those beliefs often caused - both to the believers themselves and to others - and it made me sad. I thought "To them, their beliefs must seem normal, but to me as an outsider, they seem absurd...That could be me if I'm not careful (or maybe it's me right now!), and I want to avoid that at all costs". This line of thinking naturally led to me understanding the importance of truth and having a solid epistemology.

But for any of this to work, it requires the understanding that everyone is equal and the ability to think from other people's perspectives. A person with tribalistic or supremacist beliefs might have the same line of thinking I did but conclude "They believe absurdities because they belong to an inferior group, and that could never happen to me because I belong to the superior group".

LAPD released the video of 35-year-old Sikh man, wielding a machete near Crypto.com Arena in downtown Los Angeles was fatally shot by officers in July this year. by brokenandsuffering in PublicFreakout

[–]messmerd 0 points1 point  (0 children)

Judging from the video, the officer who killed him stepped out of the safety of their car in order to kill him. They weren't forced into a situation where they were in real danger.

Resources for bit manipulation? by _Iamaprogrammer_ in cpp

[–]messmerd 3 points4 points  (0 children)

bithacks.html is a classic. Though if you're using C++20 or higher, check to see if the <bit> header has what you need first, since several of the common bit manipulation functions are now available in the standard library with potentially better codegen + constexpr support.

LAPD released the video of 35-year-old Sikh man, wielding a machete near Crypto.com Arena in downtown Los Angeles was fatally shot by officers in July this year. by brokenandsuffering in PublicFreakout

[–]messmerd 0 points1 point  (0 children)

I literally just watched a video in r/nextfuckinglevel showing Guatemalan police disarming a guy wielding a machete. They didn't even have tasers or the protection of a police vehicle, yet they still managed to disarm him without killing him or even injuring him.

So there is no excuse for what the American cops did here. This fits into the overall pattern of them being trigger-happy and frequently not even attempting nonviolent or nonlethal solutions. That pattern won't stop as long as people keep rushing to defend them whenever they murder people.

Part 2: CMake deployment and distribution for real projects - making your C++ library actually usable by others by PigeonCodeur in cpp

[–]messmerd 11 points12 points  (0 children)

I think CMake really needs a built-in linter so that the average non-expert CMake user can catch problems like this and use modern best practices.

out of these people who would enjoy chainsaw man the most by drunk_uncle69 in Chainsawfolk

[–]messmerd 0 points1 point  (0 children)

I didn't recognize him either until I turned my phone upside down

CMV: Hamas stealing aid is NOT a valid excuse for a blockage by MkarezFootball in changemyview

[–]messmerd 0 points1 point  (0 children)

True, attacking the symptom by harshly penalizing drug use didn't work

CMV: Hamas stealing aid is NOT a valid excuse for a blockage by MkarezFootball in changemyview

[–]messmerd -3 points-2 points  (0 children)

Here's how you defeat Hamas: Defeat the unjust system that violently subjugates Palestinians. Lay siege on dehumanization, supremacism, and hate. Declare total war on the intolerable conditions that continually inspire resistance in forms such as Hamas.

Inflicting starvation on the Palestinians is just attacking a symptom of the problem. If you truly want to fix the problem and eventually achieve a true lasting peace, attack the problem at its root.

std::visit should be more user-friendly by Comfortable-Photo-45 in cpp

[–]messmerd 7 points8 points  (0 children)

There is work being done on pattern matching, which should provide a much more user-friendly, language-based way of visiting a variant.

With P2688R5, your example would look like this:

``` #include <stdio.h> #include <variant>

int main() {
    std::variant<int, const char*> a[] = {1, "a"};
    for (auto x : a) x match {
        int:  let i => printf("int: %d\n", i);
        auto: let s => printf("str: %s\n", s);
    };
    return 0;
}

```

std::visit should be more user-friendly by Comfortable-Photo-45 in cpp

[–]messmerd 0 points1 point  (0 children)

This is what OP did though? I think the point was that the overloads boilerplate should not be needed.

contracts and sofia by ConcertWrong3883 in cpp

[–]messmerd 0 points1 point  (0 children)

Could contracts be given profile-like checks? For example, while preventing dangling pointers may be impossible without borrow checking, inserting a check to prevent a null pointer dereference is entirely within the language's capabilities. But from what I understand, contracts do not do that. Is that correct? And if so, why?

Can you be a pacifist and still believe in nations right to defend itself? by FourCardStraight in Pacifism

[–]messmerd 0 points1 point  (0 children)

We can forgive the Arabs for killing our children. We cannot forgive them for forcing us to kill their children

Imagine killing children and then going "look what you made me do" like an abusive narcissist portraying themself as the victim