Better HN
topnewbestaskshowjobs
Log inSign up

consteval

1,210 karma · joined Jul 19, 2024 (2y ago) · 1,613 submissions

Submissions

comment 2y ago · link · parent

I disagree, because the scope doesn't escape those functions and it can greatly reduce the amount of ::

Usually in an entire codebase or a module there's a lot of competing, similar symbols. But in a function that's not the case, because they do something small. So there's no benefit to being more "explicit", because the function already states what it does.

For example you might not want to use std::chrono. But in, say, a series of timing functions you really don't want to be writing std::chrono:monotonic_clock::now(), do you? You can just use a using and then just call now() or whatever.

comment 2y ago · link · parent

I've never seen a nullptr somehow sneak into a reference. Never.

What I have seen is automatic variables escaping their scope as a reference, which rust protects against. And is also much more dangerous, because dereferencing a nullptr is defined behavior on most platforms

comment 2y ago · link · parent

C++ casts ALSO perform runtime checks, just not all of them. As you've stated.

And, to be clear, that behavior ALSO exists in C# and Java. You can absolutely 100% ignore the type system in Java and C# and its supported by the standard. Just like C++.

So if that's your own standard for what is weak, then you must also admit that Java and C# are ALSO weakly typed. But clearly you don't believe that, so you have some sort of logic problem here.

In my opinion, people see C++ differently because C++ code in the wild is fundamentally different. It's high performance and used in domains where that matters, so escape hatches are used more often than other langs.

However IMO the strictness/weakness of a language comes from the language itself. And both C++ and Java/C# provide static checks + runtime type checks with escape hatches.

The difference is that C++ code with raw pointers is (fairly) common.

comment 2y ago · link · parent

> That's incorrect, there's a use of the nullptr

No, there isn't.

> declared unsafe

Please, I have no patience for the purposefully obtuse. It's clear I was referring to other languages there.

Which, you failed to address. Probably because it was difficult, so you figured if you just said "I'm right" and elaborated nothing nobody would notice. Sorry, that doesn't work on people who are awake.

As I've said, you can argue that C++ is weakly typed but you MUST also address languages like C# and Java to make that argument. You haven't, so nobody will believe you when you say C++ is weakly typed.

comment 2y ago · link · parent

I'm sorry, you're just wrong. White men are represented. In almost every TV show, EVEN the ones who promote diversity. I mean take a look at Disney's new star wars shows. All incredibly diverse and guess what - each one has white men in it.

Again, same with the ads. Ads typically have multiple people in them. Usually at least one is white, typically more or most are white. But as I've iterated, white people are greedy. Anything less than 100% may as well be 0% to the eyes of a lot of white people. That's been the theme since the inception of the US.

comment 2y ago · link · parent

Definitely not, browser extensions like U-block origin are much better because they have the context of the browser and DOM access. So ads aren't just cut out, but the space where the ads would be are too. So no white blocks stopping your reading or ":( can't display this ad" nonsense.

comment 2y ago · link · parent

Yes, kind of. Cars do this for sure. Pretty much all data about your car, plus all your texts and whatnot, are sent over the cellular network. They've been doing it since 2G days, too.

comment 2y ago · link · parent

I think the reality is that the vast majority of media, period, is about and targeted to white people. If you were to take up ALL the media, you'd realize minorities are still very under represented.

Also it makes people feel good when they're represented. White men won't admit that, because for them they're always represented. And when they're not its a problem, so clearly even they understand the power of representation.

And, lastly, if you LOOK you can see white people are still in almost every ad. They're just not the only people in the ad. This is a problem of greed, the white man does not settle for anything less than 100%.

Keep in mind I'm saying this as a white man. The world is truly made for us and our success. On the off-chance it's not this one time, we need to be okay with that and learn to get over it.

comment 2y ago · link · parent

Turns out motivation is a uniquely human quality. I've heard countless stories of teachers who "saved my life" from people. Haven't gotten that same kind of response from EdTech endeavors.

