|
ShowDialog spins the message loop while it's displayed. I suppose in microsoft's defense they may be trying to move away from that.
Yeah C++ has async, and there it's even more important not to use it just because you can. (I'm not saying you don't have a good reason in this case - you do - but generally speaking)
The problem with async methods and that code transformation comes when someone throws an exception that isn't handled properly inside an async method implementation. Basically if you don't call SetResult or SetException (I think it's called?) on the taskresult object and instead you throw an exception the debugger won't be able to reconstruct your call stack in a way that will be helpful. Admittedly, this is most often a problem when writing your own async methods rather than consuming them, but it is easy to get wrong, especially when something you didn't expect to throw throws.
Real programmers use butterflies
modified 24-Nov-21 19:59pm.
|
|
|
|
|
I was perusing an 1861 U.S. military ordnance manual and came across this:
Quote: A man of ordinary strength exerts a force of 30 lbs. for 10 hours a day, with a velocity of 2.5 feet in a second == 4,500 lbs raised 1 foot in a minute == 1/5 the work of a horse.
So your (average then) 150 lb man was lifting 75 pounds a second and generating .20 HP for 10 hours.
(Today, "trained athletes" can do .35 HP for several hours; "healthy humans", .1 HP indefinitely)
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
|
Kind of an alternative to the article linked in the insider news, What the Future of Programming Languages Looks Like - ReadWrite. Maybe that article is right, maybe not, the things in it don't really match what I've seen, and maybe I'm wrong too. It's all tea-leaf reading anyway. You all have your ideas, let's talk about them.
- Concepts like the "borrow checker" from Rust and "nullability checker" from C# will be expanded to cover other constraints that are frequently broken by accident. "Such as what" - well who knows. Maybe we'll see refinement types being embraced, maybe linear types, maybe it will come in the form of compile-time verified asserts, or maybe we'll just continue down the path of inventing a Special Case to address each individual thing.. Whether you like these things of not, they are the trend. Don't start with "but Rice's theorem", it is well known that static analysis cannot be perfect, it doesn't have to be, it only needs to be useful.
- With more and more of the performance of modern processors being locked away behind SIMD and multi-threading, we will see the adoption of paradigms that natively handle one or both of them, for example basically writing compute shaders for the CPU. Intel ISPC is something in that direction and there will be more, because the hardware demands it. Not only x86 hardware, by the way. Even if the future holds a lot of ARM and RISCV, there will be a need to target ARM SVE and whatever RISCV calls their vector instruction set, and the (probably) dozens of small cores. Auto-vectorization doesn't really address the problem, it can only do so much when the source is written in the wrong paradigm to begin with, it can't change your inherently-serial algorithms.
- The "easy learning curve" because "everyone is going to be a programmer in the future" (from the article) is, IMO, the wrong way to look at it. I expect that lots of non-programmers will be writing some code, but they won't be interested in becoming programmers, and they won't be using general purpose programming languages. They will probably be using some expensive-but-buzzword-infested-and-horrible "business automation" packages (inflicted upon them by their boss) and their made-up proprietary languages. I feel a bit sorry for them already. It will be an extra thing that we're going to see more of, but it won't affect future languages in general, only the ones that are in that niche.
|
|
|
|
|
XML-based to enforce proper nesting without specifying the actual formatting/indenting.
|
|
|
|
|
Hi Harold, I expressed my opinions on that thread in "Insider News" before I saw your post.
Something I'd like to see in the future is a dramatic extension of the role of attributes in C#; a kind of "constraint meta-language," if you will. This would work at run-time to ensure integrity of data/values passed as parameters, and determine actions to take if data is not validated.
Some of the functionality AOP programs like PostSharp offer now.
Another way to describe what I have in mind is the idea it would to some extent offer the equivalent of the kinds of unit-tests used now.
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
Little ones, anyway. I am having solar panels installed, which will provide energy around 130% of my largest electric bill utility bill. The federal solar energy credits provides a 'payback' at the end of the year of all the energy I generate in excess and a fixed bill for the night, when the solar does not provide power. Will look at battery backup for night use after a few months of use, to get a feel for battery banks sizing and cost
Thar's only two possibilities: Thar is life out there in the universe which is smarter than we are, or we're the most intelligent life in the universe. Either way, it's a mighty sobering thought. (Porkypine - via Walt Kelly)
|
|
|
|
|
Have you learned nothing from the Beatles?
|
|
|
|
|
Well ... the Albert Hall hasn't fallen down yet ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Rubber has soul?
The less you need, the more you have.
Even a blind squirrel gets a nut...occasionally.
JaxCoder.com
|
|
|
|
|
I can see that your mind isn't being kept from wandering.
|
|
|
|
|
PIEBALDconsult wrote: I can see that your mind isn't being kept from wandering.
Her name was McGill, she called herself Lil but everyone knew her as Nancy....Yes when things get Rocky.
The less you need, the more you have.
Even a blind squirrel gets a nut...occasionally.
JaxCoder.com
|
|
|
|
|
|
south west florida - near fort myers
Thar's only two possibilities: Thar is life out there in the universe which is smarter than we are, or we're the most intelligent life in the universe. Either way, it's a mighty sobering thought. (Porkypine - via Walt Kelly)
|
|
|
|
|
OK, wow, I am positively surprised that someone in the US would find solar energy interesting ! Well done !
|
|
|
|
|
That is exciting. I've had my panels since July 2010 and love them. Often forgetting they are there, but always enjoying a lower electric bill.
Hogan
|
|
|
|
|
About how much savings do you see at night versus day? Night load is AC and well pump for me. Have you looked into battery storage for night?
Thar's only two possibilities: Thar is life out there in the universe which is smarter than we are, or we're the most intelligent life in the universe. Either way, it's a mighty sobering thought. (Porkypine - via Walt Kelly)
|
|
|
|
|
The great thing about solar is that you just sort of forget about it. With the system being 11 years old, I don't often think about it. My system is not large enough to power all my house, so it just generally lowers my bill each month based on sunlight. Instead of worrying about battery power, I just push excess power to the grid and get a credit against power I'm using later.
Per the battery, my basic math says the systems can't come close to paying for themselves. If you decide on a battery, its for the backup, not a financial decision.
Best I can tell, the Tesla Powerwall costs $10,500 USD installed. It can hold 14 Kwh of electricity. My rates are approximately $0.10 per Kwh. Assuming I could completely charge/discharge the battery each day, I could save (assuming I didn't get credit for the power pushed to the grid) $1.40 per day. 10,500 / 1.4 = 7,500 days to break even. So about 20.5 years of perfect charge discharge each day. I doubt it would last that long at full charge/discharge. This would require a significant power price difference, so I'll keep being grid tied
One Year of Solar Power – Snorkie
Hogan
|
|
|
|
|
Goat or spread. (6)
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Parsed ?
"Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
Nope.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Thank goodness for that
"Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
BUTTER!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
"Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
I liked it.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|