Surma is a user on toot.cafe. You can follow them or interact with them if you have an account anywhere in the fediverse.

Surma @surma@toot.cafe

Did some experimenting with Rust + wasm and it feels really good.

Compiled my entire emulator + parser into a 50K wasm module. No JS runtime or Emscripten needed!

(Static lib for MacOS is ~4MB, but that’s not quite fair b/c wasm module is has dead code eliminated)

I’m processing a big image and it takes 200ms on desktop. Clooney + OffscreenCanvas to the rescue :D

OffscreenCanvas allows you to do image processing in a worker (currently behind a flag in Chrome).

Code: glitch.com/edit/#!/clooney-off
Demo: clooney-offscreen-canvas.glitc

Now that we have static module loading in browsers, we can polyfill dynamic module loading quite easily (probably not 100% spec compliant).

217B gzip’d!

Here’s a gist with both the screenshot code and a minified version: gist.github.com/surma/09f3aada

📣 Blog: How I rendered DOM to a canvas so I can use CSS layouting and text rendering in WebGL (and WebVR!)

dassur.ma/things/dom2texture/

BEGIN KEYBASE SALTPACK SIGNED MESSAGE. kXR7VktZdyH7rvq v5wcIkHbs9uh28n CCfFtMcet62h4nJ ONOS5AGpVX2ymgc F67VEzXQ8LAIZxI ae1AvYfxPrIUleE n9T4KBR5AnZhmKF xFR2zwUmcaEHMCy xqZixAUeTd09DXA VAtIjIn9AfveH7m XJTz5gNrGFtoDCu wSF07WZr98YwmX9 M8mOs2pcM8blIvi dS4BKj0EkXzyV3F REackkXIH0CJ8dj 0TNE9d9Km5mRk1R f5bKmd7j02SC9Xf y8qpEOp6jzeM5ei yuxHKmRzaCyt4TN iWkGZHELJ2vO0i8 M1V8q6i. END KEYBASE SALTPACK SIGNED MESSAGE.

win at the CSSWG meeeting in Tokyo. `border-color` and `outline-color` now accept multiple colors.

Sometimes the focus ring was invisible if it had the same color as the background-color. This way you can have two rings (e.g. black & white) so the focus ring is always visible.

github.com/w3c/csswg-drafts/is toot.cafe/media/7Wom9MfaD-QtE-

I’ve been writing a set of helpers (no abstractions!) for WebGL2.
Here: Rendering 5 million polys at 60fps. Let’s see how far I can push it. toot.cafe/media/g-Fmk6fq1sy9R1

TIL: Uint8ClampedArray is a thing, potentially making code for binary formats & protocols simpler. toot.cafe/media/yMP0Vgzy89Thj5

Reddit open-sourced their code for the /r/places experiment and explained how they scaled it.

redditblog.com/2017/04/13/how- toot.cafe/media/BlDU91zHcxS7Tp

AnimationWorklet finally has a (proposed) spec! It’s going to be discussed next week at the Houdini f2f in Tokyo.

wicg.github.io/animation-workl toot.cafe/media/PN1cTyxbR3skw2

Might as well cross-share on Mastodon :sweat_smile:

📹 I made a video about the refactor of simplehttp2server for 🔥Firebase support and less setup friction:

youtube.com/watch?v=OLWyOIOaeP

Surma boosted

Mastodon should definitely look into getting a pinned tweet-type deal for profiles so we can pin #introductions

are a thing, apparently!

Hi! I’m Surma, I work on the Chrome DevRel team in London and therefore, and I do web stuff.

I work mostly on performance and loading but I am also a member of the CSS working group, the Houdini task force and the Service Worker working group.

My most recent article: developers.google.com/web/upda if you fancy a read.

We already have a trending bot. That’s amazing.

Surma boosted

Also: to fix Masto latency issues, can we please get together and contribute PWA / Service Worker support to https://tootsuite/mastodon ? We have like 150 brilliant web folks here, surely we can do this! ⚡️

Dayum. I got a spot on this prestigious server