Better HN
topnewbestaskshowjobs
Log inSign up

yuri91

160 karma · joined Jun 22, 2018 (8y ago) · 55 submissions

https://github.com/yuri91
Submissions

comment 1w ago · link · parent

Hi HN! Yuri from the BrowserPod dev team here.

BrowserPod started as a way to run Node.js applications in the browser, but it became so much more. You can run C/C++, Rust, and node applications written for Linux, without changing any code, and get multiprocessing, multithreading, a real filesystem, and networking, all out of the box. We are also working on a Go toolchain, and it will support goroutines running in parallel (which the upstream Wasm targets cannot do). With this release, we want to make it as easy as possible for people to try it out. It's available for free for any purpose, even commercial. If you have any question, let me know!

2.

BrowserPod 4.0: the MicroVM that runs in the browser, now free for any use(browserpod.io ↗)

4 points · by yuri91 · 1w ago · 1 comment

3.

BrowserCode: A browser-based coding playground, powered by WebAssembly(labs.leaningtech.com ↗)

2 points · by yuri91 · 4w ago · 1 comment

4.

Show HN: Codex CLI compiled to WASM running in the browser(browsercode.io ↗)

5 points · by yuri91 · 3mo ago · 1 comment

5.

Beyond WASI: Running any Rust application in the browser with BrowserPod 3.0(labs.leaningtech.com ↗)

2 points · by yuri91 · 3mo ago · discuss

6.

A Linux-like kernel in a browser tab – deep dive in the BrowserPod architecture(labs.leaningtech.com ↗)

4 points · by yuri91 · 6mo ago · discuss

comment 7mo ago · link · parent

if anyone is curious about the technical details, I recently gave a talk about BrowserPod's architecture at the Wasm I/O conference. The recordings of the talks are being published on their YT channel (https://www.youtube.com/playlist?list=PLP3xGl7Eb-4P9UDywG2NO...), but mine is not there yet.

comment 8mo ago · link · parent

I work on a project that does exactly that (and more): https://browserpod.io/.

Currently it supports Node, but we plan to add Python, Ruby, git, and more.

You can see it in action in this demo: https://vitedemo.browserpod.io

More info here: https://labs.leaningtech.com/blog/browserpod-10

Ah and kudos to Syrus and his team for this release. Edge.js's architecture seems to have many similarities with BrowserPod. I see it as proof that we are both going in the right direction!

9.

Show HN: BrowserPod – In-browser Node.js, Vite, and Svelte with full networking(vitedemo.browserpod.io ↗)

2 points · by yuri91 · 1y ago · discuss

comment 1y ago · link · parent

So using agents forces (or at least nudges) you to use go and tailwind, because they are simple enough (and abundant in the training data) for the AI to use correctly.

Does this mean that eventually in a world where we all use this stuff, no new language/framework/library will ever be able to emerge?

Competing with the existing alternatives will be too hard. You won't even be able to ask real humans for help on platforms like StackOverflow because they will be dead soon.

comment 1y ago · link · parent

On the Web, you can do that today. This is what https://webvm.io does for example. It jit-compiles Wasm modules at runtime from the original X86.

comment 1y ago · link · parent

For reference, when loading https://browsercraft.cheerpj.com for the first time (up to loading a world), my browser downloaded ~32MB.

The second time almost nothing.

comment 1y ago · link · parent

Looking forward to progress on the memory control proposal(s). Another reason to want more than 4GB of memory is to have more address space, assuming that you have the ability to map it. With that capability Wasm64 could be useful also for apps that don't plan to use a huge amount for real.

comment 2y ago · link · parent

it does if you log in with Tailscale (networking tab in the side bar).

The terminal-based https://webvm.io has it pre-installed but the graphical demo running Alpine does not.

Luckily, the package manager also works so you can install it with `apk add curl`

comment 2y ago · link · parent

It is a bit unfair to Wasmer, because it incur in the (presumed) overhead of `wasmer run ...`, but I could not figure out if the actual clang binary is directly available after it is downloaded the first time.

comment 2y ago · link · parent

very unscientific benchmark of `clang hello.c`, after a few runs to make sure the code is downloaded/cached:

jslinux: 4.7s

wasmer: 1.3s

webvm: 1.2s

comment 2y ago · link · parent

It's now possible to run Java Web Start applications fully in the browser without any plugins: https://cheerpj.com/cheerpj-jnlp-runner/

It's based on CheerpJ, a JVM that runs in the browser (using JS and Wasm).

18.

