Surma
surma.dev
Surma
@surma.dev
DX at Shopify. Web Platform Advocate.
Craving simplicity, finding it nowhere.
Internetrovert 🏳️‍🌈 He/him.
Pinned
Surma @surma.dev · Jun 17
📝 First blog in a long time!

I always like “flow-based” programming, and it’s a very powerful paradigm. LangGraph lets you codify complex workflows as graphs, and also integrates really well with LangChain, if your workflow is LLM-driven.

surma.dev/things/langg...
LangGraph for complex workflows — surma.dev
I may be late to the party, but LangGraph lets you build complex workflow architectures and codify them as powerful automations. Also LLMs, if you want. But you don’t have to!
surma.dev
Reposted by Surma
do you like geology puns and have an unhealthy obsession with package management? 🌋📦

we’re building a nix-based monorepo build system (in Rust!) at Shopify and we’re hiring.

global, remote, high-autonomy. DMs open.

www.shopify.com/careers/soft...
Software Engineer - Monorepo Systems (Rust & Nix)
ARE YOU READY? Join the fully-remote rocketship. Find your next quest to make commerce better for everyone. Unlimited growth. Crafters and hard workers only. Apply within.
www.shopify.com
October 16, 2025 at 2:56 PM
I have been working on the nix & Rust codebase that builds Shopify’s monorepo, and there’s so much left to do that we need help.

If you are interested, apply here to join us! DM me if you have questions!

www.shopify.com/careers/soft...
Software Engineer - Monorepo Systems (Rust & Nix)
ARE YOU READY? Join the fully-remote rocketship. Find your next quest to make commerce better for everyone. Unlimited growth. Crafters and hard workers only. Apply within.
www.shopify.com
October 16, 2025 at 4:20 PM
Reposted by Surma
I dug into progressive image rendering and found a bunch of common assumptions aren't quite true.

➡️ JPEG & WebP progressive-renders worse in Safari
➡️ AVIF _does_ support progressive
➡️ But JPEG XL in Safari doesn't
➡️ JPEG XL decodes much slower than AVIF
⬇️ and more

jakearchibald.com/2025/present...
The present and potential future of progressive image rendering
Exploring progressive image rendering across JPEG, PNG, WebP, AVIF, and JPEG XL.
jakearchibald.com
October 16, 2025 at 10:16 AM
You know your JS13k submission is going well when you have to resort to `btoa` and other seemingly stupid hacks to get below the file size limit.
September 9, 2025 at 9:45 AM
Reposted by Surma
if this type of thing makes you say “this is cursed af, where do i sign up” DM me, we’re looking for some teammates
Nix friends: How terrible is this idea?

I added `builtins.runWasm` to nix, allowing you to call out to Wasm. The Wasm is reset every time, so the functions remain pure. This gives you a (performant?) escape hatch for things that Nix is missing. E.g parsing YAML (here: via Rust)
September 6, 2025 at 3:37 PM
Nix friends: How terrible is this idea?

I added `builtins.runWasm` to nix, allowing you to call out to Wasm. The Wasm is reset every time, so the functions remain pure. This gives you a (performant?) escape hatch for things that Nix is missing. E.g parsing YAML (here: via Rust)
September 4, 2025 at 2:44 PM
Reposted by Surma
📝 Making XML human-readable without XSLT.

Turns out, JavaScript works pretty well!

jakearchibald.com/2025/making-...
Making XML human-readable without XSLT
JavaScript is right there.
jakearchibald.com
September 2, 2025 at 5:23 PM
Reposted by Surma
Starting my new role on Monday. Could be anywhere.
July 31, 2025 at 12:57 PM
Reposted by Surma
ECMAScript excitement 😉

Congrats to @bakkot.com on advancing UInt8Array ↔️ Base64/Hex to Stage 4 at TC39 this week 🎉

UInt8Array.prototype.
toBase64
toHex

UInt8Array.
fromBase64
fromHex

It lets you convert directly between binary data and Base64/Hex strings 👍
July 30, 2025 at 6:56 AM
Reposted by Surma
I spent hours and hours trawling through the sites of some of the world's best web developers, and despite the horrors I regularly experience in my daily work in Big JavaScript Territory, what I saw left me hopeful:

infrequently.org/2025/07/links/
Links? Links! - Infrequently Noted
Alex Russell on browsers, standards, and the process of progress.
infrequently.org
July 16, 2025 at 11:17 PM
Convince me I am wrong: This should not be a type error, right?
- I asserted it’s an object
- I am using `?.` for property access

www.typescriptlang.org/play/#code/G...
July 10, 2025 at 1:40 PM
Reposted by Surma
CSS uses a complex algorithm to decide how to animate transforms. If you get it wrong, as many folks do, you end up with an unnatural animation.

Here's how it works, and how to avoid the pitfalls.

jakearchibald.com/2025/animati...
Animating zooming using CSS: transform order is important… sometimes
How to get the right transform animation.
jakearchibald.com
June 17, 2025 at 11:20 AM
📝 First blog in a long time!

I always like “flow-based” programming, and it’s a very powerful paradigm. LangGraph lets you codify complex workflows as graphs, and also integrates really well with LangChain, if your workflow is LLM-driven.

surma.dev/things/langg...
LangGraph for complex workflows — surma.dev
I may be late to the party, but LangGraph lets you build complex workflow architectures and codify them as powerful automations. Also LLMs, if you want. But you don’t have to!
surma.dev
June 17, 2025 at 4:19 PM
Unexpected dangers of vibe coding:
Somehow git ended up tracking its own .git folder and now I can't commit anymore :3
March 28, 2025 at 11:01 AM
Folks who know their way around the TypeScript type checker, I need help:

gist.github.com/surma/be14ca...

How do I figure out what types the type parameters have been bound to given a `CallExpression`? I know the answer is in `resolvedSignature.mapper`, but that’s not a public API.
typeargs.ts
GitHub Gist: instantly share code, notes, and snippets.
gist.github.com
January 20, 2025 at 11:55 AM
Wait, am I dumb? What does NodeJS' WASI implementation only accept file descriptor numbers for stdio? Why don't they allow a Readables/Writables? How are you supposed to capture the output of a WASI module?

nodejs.org/api/wasi.htm...
WebAssembly System Interface (WASI) | Node.js v23.6.0 Documentation
nodejs.org
January 18, 2025 at 1:46 PM
Reposted by Surma
🔊 It's new OTMT time! Me and @surma.dev chat through some newer View Transitions features that have recently landed in browsers, and some things that might land this year.

⬇️ Pop this in your ears ⬇️
offthemainthread.tech/episode/new-...
New View Transition Stuff - Off The Main Thread
Recently added stuff, and ideas for the future
offthemainthread.tech
January 15, 2025 at 11:39 AM
Reposted by Surma
Ooh just caught this #OTMT episode on customizable select 😎 Always love to hear @surma.dev and @jakearchibald.com chat about the web and especially the features I’ve been working on for the past few years 🥰

offthemainthread.tech/episode/styl...
The new stylable <select> element - Off The Main Thread
And 10 other features we got along the way
offthemainthread.tech
January 7, 2025 at 12:07 AM
Reposted by Surma
I apologize for splitting the last OTMT episode into two parts. It was sincerely unplanned.

🎧 Part II of the TC39 Drama 🌶️ Roundup is now out!

In this one, I talk to @jakearchibald.com about JS0, which proposes to split JavaScript into two specifications.

offthemainthread.tech/episode/tc39...
TC39 Roundup Drama Edition Part II: JS0 and JSSugar - Off The Main Thread
Splitting JavaScript into two languages
offthemainthread.tech
December 16, 2024 at 1:25 PM
I apologize for splitting the last OTMT episode into two parts. It was sincerely unplanned.

🎧 Part II of the TC39 Drama 🌶️ Roundup is now out!

In this one, I talk to @jakearchibald.com about JS0, which proposes to split JavaScript into two specifications.

offthemainthread.tech/episode/tc39...
TC39 Roundup Drama Edition Part II: JS0 and JSSugar - Off The Main Thread
Splitting JavaScript into two languages
offthemainthread.tech
December 16, 2024 at 1:25 PM
🎧 A brand-new OTMT episode should be in your podcast players by now:
The TC39 Roundup 🌶️ Drama Edition — Part I

I talk to @jakearchibald.com about the TC39 Structs proposal and how it is a big step towards shared-data multithreading in JS.

offthemainthread.tech/episode/tc39...
TC39 Roundup Drama Edition Part I: Shared Structs - Off The Main Thread
Sharing JS objects between worker and main thread
offthemainthread.tech
December 3, 2024 at 2:11 PM
Reposted by Surma
An average day spent inspecting WASM binaries
November 25, 2024 at 7:56 AM
Reposted by Surma
🔊 ICYMI: @surma.dev talked through Nix in the last OTMT, comparing it to other build systems we'd looked at in previous episodes offthemainthread.tech/episode/nix/
More build tools: Nix - Off The Main Thread
and nixpkgs and NixOS and maybe even the web
offthemainthread.tech
November 18, 2024 at 1:48 PM
Get your 👂ears ready for a brand new OTMT episode!

A while ago we talked about Bazel, and now it's time to take a closer look at Nix! How does it work? Is it any good for web development? In this episode, @jakearchibald.com and I try to provide answers.

offthemainthread.tech/episode/nix/
More build tools: Nix - Off The Main Thread
and nixpkgs and NixOS and maybe even the web
offthemainthread.tech
October 29, 2024 at 3:57 PM