Webassembly and Pharo

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Webassembly and Pharo

Vitor Medina Cruz
Hello,

Is the Pharo team aware of the http://webassembly.org/ effort? The Browser Preview tentative is for Q1, do you think it is a good opportunity to push Pharo to web development more easily? I know next to nothing of VM binary (lol), but I am curious on how one could provide an Smalltalk (in this particular Pharo) application in the web using webassembly, as the project is aimed to broaden the development choices to something different than Javascript or Transpilers (which I profoundly wishes to succeed since I hate js) . 

Thanks,
VItor
Reply | Threaded
Open this post in threaded view
|

Re: Webassembly and Pharo

Esteban A. Maringolo
2016-12-27 14:44 GMT-03:00 Vitor Medina Cruz <[hidden email]>:

> Hello,
>
> Is the Pharo team aware of the http://webassembly.org/ effort? The Browser
> Preview tentative is for Q1, do you think it is a good opportunity to push
> Pharo to web development more easily? I know next to nothing of VM binary
> (lol), but I am curious on how one could provide an Smalltalk (in this
> particular Pharo) application in the web using webassembly, as the project
> is aimed to broaden the development choices to something different than
> Javascript or Transpilers (which I profoundly wishes to succeed since I hate
> js) .

It's been mentioned that SqueakJS [1] might benefit from WebAssembly,
and use that as a replacement for its JS VM.
So far it is the only Smalltalk project that is in a position to
benefit from that.

With Craig's JS Bridge [2] you can manipulate the DOM from within a
100% smalltalk image like:
((JS document getElementsByTagName: 'h1') at: 0) at: 'innerHTML' put:
'Squeak said Hello World at ', Time now asString

The images being used for Squeak JS examples are mostly old and the
UI/UX are awkward and convoluted by today standards. But it would be a
matter of having a minimal Pharo image that can run there. So you
would have the power of Smalltalk development, with the ubiquity of JS
runtimes.

Regards,

[1] https://squeak.js.org/
[2] https://squeak.js.org/demo/simple.html#document=JSBridge.st

Esteban A. Maringolo

Reply | Threaded
Open this post in threaded view
|

Re: Webassembly and Pharo

kilon.alios
In reply to this post by Vitor Medina Cruz

On Tue, 27 Dec 2016 at 19:46, Vitor Medina Cruz <[hidden email]> wrote:
Hello,

Is the Pharo team aware of the http://webassembly.org/ effort? The Browser Preview tentative is for Q1, do you think it is a good opportunity to push Pharo to web development more easily? I know next to nothing of VM binary (lol), but I am curious on how one could provide an Smalltalk (in this particular Pharo) application in the web using webassembly, as the project is aimed to broaden the development choices to something different than Javascript or Transpilers (which I profoundly wishes to succeed since I hate js) . 

Thanks,
VItor



From the little I know it may be possible to port Cog VM to WebAssembly , compiling the C sources through emacscripten. As always things are more complex in practice than it may seem.

WebAssembly would be more meaningful for front ends because you can run whatever you want on back ends.

web dev on front end is not doing very well with both mobile and desktop platforms dominated by native apps. Pharo is already native , so unless you really want it for websites to replace JavaScript , but we already have PharoJS , squeakJs and amber for that, you don't need it.

Personally I think for Pharo is more important to have official releases for iOS and Android. JavaScript wise I think we are well covered.

So no I don't think webassembly matters as much for JavaScript as it matters for other languages.  

If you really care about performance just make an app and release it on Mac, windows, Linux, android and iOS app stores. This the route most popular web orientated apps go nowadays ,like Slack, Dropbox, Netflix etc. 

We actually do this side ways and embed a web browser to your app , which I think will be far more flexible than a website with webassembly. 

I think for now we have to wait and see.
Reply | Threaded
Open this post in threaded view
|

Re: Webassembly and Pharo

Vitor Medina Cruz
Thanks for the answers!

On Tue, Dec 27, 2016 at 4:42 PM, Dimitris Chloupis <[hidden email]> wrote:

On Tue, 27 Dec 2016 at 19:46, Vitor Medina Cruz <[hidden email]> wrote:
Hello,

Is the Pharo team aware of the http://webassembly.org/ effort? The Browser Preview tentative is for Q1, do you think it is a good opportunity to push Pharo to web development more easily? I know next to nothing of VM binary (lol), but I am curious on how one could provide an Smalltalk (in this particular Pharo) application in the web using webassembly, as the project is aimed to broaden the development choices to something different than Javascript or Transpilers (which I profoundly wishes to succeed since I hate js) . 

Thanks,
VItor



From the little I know it may be possible to port Cog VM to WebAssembly , compiling the C sources through emacscripten. As always things are more complex in practice than it may seem.

WebAssembly would be more meaningful for front ends because you can run whatever you want on back ends.

web dev on front end is not doing very well with both mobile and desktop platforms dominated by native apps. Pharo is already native , so unless you really want it for websites to replace JavaScript , but we already have PharoJS , squeakJs and amber for that, you don't need it.

Personally I think for Pharo is more important to have official releases for iOS and Android. JavaScript wise I think we are well covered.

So no I don't think webassembly matters as much for JavaScript as it matters for other languages.  

If you really care about performance just make an app and release it on Mac, windows, Linux, android and iOS app stores. This the route most popular web orientated apps go nowadays ,like Slack, Dropbox, Netflix etc. 

We actually do this side ways and embed a web browser to your app , which I think will be far more flexible than a website with webassembly. 

I think for now we have to wait and see.