Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The thing I most want to use this (or some other WASM Linux engine) for is running a coding agent against a virtual operating system directly in my browser.

Well, there it is, the dumbest thing I'll read on the internet all week.

Most of the engineering in Linux revolves around efficiently managing hardware interfaces to build up higher-level primitives, upon which your browser builds even higher-level primitives, that you want to use to simulate an x86 and attached devices, so you can start the process again? Somewhere (everywhere), hardware engineers are weeping. I'll bet you can't name a single advantage such a system would have over cloud hosting or a local Docker instance.

Even worse, you want this so your cloud-hosted imaginary friend can boil a medium-sized pond while taking the joyful bits of software development away from you, all for the enrichment of some of the most ethically-challenged members of the human race, and the fawning investors who keep tossing other people's capital at them? Our species has perhaps jumped the shark.



> while taking the joyful bits of software development away from you

Quick question: by "joyful bits of software development," do you mean the bit where you design robust architectures, services, and their communication/data concepts to solve specific problems, or the part where you have to assault a keyboard for extended periods of time _after_ all that interesting work so that it all actually does anything?

Because I sure know which of these has been "taken from me," and it's certainly not the joyful one.


I guess I enjoy solving problems, and recognize that the devil is always in the details, so I don't get much satisfaction until I see the whole stack working in concert. I never had much esteem for "architects" who sketch some blobs on the whiteboard and then disappear. I certainly wouldn't want to be "that guy" for anyone else, and I'm not even sure I could do it to an LLM.


> Well, there it is, the dumbest thing I'll read on the internet all week.

Rude.

In case you're open to learning, here's why I think this is useful.

The big lesson we've learned from Claude Code, Codex CLI et al over the past twelve months is that the most useful tool you can provide to an LLM is Bash.

Last year there was enormous buzz around MCP - Model Context Protocol. The idea was to provide a standard for wiring tools into LLMs, then thousands of such tools could bloom.

Claude Code demonstrated that a single tool - Bash - is actually much more interesting than dozens of specialized tools.

Want to edit files without rewriting the whole thing every time? Tell the agent to use sed or perl -e or python -c.

Look at the whole Skills idea. The way Skills work is you tell the LLM "if you need to create an Excel spreadsheet, go read this markdown file first and it will tell you how to run some extra scripts for Excel generation in the same folder". Example here: https://github.com/anthropics/skills/tree/main/skills/xlsx

That only works if you have a filesystem and Bash style tools for navigating it and reading and executing the files.

This is why I want Linux in WebAssembly. I'd like to be able to build LLM systems that can edit files, execute skills and generally do useful things without needing an entire locked down VM in cloud hosting somewhere just to run that application.

Here's an alternative swipe at this problem: Vercel have been reimplementing Bash and dozens of other common Unix tools in TypeScript purely to have an environment agents know how to use: https://github.com/vercel-labs/just-bash

I'd rather run a 10MB WASM bundle with a full existing Linux build in then reimplement it all in TypeScript, personally.


I agree, bash, sed, etc. are great, but a VM running inside a browser seems like the least efficient way to access them. Even if you're stuck on Windows, Cygwin has been a thing for 30 years now, and WSL for ten or so? There should be plenty of ways to set up a sandbox without having the simulate an entire machine.

It sounds like what you're really trying to recreate is the Software Tools movement from 50 years ago, where there was a push to port the UNIX/BTL utilities to the widest possible variety of systems to establish a common programming and data manipulation environment. It was arguably successful in getting good ports available just about anywhere, evolving into GNU, etc., but it never really reached its apotheosis. That style of clear, easy-to-read-and-write software was still largely killed off by a few big industry players pushing a narrative that "enterprise" has to mean relational databases and distributed objects. It would be FASCINATING if AI coding agents are the force that brings it back.


This isn't meant to be a daily driver. I'd like the option to build systems that occasionally run filesystem agent loops on an ad-hoc basis, for any user. A browser is a really good platform for that.


So are Cygwin and WSL, though, for those who don't already have the luxury of being on Linux or UNIX (incl. MacOS). I'm sure there are uses for running full-system emulators inside a browser, but access to bash and sed and gawk doesn't seem like one of them. Seriously, if that's the best way to get access to good text manipulation tools, why aren't you ditching your entire OS?


Because bash and sed and suchlike turn out to be the most useful tools for unlocking the abilities of AI agents to do interesting things - more so than previous attempts like MCP.


> 10MB WASM bundle with a full existing Linux build

We'll get there I'm sure of it. In case you hadn't seen: https://github.com/edubart/webcm

> Linux RISC-V virtual machine, powered by the Cartesi Machine emulator, running in the browser via WebAssembly

> a single 32MiB WebAssembly file containing the emulator, the kernel and Alpine Linux operating system. Networking supports HTTP/HTTPS requests, but is subject to CORS restrictions


My demo here loads 12.7MB (if you watch the browser network panel) to get to a usable Linux machine, it even has Lua! https://tools.simonwillison.net/v86


Ooh that looks great, I'll enjoy exploring this!


> I'll bet you can't name a single advantage such a system would have over cloud hosting or a local Docker instance.

Cheaper than renting a server, more isolated than a container.


But Docker is free (unless you're a fairly large business, in which case containerd is still free, and you can either pay for the front-end license or figure out how to set up one of the free alternatives), and from what perspective are the isolations available for the containerd process inferior to those available for your browser process? The former was at least designed from the ground up with security, auditing, quotas etc. in mind, and offers better per-container granular control than your browser offers per-tab.


I would argue the exact opposite: Linux is great, but it wasn't really designed with a focus on containing hostile software, and while containers have come to be a decent security barrier, they're still one kernel bug away from compromise. On the other hand, the browser is very accustomed to being the most exposed security-sensitive software on a machine, and modern browsers and wasm in particular are designed against that threat. Heck, wasm is so good for security that Mozilla started compiling components to wasm and then back into native code to get memory safety ( https://hacks.mozilla.org/2020/02/securing-firefox-with-weba... ).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: