Your just asserting, not arguing. Maybe I'm doing the same. That's pointless. How about details.
One income today buys one car which is much nicer than average from the 60s, especially safety-wise (compare the Honda civic, for example - much much safer, corners better than most cars from the 60s (than any car, in the rain), good legroom, etc)), and emissions in the 60s were something like 100000 times worse than ULEV cars today.
One income today easily buys a washing machine, a TV, a stove, a fridge, and even a dishwasher! We expect all that today and don't even think about it, but they were the ideal in the 50s, and still not everywhere in the 60s.
Health care is of course far better - just look at life expectancy.
I'm struggling to see in what particular, other than tuition, the 60s were better on one income?
Why are people so devoted to romanticizing the 1960s? They were not better times, not even if you were lucky enough to be a white male.
Seriously, other than the ongoing, ridiculous tuition bubble, there's no aspect of life in which the 60s were better (unless you count "women knowing their place" or "black men knowing their place" as better). If you take the median of the higher income in each family today, what that buys was far beyond what people had in the 60s, including all sorts of wonders unavailable at any price 50 years ago. Better life expectancy, a larger place to live, a vastly safer car, breathable air in cities, a phone you can carry with you, a bewildering variety of entertainment. Heck, a middle class family today has a maid and a gardener, who each have longer life expectancy than the average in the 60s.
You're not thinking that through. Life expectancy among black people has risen because of their access to health care
Right: higher standard of living.
If all the fancy machines and diagnostic technologies that you point to as being such an example of higher standard of living were really worth it, wouldn't you see a rise among the wealthy, who have the greatest access to those technologies?
Right: the non-rich have a higher standard of living. Actually the primary thing technology does is bring the price of good and services once available only to the very rich down to where most people can afford them. That's what technology is, really: efficiency.
If you want to change your argument to: 1% don't have better health care now than 50 years ago, I highly doubt that too, but it certainly wasn't your original point.
There is, tragically, no doubt that the median earner has experienced a decline in his standard of living.
There is simply no area of life, other than education (as we're towards the end of a ridiculous tuition bubble), in which you have a lower standard of living today. Better goods today, better services today, better health care today - romanticizing the 60s is simply ignoring the reality. Heck, even with the tuition bubble, there's probably better education today if you're not a white male!
People have just memorized this "it's getting worse" factoid, and though it's wrong in every detail, it's a tribal identification signal to believe this, and so they won't let go of it. I dunno, being happy and successful seems like a better life strategy to me than believing false things that only serve to make one miserable and hold one back.
If you could have a job today, or an infinite supply of everything you desired, the latter would be preferable, and about as relevant.
We live in an age of wonder and opportunity, but all these people sit around bitching and unhappy with life because someone else has it better. Envy is a nasty condition, good for no one.
No one is poor because someone else is rich - it just doesn't work that way. It's also a bit disingenuous to suggest that "the income of the rich has risen" - the income of most individuals who were rich has in fact fallen. The bar to qualify as "rich" has risen, to be sure, but it's not the same people every year.
Have you tried outsourcing within the US? We have to because of certain regulations? It's the same. Nothing to do with India or Indian outsourcers (or outsorcerors!). The business model of an outsourcing company is very similar to that of your building contractor. They'd like to stay on till the next big project is lined up and then they flee as fast as they can.
This can't be emphasized enough. Ignore the racist cries that the brown-skinned programmers aren't as good. The simple truth is: outsourcing blows goats. Hire your own, or move everything to the cloud if you must save a few bucks (and hire your own to stay on top of that).
No, I don't get your point. life expectancy, in the US has risen sharply since the 60s, especially if you're black. Medicine costs more, in an adjusted way, but we get more for it. Sure, it's not the difference between a 1960s computer and a smart phone, but it's still a remarkable improvement.
People want more. People want more over time, people want more than they have, and especially people want more than their neighbors have! ("Sure my life is better, but that other guy's life improved more, so the system is broken!") That will certainly keep us employed even after all the basics are made with no labor and are very cheap as a result. What will we all be doing? More.
You could work the same hours (per family) today and still have a vastly higher standard of living than people had in the 60s. You might have a lower standard of living than your neighbors, with 2 earners, and that's mostly what people care about, but that's a relative, not absolute, measure. And we are absolutely doing better now.
World population and consumption rate is well beyond the sustainable threshold. Population reduction is going to happen anyway, the soft or the hard way.
Reverend Malthus? Aren't you dead? You've been wrong for about 130 years now, can't you take a hint?
Technology changes things. That's rather the point of technology, really. WTF is with all these Luddites on/.?
a lot of people today are hopelessly unemployable and basically incapable of caring for their family
Really? They can't complete the vocational training to be a plumber, or a welder, or an HVAC repairman? Learn to repair A/Cs, live in the South, and you won't starve, that's for sure!
Much more that "mindless menial labor" went down the sinkhole, and too little sprung up to replace it.
All those carpenters who made furniture by hand - where are they going to find work now that furniture is being made cheaply on assembly lines? All those poor cobblers, where will they find work now that shoes are being made on assembly lines? All those poor coopers - why, I can imagine a future where barrels aren't even made of wood! All those poor blacksmiths, no one can even afford hand-smithed equipment any more! And even farriers will be hard hit if this no auto-mobile thing takes off!
Sure, you can take FDRs approach and extend a short downturn needlessly by 15-20 years. The problems of the 30s were deep, structural, and one can take different lessons from them depending on one's point of view.
But anyhow, saying you can't meaningfully measure debt in terms of years of income is total rubbish. I'm sure you believe the answer is to just give everyone $10000000000000000000 of printed money, making everyone rich for life. Well, it's been tried before.
It's all about how much stuff we collectively produce, not the size of the money supply (though high inflation makes lots of day-to-day stuff a pain in the ass, and is best avoided), but carrying debt can only make things worse.
I recommend entertainment as a profession. I hear there's an IQ cap of 60 for Hollywood screenwriters.
IQ isn't so important as you might think - you don't have to be an engineer to learn a skilled trade, and plenty of trades aren't focused on abstract reasoning or creativity.
Sure, eventually we might not need plumbers, or welders, or A/C repairmen, or someone t give a sponge bath, but by then we'll have the luxury to carry 20%, likely 80%, of the population with need of their labor to provide for us all - work will be a matter of psychological health, not productivity eventually. But I won't live to see it; that's not this generation's problem to solve.
Health care? Sure, 1960s health care is dead cheap - no MRIs, no PET scans, no CAT scans, no tonsils, no modern drugs. We're as far from 1960s medicine is it was from medicine before anesthetic and antibiotics.
Sure, we're in the middle of a tuition bubble, it's as insane as the previous bubbles and will only get worse till it pops.
And, again, I don't care how much a 60s family paid for a car, when that car had no modern safety features, emissions controls, performance, or any of the other things that have made cars better over the past 50 years. Technology is a good thing - really it is. Why do all the Luddites keep posting on/.?
Well, when you invent the grandparents that don't need tech handholding, I'll be lined up outside your store to buy a pair!
Meanwhile, I just spent a weekend hanging a TV from a wall for a relative who's actually pretty handy, but will be recovering for surgery for some time. People will always need help of one sort or another from one another, and there's always ways in which skilled labor can make each of our lives better.
Robots will replace unskilled labor - and more power to them - but those jobs suck anyway.
Tell me, do you really believe that a family of four could live like that today on one salary?
Absolutely 100% they could. You can afford a 1960s-quality car and a tiny house as was normal then with 1960s-quality plumbing and electricity, 1960s-quality appliances, no electronic gadgets of any kind, 1960s-quality health care, and so on. Don't romanticize it - it was not at all a high standard of living compared to what you can buy for a single median income today.
So, you see us going to an all-barter economy? When? And what are you going to use to buy food? You going to trade home stereo installations for a loaf of bread?
Poor people in America have access to effectively unlimited calories already. Food is damn cheap - why would it get more expensive? Why would that multi-century trend suddenly reverse? Because there aren't any manufacturing jobs? (They are almost none today). Because the jobs that currently pay minimum wage go away?
I honestly can't see where these doomsayers are coming from. You heard the same shit with every revolution in automation, wrong every time. Making stuff more efficiently means... everyone has more stuff.
The stuff we each have is just the total of all stuff made divided between us, and divided fairly evenly. The 1% don't each 10x as much food, or typically own 10 cars, or drink 10x as much beer, or whatever - they barely make a difference in the amount of stuff divided among the rest of us. You seem to be confusing money with stuff - don't do that.
GDP is quite relevant, because tax revenue has never stay above 19% of GDP for long, no matter the tax scheme tried. If you want to pay down, or even just service, that debt, your limited by GDP. Making the GDP grow is a great answer, but one that IMO the government does best by getting out of the way.
You'd be amazed how much some people struggle with technology. Much as I can't get the simplest, easiest stuff right with interior decorating.
And anyhow, by what possible process can dropping the cost of manufactured goods to next to nothing make life worse? There are very few manufacturing jobs now, so not much change when they vanish. There's a recent surge in maid and gardener jobs, but that's a first-gen immigrant wave, and their kids won't need that sort of work. Most people already do work that's not so easily automated. And that majority will consume new services when their budget goes further. Just like every previous automation revolution in history.
Life is always better while you're maxing out your credit cards. It's not till the "paying them down" part happens that it sucks. And it's going to suck, but I expect only to whatever extent one has a fixed-in-dollars benefit when the dollar loses, say, half its value (and anything "inflation-adjusted" by an inflation number picked by the government will be nearly as sucky).
Fortunately, there are just a couple bubbles left for us to suffer through: the tuition bubble, and the sovereign debt bubble. Won't be worse than the last couple, I don't think (not that that's anything to look forward to, but no reason to build a bunker).
It's possible to have capitalism without having a strong central government handing out favors and earmarks to campaign contributors: stick to a weak central government.
Product quality and fraud regulation: good. Monopoly granting and price controls: bad.
As with everyone else who wants to reduce the population, I say to you "you first".
were able to get by and make progress only having one person in the family working full time.
You can have a much higher standard of living today with one person working than you could in the 60s! Tiny tract house, one car for the family, one TV, a washing machine, and a refrigerator, and you have what families were aiming for in the 50s, and largely had by the 60s.
Expectations have risen faster than earning power, and that's great. Women wanted the option of working outside the home, and that's great. These are not problems with the system.
What happens when we get to a point where we just don't need everyone to work in order to provide the goods and services people want?
People always want more. You can always achieve full employment with people helping their neighbors. That's not a system that works unless robots make all the basics, but if that was the case, I could certainly make enough helping people install their home theater systems to have them help me with interior decorating, and so on.
BTW, you can use <code> or <tt> on Slashdot (I find the latter works better for indenting).
Thoughtful post. Couple of notes. You seem to worry about a mix of non-trivial constructors and existing code, but of course for all existing code the constructors are trivial. You can't quite compile C code as C++ and get exactly the same object, but it's pretty close (still, not 100% so of course you couldn't blindly do it for a large code base).
As far as placement new, well, I guess it depends on what you're doing with slab allocation. We were hyper-paranoid about dangling pointers and slot re-use, rather than trying to count clock cycles, so everything that was allocated in slabs had meta-data before it anyway, so delete knew what class it was working on. (Every function argument that was a pointer to an important type was checked that it still pointed to an instance of that type, that the instance hadn't been freed, and that the generation number of that instance was as expected. We caught so many bugs that way.)
As far as locks - of course there's no one pattern that fits every use case, but the "try to get the lock, if we get it, use the locked object, then whatever you do be damn sure to release any lock on the way out" is a really common pattern, and one that junior programmers somehow manage to screw up from time to time. Turning this:
get_lock_a(); x = find_object_in_a(); if (! x)
goto release_a; get_lock_b(); y = find_object_in_b(); if (! y)
goto release_b;// do stuff release_lock_b();// do more stuff release_lock_a();// do even more stuff return 0; release_b: release_lock_b(); release_a: release_lock_a(); return -EINVAL;
into this:
Lock lock_a(a); x = find_object_in_a(); if (!x)
return ERROR;// gasp, horror, return in the middle! Lock lock_b(b); y = find_object_in_b(); if (!y)
return ERROR; // do some stuff; return 0;
Is more clear for the missing boilerplate, and requires far less demanding code reviews. Too much culture shock for traditional C kernel guys though, I guess.
It's probably also worth pointing out that in many (all?) contexts these days, security trumps a doubling of performance. We're none of us perfect - but I never released a resource leak in the 12 or so years I did low-level stuff. And it wasn't because I was the unerring master of matching alloc at the top with free at the bottom! You name a typo that compiles, I made it! But there are coding styles less demanding (and less tedious), by eschewing the boiler plate that must be perfect every time.
If an adversary is capable of obtaining the executable of a program, they can also reverse engineer that same executable. It may take a lot of effort, but it is always achievable.
Well, you can also brute force a 256-bit key. It may take the lifetime of the universe, squared, but it is achievable.
The whole point of this technology is that the computer executing the code doesn't have the source or data in the clear.
There's some existing work designed for databases that work just this way. I send "the cloud" and encrypted query that causes the server to sum a column in some encrypted table and return me the encrypted result all without the server having any keys. It's all manipulation of encrypted data in such a way that you return the manipulated result without any information leaking - even to the server doing the manipulation.
And, of course, once you have a few primitive operations, you can build a Turing-complete system. Performance is the thing though. The first approach I saw took seconds to increment a counter or somesuch, IIRC, just really unworkably slow. But it seems all it takes to make all of this work is sufficient performance gains, so sure, I can see it in time.
Not an excuse to write bad software. How hard is it to ask about personal name and family name and default to whatever's most common to your userbase, so that most people can still just click next? And for goodness sake, support Unicode in names.
And you do realize the Hispanic two-last-names thing is part of Western culture, right? And that the Dutch, also part of Western culture, don't have two last names, but many have a space in their last name? And that apostrophes show up commonly in Irish names, which, as far as I can tell: still Western culture.
Oh, yeah, immutable data structures, those work great for code that runs on a whiteboard.:p I just spent a year cleaning up and refactoring code where someone thought immutable data structures were clever - it's hard to make code run unacceptably slow without being I/O or lock bound, but spend enough time copying data around in code that was CPU-intensive anyhow, and you can manage it!
Anyhow, I've never seen a large code base, written and maintained by the usual diverse range of developer competencies, where it was safe to proceed after unwinding too far "such programs work perfectly reliably, they simply require some more forethought" indeed. In my current case, restarting actually will help, because of the way in-memory caching was done (which design required more forethought than it was given).
Man, it seems like too much of my recent career has been spent re-doing someone's "oh so clever" idea, instead in the most straightforward and obvious way, and gaining a 100x performance increase, or a 10x memory improvement, or getting horizontal scalability by abandoning some technology that some developer was just in love with, and would not let go of, despite it's inability to scale out.
Your just asserting, not arguing. Maybe I'm doing the same. That's pointless. How about details.
One income today buys one car which is much nicer than average from the 60s, especially safety-wise (compare the Honda civic, for example - much much safer, corners better than most cars from the 60s (than any car, in the rain), good legroom, etc)), and emissions in the 60s were something like 100000 times worse than ULEV cars today.
One income today easily buys a washing machine, a TV, a stove, a fridge, and even a dishwasher! We expect all that today and don't even think about it, but they were the ideal in the 50s, and still not everywhere in the 60s.
Health care is of course far better - just look at life expectancy.
I'm struggling to see in what particular, other than tuition, the 60s were better on one income?
Why are people so devoted to romanticizing the 1960s? They were not better times, not even if you were lucky enough to be a white male.
Seriously, other than the ongoing, ridiculous tuition bubble, there's no aspect of life in which the 60s were better (unless you count "women knowing their place" or "black men knowing their place" as better). If you take the median of the higher income in each family today, what that buys was far beyond what people had in the 60s, including all sorts of wonders unavailable at any price 50 years ago. Better life expectancy, a larger place to live, a vastly safer car, breathable air in cities, a phone you can carry with you, a bewildering variety of entertainment. Heck, a middle class family today has a maid and a gardener, who each have longer life expectancy than the average in the 60s.
You're not thinking that through. Life expectancy among black people has risen because of their access to health care
Right: higher standard of living.
If all the fancy machines and diagnostic technologies that you point to as being such an example of higher standard of living were really worth it, wouldn't you see a rise among the wealthy, who have the greatest access to those technologies?
Right: the non-rich have a higher standard of living. Actually the primary thing technology does is bring the price of good and services once available only to the very rich down to where most people can afford them. That's what technology is, really: efficiency.
If you want to change your argument to: 1% don't have better health care now than 50 years ago, I highly doubt that too, but it certainly wasn't your original point.
There is, tragically, no doubt that the median earner has experienced a decline in his standard of living.
There is simply no area of life, other than education (as we're towards the end of a ridiculous tuition bubble), in which you have a lower standard of living today. Better goods today, better services today, better health care today - romanticizing the 60s is simply ignoring the reality. Heck, even with the tuition bubble, there's probably better education today if you're not a white male!
People have just memorized this "it's getting worse" factoid, and though it's wrong in every detail, it's a tribal identification signal to believe this, and so they won't let go of it. I dunno, being happy and successful seems like a better life strategy to me than believing false things that only serve to make one miserable and hold one back.
If you could have a job today, or an infinite supply of everything you desired, the latter would be preferable, and about as relevant.
We live in an age of wonder and opportunity, but all these people sit around bitching and unhappy with life because someone else has it better. Envy is a nasty condition, good for no one.
No one is poor because someone else is rich - it just doesn't work that way. It's also a bit disingenuous to suggest that "the income of the rich has risen" - the income of most individuals who were rich has in fact fallen. The bar to qualify as "rich" has risen, to be sure, but it's not the same people every year.
Have you tried outsourcing within the US? We have to because of certain regulations? It's the same. Nothing to do with India or Indian outsourcers (or outsorcerors!). The business model of an outsourcing company is very similar to that of your building contractor. They'd like to stay on till the next big project is lined up and then they flee as fast as they can.
This can't be emphasized enough. Ignore the racist cries that the brown-skinned programmers aren't as good. The simple truth is: outsourcing blows goats. Hire your own, or move everything to the cloud if you must save a few bucks (and hire your own to stay on top of that).
No, I don't get your point. life expectancy, in the US has risen sharply since the 60s, especially if you're black. Medicine costs more, in an adjusted way, but we get more for it. Sure, it's not the difference between a 1960s computer and a smart phone, but it's still a remarkable improvement.
People want more. People want more over time, people want more than they have, and especially people want more than their neighbors have! ("Sure my life is better, but that other guy's life improved more, so the system is broken!") That will certainly keep us employed even after all the basics are made with no labor and are very cheap as a result. What will we all be doing? More.
You could work the same hours (per family) today and still have a vastly higher standard of living than people had in the 60s. You might have a lower standard of living than your neighbors, with 2 earners, and that's mostly what people care about, but that's a relative, not absolute, measure. And we are absolutely doing better now.
World population and consumption rate is well beyond the sustainable threshold. Population reduction is going to happen anyway, the soft or the hard way.
Reverend Malthus? Aren't you dead? You've been wrong for about 130 years now, can't you take a hint?
Technology changes things. That's rather the point of technology, really. WTF is with all these Luddites on /.?
a lot of people today are hopelessly unemployable and basically incapable of caring for their family
Really? They can't complete the vocational training to be a plumber, or a welder, or an HVAC repairman? Learn to repair A/Cs, live in the South, and you won't starve, that's for sure!
Much more that "mindless menial labor" went down the sinkhole, and too little sprung up to replace it.
All those carpenters who made furniture by hand - where are they going to find work now that furniture is being made cheaply on assembly lines? All those poor cobblers, where will they find work now that shoes are being made on assembly lines? All those poor coopers - why, I can imagine a future where barrels aren't even made of wood! All those poor blacksmiths, no one can even afford hand-smithed equipment any more! And even farriers will be hard hit if this no auto-mobile thing takes off!
Sure, you can take FDRs approach and extend a short downturn needlessly by 15-20 years. The problems of the 30s were deep, structural, and one can take different lessons from them depending on one's point of view.
But anyhow, saying you can't meaningfully measure debt in terms of years of income is total rubbish. I'm sure you believe the answer is to just give everyone $10000000000000000000 of printed money, making everyone rich for life. Well, it's been tried before.
It's all about how much stuff we collectively produce, not the size of the money supply (though high inflation makes lots of day-to-day stuff a pain in the ass, and is best avoided), but carrying debt can only make things worse.
I recommend entertainment as a profession. I hear there's an IQ cap of 60 for Hollywood screenwriters.
IQ isn't so important as you might think - you don't have to be an engineer to learn a skilled trade, and plenty of trades aren't focused on abstract reasoning or creativity.
Sure, eventually we might not need plumbers, or welders, or A/C repairmen, or someone t give a sponge bath, but by then we'll have the luxury to carry 20%, likely 80%, of the population with need of their labor to provide for us all - work will be a matter of psychological health, not productivity eventually. But I won't live to see it; that's not this generation's problem to solve.
Health care? Sure, 1960s health care is dead cheap - no MRIs, no PET scans, no CAT scans, no tonsils, no modern drugs. We're as far from 1960s medicine is it was from medicine before anesthetic and antibiotics.
Sure, we're in the middle of a tuition bubble, it's as insane as the previous bubbles and will only get worse till it pops.
And, again, I don't care how much a 60s family paid for a car, when that car had no modern safety features, emissions controls, performance, or any of the other things that have made cars better over the past 50 years. Technology is a good thing - really it is. Why do all the Luddites keep posting on /.?
Well, when you invent the grandparents that don't need tech handholding, I'll be lined up outside your store to buy a pair!
Meanwhile, I just spent a weekend hanging a TV from a wall for a relative who's actually pretty handy, but will be recovering for surgery for some time. People will always need help of one sort or another from one another, and there's always ways in which skilled labor can make each of our lives better.
Robots will replace unskilled labor - and more power to them - but those jobs suck anyway.
Tell me, do you really believe that a family of four could live like that today on one salary?
Absolutely 100% they could. You can afford a 1960s-quality car and a tiny house as was normal then with 1960s-quality plumbing and electricity, 1960s-quality appliances, no electronic gadgets of any kind, 1960s-quality health care, and so on. Don't romanticize it - it was not at all a high standard of living compared to what you can buy for a single median income today.
So, you see us going to an all-barter economy? When? And what are you going to use to buy food? You going to trade home stereo installations for a loaf of bread?
Poor people in America have access to effectively unlimited calories already. Food is damn cheap - why would it get more expensive? Why would that multi-century trend suddenly reverse? Because there aren't any manufacturing jobs? (They are almost none today). Because the jobs that currently pay minimum wage go away?
I honestly can't see where these doomsayers are coming from. You heard the same shit with every revolution in automation, wrong every time. Making stuff more efficiently means ... everyone has more stuff.
The stuff we each have is just the total of all stuff made divided between us, and divided fairly evenly. The 1% don't each 10x as much food, or typically own 10 cars, or drink 10x as much beer, or whatever - they barely make a difference in the amount of stuff divided among the rest of us. You seem to be confusing money with stuff - don't do that.
GDP is quite relevant, because tax revenue has never stay above 19% of GDP for long, no matter the tax scheme tried. If you want to pay down, or even just service, that debt, your limited by GDP. Making the GDP grow is a great answer, but one that IMO the government does best by getting out of the way.
You'd be amazed how much some people struggle with technology. Much as I can't get the simplest, easiest stuff right with interior decorating.
And anyhow, by what possible process can dropping the cost of manufactured goods to next to nothing make life worse? There are very few manufacturing jobs now, so not much change when they vanish. There's a recent surge in maid and gardener jobs, but that's a first-gen immigrant wave, and their kids won't need that sort of work. Most people already do work that's not so easily automated. And that majority will consume new services when their budget goes further. Just like every previous automation revolution in history.
Life is always better while you're maxing out your credit cards. It's not till the "paying them down" part happens that it sucks. And it's going to suck, but I expect only to whatever extent one has a fixed-in-dollars benefit when the dollar loses, say, half its value (and anything "inflation-adjusted" by an inflation number picked by the government will be nearly as sucky).
Fortunately, there are just a couple bubbles left for us to suffer through: the tuition bubble, and the sovereign debt bubble. Won't be worse than the last couple, I don't think (not that that's anything to look forward to, but no reason to build a bunker).
It's possible to have capitalism without having a strong central government handing out favors and earmarks to campaign contributors: stick to a weak central government.
Product quality and fraud regulation: good. Monopoly granting and price controls: bad.
As with everyone else who wants to reduce the population, I say to you "you first".
were able to get by and make progress only having one person in the family working full time.
You can have a much higher standard of living today with one person working than you could in the 60s! Tiny tract house, one car for the family, one TV, a washing machine, and a refrigerator, and you have what families were aiming for in the 50s, and largely had by the 60s.
Expectations have risen faster than earning power, and that's great. Women wanted the option of working outside the home, and that's great. These are not problems with the system.
What happens when we get to a point where we just don't need everyone to work in order to provide the goods and services people want?
People always want more. You can always achieve full employment with people helping their neighbors. That's not a system that works unless robots make all the basics, but if that was the case, I could certainly make enough helping people install their home theater systems to have them help me with interior decorating, and so on.
The end of mindless menial labor is a good thing.
BTW, you can use <code> or <tt> on Slashdot (I find the latter works better for indenting).
Thoughtful post. Couple of notes. You seem to worry about a mix of non-trivial constructors and existing code, but of course for all existing code the constructors are trivial. You can't quite compile C code as C++ and get exactly the same object, but it's pretty close (still, not 100% so of course you couldn't blindly do it for a large code base).
As far as placement new, well, I guess it depends on what you're doing with slab allocation. We were hyper-paranoid about dangling pointers and slot re-use, rather than trying to count clock cycles, so everything that was allocated in slabs had meta-data before it anyway, so delete knew what class it was working on. (Every function argument that was a pointer to an important type was checked that it still pointed to an instance of that type, that the instance hadn't been freed, and that the generation number of that instance was as expected. We caught so many bugs that way.)
As far as locks - of course there's no one pattern that fits every use case, but the "try to get the lock, if we get it, use the locked object, then whatever you do be damn sure to release any lock on the way out" is a really common pattern, and one that junior programmers somehow manage to screw up from time to time. Turning this:
get_lock_a(); // do stuff // do more stuff // do even more stuff
x = find_object_in_a();
if (! x)
goto release_a;
get_lock_b();
y = find_object_in_b();
if (! y)
goto release_b;
release_lock_b();
release_lock_a();
return 0;
release_b:
release_lock_b();
release_a:
release_lock_a();
return -EINVAL;
into this:
Lock lock_a(a); // gasp, horror, return in the middle!
// do some stuff;
x = find_object_in_a();
if (!x)
return ERROR;
Lock lock_b(b);
y = find_object_in_b();
if (!y)
return ERROR;
return 0;
Is more clear for the missing boilerplate, and requires far less demanding code reviews. Too much culture shock for traditional C kernel guys though, I guess.
It's probably also worth pointing out that in many (all?) contexts these days, security trumps a doubling of performance. We're none of us perfect - but I never released a resource leak in the 12 or so years I did low-level stuff. And it wasn't because I was the unerring master of matching alloc at the top with free at the bottom! You name a typo that compiles, I made it! But there are coding styles less demanding (and less tedious), by eschewing the boiler plate that must be perfect every time.
If an adversary is capable of obtaining the executable of a program, they can also reverse engineer that same executable. It may take a lot of effort, but it is always achievable.
Well, you can also brute force a 256-bit key. It may take the lifetime of the universe, squared, but it is achievable.
The whole point of this technology is that the computer executing the code doesn't have the source or data in the clear.
There's some existing work designed for databases that work just this way. I send "the cloud" and encrypted query that causes the server to sum a column in some encrypted table and return me the encrypted result all without the server having any keys. It's all manipulation of encrypted data in such a way that you return the manipulated result without any information leaking - even to the server doing the manipulation.
And, of course, once you have a few primitive operations, you can build a Turing-complete system. Performance is the thing though. The first approach I saw took seconds to increment a counter or somesuch, IIRC, just really unworkably slow. But it seems all it takes to make all of this work is sufficient performance gains, so sure, I can see it in time.
Not an excuse to write bad software. How hard is it to ask about personal name and family name and default to whatever's most common to your userbase, so that most people can still just click next? And for goodness sake, support Unicode in names.
And you do realize the Hispanic two-last-names thing is part of Western culture, right? And that the Dutch, also part of Western culture, don't have two last names, but many have a space in their last name? And that apostrophes show up commonly in Irish names, which, as far as I can tell: still Western culture.
And still: you do better than Slashcode.
Slashcode: the goaste anus of a Unicode world.
Oh, yeah, immutable data structures, those work great for code that runs on a whiteboard. :p I just spent a year cleaning up and refactoring code where someone thought immutable data structures were clever - it's hard to make code run unacceptably slow without being I/O or lock bound, but spend enough time copying data around in code that was CPU-intensive anyhow, and you can manage it!
Anyhow, I've never seen a large code base, written and maintained by the usual diverse range of developer competencies, where it was safe to proceed after unwinding too far "such programs work perfectly reliably, they simply require some more forethought" indeed. In my current case, restarting actually will help, because of the way in-memory caching was done (which design required more forethought than it was given).
Man, it seems like too much of my recent career has been spent re-doing someone's "oh so clever" idea, instead in the most straightforward and obvious way, and gaining a 100x performance increase, or a 10x memory improvement, or getting horizontal scalability by abandoning some technology that some developer was just in love with, and would not let go of, despite it's inability to scale out.
Canada actually issued a "traveler warning" to people coming to the US about how our corrupt cops would just steal any cash they had.