Hello all! As some of you might be aware, there has been a lot of progress in the web-world in developing WebAssembly. Many environments and languages can now compile to the wasm binary format. Projects are doing things like putting full Python interpreters and environments in the browser, etc. There is even a nascent movement to come up with a consistent system interface standard for WebAssembly, allowing developers to run wasm code on any platform -- not just the web. My question is this: what would it take to get the opensmalltalk-vm to compile to WebAssembly and has anyone involved with it considered the option so far? There would be a great many advantages to running a Smalltalk in the browser this way. — |
$10,000,000 usa — |
> On 2019-03-28, at 2:06 PM, johnmci <[hidden email]> wrote: > > $10,000,000 usa At least. tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim World Ends at Ten! Pictures at 11 on Fox News! |
In reply to this post by David T Lewis
Yes, I've been following WASM since it attained full browser coverage in 2017. I've built the OpenSmalltalk stack interpreter with emscripten, no major gotchas. Of course we want a WASM Cog. We're waiting for WASM to do garbage collection, and provide an API for running your own generated native code. I expect both of these to arrive in the next two years. In the meantime, I'm getting very good results running Squeak in web browser and on Node with SqueakJS. The simple bytecode-to-JS dynamic translator that Bert wrote for it is a big win. You get a decent translation of bytecodes to native code via the underlying JS engine (V8 et al). — |
In reply to this post by timrowledge
On Fri, 29 Mar 2019 at 05:17, tim Rowledge <[hidden email]> wrote:
Really? So ten years for 5 x $200k programmers? I'd hope we could do better than that ;) On Fri, 29 Mar 2019 at 08:16, Craig Latta <[hidden email]> wrote:
btw, Is that then a Slang to SqueakJS writer? Or is the bytecode-to-JS happening as some other level? cheers -ben |
In reply to this post by David T Lewis
It takes a Smalltalk CompiledMethod object, and transcribes the instructions (bytecodes) into a JavaScript method, and makes sure to run that instead the next time the CompiledMethod would normally run. Then V8 optimizes the hell out of that transcribed JS method. It's pretty neat, and makes a huge difference for lots of things, including the UI. — |
In reply to this post by Ben Coman
Hi Ben-- > > In the meantime, I'm getting very good results running Squeak in web > > browser and on Node with SqueakJS. The simple bytecode-to-JS dynamic > > translator that Bert wrote for it is a big win. You get a decent > > translation of bytecodes to native code via the underlying JS engine > > (V8 et al). > > btw, Is that then a Slang to SqueakJS writer? Or is the bytecode-to-JS > happening as some other level? It takes a Smalltalk CompiledMethod object, and transcribes the instructions (bytecodes) into a JavaScript method, and makes sure to run that instead, whenever the CompiledMethod would normally run. Then V8 optimizes the hell out of the native code for that transcribed JS method. It's pretty neat, and makes a huge difference for lots of things, including the UI. -C -- Craig Latta Black Page Digital Amsterdam :: San Francisco [hidden email] +31 6 2757 7177 + 1 415 287 3547 |
On Sat, 30 Mar 2019 at 15:30, Craig Latta <[hidden email]> wrote:
When is the source code for that transcriber? cheers -ben |
> > [The SqueakJS VM] takes a Smalltalk CompiledMethod object, and > > transcribes the instructions (bytecodes) into a JavaScript method, > > and makes sure to run that instead, whenever the CompiledMethod > > would normally run. Then V8 optimizes the hell out of the native > > code for that transcribed JS method. It's pretty neat, and makes a > > huge difference for lots of things, including the UI. > > Where is the source code for that transcriber? https://github.com/bertfreudenberg/SqueakJS/blob/master/jit.js Used by: https://github.com/bertfreudenberg/SqueakJS/blob/master/vm.js -C -- Craig Latta Black Page Digital Amsterdam :: San Francisco [hidden email] +31 6 2757 7177 + 1 415 287 3547 |
In reply to this post by David T Lewis
Do you want good performance? Do you want to use the ManagedObject layer provided by WASM or OpenSmalltalk-VM own GC? The latter would require to keep a shadow stack since the WASM stack cannot be walked easily for GC. Do you want to JIT to WASM or just an interpreter? My main concern is that implementing high level languages on top of WASM is just starting to be possible in a nice way, and I think we should wait for other people to struggle and to re-negotiate some APIs with the WASM people before trying. Each WASM API change have to be validated by multiple people from different companies after being prototyped, so it can take time. Depending on what you want it may not be 10M$, but if you want a solid high-performance low-memory-footprint runtime and you don't want to wait multiple years for other people to struggle implementing other languages first, that would be a fair initial investment. On Thu, Mar 28, 2019 at 9:36 PM Eric Gade <[hidden email]> wrote:
|
In reply to this post by Craig Latta
On Sat, 30 Mar 2019 at 16:57, Craig Latta <[hidden email]> wrote:
Thx. Really interesting perusing that. Now was vm.js completely hand crafted? Or generated somehow from VMMaker Slang code? cheers -ben |
Free forum by Nabble | Edit this page |