Hacker Newsnew | past | comments | ask | show | jobs | submit | repstosb's commentslogin


The problem is that C++ stores the vtable inside the object, and the objects over which you're iterating often weren't allocated contiguously. Even when they are, if each object contains lots of other data, the vtables won't necessarily be close to each other. That means that invoking virtual functions inside a loop means a lot of cache misses, and since the data you're fetching will be a branch target, it's often hard to find other useful work to accomplish during the memory delay cycles. However, in a language where you can store a relatively tight array of object IDs (or even use tag bits in the this pointer), now you have a much higher cache hit rate on the indexes to your equally tight dispatch table, which will also have a high hit rate.

It's a fair amount of extra work, but in a hot loop it's sometimes worth it. "You can often solve correctness problems (tricky corner cases) by adding an extra layer of indirection. You can solve any performance problem by removing a layer of indirection."


And how does one become a maintainer, if there's no way to contribute from outside? Even if there's some extensive "application process", what is the motivation for a relatively new user to go through that, and how do they prove themselves worthy without something very much like a PR process? Are we going to just replace PRs with a maze of countless project forks, and you think that will somehow be better, for either users or developers?

If I wanted to put up with software where every time I encounter a bug, I either have no way at all to report it, or perhaps a "reporting" channel but little likelihood of convincing the developers that this thing that matters to me is worthy of attention among all of their competing priorities, then I might as well just use Microsoft products. And frankly, I'd rather run my genitals though an electric cheese grater.


You get in contact with the current maintainers and talk to them. Real human communication is the only shibboleth that will survive the AI winter. Those soft skills muscles are about to get a workout. Tell them about what you use the software for and what kinds of improvements you want to make and how involved you'd like your role to be. Then you'll either be invited to open PRs as a well-known contributor or become a candidate for maintainership.

Github issues/prs are effectively a public forum for a software project where the maintainers play moderator and that forum is now overrun with trolls and bots filling it with spam. Closing up that means of contributing is going to be the rational response for a lot of projects. Even more will be shunted to semi-private communities like Discord/Matrix/IRC/Email lists.


If the goal is truly "clarity", then I fail to see how this leads to more readable programs than Knuth's Web (or cweb for a more practical implementation).

If you really mean "C/C++, but with the sharp pointy bits filed down," then I fail to see what it adds over MISRA.

The bottom line is that we've had "clarity-first" languages for decades; the reason they're not more widely used is not simply that no one has tried this, nor that programmers appreciate murky code.


Also pretty much every company with a "headquarters" of some kind in Ireland, notoriously including Apple.

https://en.wikipedia.org/wiki/Double_Irish_arrangement


And citizens benefit from the taxes paid by non-citizen immigrants, whether documented or undocumented. Not just income and payroll taxes that might be dodged by under-the-table arrangements, but sales taxes, property taxes (perhaps paid indirectly via rent to a taxpaying landlord), the consumer share (nearly 100%) of tariffs, etc. And much of that tax base is spent on benefits and services that are not accessible to taxpaying non-citizens.

So from that standpoint, immigrants are a /better/ economic deal for the public than children are. At the end of the day, though, it shouldn't matter where people were born if they're contributing to society, and the grandparent post is 100% correct that the whole debate is stupid.


Sales tax is actually paid by the vendor, they just pass the cost along. The landlord pays the property tax, they just pass the cost along.

It is absolutely impossible for an undocumented alien to meaningfully contribute towards their tax burden in any meaningful way.


Oh, in that case no w-2 employee pays income taxes, their employer does. I guess we’re all just mooches on society and only the company owners do anything.


Ah, you arrived at the point. Undocumented people don't pay taxes in a W2.


No, they just pay sales tax and other taxes on use. I was being sarcastic because you are fundamentally incorrect and as the other comment said, engaging in sophistry.

Disrespectfully, get fucked.


Oh man, struck a nerve here huh. We escalated from sarcasm to rude quickly.

I enjoy both fucking and getting fucked, I shall take you up on that.

Have a nice day!


