3 ms·
You know, I keep seeing this "proprietary NaCl" statement around, and having played with it myself, I have a bit of a soapbox. There's nothing proprietary about
by derefr 14y ago
You know, I keep seeing this "proprietary NaCl" statement around, and having played with it myself, I have a bit of a soapbox. There's nothing proprietary about NaCl: all the specs are open, and Google actively wants Mozilla and others to support them.
To be charitable, though, I guess what most people mean by "NaCl is not open like Javascript" is that it's low-level--compiled binaries instead of readily-accessible script. And that's true; it exposes less to the user--and although it would be perfectly possible for every NaCl module to be debuggable through the browser with embedded symbols, just like Javascript is, it hasn't happened yet.
But you know, NaCl isn't for that, as far as I can tell. It's not a thing to write the business-domain logic of your web app in. It's far too clunky to develop with, if that were the intent.
Instead, what NaCl seems perfectly suited as, to me, is an architecture for writing pluggable scripting-language virtual machines. In other words, to give freedom of choice to use a backend other than V8 to write your web app against. Java-in-the-browser, Ruby-in-the-browser, Erlang-in-the-browser; any of those would be possible, and just as transparent+useful as Javascript-in-the-browser (in fact, V8 itself could be lifted out to being just another NaCl module.) And since the site would deliver the "runtime" for the scripts itself[1], any compatible browser could pull it down and execute it, instead of waiting for IE, Firefox, Chrome, etc. to all adopt the new language before anyone can start using it (a Sisyphean wait.)
There's already one perfect example of how this all would work: Adobe Flash. Flash is, in Chrome at least, an NaCl (PPAPI) module. Now, Flash isn't a shining example of openness--but using a custom interpreter is not where it goes wrong.[2] You can easily imagine Flash without that problem: a world where you can have <script type="text/actionscript"> and the Flash runtime will reach in and execute that code, just like the Javascript runtime reaches in and executes your JS.
---
[1] This doesn't necessarily have to be true, though. The browser can come with default language runtime modules, and then the webapp can suggest a site-specific runtime module, but the browser doesn't have to take that suggestion. Which is exactly the way a thing that is considered "open" on the web works: fonts! Think of an NaCl module as being no more or less than a custom @font-face rule for the execution of a script.
[2] Flash goes wrong by embedding its programs into proprietary binary asset packages [SWFs]; goes wrong again by drawing everything onto a single canvas, not allowing for anything like DOM manipulation; and then goes wrong a third time by having only one de-facto implementation with no open standard.
- samastur 14y agoWhat do you mean by specs are open? Published fully or developed communally? Fully published is obviously better than not, but is rarely enough. Openness is not a binary choice.
- derefr 14y agoDeveloped communally, as part of the Chromium project. Not as a vendor-neutral working group or anything of the sort yet, mind you. But there's no reason it wouldn't move to become that if any other vendor was actually interested in coordinating on it--they're not hiding their cards inside Google's walled garden or anything.
- MatthewPhillips 14y agoYou're incorrect, that's not how NaCl or Dart were developed. They were developed in secret years before released. They're alpha versions had all of the fundamentals established when finally presented to the public.
- derefr 14y agoI don't see how the way in which something is developed before its first release has any bearing on whether its current development is community-driven. Everything was designed in secret at some point: within the head of whoever was thinking about it, before they decided to start talking about it.
- MatthewPhillips 14y ago> I don't see how the way in which something is developed before its first release has any bearing on whether its current development is community-driven. You don't? Go look at the nacl commit logs and count how many non-Google employees are contributing. That it was developed in secret is precisely the reason for this (not because they are against outside contributors today). If you develop a supposedly open technology in secret it either needs to be 1) really good or 2) really popular. XHR is successful because it fits into both. Whatever you may feel about NaCl, Microsoft, Apple and Mozilla don't think it's good.