https://podcasts.apple.com/us/podcast/the-haskell-interlude/...
61 karma · joined February 4, 2017
https://podcasts.apple.com/us/podcast/the-haskell-interlude/...
[0] https://doc.rust-lang.org/std/str/pattern/trait.Pattern.html...
// #1 @ 916,616: 21x29
let parts: Vec<&str> = l.split(['@', ',', ':', 'x'].as_ref()).collect();
let x = parts[1].trim().parse::<i32>().expect("x as i32");
let y = parts[2].trim().parse::<i32>().expect("y as i32");
let w = parts[3].trim().parse::<i32>().expect("width as i32");
let h = parts[4].trim().parse::<i32>().expect("height as i32");
[0] https://doc.rust-lang.org/std/primitive.str.html#method.spli...For example in rust most code that can fail will return a Result and thus the compiler forces you to handle that. However, that code can just as easily panic and behave like an uncaught exception would (thread exiting). An example would be the division operator and the array index operator. Both division-by-zero and out-of-bounds errors can certainly be handled by using a Result but in this case the Rust developers made a decision to use panic. Are these both exceptions bc they are handled like a typical uncaught exception or are they errors bc it’s conceivable to handle them just like a failed file open?
I also just want to comment that skepticism to high claims is good but your comment seems a bit too harsh. Briefly looking at his post where he goes into his “fastest hash table” it’s quite long, very detailed and has similar graphs. That doesn’t seem under-researched to me.
A counter example to this is the typescript compiler which some might describe as a transpiler. It does sophisticated control flow analysis to, for example, make sure all branches of an if statement return the same type.
> Halliday’s character combines the worst traits of Elon Musk, Mark Zuckerberg and Kim Dotcom.
Do you think its purpose is to inspire you to be a better person? Since when are fiction books self help books? Since when are perfect characters the most interesting ones?