Would it be possible to disable Self’s JIT and just compile the C++ to WASM and use the Self interpreter?

Btw, here’s a project that’s tinkering with JITs on WASM:


Besides all of the other advantages of Self over JS, it would be interesting to compare the performance of Self-on-WASM to JS native. IIRC, JS has mostly moved to an interpreter as mobile platforms like iOS don’t allow native JITs. 

On Nov 28, 2022, at 1:42 PM, Russell Allen <mail@russell-allen.com> wrote:


Yes, that's basically right. I'm using a X11->vnc->canvas_vnc_client pathway because it exists and works, but longer term I'd love to cut out X and just have a Self vnc server (or some higher level protocol)

Running Self directly in the browser under WASM would be very attractive because it would tackle the issue of GUI latency which is probably a more important issue for development than raw VM speed at the moment. 

Presumably it would also make the system more scalable by reducing OurSelf.io server requirements, but that's not really an issue yet :)

I suspect we're talking about writing a new Self VM - is a port of the existing VM to WASM even theoretically possible? Can you write a JIT in WASM? Maybe SqueakJS could be altered to run Self. 

But either way it requires a fair amount of work.

Russell

Steve Dekorte wrote:



Hi Russell,

OurSelf.io looks like an interesting project. As I understand it, you launch a Self instance on a server within a FreeBSD container and then do screen sharing to that instance within a canvas element (and some JS code) in the browser. Is that correct?

Has anyone considered the possibility of porting Self to WASM so it could be run directly in the browser?

Steve