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.

This is the legacy version of twitter.com. We will be shutting it down on June 1, 2020. Please switch to a supported browser, or disable the extension which masks your browser. You can see a list of supported browsers in our Help Center.

  • 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
colmmacc's profile
Colm MacCárthaigh
Colm MacCárthaigh
Colm MacCárthaigh
@colmmacc

Tweets

Colm MacCárthaigh

@colmmacc

AWS, Apache, Crypto, Irish Music, Haiku, Photography

Seattle
notesfromthesound.com
Joined April 2008

Tweets

  • © 2020 Twitter
  • About
  • Help Center
  • Terms
  • Privacy policy
  • Imprint
  • 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. Colm MacCárthaigh‏ @colmmacc 29 Jun 2018
      • Report Tweet
      • Report NetzDG Violation

      A normal distribution is a super common statistical distribution, it describes the distribution of lots of phenomena and the central limit theorem says that basically any distribution is secretly just one step removed from the normal distribution.

      1 reply 1 retweet 21 likes
      Show this thread
    2. Colm MacCárthaigh‏ @colmmacc 29 Jun 2018
      • Report Tweet
      • Report NetzDG Violation

      That probably didn't make any sense. Here's a Wikipedia page that also won't make much sense: https://en.wikipedia.org/wiki/Normal_distribution … . It especially doesn't make sense that those totally differently looking lines are supposed to be "the same". That's ok though.

      1 reply 1 retweet 22 likes
      Show this thread
    3. Colm MacCárthaigh‏ @colmmacc 29 Jun 2018
      • Report Tweet
      • Report NetzDG Violation

      It's ok because STATISTICS DOESN'T MAKE SENSE. They work really well, but if you think about them for too long and too deeply, you fall into a transcendent state. That's also how we know that statistics are pure science. Anyway, back to the topic ...

      2 replies 20 retweets 114 likes
      Show this thread
    4. Colm MacCárthaigh‏ @colmmacc 29 Jun 2018
      • Report Tweet
      • Report NetzDG Violation

      A cool, though not common any more, way to generate normally distributed numbers is called the Box-Muller transform, https://en.wikipedia.org/wiki/Box–Muller_transform …, and it combines the "Just throw the bad crap away" (aka rejection sampling) and two-dimensional approaches we've seen already.

      1 reply 2 retweets 34 likes
      Show this thread
    5. Colm MacCárthaigh‏ @colmmacc 29 Jun 2018
      • Report Tweet
      • Report NetzDG Violation

      With Box-Muller, we choose two random values, between -2^^31 and 2^^31 say, we plot them as x and y on a two dimensional plane. If (x,y) lies within the circle of radius size 2^^31, we keep the point, otherwise we go again. r is the distance from the origin to (x, y) squared.

      1 reply 0 retweets 21 likes
      Show this thread
    6. Colm MacCárthaigh‏ @colmmacc 29 Jun 2018
      • Report Tweet
      • Report NetzDG Violation

      Here's a picture from Wikipedia, but basically we're throwing darts at a square and if they land in a circle we're good. It's amazing how much low-level stuff is dumb-as-rocks.pic.twitter.com/pQ97dvdD8x

      2 replies 3 retweets 54 likes
      Show this thread
    7. Colm MacCárthaigh‏ @colmmacc 29 Jun 2018
      • Report Tweet
      • Report NetzDG Violation

      O.k. some parting thoughts before ending this thread. First, if you need to generate random numbers in constant time, or exotic distributions, get super deep into this stuff. There are seriously rough weeds to tackle.

      2 replies 1 retweet 27 likes
      Show this thread
    8. Colm MacCárthaigh‏ @colmmacc 29 Jun 2018
      • Report Tweet
      • Report NetzDG Violation

      Second: if you find yourself building a whole RNG, it's really very hard, again, get deep in the weeds and learn about DRBGs, fork-safety, thread-safety, /dev/urandom, getrandom() and so on. Avoid if you can!

      4 replies 0 retweets 28 likes
      Show this thread
    9. Colm MacCárthaigh‏ @colmmacc 29 Jun 2018
      • Report Tweet
      • Report NetzDG Violation

      Third: always use a secure RNG, your language or programming environment should have one. *Don't* ever seed an RNG yourself. One exception: for fuzz inputs and other tests, where you may want repeat deterministically for debugging. But DON'T LET IT LEAK INTO PRODUCTION.

      4 replies 1 retweet 45 likes
      Show this thread
    10. Colm MacCárthaigh‏ @colmmacc 29 Jun 2018
      • Report Tweet
      • Report NetzDG Violation

      Another exception is games, where you may want to generate content and play based on a small seed value, BUT UNDERSTAND THAT THIS IS NOT SECURE.

      3 replies 0 retweets 31 likes
      Show this thread
      Colm MacCárthaigh‏ @colmmacc 29 Jun 2018
      • Report Tweet
      • Report NetzDG Violation

      Last tip: always measure your little random functions with a histogram or whatever. I still code these wrong and have to check. Thanks for reading!

      9:33 AM - 29 Jun 2018
      • 7 Retweets
      • 127 Likes
      • Phil Rogers Boris Reuderink Mattias Johansson NUCblog Richard Copperwaite JC Jonah🌹☭ Tanuj Kumar Cameron Durham
      11 replies 7 retweets 127 likes
        1. New conversation
        2. Thread Reader App‏ @threadreaderapp 29 Jun 2018
          • Report Tweet
          • Report NetzDG Violation
          Replying to @flukejones

          Hi please find the unroll here: https://threadreaderapp.com/thread/1012735873627107328.html … Enjoy :) 🤖

          1 reply 0 retweets 0 likes
        3. 1 more reply
        1. Loreto Parisi‏ @loretoparisi 30 Jun 2018
          • Report Tweet
          • Report NetzDG Violation
          Replying to @colmmacc

          I don’t get why this would not be enough supposed the distribution is uniform: Math.floor(Math.random() * (max - min + 1)) + min;

          0 replies 0 retweets 0 likes
          Thanks. Twitter will use this to make your timeline better. Undo
          Undo
        1. Max Nordlund‏ @nevonnen 30 Jun 2018
          • Report Tweet
          • Report NetzDG Violation
          Replying to @colmmacc

          This reminds me of http://www.pcg-random.org/  which when I read it the first time found much enlightening.

          0 replies 0 retweets 0 likes
          Thanks. Twitter will use this to make your timeline better. Undo
          Undo
        1. N.W.‏ @molten_tofu 30 Jun 2018
          • Report Tweet
          • Report NetzDG Violation
          Replying to @colmmacc

          I’m confused how about: import random random.randint(0, 5)

          0 replies 0 retweets 0 likes
          Thanks. Twitter will use this to make your timeline better. Undo
          Undo
        1. ((( Ken N.)))‏ @K3n_5s 30 Jun 2018
          • Report Tweet
          • Report NetzDG Violation
          Replying to @colmmacc

          Great thread, thanks for posting!

          0 replies 0 retweets 0 likes
          Thanks. Twitter will use this to make your timeline better. Undo
          Undo
        1. emily =^.^=‏ @droidmlwr 1 Jul 2018
          • Report Tweet
          • Report NetzDG Violation
          Replying to @colmmacc

          Great thread!pic.twitter.com/Z1az4IsZGp

          0 replies 0 retweets 0 likes
          Thanks. Twitter will use this to make your timeline better. Undo
          Undo
        1. Oliver Smith‏ @kfsone 2 Jul 2018
          • Report Tweet
          • Report NetzDG Violation
          Replying to @colmmacc

          No, no, no, no: histogram itself is not enough. The first rule of random is: we do not understand random. I once had to remove someone's rand from a game because, for a month, it had consistently returned 0 for one team's rolls and non zero for the other until we manually reset

          0 replies 0 retweets 0 likes
          Thanks. Twitter will use this to make your timeline better. Undo
          Undo
        1. Oliver Smith‏ @kfsone 2 Jul 2018
          • Report Tweet
          • Report NetzDG Violation
          Replying to @colmmacc

          Most people overlook the fact that 1,1,1,1,1,1,1 is a legitimately random sequence. No matter how many 1s the are. A truly random number generator *should* produce such patterns. "But it's highly improbable " YOU DON'T UNDERSTAND RANDOM :)

          0 replies 0 retweets 0 likes
          Thanks. Twitter will use this to make your timeline better. Undo
          Undo
        1. New conversation
        2. Markus Ueberall‏ @m_ueberall 4 Jul 2018
          • Report Tweet
          • Report NetzDG Violation
          Replying to @colmmacc

          @threadreaderapp: unroll

          1 reply 0 retweets 0 likes
        3. Thread Reader App‏ @threadreaderapp 4 Jul 2018
          • Report Tweet
          • Report NetzDG Violation
          Replying to @m_ueberall

          Hallo the unroll you asked for: https://threadreaderapp.com/thread/1012735873627107328.html … Have a good day. 🤖

          0 replies 0 retweets 0 likes
        4. End of conversation

      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

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