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.

For the best Twitter experience, please use Microsoft Edge, or install the Twitter app from Microsoft Store.

  • 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
baldand's profile
Andrew Baldwin
Andrew Baldwin
Andrew Baldwin
@baldand

Tweets

Andrew Baldwin

@baldand

Error: Undefined output

Finland / Estonia
thndl.com
Joined December 2009

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.

    Andrew Baldwin‏ @baldand Feb 1
    • Report Tweet

    I've been exploring Rust+WebAssembly recently. Here's one experiment made with those - my friend said it looked like thousands of fruit loops dancing to "music". Runs in your browser (and maybe even your phone). One file, just 4092 bytes. https://thndl.com/ws4k pic.twitter.com/oIZDtHPvHp

    1:20 PM - 1 Feb 2020
    • 28 Retweets
    • 135 Likes
    • Vote Bernie Dimitris Iliopoulos redaready wagner martins Carsten Munk bsletten Attila Török Enikő Biró Rust Language
    11 replies 28 retweets 135 likes
      1. New conversation
      2. Andrew Baldwin‏ @baldand Feb 1
        • Report Tweet

        On my (android) phone, performance is best in landscape

        3 replies 0 retweets 2 likes
        Show this thread
      3. Andrew Baldwin‏ @baldand Feb 1
        • Report Tweet

        The file is actually one wasm binary file, with just "<!--" added to the start, and the javascript bootstrap embedded as constant data

        1 reply 0 retweets 2 likes
        Show this thread
      4. Andrew Baldwin‏ @baldand Feb 1
        • Report Tweet

        The graphics and audio are rendered with WebGL(1) shaders. The challenge for me was how to bind all the needed functions while staying "in budget" (<4KB) but still with broad compatibility

        1 reply 0 retweets 0 likes
        Show this thread
      5. Andrew Baldwin‏ @baldand Feb 2
        • Report Tweet

        Each of the 4096 rings is a quad instance, positioned in 3D space by the vertex shader. Then in the fragment shader, a local single torus distance field is ray marched for a few steps. Depth testing is on, and pixels that don't hit a surface are discarded.

        1 reply 0 retweets 2 likes
        Show this thread
      6. Andrew Baldwin‏ @baldand Feb 2
        • Report Tweet

        The audio ("music") is also rendered in a fragment shader, with one pixel per sample, using additive synthesis with about 500 sin waves for left and right channels. Output float value is coded into the 4x8bit RGBA and cast back to float32 on host side, then into a WebAudio buffer

        1 reply 0 retweets 2 likes
        Show this thread
      7. Andrew Baldwin‏ @baldand Feb 2
        • Report Tweet

        The version of WebAssembly widely available today in most browsers is limited to being able to call a list of javascript functions you give it at load time, with only numbers as parameters & returns - it cannot call arbitrary Web functions (such as WebGL or WebAudio) directly

        1 reply 0 retweets 0 likes
        Show this thread
      8. Andrew Baldwin‏ @baldand Feb 2
        • Report Tweet

        To avoid needing JS binding functions for all the Web APIs, I used the JS function Reflect.ownKeys() on API classes to enumerate all the available functions, and extract the ones I needed dynamically based on a pre-computed (12-bit) hash - then using JS fn apply() to call them

        1 reply 0 retweets 2 likes
        Show this thread
      9. Andrew Baldwin‏ @baldand 19h19 hours ago
        • Report Tweet

        The (text) shader code is stored with simple dictionary-based compression of keywords. But the rest of the code is not compressed. To keep code density high, I used rust to write a binary code runtime based on 4-bit opcodes and args that manipulate a JS-side stack

        3 replies 0 retweets 1 like
        Show this thread
      10. Andrew Baldwin‏ @baldand 4h4 hours ago
        • Report Tweet

        Some annoyances and challenges: - Android chrome much faster fullscreen - Fullscreen & WebAudio only work if the user interacts. So there has to be an initial state that requires a click/press - Safari WebAudio is still behind webkit prefix and has slightly different behaviour

        0 replies 0 retweets 0 likes
        Show this thread
      11. End of conversation
      1. New conversation
      2. Unai Landa‏ @unai_landa Feb 1
        • Report Tweet
        Replying to @baldand @WasmWeekly

        Works on iOS too, any chance for a post with the setup or compiler configuration ?

        1 reply 0 retweets 0 likes
      3. Andrew Baldwin‏ @baldand Feb 1
        • Report Tweet
        Replying to @unai_landa @WasmWeekly

        Yes, I was thinking of writing a blog post soon to explain a bit about how it was put together

        1 reply 0 retweets 5 likes
      4. 2 more 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

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