Remix.run Logo
simonw 5 hours ago

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.

Claude Code / Codex CLI / etc are all great because they know how to drive Bash and other Linux tools.

The browser is probably the best sandbox we have. Being able to run an agent loop against a WebAssembly Linux would be a very cool trick.

I had a play with v86 a few months ago but didn't quite get to the point where I hooked up the agent to it - here's my WIP: https://tools.simonwillison.net/v86 - it has a text input you can use to send commands to the Linux machine, which is pretty much what you'd need to wire in an agent too.

In that demo try running "cat test.lua" and then "lua test.lua".

zitterbewegung 10 minutes ago | parent | next [-]

While this may be a better sandbox, actually having a separate computer dedicated to the task seems like a better solution still and you will get better performance.

Besides, prompt injection or simpler exploits should be addressed first than making a virtual computer in a browser and if you are simulating a whole computer you have a huge performance hit as another trade off.

On the other hand using the browser sandbox that also offers a UI / UX that the foundation models have in their apps would ease their own development time and be an easy win for them.

the_mitsuhiko 4 hours ago | parent | prev | next [-]

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

That exists: https://github.com/container2wasm/container2wasm

Unfortunately I found the performance to be enough of an issue that I did not look much further into it.

jraph 4 hours ago | parent | prev | next [-]

Simon, this HN post didn't need to be about Gen AI.

This thing is really inescapable those days.

simonw 4 hours ago | parent | next [-]

Parallel thread: https://news.ycombinator.com/item?id=47311484#47312829 - "I've always been fascinated by this, but I have never known what it would be useful for."

I should have replied there instead, my mistake.

stavros an hour ago | parent | next [-]

I don't know man, I didn't see anyone say "this post didn't need to be about <random topic>", HN has just become allergic to LLMs lately.

I'm excited about them and I think discussion on how to combine two exciting technologies are exactly what I'd like to see here.

purerandomness 41 minutes ago | parent | next [-]

You haven't been around here in the Blockchain/NFT/Smart Contract dark ages, have you?

stavros 40 minutes ago | parent [-]

Naw man I just signed up.

yokoprime 20 minutes ago | parent [-]

I chuckled. Everything on earth is recent if you look at it from a cosmic timeframe I guess

stavros 9 minutes ago | parent [-]

To be fair, it really was annoying when everything was blockchain.

bakugo an hour ago | parent | prev [-]

Has there ever been any other topic that was not only the subject of the majority of submissions, but also had a subset of users repeatedly butting into completely unrelated discussions to go "b-but what about <thing>? we need to talk about <thing> here too! how can I relate this to <thing>? look at my <thing> product!"?

You can't just roll in to a random post to tell people about your revolutionary new AI agent for the 50th time this week and expect them not to be at least mildly annoyed.

stavros an hour ago | parent [-]

I'm with you, but he wasn't telling us about his agent, he was saying "this is a cool technology and I've been wanting to use it to make a thing". The thing just happened to be LLM-adjacent.

bakugo 28 minutes ago | parent [-]

Almost all of his comments "just happen" to be LLM-adjacent. At some point it stops "just happening" and it becomes clear that certain people (or their AI bots) are frequenting discussion spaces for the sole purpose of seeking out opportunities to bring up AI and self-promote.

yokoprime 2 minutes ago | parent | next [-]

You are not reading his material i suppose? It’s really one of the better sources for informed takes on llms

stavros 27 minutes ago | parent | prev [-]

Simon has been here since way before LLMs were a thing, and it's fairly obvious (to me, at least) that he's genuinely excited about LLMs, he's not just spamming sales or anything.

darig 2 hours ago | parent | prev [-]

[dead]

yokoprime 22 minutes ago | parent | prev | next [-]

What topics are allowed in your opinion? I very much enjoyed Simon’s comment as it is a use case I also was thinking of.

grimgrin 21 minutes ago | parent | prev [-]

a bit cute that you interacted with the 1 AI thread. there are other threads!

d_philla 3 hours ago | parent | prev | next [-]

Check out Jeff Lindsay's Apptron (https://github.com/tractordev/apptron), comes very close to this, and is some great tech all on its own.

progrium 3 hours ago | parent [-]

It's getting there. Among other things, it's probably the quickest way to author a Linux environment to embed on the web: https://www.youtube.com/watch?v=aGOHvWArOOE

Apptron uses v86 because its fast. Would love it for somebody to add 64-bit support to v86. However, Apptron is not tied to v86. We could add Bochs like c2w or even JSLinux for 64-bit, I just don't think it will be fast enough to be useful for most.

Apptron is built on Wanix, which is sort of like a Plan9-inspired ... micro hypervisor? Looking forward to a future where it ties different environments/OS's together. https://www.youtube.com/watch?v=kGBeT8lwbo0

apignotti 4 hours ago | parent | prev | next [-]

We are working on exactly this: https://browserpod.io

For a full-stack demo see: https://vitedemo.browserpod.io/

To get an idea of our previous work: https://webvm.io

kantord 2 hours ago | parent | prev | next [-]

This is not the technical solution you want, but I think it provides the result that you want: https://github.com/devcontainers

tldr; devcontainers let you completely containerize your development environment. You can run them on Linux natively, or you can run them on rented computers (there are some providers, such as GitHub Codespaces) or you can also run them in a VM (which is what you will be stuck with on a Mac anyways - but reportedly performance is still great).

All CLI dev tools (including things like Neovim) work out of the box, but also many/most GUI IDEs support working with devcontainers (in this case, the GUI is usually not containerized, or at least does not live in the same container. Although on Linux you can do that also with Flatpak. And for instance GitHub Codespaces runs a VsCode fully in the browser for you which is another way to sandbox it on both ends).

stavros an hour ago | parent [-]

This is interesting (and I've seen it mentioned in some editors), but how do I use it? It would be great if it had bubblewrap support, so I don't have to use Docker.

Do you know if there's a cli or something that would make this easier? The GitHub org seems to be more focused on the spec.

bakugo an hour ago | parent | prev [-]

Can I PLEASE click on ONE post on the front page of HN without immediately being met by some grifter trying to derail it to promote their AI product?

Please? I'm begging here.

iamjackg 13 minutes ago | parent [-]

Nobody is promoting a product. Simon is just sharing an experiment he attempted. No products being sold here.