7,061 karma · joined Nov 18, 2024 (2y ago) · 4,562 submissions
comment 8h ago · link · parent
comment 1d ago · link · parent
comment 1d ago · link · parent
If you open the possibility of other notions of “the semantics” besides what the language spec lays out, then changing those semantics is an inherent part of an optimizer.
What people (IMO fairly reasonably) want is a different C language spec with less undefined behavior and compilers that follow that spec. But people don’t think about it clearly and skip major parts of that picture when complaining about it.
comment 1d ago · link · parent
I agree that dependencies are often taken far beyond what they should be. But I don’t see that as central to the issue. Some dependencies are inevitable. If those dependencies are open source then they’re going to have some variant of your quoted disclaimer and no explicit guarantee that they have any particular security posture. Even if they aren’t* open source, they probably have something like that in their license agreement. Is the expectation that either I give up on security, or I get custom agreements for (or directly maintain) every part of my software stack from the hypervisor on down?
It seems like your attitude is either incompatible with software existing on networks, or incompatible with collaboration and open source. I doubt that’s what you mean but I don’t see how you envision this working.
comment 1d ago · link · parent
comment 1d ago · link · parent
I’m talking about the question of what should be covered by the official semantics. That’s inherently subjective and a matter of opinion.
Gcc’s optimizer does not accept changing language-level semantics based on which optimizations are performed. That the above comment thinks it does means that the commenter has a different notion of what should count as “the semantics” from what the language spec says. Which is a perfectly legitimate opinion, but if you take that position then you have to accept that other people will have other ideas of what should count, and therefore any optimizer might change “the semantics” of code according to at least some of those ideas.
comment 1d ago · link · parent
int *x = malloc(4);
*x = 42;
int *y = realloc(x, 4);
*y = 43;
printf(“%p %d %p %d\n”, x, *x, y, *y);
This may well print the same address for x and y while printing different values for x and y. Despite having the same bitwise value, x was invalidated by the call to realloc and it became illegal to access x. Thus the compiler is free to assume that x still holds the value previously assigned to it (or make demons fly out of your nose when you try to read from it), because a pointer isn’t just a memory address, it has meaning tied to where you got it and what you did with it.comment 1d ago · link · parent
C and C++ happen to have a particularly restrictive view on what “the semantics” of a program really are, such that there are a lot of things you can write in syntactically-legal C that officially erase the semantic meaning of the code. Within that definition of the program’s semantics, gcc’s optimizer is not supposed to change them, and any such change would be a bug. You’re taking a more expansive view of program semantics than the actual language specifies. If you do that, then any optimizing compiler is going to consider it to be acceptable to violate your special bespoke definition of them.
comment 1d ago · link · parent
Can we talk about the actual issue at hand instead of whatever this is? You’re not helping the discussion by veering off like this and you’re not helping your own argument either. “A weekend project that got dropped on GitHub is use at your own risk, therefore PHP should ignore the flood of vulnerabilities and just go at their own pace” is not a serious statement.
comment 1d ago · link · parent
Security isn’t some abstract thing. You’re playing with people’s lives. It’s not something you have to worry about if your projects are unused or have no potential exposure to malicious data. But if your projects are used and do get exposed to malicious data, then you do have a responsibility to keep up with security issues as they’re reported.
comment 1d ago · link · parent
Just look at how the world has handled climate change. Even the most enthusiastic countries took absolutely minimal action, the best international framework we got was some nonbinding agreements, and now even that is falling apart. And that’s for something where there was broad consensus that a particular outcome was undesirable, albeit much less consensus about how bad it would be or what should be done about it. But with AI you don’t even have that. Lots of people think it’s fantastic and want to be balls to the wall pushing it forward.
How many successful international agreements limiting technology have here ever been? There’s the CFCs success story. Anything else? Governments couldn’t even stop the proliferation of nuclear weapons.
comment 1d ago · link · parent
comment 1d ago · link · parent
Lots of people like using drugs. We might be better off as a society if everybody stopped using them, but that’s not a universal opinion. And one person quitting drugs doesn’t make a dent in the problem anyway, so why bother unless you want to quit for your own personal reasons?
Pushing a train carriage furthers a goal that everyone can agree on (very few people think it’s good to leave someone trapped under a train) and each person pushing can see that they’re helping.
AI is firmly in the former category. There’s nothing close to consensus on what the desired outcome would be, and among those who do agree, there’s no sense that individual action actually makes a difference.
comment 2d ago · link · parent
The most obvious is that it was ugly as hell. Before Tesla showed that a normal looking EV could sell well, manufacturers seemed to think they needed an EV to look like an EV, which somehow meant looking weird. This was wrong but it took Nissan a very long time to figure that out.
They had terrible range. This was understandable, maybe unavoidable, in the early days, but they didn’t keep up. Their longer range trim had barely 200 miles of range in 2024!
And then they had terrible technology around the battery. They were still using air cooling until 2025. This severely limited charging speeds (if charging efficiency is 95%, then 100kW charging has to reject 5kW of heat which does not come easily!) and, worse, made the battery degrade much faster. This actually damaged not just the Leaf but the entire industry. It was the most common EV for years and a whole lot of people learned that an EV battery is only good for a few years before the range tanks and you need an expensive replacement. This is not generally true, but it was often true of the Leaf.
comment 4d ago · link · parent
For now, same old stuff. Go to work, keep up with the latest changes, get the kids to school, plan to send them to college. Hard to say if that's the right move at the moment, but what else is there?
comment 4d ago · link · parent
Then you can talk about how this optimal program behaves. If you double the size of the input (people can understand this in terms of file size), does the time double, or quadruple, or...? I wouldn't mind trying to explain NP to a lay audience. I think you could get it across pretty well.
You can probably do Monty Hall by enumerating all of the possibilities. There are only nine possible combinations of where the car is and which door you choose. The difficulty, I think, comes from overanalyzing the problem, and a simpler explanation actually makes the job easier.
Relativity is a goo example though. I don't understand relativity beyond the most superficial level. As far as I can tell, the teenager-level explanations of relativity are not right. They convey some aspects of relativity on a conceptual level, and even some basic things on a mathematical level, but they're omitting important aspects of it. You might read A Brief History of Time (or whatever your favorite explainer is) and come away with an understanding of relativity, but your understanding will be some combination of wrong and extremely incomplete.
comment 4d ago · link · parent