> Sales tax is actually paid by the vendor, they just pass the cost along. The landlord pays the property tax, they just pass the cost along.

This is sophistry. Ultimately the tax is paid by the person that brings their money to the table.


The "founding engineers" behind Facebook and Twitter probably didn't set out to destroy civil discourse and democracy, yet here we are.

Anyway, "full control over your keys" isn't the issue, it's the way that normalization of this kind of attestation will enable corporations and governments to infringe on traditional freedoms and privacy. People in an autocratic state "have full control over" their identity papers, too.


That's not a great example, since memcpy() already has all the information it needs to determine whether the regions overlap (src < dest + len && dst < src + len) and even where and by how much. So pretty much any quality implementation is already performing this test and selecting an appropriate code path, at the cost of a single branch rather than 8x as many memory operations.

The real purpose of restrict is to allow the compiler to cache a value that may be used many times in a loop (in memcpy(), each byte/word is used only once) in a register at the start of the loop, and not have to worry about repeatedly reaching back to memory to re-retrieve it because it might have been modified as a side effect of the loop body.


>> was it the unions or executives that decided to offshore manufacturing? >Neither. It was consumers, who prefer lower prices.

Right, because every executive who pursued offshore manufacturing was thinking, "gosh, how can I deliver even lower prices and better value to my customers?", and not "OK, we've shown the market will pay $X for product Y, how can I cut my costs and free up more money for bonuses and cocaine?"

Graphs of price indices (aside from a few sectors such as electronics where it was the core technology that improved, not labor efficiency) and wages over the last 50 years clearly show that the bulk of any offshoring savings were not passed along to consumers or front-line workers.


> Right, because every executive who pursued offshore manufacturing was thinking, "gosh, how can I deliver even lower prices and better value to my customers?", and not "OK, we've shown the market will pay $X for product Y, how can I cut my costs and free up more money for bonuses and cocaine?"

Suppose it used to cost you $1 to make something in the US that you had been selling for $1.50. The cost of domestic real estate and other things goes up, so now to make it in the US it costs you $1.60. If you sell for $1.50 you're losing money and to have your previous gross margin percentage you'd have to sell for $2.40. Meanwhile it still costs $1 to make it in China and one of your competitors is doing that and still selling it for $1.50.

Your options are a) don't raise prices, lose $0.10/unit and go out of business, b) raise prices, lose all of your sales to the company who still charges the old price and go out of business, or c) offshore manufacturing.

The only way out of this is to get the domestic costs back down, which is a matter of changing the government policy over zoning rules etc.

> Graphs of price indices (aside from a few sectors such as electronics where it was the core technology that improved, not labor efficiency) and wages over the last 50 years clearly show that the bulk of any offshoring savings were not passed along to consumers or front-line workers.

Are these graphs being adjusted for the increasing cost of things like domestic real estate having to be incorporated into the prices of everything? Even if you make it in another country you still have to pay for a domestic warehouse or retail store.


That's actually a terrific example, because the company already had a working, field-tested manually controlled version of their product, but they wanted a computer-controlled version to relieve radiologists of all of the drudgery and opportunities for error in the manual setup. So the design spec was to "faithfully replicate the manual setup procedures in a microcontroller," which was achieved. The problem was that the UI was utter dogshit, the training materials were poor (you can't have Marketing say "hey this computer handles all the details for you!" and then expect customers to pore page-by-page through the reference manual), and most clinics weren't really enforcing or QAing the operator training anyway. And since "the computer has a handle on it," the radiologists and senior techs who were supposed to be second-checking everything basically abdicated that responsibility, driven in part I'm sure by management that expected them to now have more "free hours" for other activities that Make Line Go Up. And nobody really raised a flag that this seemed troubling until multiple children died, and at the end of the day a lot of people could say "well, it wasn't my fault, I did what I was told to do" and sort of believe it.

If anyone doesn't think all of that is going to happen again on a massive scale as companies embrace GenAI, HAHAHAHAHAHAHA. AI will change a lot of things, but it won't fix human nature.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: