Sign in

Surma

@surma.dev
3.2K followers 88 following 64 posts

DX & monorepo at Shopify. Craving simplicity, finding it nowhere. Internetrovert 🏳️‍🌈 He/him.

PostsRepliesMedia
Surma @surma.dev · 28/05/2026
This is what I have been working on! Shopify’s monorepo “world”, its nixification, building our Slack-based agent River and now generalizing River’s underlying agentic sandbox infrastructure called Aquifer. Finally I got someting I can share about it! shopify.engineering/under-the-ri...
shopify.engineering
Under the River (2026) - Shopify
What it took to ship our Slack-native agent River, lessons learned, and the substrate that runs beneath it. Co-authored by River.
151
Surma @surma.dev · 05/03/2026
This became real a lot quicker than I thought 😂 There's also a talk about this tomorrow at PlanetNix! bsky.app/profile/surm...
040
Surma @surma.dev · 05/03/2026
`builtins.wasm` is now a (experimental) thing in @determinate.systems’ nix, with a PR open for upstream nix. This lets you extend the nix language by compiling C/C++/Rust/etc into safely sandboxed, platform-independent plugins! determinate.systems/blog/builtin...
determinate.systems
A new chapter for the Nix language, courtesy of WebAssembly
Determinate Nix now supports Wasm functions in Nix expressions, bringing a range of new possibilities to the Nix ecosystem
250
Surma @surma.dev · 23/10/2025
What a flex :D Fwiw, it was similarly easy on the spec side. The algorithm was fully spec’d, just not attached to any globals. And after the spec was written, it took 3 years or something for browsers to go “well I suppose this is kinda useful?” 😂
000
Reposted by Surma
ashley williams @agdubs.bsky.social · 16/10/2025
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...
shopify.com
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.
1131
Surma @surma.dev · 16/10/2025
Thank you!! Fixed :)
010
Surma @surma.dev · 16/10/2025
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...
shopify.com
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.
1173
Reposted by Surma
Jake Archibald @jakearchibald.com · 16/10/2025
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...
jakearchibald.com
The present and potential future of progressive image rendering
Exploring progressive image rendering across JPEG, PNG, WebP, AVIF, and JPEG XL.
1517340
Surma @surma.dev · 07/10/2025
It can handle 400 megapixel manga like no other
1160
Surma @surma.dev · 27/09/2025
JSConf.eu throwback for me
130
Surma @surma.dev · 14/09/2025
Take a look at ImHex!!
100
Surma @surma.dev · 13/09/2025
This is so perfect for you. Can't wait to see you crush it.
020
Surma @surma.dev · 10/09/2025
Alternativprojektsinterressantheitsverstärkung
1200
Surma @surma.dev · 09/09/2025
`enum` yes, `const enum` no. Gotta love TS sometimes :3
030
Surma @surma.dev · 09/09/2025
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.
190
Reposted by Surma
ashley williams @agdubs.bsky.social · 06/09/2025
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
271
Surma @surma.dev · 04/09/2025
For now, I established the convention the the parameters must be pointers to byte arrays containing UTF-8 encoded JSON strings. I think that’s actually quite feasible. But the real deal would be to use the Wasm component model imo
020
Surma @surma.dev · 04/09/2025
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)
180
Reposted by Surma
Jake Archibald @jakearchibald.com · 02/09/2025
📝 Making XML human-readable without XSLT. Turns out, JavaScript works pretty well! jakearchibald.com/2025/making-...
jakearchibald.com
Making XML human-readable without XSLT
JavaScript is right there.
67414
Surma @surma.dev · 27/08/2025
I guess I grouped all kinds of implementation bugs into the "interoperability" category. Probably not super fair to folks working on interop 😅
120
Surma @surma.dev · 27/08/2025
I had to learn it for my UK citizenship test. I didn't do very well, just barely enough to pass.
110
Surma @surma.dev · 27/08/2025
I mean, something working in one browser and not the other is a failure of either interoperability or specification.
250
Surma @surma.dev · 24/08/2025
The thing is that Firefox on iOS is not even Firefox. But whenever I see multiple rAF's nested, especially with a setTimeout sprinkled in, I gotta summon Jake.
2120
Surma @surma.dev · 24/08/2025
@jakearchibald.com plz fix
260
Reposted by Surma
Jake Archibald @jakearchibald.com · 31/07/2025
Starting my new role on Monday. Could be anywhere.
Me, sitting behind a cuddly toy of a fox. Ok it's obviously Firefox.
4441114
Reposted by Surma
Rob Palmer @robpalmer.bsky.social · 30/07/2025
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 👍
let arr = new Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100]);
console.log(arr.toBase64());
// 'SGVsbG8gV29ybGQ='
console.log(arr.toHex());
// '48656c6c6f20576f726c64'
let string = 'SGVsbG8gV29ybGQ=';
console.log(Uint8Array.fromBase64(string));
// Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100])

