New post: Swift: The joy of sequences http://ericasadun.com/2016/06/08/swift-the-joy-of-sequences/ …
-
-
Replying to @ericasadun
Oh god no: `Int(exp2(Double(idx)))`. Not only is this pointlessly expensive, but there's no guarantee that `exp2` is correctly\
2 replies 0 retweets 1 like -
Replying to @stephentyrone @ericasadun
The cause is that << is wrongly taught as a bit-fiddling operator rather than as scale-by-pow-of-2 (as defined).
1 reply 0 retweets 1 like
Nobody should have to know that C requires binary repr of integers in order to use << for arithmetic.
11:44 AM - 8 Jun 2016
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.