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
TimSweeneyEpic's profile
Tim Sweeney
Tim Sweeney
Tim Sweeney
@TimSweeneyEpic

Tweets

Tim Sweeney

@TimSweeneyEpic

Epic Games founder & CEO

epicgames.com
Joined August 2013

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. Tim Sweeney‏ @TimSweeneyEpic May 26
      • Report Tweet
      • Report NetzDG Violation

      About two years into Apple BASIC programming, I was befuddled by this. I only knew loops and not recursion, so I wanted to write an outer loop that maintained a variable number of inner loops, but that wasn't supported:pic.twitter.com/2z6FsTnB6d

      3 replies 2 retweets 71 likes
      Show this thread
    2. Tim Sweeney‏ @TimSweeneyEpic May 26
      • Report Tweet
      • Report NetzDG Violation

      Because BASIC supported GOSUB recursion only, without a parameter stack, I eventually abandoned it in frustration and wrote a compiler for a Pascal style language. The recursive solution is easy, but the question still stands: why are for-loops too weak to express this?

      5 replies 1 retweet 54 likes
      Show this thread
    3. Tim Sweeney‏ @TimSweeneyEpic May 26
      • Report Tweet
      • Report NetzDG Violation

      A Haskell programmer will use some higher-order library functions to build a list comprehension over a variable number of permutations, but that's tricky and just moves the recursion to a library function.

      4 replies 1 retweet 40 likes
      Show this thread
    4. Tim Sweeney‏ @TimSweeneyEpic May 26
      • Report Tweet
      • Report NetzDG Violation

      There's actually a deep answer to this: looping over just mutable loop variables isn't very powerful. A set of n simple nested loops of k iterations each can only explore k^n possibilities, and n must be static. We can't handle n being a variable.

      2 replies 1 retweet 43 likes
      Show this thread
    5. Tim Sweeney‏ @TimSweeneyEpic May 26
      • Report Tweet
      • Report NetzDG Violation

      This is another area where the functional logic language family is more powerful. There, we can loop over multi-valued choices (like little forks whose scope is limited to the enclosing loop) and gather all of their results in sequence through backtracking.

      1 reply 1 retweet 37 likes
      Show this thread
    6. Tim Sweeney‏ @TimSweeneyEpic May 26
      • Report Tweet
      • Report NetzDG Violation

      Here, let "a..b" represent the choice of all values in the range from a to b, and "for(a) do b" loop over all choices in a, producing an array containing the values of b. Then we can write a simple loop like:pic.twitter.com/yVYAUSLSR3

      3 replies 2 retweets 31 likes
      Show this thread
    7. Tim Sweeney‏ @TimSweeneyEpic May 26
      • Report Tweet
      • Report NetzDG Violation

      New expressive power comes from our ability to nest choices inside of loops, where each iteration explores all choices. Then we can variably "exponentiate", and write PrintXY as:pic.twitter.com/loFkBD2RaC

      6 replies 4 retweets 41 likes
      Show this thread
    8. Tim Sweeney‏ @TimSweeneyEpic May 26
      • Report Tweet
      • Report NetzDG Violation

      Is this a quirky, special-case language feature? Definitely not; it has well-defined semantics and increases the expressive power of loops. And it's what 14-year-old me intuitively tried to do in Apple BASIC.

      5 replies 0 retweets 35 likes
      Show this thread
    9. Tim Sweeney‏ @TimSweeneyEpic May 26
      • Report Tweet
      • Report NetzDG Violation

      Tim Sweeney Retweeted Tikhon Jelvis

      There are many interesting solutions in this thread. The C and JavaScript solutions seen akin to mechanical devices that crank out solutions. One is an astonishingly short Haskell composition of library functions:https://twitter.com/tikhonjelvis/status/1265453175219183616?s=20 …

      Tim Sweeney added,

      Tikhon Jelvis @tikhonjelvis
      Replying to @TimSweeneyEpic
      printXY n = mapM_ print $ replicateM n "xy"
      3 replies 4 retweets 48 likes
      Show this thread
    10. Tim Sweeney‏ @TimSweeneyEpic May 26
      • Report Tweet
      • Report NetzDG Violation

      There is generally a barrier to reading these solutions. In one case you have to run through the behavior of imperative code in your head to understand what it does. In another you have to understand the near magical incantation of pointfree function compositions.

      6 replies 0 retweets 44 likes
      Show this thread
      Tim Sweeney‏ @TimSweeneyEpic May 26
      • Report Tweet
      • Report NetzDG Violation

      The more a solution can resemble a simple recitation of the problem to be solved, and rely on the compiler to generate the code, the better for ease of reading and writing code.

      7:46 PM - 26 May 2020
      • 2 Retweets
      • 68 Likes
      • Sebastien Lebreton Barry Kelly Lars "Sweet Leaf" Doucet Jon Colverson ♡ カム Benjamin Contant Wildlands 🍥 CrimsonnRavee Jomoho Games
      10 replies 2 retweets 68 likes
        1. New conversation
        2. Dmitry Egorov‏ @degorov76 May 26
          • Report Tweet
          • Report NetzDG Violation
          Replying to @TimSweeneyEpic

          The problem is, there are infinitely many ways to formulate a problem and each one has different performance implications. Your formulation implies generating ALL strings of length N and then filtering out those, that have symbols other than X and Y, which is very inefficient.pic.twitter.com/yerQIxLRFe

          2 replies 0 retweets 0 likes
        3. Tim Sweeney‏ @TimSweeneyEpic May 26
          • Report Tweet
          • Report NetzDG Violation
          Replying to @degorov76

          Many of the matching constructs that exist in functional logic languages (and also regular expressions) have “reverse” algorithms that can actually enumerate all possible matches efficiently, without generating temporary values that may fail.

          2 replies 0 retweets 2 likes
        4. 2 more replies
        1. Michael Hale‏ @wakebrdkid May 26
          • Report Tweet
          • Report NetzDG Violation
          Replying to @TimSweeneyEpic

          I find the Wolfram code to be so short and readable that it seems silly to even wrap it as a named function. It's not lazily evaluated though, so only lists that can fit in memory. Bottom version is without syntax sugar for "map" or "apply to each".pic.twitter.com/t9wDdOq627

          0 replies 0 retweets 2 likes
          Thanks. Twitter will use this to make your timeline better. Undo
          Undo
        1. amazing‏ @amazing62473658 May 29
          • Report Tweet
          • Report NetzDG Violation
          Replying to @TimSweeneyEpic

          Tim I beg put arena trios back

          0 replies 0 retweets 1 like
          Thanks. Twitter will use this to make your timeline better. Undo
          Undo
        1. The alternator‏ @Thealternator4 May 26
          • Report Tweet
          • Report NetzDG Violation
          Replying to @TimSweeneyEpic

          Linus said, If you think like machine, writing c makes sense because of one to one correspondence? Can same be said for c++?

          0 replies 0 retweets 0 likes
          Thanks. Twitter will use this to make your timeline better. Undo
          Undo
        1. Ruben Dario Torres‏ @rubicoRs16 May 28
          • Report Tweet
          • Report NetzDG Violation
          Replying to @TimSweeneyEpic

          as simple as removing the crossplay and locking the controller on the pc in fortnite

          0 replies 0 retweets 0 likes
          Thanks. Twitter will use this to make your timeline better. Undo
          Undo
        1. New conversation
        2. The alternator‏ @Thealternator4 May 26
          • Report Tweet
          • Report NetzDG Violation
          Replying to @TimSweeneyEpic

          Is it possible to write assembly by hand that is better than compiler generated? Can you do it?

          1 reply 0 retweets 0 likes
        3. Evelyn Kokemoor‏ @EKokemoor May 27
          • Report Tweet
          • Report NetzDG Violation
          Replying to @Thealternator4 @TimSweeneyEpic

          Certainly. All you need is an assembler program and a text editor. Handwritten assembly is likely to be faster than compiler-generated code since you have supreme control over things like register usage and memory layout.

          1 reply 0 retweets 1 like
        4. 1 more reply

      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