string = '48656c6c6f20576f726c64';
console.log(Uint8Array.fromHex(string));
// Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100])
1409
Surma @surma.dev · 24/07/2025
Super happy with hyperoptic
010
Surma @surma.dev · 18/07/2025
Oh that's interesting. I wonder if this is from the merge of ChromeOS and Android. Let me see if I can install nix :3
030
Reposted by Surma
Alex Russell @infrequently.org · 17/07/2025
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/
infrequently.org
Links? Links! - Infrequently Noted
Alex Russell on browsers, standards, and the process of progress.
68219
Surma @surma.dev · 11/07/2025
No, I'd want `x.a` to still be an error, which would not be the case with `any`. With `?.` I feel like I'm opting in to props that TS is not aware of
110
Surma @surma.dev · 10/07/2025
Hm... Haven't thought about this nuance too much, but I suppose whenever it is allowed in JS (and behaves by returning undefined) it should be allowed in TS.
100
Surma @surma.dev · 10/07/2025
You are prescribing intent that isn’t here. I know what I am checking. The question boils down to: Should `o?.x` be a *type error* if `x` does not exist on the type of `o`. I claim “no”. Checking/using properties that TS is unaware is often required, especially at an API boundary.
120
Surma @surma.dev · 10/07/2025
I'm proposing that `o?.x` is not a *type error* if `x` does not exist on o's type.
100
Surma @surma.dev · 10/07/2025
Yes. I know how typescript currently works. I'm claiming that TS should change it's behavior here (hence why I said "this should not be a type error, right?"). I thought you were saying that what I was doing here is wrong at the type theory level, which I don't think is the case.
100
Surma @surma.dev · 10/07/2025
Why not?
100
Surma @surma.dev · 10/07/2025
Right, I know how to work around it. But I am asking: Shouldn’t this be accepted by the type checker (because `null?.a` is perfectly valid)
210
Surma @surma.dev · 10/07/2025
Yes, but I specifically don’t want to use any because then you get to access any property without it being an error.
200
Surma @surma.dev · 10/07/2025
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...
1150
Surma @surma.dev · 18/06/2025
🤦 I’m a professional engineer, fyi. Should be fixed now 🙄
170
Reposted by Surma
Jake Archibald @jakearchibald.com · 17/06/2025
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...
jakearchibald.com
Animating zooming using CSS: transform order is important… sometimes
How to get the right transform animation.
1428454
Surma @surma.dev · 17/06/2025
Should be fixed <3
100
Surma @surma.dev · 17/06/2025
Oh how weird! Chrome doesn’t render it like that at all. Thanks mate, will fix that later today!
100
Surma @surma.dev · 17/06/2025
📝 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...
surma.dev
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!
1546
Surma @surma.dev · 28/03/2025
Unexpected dangers of vibe coding: Somehow git ended up tracking its own .git folder and now I can't commit anymore :3
3191
Surma @surma.dev · 17/03/2025
This is IRC. Let's do IRC. I miss IRC
360
Surma @surma.dev · 21/01/2025
I did consider this, but it presumes that every type parameter is only used as a function parameter type. It will get very cumbersome for more complex type signatures (like nested generic). This work has already been done in `mapper`, just not exposed :S
100
Surma @surma.dev · 20/01/2025
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.
gist.github.com
typeargs.ts
GitHub Gist: instantly share code, notes, and snippets.
120
Surma @surma.dev · 18/01/2025
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...
nodejs.org
WebAssembly System Interface (WASI) | Node.js v23.6.0 Documentation
210
Reposted by Surma
Jake Archibald @jakearchibald.com · 15/01/2025
🔊 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-...
offthemainthread.tech
New View Transition Stuff - Off The Main Thread
Recently added stuff, and ideas for the future
810214