Adding AddressSanitizer support to the Cheerp WebAssembly compiler(labs.leaningtech.com ↗)

1 points · by yuri91 · 2y ago · discuss

comment 2y ago · link · parent

Could you elaborate on how you solved the issue? A link to the relevant code would be nice.

comment 3y ago · link · parent

Actually, it was in wasi-libc: https://github.com/WebAssembly/wasi-libc/blob/main/libc-bott...

comment 3y ago · link · parent

I don't necessarily disagree, but implementing these things in your custom runtime is easy. I am more interested in how they achieved them in the more constrained browser environment.

comment 3y ago · link · parent

I am curious about the browser compatibility layer.

Does it support networking? (And if so, is it using a proxy to connect to the internet or is it using a virtualized network layer that stays in the browser?)

How is fork implemented? (Asyncify all the code?)

I was looking at the Github org page (https://github.com/wasix-org), but I can't figure out where this stuff is.

comment 3y ago · link · parent

This is exactly what we do in Webvm: https://leaningtech.com/webvm-virtual-machine-with-networkin...

comment 3y ago · link · parent

I agree. I implemented a subset of WASI, and the best resource was an autogenerated C header with function signatures and very terse comments, buried in the WASI SDK repo.

comment 3y ago · link · parent

Yeah I mean, I wouldn't trust the accuracy of its answer. But I find it funny that it agrees that OpenAI should comply.

comment 3y ago · link · parent

I asked ChatGPT what it thinks about this ruling:

As an AI language model, I do not collect personal data directly as I do not have access to user information. However, I understand that OpenAI, the company that developed and manages the platform, has been ordered to temporarily limit the processing of data of Italian users and is under investigation by the Italian Data Protection Authority.

As an AI language model, my purpose is to provide conversational assistance and generate human-like text based on the input provided by the user. My training data is sourced from publicly available text on the internet and does not specifically target any individual or collect personal data.

I understand that OpenAI has been accused of not providing adequate information to users regarding the collection and storage of personal data and not having a legal basis for such collection. I cannot comment on OpenAI's specific policies and practices regarding data collection and storage, as I am not privy to such information.

However, I believe that it is important for companies to prioritize user privacy and to comply with data protection regulations. I hope that OpenAI will take the necessary measures to address the concerns raised by the Italian Data Protection Authority and implement appropriate safeguards to protect the personal data of its users.

comment 3y ago · link · parent

There you go: https://chrome.google.com/webstore/detail/cheerpj-applet-run...

comment 3y ago · link · parent

Indeed, as I said it can be a downside.

What we usually suggest is to compile most of the application to Wasm (which is also the default), and move the parts that most interact with the outside world to JS.

This can actually result in a speedup if it avoids multiple back-and-forths between JS and Wasm, which is common if you use a Browser/JS api from Wasm.

comment 3y ago · link · parent

Disclaimer: I work on Cheerp.

We do include the C (Musl) and C++ (Clang's libcxx) standard libraries.

And we do have some custom LLVM passes to improve code size and performance (See for example [1] and [2]).

But the main selling point in my opinion is the ability to target JavaScript, and (almost) freely mix data and code compiled to either JS or Wasm.

Emscripten can also target JS, but it still retains the linear memory model of Wasm (or X86, Arm, ...), which means that what you get in the end is a big TypedArray and operations on it using basic types.

With Cheerp, code compiled to JS uses an object memory model: a C++ object will become a garbage-collected JS object. While this has some limitations (you can't do unsafe casts and treat your memory like it's a big array, because it isn't), it allows seamless integration with the Browser (or any third-party) APIs:

- You can store a DOM element directly in your C++ objects (instead of doing everything through tables)

- You can directly manipulate JS Strings instead of constantly converting back and forth to C strings

- You can create nice zero-overhead interfaces to use your C++ classes from manually written JS

- Or, you can just write your whole program in C++, including callbacks for DOM events and whatnot

And you can still compile the peformance-sensitive or type-unsafe parts of your code to Wasm (losing access to some convenience in exchange for speed).

You can get an idea from the Pong tutorial [3], although it's a bit of a contrived example to showcase what can be done.

[1] https://medium.com/leaningtech/partialexecuter-reducing-weba...

[2] https://docs.leaningtech.com/cheerp/Cheerp-PreExecuter.html

[3] https://docs.leaningtech.com/cheerp/Cheerp-Tutorial-Mixed-mo...

comment 4y ago · link · parent

That is also possible: https://docs.leaningtech.com/cheerpj/Getting-Started

See "Converting an applet"

12