[PD] [OT] wasm (was Re: Present and future of WebPd)

Chris McCormick chris at mccormick.cx
Thu Sep 10 08:42:41 CEST 2015


On 10/09/15 14:10, s p wrote:
> This said, We're not there yet, there will be probably a lot of
> opposition, like there was with asm.js (people saying we should rather
> optimize JS engines, as there is apparently lots lots of room for
> improvement).

Yep. These things tend to take relative ages (unless you happen to 
factor in 200,000 years of Homo Sapiens history before computers 
existed!) and then suddenly they are working and deployed everywhere. I 
feel like this particular development will be in browsers quicker than 
we expect because all of the major browser developers are on board 
already and it's such a no-brainer.

> Also, writing browser code fully in C++ would be a huge step backwards
> in terms of usability for software developers.

Different tasks need different tools. Agree that C++ is unlikely to be a 
good choice for web apps. There is a lot of wonderful code written in 
C++ that people will want to deploy and use though, especially on the 
library side of things.

There are a ton of other languages that would be excellent in the 
web-app space though, and many will be quicker and safer to develop with 
than JS. Python & Go spring to mind. There are already Python 
interpreters that compile down to JS, so it's likely they will appear 
with wasm targets very quickly, especially given PyPy.

PHP is another one - as loathsome and offensive a language as it is 
there are huge number of developers with existing code in PHP who are 
just itching to deploy right into your browser (thus opening up a giant 
attack surface the size of the USA, China & Russia combined ha ha!). If 
somebody writes a wasm target for PHP just you watch how fast JS 
disappears off the radar of popular web languages*! :)

Javascript is an interesting and fun language but not the best for 
everything. I am very happy at the prospect we may have even better 
choices soon inside the browser. Already existing better choices** not 
withstanding. :)

[Aside: making everyone code everything callback-based-async was 
probably a mistake which they have finally realised and are undoing with 
`yield` and `await`. Other languages which don't do this are much more 
pleasurable to code in for many tasks that require concurrency (Pd!).]

 > Probably the thing that
> is going to happen is rather that JS will stay the go to language, and
> small CPU-intensive functions will be reimplemented using webassembly.

We should make a bet with some quantitative constraints. :)

> And anyways, even if al of this happen, that won't be for another 5
> years before it lands ... and in 5 years so many things can happen in
> software world (skynet etc ...)!

True!

"It's hard to make predictions, especially about the future." -Niels Bohr.

Cheers,

Chris.

* http://w3techs.com/technologies/overview/programming_language/all - 
Obviously popularity does not imply quality.

** https://github.com/clojure/clojurescript = yet another way to 
understand the value of everything and the cost of nothing  - now 
shinier & in your browser! :D

-- 
http://mccormick.cx/



More information about the Pd-list mailing list