Live data from Hacker News

JSLinux Now Supports x86_64

bellard.org

91–100 of 148 posts

Re: JSLinux Now Supports x86_64

#91
post #2

I've always been fascinated by this, but I have never known what it would be useful for. Does anyone know of any practical use cases?

I guess for the author its learning about how Linux can be ported to the browser. For us, it's more of a nice amusement.

But then again, I've never understood why Buddhist monks create sand mandalas[1] and then let them be blown away (the mandalas not the monks!).

I think one should see it from the authors PoV instead of thinking "what is in it for me". If I were to use this, then to create digital sand mandalas in the browser! ;)

[1]: https://en.wikipedia.org/wiki/Sand_mandala

Re: JSLinux Now Supports x86_64

#92
post #59

Earlier quoted context omitted.

Naw man I just signed up.

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

I wonder in what timeframe the cosmic timeframe is recent.

It's turtles all the way down ....

;)

Re: JSLinux Now Supports x86_64

#93
post #67

Earlier quoted context omitted.

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

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

Aren't there blockchain agents, surely there must be agents running in the blockchain as smart contracts?

Re: JSLinux Now Supports x86_64

#94
post #55

Earlier quoted context omitted.

I don't know man, I didn't see anyone say "this post didn't need to be about ", 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.

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

TBH I’ve been here a while, never felt what the point with the above is but do feel LLM:s are a new valuable affordance in computer use.

I mean I don’t have to remember the horrible git command line anymore which already improves my exprience as a dev 50%.

It’s not all hype bs this time.

Re: JSLinux Now Supports x86_64

#95
post #19

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…

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

Re: JSLinux Now Supports x86_64

#96
post #43
post #7

Earlier quoted context omitted.

Most such emulators have Internet access on the IP level. Therefore, this is a very cheap way to test anything on the Internet. apk add nmap nmap your.domain.com However, the speed is heavily throttled. You can even use ssh and login to your own server. It can also be used as a very cheap way to provide a complete build environment on a single website, for example to teach C/C++. Or to learn the shell. You don't have…

You need backend proxies, the browser doesn't allow ignoring CORS by default.

Exactly. And JSLinux is using one.

Re: JSLinux Now Supports x86_64

#97

Earlier quoted context omitted.

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

How’s performance relative to bare metal or hardware virtualization?

I ran two experiments:

~20x slower for a naive recursive Fibonacci implementation in Python (1300 ms for fib(30) in this VM vs 65ms on bare metal. For comparison, CPython directly compiled to WASM without VM overhead does it in 140ms.)

~2500x slower for 1024x1024 matrix multiplication with NumPy (0.25 GFLOPS in VM vs 575 GFLOPS on bare metal).

Re: JSLinux Now Supports x86_64

#98

Earlier quoted context omitted.

How’s performance relative to bare metal or hardware virtualization?

I ran two experiments: ~20x slower for a naive recursive Fibonacci implementation in Python (1300 ms for fib(30) in this VM vs 65ms on bare metal. For comparison, CPython directly compiled to WASM without VM overhead does it in 140ms.) ~2500x slower for 1024x1024 matrix multiplication with NumPy (0.25 GFLOPS in VM vs 575 GFLOPS on bare metal).

This is not correct. You are using WebVM here, not BrowserPod.

WebVM is based on x86 emulation and JIT compilation, which at this time lowers vector instructions as scalar. This explains the slowdowns you observe. WebVM is still much faster than v86 in most cases.

BrowserPod is based on a pure WebAssembly kernel and WebAssembly payload. Performance is close to native speed.

Re: JSLinux Now Supports x86_64

#100
post #3

Unfortunately, he didn't attach the source code for the 64-bit x86 emulation layer, or the config used to compile the hosted image. For a more open-source version, check out container2wasm (which supports x86_64, riscv64, and AArch64 architectures): https://github.com/container2wasm/container2wasm

"he didn't attach the source code for the 64-bit x86 emulation layer"

It's not open source? If that's the case, it should be in his FAQ.

Post reply on HN