comment 2y ago · link · parent

> intentional reading of bad faith

In my opinion, marketing relies on targeting people's initial guttural feelings. That's why car commercials always show the cool part of driving, to activate the monkey brain "ooo shiny!" mentality.

So, I think criticisms of how people feel are fair game. Meaning if someone doesn't have a logical argument that's fine to me - because marketing is emotional manipulation anyway, so if your emotions got manipulated wrongly then the marketing failed.

comment 2y ago · link · parent

C++ is not weakly typed, it's just a low-level language. Meaning you can directly interact with memory if you so choose. The same is true in Rust, and YES you can break the type system with unsafe code. However, we understand that this is not really enough to make the language weakly typed. Java and C# ALSO have this problem. You can make everything Object if you want. It'll compile, it'll run, and C#'s ArrayList class worked like this.

Also the above will not compile. Because compilers can actually detect if you set a pointer to nullptr and then use it. Here, you didn't use it so maybe the compiler won't complain. But in the general case yes it will complain.

You can also get Null references in C# and Java in this same method. You call some unsafe code that directly interacts with memory. That's allowed, and yes it breaks the type invariants.

Point being, if you truly want to argue C++ is weakly-typed then you'd also have to argue C# and Java are weakly-typed. Most people don't do that though, so it's just a matter of bias or familiarity.

comment 2y ago · link · parent

1. Aspartame is not new

2. Aspartame is safe and there's not a scientist on Earth who claims otherwise.

3. While we may not know NEW stuff, we do know old stuff. Sugar quite literally kills people. An alternative could, AND DOES, save lives.

comment 2y ago · link · parent

Claiming zero-calorie sweeteners, which by definition cannot contribute to weight gain as it's impossible, are "contributing to obesity" is a BOLD claim. I'm talking science-shattering hundreds of studies disproving bold.

Listen, you can't just make things up. Just because you feel as though something is too good to be true doesn't mean it actually is.

This is like those people who think Ozempic makes your eyes melt and stuff.

The problem is in capitalistic society "pain is gain" is ingrained since you left the womb. People often have trouble conceptualizing that you can get good results without suffering. People actually ENJOY the suffering because they think it directly translates into good stuff for them and their life.

It's not a healthy, or rationale, way to operate. Ensuring your own misery out of a desperate need to prove yourself and your work ethic is just self-destructive behavior. Sorry to be the one to tell you.

comment 2y ago · link · parent

I commute 15 hours a week. In Texas.

I see a few accidents a day. Nobody actually wants to drive really, we just do it because we have to. If I could teleport to work or even take a train I'd do it, and I'm not alone in that.

Point is, I don't feel comfortable betting on things where there's a large amount of outside influence. And no, insurance isn't betting. It's risk pooling, not betting.

comment 2y ago · link · parent

To be clear I'm not saying you personally are necessarily opposed to all changes. But, when I see people very obviously over-exaggerate, like "looking for a Utopia", that's the impression you give off. That you're ideologically opposed to this particular change, and not reasonably opposed to it. Like, the fact any amount of this change is happening at all is too much for you.

> people who actually live there

See, again, nobody is saying this should be a thing for everyone. Nobody is really going to target rural areas with any infrastructure changes because, well, nobody cares. And that's the draw of rural areas - you don't have that infrastructure. People don't live in towns of 2,000 people they want rich public accommodations, lol.

> don't have to deal with the consequences

Au contraire, you have it backwards. The Suburbs are the ones who do not have to deal with the consequences of urban sprawl. They're subsidized, on welfare, by the dense, walkable parts of the city. Because dense areas are simply more efficient and produce MUCH more taxes. That money is then taken and given to the suburbs, who cannot exist on their own.

> are tradeoffs

Sure there are. But this position of "we've tried nothing ever and we're all out of ideas" is lame. Sorry. There are trade-offs in our current status quo but because it's status-quo you refuse to acknowledge them as tradeoffs.

Again, nobody is claiming magic wand or Utopia. You have the expectation that we can make things better for pedestrians with absolutely no friction. And when the solutions don't meet the absurd expectations, YOU set for yourself, you deem the whoooole idea bad.

That, to me, is a mindset problem. In order to justify your need to maintain the status-quo you have to construct a logical framework where change can never be good, ever.

> push changes

Simple, we're not. These things are decided democratically and you're seeing more and more people talk about it because, well, they want it. Sorry if that makes you feel as though you're becoming a minority. I don't know what the future holds and maybe in 10 years everyone will be drooling over motor vehicles and concrete again. In which case, good for you.

The reality is these ARE being talked about by the people they affect. These aren't random outside forces. These are me, and others, living in our communities who want change in our communities. We don't want change in your community. Nobody cares about the boonies and that's the entire draw of the boonies. If you want people to start caring about you move out of the boonies. Then, I'm sure, you'd be very upset.

comment 2y ago · link · parent

No that's not what they mean. They mean you'd kind of assume someone who identifies as queer, or is at least knowledgeable enough on the community to participate in some ways, wouldn't be homophobic.

In practice this isn't the case, because you can use this as a shield. So for homophobic people it might be advantageous to enter the community in a way that causes the least amount of personal friction. Like, simply putting pronouns in your bio and doing literally nothing else is trivial - but the social benefit is not.

It's a big problem, because people who ARE non-binary or ARE bisexual or whatever then get a ton of backlash. Because those identities are the most common to be commandeered, so to speak. At least online.

comment 2y ago · link · parent

I think if people of a country have a standard for how companies should act that's fair game. If they don't want companies to do that stuff than the companies leaving or crying isn't a bad thing, it's accomplishing the goal.

comment 2y ago · link · parent

It sounds like you admit cars are awful, so awful you have to take measures to combat their awfulness. Like choosing a close place to live, running to combat the health effects, and even then you still get some awfulness, like traffic.

I hear these types of arguments all the time for all different things.

comment 2y ago · link · parent

I hear these complaints all the time about any conversation that involves making a change for the better.

At the end of the day, there's a lot of people that are fundamentally anti-progress. If it makes things better, they don't want it. Doesn't matter what it is past that. Their solutions to our problems are either that the problems don't exist, or if they do, we should do nothing and they'll solve themselves.

Look, nobody is looking for a utopia. Nobody expects that. But making small steps in a better direction is a good thing.

Look around you at your cities. Is this the best it could possibly get? Do you truly believe this is the apex of human society? I know you don't. Why, then, do you (and others) feel so ideologically opposed to making some amount of change? I just don't get it.

comment 2y ago · link · parent

Maybe zoning.

In arglinton, Texas, often called one of the least walkable cities on Earth, there's a requirement that each building has a parking lot proportional to it's occupancy. So if you build a 200 person building, you need a parking lot to handle 200 people. I can't remember the exact ratio, I doubt it was 1:1 like that.

So the parking lots are there by force, not convenience or cost.

comment 2y ago · link · parent

> Thousands of call center employees

Uh... you realize they were already algorithms, right? Meaning, they have a flow chart they follow. They don't make any decisions, they take input and respond to output.

The only reason they're not computer programs is because they NEED to be human. So the human on the other end trusts them. Even though everyone understands they have no free will or reasoning abilities (or if they use them they get canned).

AI doesn't fit that use case. Number 1 is because AI IS NOT algorithmic. So it's a liability to use. Number 2 is it's not human. Again, if you're going the no human route there's infinite cheaper, more reliable, faster, and overall better in every way programs you can use.

comment 2y ago · link · parent

> If the author was sufficiently confident in their claims

What? No.

I'm very confident in my driving skills. I'm a great defensive driver. But I won't bet on me not getting in a wreck this next year.

Because the real world is complicated and truly anything can happen. That doesn't mean you're right, that means you got lucky.

