Skip to content
By using Twitter’s services you agree to our Cookies Use. We and our partners operate globally and use cookies, including for analytics, personalisation, and ads.
  • Home Home Home, current page.
  • About

Saved searches

  • Remove
  • In this conversation
    Verified accountProtected Tweets @
Suggested users
  • Verified accountProtected Tweets @
  • Verified accountProtected Tweets @
  • Language: English
    • Bahasa Indonesia
    • Bahasa Melayu
    • Català
    • Čeština
    • Dansk
    • Deutsch
    • English UK
    • Español
    • Filipino
    • Français
    • Hrvatski
    • Italiano
    • Magyar
    • Nederlands
    • Norsk
    • Polski
    • Português
    • Română
    • Slovenčina
    • Suomi
    • Svenska
    • Tiếng Việt
    • Türkçe
    • Ελληνικά
    • Български език
    • Русский
    • Српски
    • Українська мова
    • עִבְרִית
    • العربية
    • فارسی
    • मराठी
    • हिन्दी
    • বাংলা
    • ગુજરાતી
    • தமிழ்
    • ಕನ್ನಡ
    • ภาษาไทย
    • 한국어
    • 日本語
    • 简体中文
    • 繁體中文
  • Have an account? Log in
    Have an account?
    · Forgot password?

    New to Twitter?
    Sign up
cmuratori's profile
Casey Muratori
Casey Muratori
Casey Muratori
@cmuratori

Tweets

Casey Muratori

@cmuratori

I'm worried that the baby thinks people can't change.

Seattle
caseymuratori.com
Joined March 2009

Tweets

  • © 2021 Twitter
  • About
  • Help Center
  • Terms
  • Privacy policy
  • Cookies
  • Ads info
Dismiss
Previous
Next

Go to a person's profile

Saved searches

  • Remove
  • In this conversation
    Verified accountProtected Tweets @
Suggested users
  • Verified accountProtected Tweets @
  • Verified accountProtected Tweets @

Promote this Tweet

