4 ms·
PNaCl is more than two years away from mainstream adoption though. The system is huge and complex due to the fact that it stretches LLVM far beyond what it was
by ootachi 15y ago
PNaCl is more than two years away from mainstream adoption though. The system is huge and complex due to the fact that it stretches LLVM far beyond what it was meant to handle. For example, LLVM was never designed to have platform-independent bitcode; to make it work they basically had to find ways to make the x86 data layout sorta work for all platforms. Additionally, LLVM bitcode is huge; it was designed to be an intermediate language for compilers, not a packaging mechanism for application distribution.
If we were to use PNaCl, even once Google sorts out all the technical issues, in order to compete with native mobile apps, a whole ecosystem of toolkits and libraries will have to be created. That will take time, and we will see growing pains just like the ones we're seeing with mobile app frameworks for JavaScript.
Compare this to the status quo with JS. In two years, JavaScript will be as fast as NaCl for 90% of applications out there. Look at the speed of LuaJIT, which is the closest cousin to the modern JS engines, compared to C [1]. And this is on scientific number-crunching microbenchmarks! We don't have to throw away the lingua franca of the web in order to achieve good performance.
[1]: http://lua-users.org/lists/lua-l/2009-06/msg00071.html http://lua-users.org/lists/lua-l/2009-06/msg00071.html
- nupark2 15y agoIf PNaCL or similar can't be leveraged, then the web won't keep up as an app platform. Let's look at the modern platforms: - Microsoft is innovating heavily on the language front with C#, F#, and the CLR. I'm not a big fan of Microsoft's platforms, but there is no denying that they're doing very interesting work in language and runtime design. - Google is innovating with Android, the Dalvik VM, and an application development framework not too much worse than Apple's. You have the NDK at your disposal, and many GL-based games can be ported without too much complexity from iOS. Numerous languages are being ported to the JVM, and are supported on Android. - Apple is innovating with UIKit and high-level high-quality application development frameworks. Even if ObjC isn't particularly cutting edge, it's a reasonable solution for building large applications, it's fast enough, and you've got C at hand. The browser makers, however, are fighting over whether or not WebSockets can actually be included in the browser; meanwhile, Apple rolled out GameKit support for automatic peer-to-peer session negotiation over bluetooth, wifi, and the internet to support multiplayer games. The web as an application platform is broken, and will continue to be so as long as browser makers attempt to force everyone to stick to one language, lacking a standardized platform API, using a poor view model (DOM/HTML/CSS), stuck in the browser's limited sandbox.
- takapa 15y agoTotally agree with you. I wrote this a few years ago on the exact same subject and advocated that a real VM plus application stack is required for the browser if it is to compete with native applications. http://preview.tinyurl.com/webappsrslow http://preview.tinyurl.com/webappsrslow