156 karma · joined Oct 5, 2015 (11y ago) · 40 submissions
comment 2y ago · link · parent
comment 2y ago · link · parent
So, if you only vary amount of rice, you really need some_factor * amount_of_rice + constant_amount and the knuckle rule has that characteristic.
comment 2y ago · link · parent
There are multiple levels of shorthand, the faster ones drop more and more information from each word if it can be inferred from the context (for someone familiar with the topic, i.e. yourself mainly).
Shorthand never really stuck for me. Learning to write and read it wasn't that difficult actually, but I couldn't quickly scan shorthand notes like I could with regular writing. I suppose that's a matter of practice and I wasn't ready to sink hundreds of hours into just that. One thing I learned from the experience was how frustrating of an experience it is if you're not good at reading. I have always been an above average reader and I couldn't understand how people struggled so much with it. Reading shorthand was effortful and slow, especially at the very beginning for me and that gave me some perspective of how some of my classmates must have felt.
comment 3y ago · link · parent
comment 3y ago · link · parent
And Win Wenger, who the author says this technique originally comes from, is the author of "The Einstein Factor" which is a book with similarly grandiose claims about improving your mental abilities.
comment 3y ago · link · parent
This one for example mentions in the abstract that by using an amount of turbines collectively making up 300 GW of capacity, it could severely reduce wind speeds of a hurricane: https://www.nature.com/articles/nclimate2120
300 GW is 2/3 of the power consumption of the entire US and you would need all of those in a small-ish area just to dampen, not fully absorb, a catastrophic storm's energy. Even after those wind speed reductions, there is very strong wind.
If you scatter those turbines in a larger area, you can imagine that the effect will be much more diluted. There is so much energy in the atmosphere that we won't put much of a dent in it with our current energy consumption.
comment 3y ago · link · parent
comment 3y ago · link · parent
When using unwrap_or(&vec![]), it lives in the enclosing stack. Without the reference, you could use unwrap_or_default().
comment 3y ago · link · parent
comment 4y ago · link · parent
Here is an example where a variable is definitely initialized, but it will be rejected.
fn main() {
let foo;
if true {
foo = 1;
}
println!("{}", foo);
}comment 4y ago · link · parent
comment 4y ago · link · parent
Year - Most Loved Pct. - Rank
2015 - 73.8% - 3
2016 - 79.1% - 1
2017 - 73.1% - 1
2018 - 78.9% - 1
2019 - 83.5% - 1
2020 - 86.1% - 1
2021 - 86.98% - 1comment 5y ago · link · parent
Currently, that's an ubuntu 18.04 machine at work and that doesn't have `git restore`, yet.
comment 5y ago · link · parent
comment 5y ago · link · parent
So even if you manage to reason correctly around `restrict` in C, you can't count on the compiler to translate your code correctly.
GCC also had bugs around restrict, but I don't know about their current status.