Block

  • Tweet with a location

    You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more

    Your lists

    Create a new list


    Under 100 characters, optional

    Privacy

    Copy link to Tweet

    Embed this Tweet

    Embed this Video

    Add this Tweet to your website by copying the code below. Learn more

    Add this video to your website by copying the code below. Learn more

    Hmm, there was a problem reaching the server.

    By embedding Twitter content in your website or app, you are agreeing to the Twitter Developer Agreement and Developer Policy.

    Preview

    Why you're seeing this ad

    Log in to Twitter

    · Forgot password?
    Don't have an account? Sign up »

    Sign up for Twitter

    Not on Twitter? Sign up, tune into the things you care about, and get updates as they happen.

    Sign up
    Have an account? Log in »

    Two-way (sending and receiving) short codes:

    Country Code For customers of
    United States 40404 (any)
    Canada 21212 (any)
    United Kingdom 86444 Vodafone, Orange, 3, O2
    Brazil 40404 Nextel, TIM
    Haiti 40404 Digicel, Voila
    Ireland 51210 Vodafone, O2
    India 53000 Bharti Airtel, Videocon, Reliance
    Indonesia 89887 AXIS, 3, Telkomsel, Indosat, XL Axiata
    Italy 4880804 Wind
    3424486444 Vodafone
    » See SMS short codes for other countries

    Confirmation

     

    Welcome home!

    This timeline is where you’ll spend most of your time, getting instant updates about what matters to you.

    Tweets not working for you?

    Hover over the profile pic and click the Following button to unfollow any account.

    Say a lot with a little

    When you see a Tweet you love, tap the heart — it lets the person who wrote it know you shared the love.

    Spread the word

    The fastest way to share someone else’s Tweet with your followers is with a Retweet. Tap the icon to send it instantly.

    Join the conversation

    Add your thoughts about any Tweet with a Reply. Find a topic you’re passionate about, and jump right in.

    Learn the latest

    Get instant insight into what people are talking about now.

    Get more of what you love

    Follow more accounts to get instant updates about topics you care about.

    Find what's happening

    See the latest conversations about any topic instantly.

    Never miss a Moment

    Catch up instantly on the best stories happening as they unfold.

    1. Casey Muratori‏ @cmuratori Sep 27

      This is such a tremendous pain in the ass. Most code that has to do an "if this isn't zero, then divide" could be written to "just work" if it could generally assume that the CSRs were always set to flush. But they can't, because it usually isn't.

      1 reply 0 retweets 16 likes
      Show this thread
    2. Casey Muratori‏ @cmuratori Sep 27

      Since most numerical code today is in libraries, and libraries can't go setting the CSR because different libraries might conflict, etc., it is really a huge issue. Please someone just change this globally, by fiat. Microsoft? Linux? WASM? PLEASE???

      1 reply 0 retweets 13 likes
      Show this thread
    3. Casey Muratori‏ @cmuratori Sep 27

      Maybe somebody has already, and if so, I commend you. But as far as I can tell so far, everybody still defaults to _crashing the program_ when it divides by zero.

      2 replies 0 retweets 12 likes
      Show this thread
    4. Jane Schwartz‏ @JaneSchwartz100 Sep 28
      Replying to @cmuratori

      Maybe I'm misunderstanding: what would you like the following code to do? int x = 2 / 0; cout << x;

      1 reply 0 retweets 0 likes
    5. Casey Muratori‏ @cmuratori Sep 28
      Replying to @JaneSchwartz100

      It's not what I would like it to do, it's what it _does_ do provided you set MXCSR properly (or the equivalent on other CPUs). With div-by-zero/underflow turned off, and flush-to-zero turned on, 2/0 = 0. So your code would print 0.pic.twitter.com/ju2q6BIfv5

      1 reply 0 retweets 1 like
    6. Casey Muratori‏ @cmuratori Sep 28
      Replying to @cmuratori @JaneSchwartz100

      The only reason it _doesn't_ do that by default is because - for some truly bizarre reason - the default setting for MXCSR is to fault on divide by zero. Even though that is basically never what you want, unless you are debugging.

      1 reply 0 retweets 1 like
    7. Jane Schwartz‏ @JaneSchwartz100 Sep 28
      Replying to @cmuratori

      Shouldn't we want to crash hard with errors like these, instead of letting them go unnoticed silently?

      3 replies 0 retweets 2 likes
    8. Casey Muratori‏ @cmuratori Sep 28
      Replying to @JaneSchwartz100

      They're not errors if you wrote the code properly. Most code paths that feature a divide can be written such that they will work properly if the denominator is zero.

      1 reply 0 retweets 1 like
    9. Jane Schwartz‏ @JaneSchwartz100 Sep 28
      Replying to @cmuratori

      Interesting, can you give an example? (Genuine question of course. Always wise to say that on Twitter 😆)

      1 reply 0 retweets 0 likes
    10. Casey Muratori‏ @cmuratori Sep 28
      Replying to @JaneSchwartz100

      Yes, certainly. Simplest is the oft-occurring form: int Step = Width / Count; for(int I = 0; I < Count; ++I) { // ... Step used here ... } With exceptions, this faults. Without exceptions, it runs as expected, since a zero count means the loop is never entered.

      1 reply 0 retweets 3 likes
      Casey Muratori‏ @cmuratori Sep 28
      Replying to @cmuratori @JaneSchwartz100

      By enabling divide-by-zero exceptions, we effectively take all loops of this form and turn them from perfectly working code to things that literally crash the application :( There are _many_ other forms that look like this, this is just the easiest to type in Twitter.

      1:35 PM - 28 Sep 2021
      • 1 Like
      • Ivan Braidi
      1 reply 0 retweets 1 like
        1. New conversation
        2. Casey Muratori‏ @cmuratori Sep 28
          Replying to @cmuratori @JaneSchwartz100

          In ASM you can work around some of these. In the previous example, you could presumably move the divide below the top jnz for the for loop, and have the bottom jnz jump back to after the divide, etc., so maybe it "costs you nothing" to do.

          1 reply 0 retweets 1 like
        3. Casey Muratori‏ @cmuratori Sep 28
          Replying to @cmuratori @JaneSchwartz100

          In C, on the other hand, you pretty much just have to manually type out additional if's every time. So you're going to always write if(Count) { int Step = Width / Count; for(int I = 0; I < Count; ++I) { // ... Step used here ... } } for no good reason.

          1 reply 0 retweets 1 like
        4. Show replies

      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.

        Promoted Tweet

        false

        • © 2021 Twitter
        • About
        • Help Center
        • Terms
        • Privacy policy
        • Cookies
        • Ads info