I think your assessment is on the ball. It is a shame about PNaCl, because that feels like the correct way to go about this, and emscripten looks hacky.

----- Original Message -----
From: Edward Costello <edwardcostello@gmail.com>
Date: Tuesday, November 5, 2013 4:09 pm
Subject: Re: [Cs-dev] Cross compiling C++ for various virtual machines
To: Developer discussions <csound-devel@lists.sourceforge.net>


> Yes, this is a real problem. Emscripten is universal yet no threads, performs best on Firefox, and will probably never be as fast as native. PNaCl is faster, has threads but is only running in Chromium. I feel at this point Emscripten is the very flawed best option, if however PNaCl received wider support then it would be a no brainer. 

>

> -- 
> Edward Costello
>

>

> On Tuesday 5 November 2013 at 14:06, Michael Gogins wrote:



> There appear to be some differences with respect to threading. PNaCl looks better for threading.

> I agree with Edward that standards are very, very important. One baseline assumption of Csound is that it rests upon software engineering and computer protocol standards.

> I'd hate to gain a universal platform and lose parallel execution in Csound, however.

> Here's what appears to be an informed comparison between asm.js (Emscripten with optimization, essentially) and PNaCl: http://games.greggman.com/game/thoughts-on-asm-js-vs-pnacl/

> Regards,
> Mike

> ===========================
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com

> One advantage of NaCl over pure java_script is the audio implementation, which I reckon is faster (by the looks  of it).
>
> Victor
> On 5 Nov 2013, at 00:04, Michael Gogins wrote:
>
> > This page:
> >
> >   http://flohofwoe.blogspot.com/2013/08/emscripten-and-pnacl-build-systems.html
> >
> > compares Emscripten to PNaCl.
> >
> > The same demos will run either in Emscripten, or in PNaCL.
> >
> > You have get the latest Google dev channel Chrome Canary to run PNaCl, at least on Windows.
> >
> > This is very thought-provoking. You are watching two mature runtimes for bytecode compiled from C or C++.
> >
> > According to the developer, using the latest Firefox gets even faster performance out of Emscripten. I am going to try that now...
> >
> > Regards,
> > Mike
> >
> >
> > ===========================
> > Michael Gogins
> > Irreducible Productions
> > http://michaelgogins.tumblr.com
> > Michael dot Gogins at gmail dot com
> >
> >
> > On Mon, Nov 4, 2013 at 3:53 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
> > Yes, but you still have one binary for each platform that way. This way, you have one binary for all platforms.
> >
> > Regards,
> > Mike
> >
> > On Nov 4, 2013 2:56 PM, "Victor Lazzarini" <Victor.Lazzarini@nuim.ie> wrote:
> > In a way this is already achievable via Javasound and JAWS. We did a proof-of-concept study a couple of years ago that indicated it could be done, with
> > the java Csound wrapper with Csound linked statically in it. With natively compiled csound jnis, JAWS then delivers the correct JNI to each
> > client OS.
> >
> > Victor
> > On 4 Nov 2013, at 19:40, Michael Gogins wrote:
> >
> > > What is motivating me here is the thought of something like Csound 6 for Android that runs on any browser, or at least on Chrome on any platform, and ties into java_script as well as into the browser's image, video, and above all audio facilities. It something a lot closer to a "universal" Csound application. And it would be easy to do user-defined widgets. Frankly, this could save us all a huge load of work.
> >
> > Dr Victor Lazzarini
> > Senior Lecturer
> > Dept. of Music
> > NUI Maynooth Ireland
> > tel.: +353 1 708 3545
> > Victor dot Lazzarini AT nuim dot ie
> >
> >
> >
> >
> > ------------------------------------------------------------------------------
> > Android is increasing in popularity, but the open development platform that
> > developers love is also attractive to malware creators. Download this white
> > paper to learn more about secure code signing practices that can help keep
> > Android apps secure.
> > http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
> > _______________________________________________
> > Csound-devel mailing list
> > Csound-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/csound-devel
> >
> > ------------------------------------------------------------------------------
> > November Webinars for C, C++, Fortran Developers
> > Accelerate application performance with scalable programming models. Explore
> > techniques for threading, error checking, porting, and tuning. Get the most
> > from the latest Intel processors and coprocessors. See abstracts and register
> > http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk_______________________________________________
> > Csound-devel mailing list
> > Csound-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>
> ------------------------------------------------------------------------------
> November Webinars for C, C++, Fortran Developers
> Accelerate application performance with scalable programming models. Explore
> techniques for threading, error checking, porting, and tuning. Get the most
> from the latest Intel processors and coprocessors. See abstracts and register
> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


> ------------------------------------------------------------------------------
> November Webinars for C, C++, Fortran Developers
> Accelerate application performance with scalable programming models. Explore
> techniques for threading, error checking, porting, and tuning. Get the most
> from the latest Intel processors and coprocessors. See abstracts and register
> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk

> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

>
> -----------------------------------------------------------------
> -------------
> November Webinars for C, C++, Fortran Developers
> Accelerate application performance with scalable programming
> models. Explore
> techniques for threading, error checking, porting, and tuning.
> Get the most
> from the latest Intel processors and coprocessors. See abstracts
> and register
> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini, Senior Lecturer, Dept. of Music,
National University of Ireland, Maynooth