Yep, I'm not actually claiming that driving is safer per se, but it's apples vs oranges. I'm also not sure about 24M hours, total commercial airlines hours (i.e. aircraft hours, not passengers') is around 14M/year in…
Statistics is a tricky thing. There are 43K traffic fatalities in the US per year and 53K deaths from colorectal cancer. Which means chances of dying from colorectal cancer is higher than dying in a traffic accident.…
Let's do some math, shall we? > In 2007, the National Transportation Safety Board estimated a total of nearly 24 million flight hours. Of these 24 million hours, 6.84 of every 100,000 flight hours yielded an airplane…
It does change odds. So when considering defensive driving the rule "flying is safer" may not hold.
Yes, entropy increases in the salad dressing, but only when it's insulated (in reality we can't consider salad dressing outside of the Earth gravitational field, but let's say the Earth is insulated too). Now imagine…
Standard gear box oil is 80W90, which at -30C (even at -20C) turns into a thick jelly. Even in neutral starter has to move gears in that jelly. So normally you don't want to release the clutch until engine is warm…
People just don't care about their vehicles, that's why. There are multiple examples of even diesels starting at -25°C without heating. All my cars have been gas and while starting them at -30°C required some magical…
> It hates any form of order and will actively attempt to destroy it. If you are talking about ever increasing entropy, it applies to any environment. But keep in mind that the Moon itself is a manifestation of order.…
Most modern cars will happily start at -20°C and many will start at -30°C without any special additions (don't ask me how I know, you just need to know what you are doing). Of course it's not -200°C, but one thing to…
If you block your timer goes out the window, right? Because the poll will never get there until the blocking call is done. So yeah, you can block, but it will disrupt the whole chain, including tasks above yours up to…
Interesting, in the Java world Thread.stop is deprecated too: https://docs.oracle.com/javase/7/docs/technotes/guides/concu... Which means there is no good way to actually stop a thread involuntary. Of course in most…
Most languages I know allow killing a thread, or at least unblock a system call.
Can you cancel a tight computing loop (i.e. without system calls and without yielding of any sort) with async? I wonder how? Also if you can inject a cleanup code in your async task what prevents you from doing it with…
You wait on a shared channel so both read and sleep threads queue a message when ready (whichever comes first). Not sure about channels, but in other languages it would be a concurrent queue.
As I understand when you are blocked on I/O and sends a signal to the waiting thread, that system call will simply be released and return an error. Ruby (Java etc.) does make it simple because of GC, so I don't need to…
What happens if I block a future in a single threaded runtime?
Channel with an additional thread for sleep? Waiting for a channel is not a poll.
Not sure about Rust, but in other languages that don't have async: create a queue, spawn a thread with your task, thread with sleep and wait for a message from any of those two. Kill the still running thread when you…
In some sense it is. Async is a glorified future, and future is a glorified thread management, and threads are a way to facilitate asynchronous execution. You can also create a threadless runtime, but then you are…
Not exactly sure how async in Python works, but if its runtime is non-preemptive and single-threaded (i.e. based on yield), then congratulations, you reinvented Windows 3.1! Those who are old enough to be "lucky" to use…
Depends on the nature of commercial code and if it has another level of parallelism (think of web servers and read my comment below). As for DB queries, here's the thing: most commercial code is using DB transactions…
Also parallel execution is never simple, there are multiple problems no matter what technology you use, be it async or threads. Meanwhile there are different threads too, you know, green, system etc. There is Erlang for…
If you carefully read my message, I said there are cases where async is beneficial. Most of the time I don't think even threads are necessary. E.g. the most common application nowadays (arguably) is a web server. Of…
Maybe I don't understand the complexity, but in good old Ruby I can easily stop a thread if I don't need result anymore. No async needed and no yield points necessary. Doesn't it apply to Rust too?
Nope, my answer boils down to: "I said I never had much use for one. Never said I didn't know how to use it." (c)
Yep, I'm not actually claiming that driving is safer per se, but it's apples vs oranges. I'm also not sure about 24M hours, total commercial airlines hours (i.e. aircraft hours, not passengers') is around 14M/year in…
Statistics is a tricky thing. There are 43K traffic fatalities in the US per year and 53K deaths from colorectal cancer. Which means chances of dying from colorectal cancer is higher than dying in a traffic accident.…
Let's do some math, shall we? > In 2007, the National Transportation Safety Board estimated a total of nearly 24 million flight hours. Of these 24 million hours, 6.84 of every 100,000 flight hours yielded an airplane…
It does change odds. So when considering defensive driving the rule "flying is safer" may not hold.
Yes, entropy increases in the salad dressing, but only when it's insulated (in reality we can't consider salad dressing outside of the Earth gravitational field, but let's say the Earth is insulated too). Now imagine…
Standard gear box oil is 80W90, which at -30C (even at -20C) turns into a thick jelly. Even in neutral starter has to move gears in that jelly. So normally you don't want to release the clutch until engine is warm…
People just don't care about their vehicles, that's why. There are multiple examples of even diesels starting at -25°C without heating. All my cars have been gas and while starting them at -30°C required some magical…
> It hates any form of order and will actively attempt to destroy it. If you are talking about ever increasing entropy, it applies to any environment. But keep in mind that the Moon itself is a manifestation of order.…
Most modern cars will happily start at -20°C and many will start at -30°C without any special additions (don't ask me how I know, you just need to know what you are doing). Of course it's not -200°C, but one thing to…
If you block your timer goes out the window, right? Because the poll will never get there until the blocking call is done. So yeah, you can block, but it will disrupt the whole chain, including tasks above yours up to…
Interesting, in the Java world Thread.stop is deprecated too: https://docs.oracle.com/javase/7/docs/technotes/guides/concu... Which means there is no good way to actually stop a thread involuntary. Of course in most…
Most languages I know allow killing a thread, or at least unblock a system call.
Can you cancel a tight computing loop (i.e. without system calls and without yielding of any sort) with async? I wonder how? Also if you can inject a cleanup code in your async task what prevents you from doing it with…
You wait on a shared channel so both read and sleep threads queue a message when ready (whichever comes first). Not sure about channels, but in other languages it would be a concurrent queue.
As I understand when you are blocked on I/O and sends a signal to the waiting thread, that system call will simply be released and return an error. Ruby (Java etc.) does make it simple because of GC, so I don't need to…
What happens if I block a future in a single threaded runtime?
Channel with an additional thread for sleep? Waiting for a channel is not a poll.
Not sure about Rust, but in other languages that don't have async: create a queue, spawn a thread with your task, thread with sleep and wait for a message from any of those two. Kill the still running thread when you…
In some sense it is. Async is a glorified future, and future is a glorified thread management, and threads are a way to facilitate asynchronous execution. You can also create a threadless runtime, but then you are…
Not exactly sure how async in Python works, but if its runtime is non-preemptive and single-threaded (i.e. based on yield), then congratulations, you reinvented Windows 3.1! Those who are old enough to be "lucky" to use…
Depends on the nature of commercial code and if it has another level of parallelism (think of web servers and read my comment below). As for DB queries, here's the thing: most commercial code is using DB transactions…
Also parallel execution is never simple, there are multiple problems no matter what technology you use, be it async or threads. Meanwhile there are different threads too, you know, green, system etc. There is Erlang for…
If you carefully read my message, I said there are cases where async is beneficial. Most of the time I don't think even threads are necessary. E.g. the most common application nowadays (arguably) is a web server. Of…
Maybe I don't understand the complexity, but in good old Ruby I can easily stop a thread if I don't need result anymore. No async needed and no yield points necessary. Doesn't it apply to Rust too?
Nope, my answer boils down to: "I said I never had much use for one. Never said I didn't know how to use it." (c)