Surma

@surma
1.7K Followers
177 Following
72 Posts
DX & monorepo at Shopify.
Craving simplicity, finding it nowhere.
Internetrovert 🏳️‍🌈 He/him.
Homepagehttps://surma.dev
GitHubhttps://github.com/surma
Twitterhttps://x.com/dassurma

@determinatesystems This became real a lot quicker than I thought 😂

There's also a talk about this tomorrow at PlanetNix!

https://mastodon.social/@surma/115146559441732236

`builtins.wasm` is now a (experimental) thing in @determinatesystems’s 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!

https://determinate.systems/blog/builtins-wasm/

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

You know your @js13kGames submission is going well when you have to resort to `btoa` and other seemingly stupid hacks to get below the file size limit.

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)

📝 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.

https://surma.dev/things/langgraph/

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!

Unexpected dangers of vibe coding:
Somehow git ended up tracking its own .git folder and now I can't commit anymore :3

Folks who know their way around the TypeScript type checker, I need help:

https://gist.github.com/surma/be14ca81065bf227cee785870ee8a993

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

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?

https://nodejs.org/api/wasi.html#new-wasioptions

WebAssembly System Interface (WASI) | Node.js v24.10.0 Documentation

🔊 It's new OTMT time! Me and @surma 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 ⬇️
https://offthemainthread.tech/episode/new-view-transition-stuff/

New View Transition Stuff - Off The Main Thread

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 @jaffathecake about JS0, which proposes to split JavaScript into two specifications.

https://offthemainthread.tech/episode/tc39-js0-and-jssugar/

TC39 Roundup Drama Edition Part II: JS0 and JSSugar - Off The Main Thread