For example the Simpson's creators aren't clairvoyant geniuses, they just happened to get a lot of stuff right.

comment 2y ago · link · parent

> If you only want the AI to operate in a box, then you probably can code the decision tree of the box with more specificity and accuracy than a fuzzy AI can provide.

I've been saying this for the past couple of years. Yes AI is cool, but we already have computers and computer programs. Things that can be solved algorithmically, SHOULD be solved algorithmically. Because you WANT your business rules and logic to be as predictable and reliable as possible. You want to lessen liability, complexity, and amount of possible outcomes.

We already even see this with human customer support. They follow a script and flowchart. They're just glorified algorithms. Despite being human, they're actively told to not be creative, not think, and act as a computer. Because, as it turns out, from a business perspective that's usually very advantageous (where you can do it).

AI would never, or should never, replace those types of tasks.

comment 2y ago · link · parent

> There is no free lunch

This is just a heuristic, and honestly barely that. It's a belief.

Often there really is free lunch, and that's just progress. Sometimes I think people like to pretend otherwise because it's comforting to deny yourself of convenience.

Aspartame really is zero calories. And it really is safe. Yes, much safer than sugar. No, it doesn't magically make you gain weight. No, it doesn't cause cancer (feeding rats 500 coke bottles worth of aspartame doesn't count!). Yes, it's less carcinogenic than red meat.

From a health standpoint it's better in every single way. Of course taste is another thing all together, and subjective. Point being, yes things CAN just be better.

comment 2y ago · link · parent

Alan Turing was a computer scientist, and he did not care for this. I'd imagine he'd struggle a lot in Microsoft Word. He'd probably catch on fire from pure shock.

Computer science is boolean alegra, linear algebra, theory of computation, autonoma, algorithms, and data structures. It's not, necessarily, computer programming. That's just the modern implementation.

Naturally schools DO teach computer programming. But past that, not necessarily. I was taught Git and Unix systems, but not every student at every school was.

There's pros and cons to this approach. The biggest pro is that, well, tools change. I don't know how to use punch cards. If my education was really focused on that, the practical "do you know the tools" stuff you're talking about, that would suck for me today. The con is that, as you've noticed, some less motivated students barely know how to practically use a computer.

comment 2y ago · link · parent

Develop? Yes. Learn? No, I'd say. But you only learn to develop, not just for learning's sake.

comment 2y ago · link · parent

To be fair I'm sure any time after the agricultural revolution had performances or something.

Seriously, though, advertisement is a tumor on society. It's psychological manipulation we've allowed for profit purposes. I don't think we take it seriously enough. It's an addiction machine and a life waster, designed to ruin your brain slowly over time. I consider hyper-consumerism an addiction, but even if you look past that into food, tobacco, alcohol, and medicine you'll see "real" addiction.

Anyway, my pet theory is that if advertisement was simply banned we'd solve a lot of problems. Ones we don't even intend to solve.

comment 2y ago · link · parent

It's not an appeal to emotions, it's a logical argument.

You're saying "well okay it could negatively impact business".

I'm replying "that doesn't mean anything, and sometimes negatively impacting business is very good".

It's not enough to just say something. You need to explain WHY. So what? Who cares? If you don't answer that, I'm sorry, you don't have an argument and anyone wise would choose to not listen to you.

It's bad for business. Okay let's assume that's true. So what? What's the big idea? What's the cost versus the benefit?

comment 2y ago · link · parent

I would argue this argument goes for many things. Its an uncomfortable conversation. Many people exercise because they hate themselves. Many people avoid soda because they feel they need to be punished. Some people are self-destructive just because they think it's what they deserve.

Point being, in the grand scheme of things, its sometimes okay to do things for not so good reasons. And you won't save yourself with restriction necessarily. Part of the human condition is it feels good to feel bad. Some people take this way too far, and they won't even know they do it. They'll quit drinking not to be present, but to deprive themselves of that ounce of happiness.

1
5051525354