Chrome 14 Beta Integrates Native Client
derGoldstein writes "This year Microsoft kept signaling that it's going back to lower-level code with a C++ renaissance. It would give C++ programmers the same priority that was, up until now, reserved for .Net programmers. They even launched a new show about it on their Channel9. Now Google wants to appeal to native programmers with their Native Client for Chrome. It seems the two companies want to cover both the higher-level JavaScript and lower-level C/C++. I dare hope this will give seasoned C/C++ programmers a place alongside JavaScript programmers at the web development table."
AND replacing Javascript? Where do I sign up?
There's a reason there is no "Disagree" mod...
I dare hope this will give seasoned C/C++ programmers a place alongside JavaScript programmers at the web development table.
Yeah, nothing thrills me more than the prospect of a language with absolutely no memory safety or bounds checking being exposed to the public Internet. What could possibly go wrong?
Dislike the Electoral College? Lobby your state to join the National Popular Vote Interstate Compact.
Intellisense is by far the best C++ dev environment. As much as I hate having to work in Windows, homo technicus beats homo sapien any day. And I find that I write faster and better when I have the right tools than when I have a big ego. If Chrome can produce a better environment AND be the first to support all C++11 features, I'll be happy to watch MS slide into history. Until then, I expect MS programmer base to grow.
Any guest worker system is indistinguishable from indentured servitude.
This would be great if all major browsers supported it, but developing web apps only for Chrome is a now-starter for most of us.
C++, especially modern C++, is such a different language from C, that it makes no sense to talk about them as if they are the same. A decent programmer can learn everything they need to know about C in about two weeks. Modern C++ really takes years to really master. When I interview programmers, I'm immediately skeptical of anyone who claims to know "C/C++". Often, this means the most advanced "C++" feature they use is the // comment.
I heard you like programming, so I put some programming in your program so you can program your program while you're programming.
There are just too many architectures capable of browsing the web now, and some of the most important ones will never support a feature like this (read: iOS). This is the new ActiveX, only without a dominating monopoly and OS integration to push it.
First a story about how .Net is being ignored. And now a story whose headline claims MS has been giving priority to .Net.
Ahh, slashdot.
How's the "Native Client" a big step when we've already seen the Javascript PC Emulator:
http://bellard.org/jslinux/
I guess a Chrome browser pulling up that page, the Javascript PC Emulator booting X to run Chrome to run a Native Client PC emulator would be a neat hack...
Dan
The idiot obviously frantically banged out his inane post in desperate hope that equally stupid Slashdot posters with Mod points would give him knee jerk upvotes.
No wonder every says Slashdot has been circling the bowl for years.
MS is exposing the core problem with general development today.
A lot of [older] hard code programmers learned C++, and only skimmed the newer higher level languages in the beginning--which they deemed inferior and went back to C++. Since we're talking hard code programmers, we're talking solid knowledge of development, algorithm & data structures, and performance.
Now granted a lot of newer higher level programmers lack the breath of development I described above (let's face it, it's a fact) due to the great APIs and frameworks developed using higher level languages, newer [younger] programmers are really API, Application devs. That is who MS sells to, but doesn't want internally unless they "change the game" (namely move the Windows core into .NET and force Intel to write a higher level instruction set API for their CPUs). With the boat load of C++ programmers out there, it's too costly to move to .NET for a kernel.... much like why COBOL and FORTRAN are still around: alive and kicking. The only best example I can think of gaming the kernel game is none other than AndroidOS (a hybrid).
Then there's the fact the higher level languages have evolved to be just as good or even better than C++, but only the few that jumped the C++ bandwagon in the late 90's in favor of the newer languages and retain excellent development skills can exploit those advantages. That's a small circle of folks. Since no employer is willing to train employees out of C++ into another language, we are still stuck with a huge C++ base of devs. This is no different from the early C++ days, when the best devs went back to C (Linux comes to mind). And this will happen to Java as well with its huge dev base.
History says you can program the same performance and capability as C++ in .NET, Java, C#, Scala, Ada, and Haskell, and more likely win in the maintenance game long term. And with the pace of development, cost and feature set needs, higher level wins hands down as long as Moore's law applies. That why I say, "Good luck with that MS", this architecture decision could be the nail in the coffin.
" It is not some kind of C++ interpreter or VM"
Actually, everything that's not kernel code "runs in a VM". Operating systens do memory address translation and bounds check (i.e. not violating other processes memory) during runtime.
Wow, that's so meta. How many beowulf clusters will be needed for that?
Firefox 4... IE 9... Chrome 14?!
Chrome 14 better do stuff more futuristic or I will be disappoint.
Anything that uses or encourages the use of C (or C99) is more than welcome in my book. But...in browsers...
I think I will stay with my native desktop apps instead. Javascript is AOK, but bringing C/C++ into the browser just like that...doesn't it feel a bit like bringing a large hadron collider into a knife fight?
C++ is useful for some tasks. However to make it work with the new multi-core CPU architectures is a total PITA. Not only do you have to choose a non-standardized threading implementation you also get a lot of headaches as to which thread owns which object (since you don't want to clean up too early or too late). That's one of the reasons Java and C# are so popular and even people with a huge amount of C++ time (like me) will never use C++ as our first choice again. Basically for whatever small percentage of extra speed you get with C++ on *one* core is totally lost when Java/C# uses multiple cores. Even if you make C++ multi-threaded and garbage collected it requires a much larger development time to get what Java/C# has built in. Even worse than the multi-core issues with C++ is the fact that it is generally not multi-platform (at least for non-trivial programs using graphics, networking sound etc) due to the platform dependencies of the libraries. These days the computing environment is becoming more heterogenous, not less. Aside from the supposed bragging rights of C++ programmers (feel they are somehow superior by using it, but fail to realize the more experienced you are the more you wanna get things done in the easiest way, not the hardest/l33t-est way) there is not much to recommend C++ apart from the memory footprint (and only a few people work on systems that are *that* memory constrained these days, most single-board-units have *huge* quantities of memory, eg. 512 MB compared to the old days).
So, Chrome already sandboxes JavaScript in some of the same ways that they'd sandbox NaCl, but it's not the parser. JavaScript is a relatively simple language, syntactically, and any decent implementation isn't going to be fucking around with it on that level.
My guess is that it's a choice of which APIs you expose and when they're allowed to be called. Since JavaScript can't generate code which ultimately does anything other than call methods or access properties, it entirely comes down to which methods or properties you expose.
I don't think this will be better than JavaScript. I do, however, think it will be better than ActiveX. At the very least, it's actually sandboxing stuff.
Don't thank God, thank a doctor!
Sounds odd to me, the VM model (Java and then .net) represents a huge step forward in the programing paradigm, why are we going back to a language that still force you to manage the memory manually !
After removing the .net suffix on all its product line, removing the CLR made "the ms" reference platform... are they just saying that C# is no more the preffered MS language ? If so, this is definitivelly the end of .net .... What are they just doing then !?!
By the way IMHO, most "resource constrainted" element should not be handled manualy by the programmer, but instead the programmer should indicate the runtime its constraints/priorities/wishes so that the machine just does it. I am still wondering why with so much complex chips, the manufacturer are stil not able to brin you out of the box : automagic memory management (gc) , thread virtualization (realtime constraint & best effort constraint) ?
Resource mangement at chip level is the next step, then we can talk back of oldies such as C++ ;-)
(hairy troll made on purpose)
Looking forward to stack smashing hacks again. Yay!
For now; though with NaCl now in a non-dev version of Chrome (its been in dev versions since 7 or so, I think) that probably means that there is going to be more focus on getting PNaCl (Portable Native Client) ready for public consumption, which will see code deployed on the web as LLVM bitcode and compiled to native code at the client, at which point you'll have real portability.
A quick googling finds that PNaCl is scheduled for Jan. 1, 2012 Beta release on Mar. 1, 2012 general release.
If you can run compiled C/C++ code in the browser, you can use pretty much any language you want, since "compiled C/C++ code" includes the compilers and interpreters for most other languages as well. I'm sure there will be implementation tweaks needed to many existing language implementations to get them to work in the NaCl environment, but it'll be a lot lower barrier than reimplementing the compiler to target javascript, or reimplementing the interpreter in JavaScript.
This is the new ActiveX,
It's got a sandbox. ActiveX didn't. ActiveX is for writing plugins; this is for building faster webpages.
only without a dominating monopoly
Google doesn't dominate search?
and OS integration
Granted, it's not integration into a monopoly OS, but it's integrated into Chrome OS.
Now, on to the real points:
There are just too many architectures capable of browsing the web now,
Really?
I count three that anyone cares about anymore: ARM, x86, and x86_64. If you're feeling generous, PPC and PPC64. And if you compile one nacl binary for, say, x86, that'll run on Windows, Linux, and OS X. Only reason the x86_64 plugin doesn't do the same (yet) is that Chrome, like all browsers, has stuck with 32-bit only for Windows and OS X until various plugins (*cough* Flash) get proper 64-bit support.
There's also an LLVM variant in the works. You compile to LLVM bytecode, the client compiles it to native code when it's downloaded.
and some of the most important ones will never support a feature like this (read: iOS).
Somehow, I think Android is more important than iOS, and for that very reason.
But how do you know this would never be supported on iOS? It already allows alternative browsers, and that's assuming Apple doesn't adopt this idea. You could make a point that Apple has a vested interest in keeping web development limited on iOS, but so far, they seem to have done just the opposite -- Safari is generally recognized as a decently modern browser with decent standards support, and they often introduce new and interesting things of their own (CSS animations, some of them 3D IIRC).
Now, it may never fly for other reasons, like the fact that very few applications need this much of a performance boost over JavaScript without also needing more than NaCl offers yet (like fast 3D -- can I draw from my NaCl library to WebGL without going through the browser and JavaScript?)
Still, it's an interesting enough idea, and this seems to be the direction things are going. Suppose I can deliver a modern game to you in a browser -- with bandwidth getting faster, I bet I could get you into a demo of my game in under a minute, without you having to install it from some random download site. And even if it were Chrome-only, that's still more portable than Steam -- but there's no reason it has to be Chrome-only.
Don't thank God, thank a doctor!
I wrote was in C. My next in C++
It's harder, but the results are faster. Not that it matters anymore, but in 1995 it sure as hell did.
The Kruger Dunning explains most post on
NaCl is not so much about executing C/C++ code as it is about executing native compiled binaries. This has issues:
It's incredible Google is even pushing this. It's so anti-portable and in concept anti-web.
There is a "portable" version of this, called "Portable Native Client". This means, of course, that NaCl is actually "Non-Portable Native Client" and that should itself be a clue. The "portable" version uses LLVM bitcode and a virtual machine. So more than a decade later, we've basically reinvented Java virtual machine applets minus the gigantic runtime (and language of your choice).
The only people who could possibly benefit from NaCl are Google. There's no general case use for this, and pushing it as standard into Chrome is a nasty move. Mozilla also reject the idea of NaCl. I believe Opera rejects it too (lacking a link). So, why is this being pushed?
I believe that Google are at the `Extend` step.
Microsoft has said they won't support NaCl. What's surprising is that Mozilla has said they won't support it either, and will try to avoid such technology altogether, instead focusing on improving their javascript performance (?!).
I sure hope Mozilla's lack of support doesn't mean this paradigm-changing technology will die a slow death. Imagine all the programming languages you could write your client-side webapps in without having to resort to terrible hacks.
...is to allow the reuse of code that has already been written in C or C++
At the same time, it makes it easier to port applications and games that have already been written in C or C++ to run in a web browser, hosted on a webpage.
With the NaCl port of Qt, it will also be easy to write applications that can be built to run on various platform, including NaCl.
I've been following NaCl, and it worries me that the compiled code only works on a particular version of Chrome. NaCl 0.5 only works with Chrome 14, 0.4 works with Chrome 13, etc.
http://code.google.com/chrome/nativeclient/docs/running.html#browser
I get it. The Google team must have people just out of college in there that never used Netscape. Seriously, this is called Java Applets. They ran in a sandbox too. Netscape 2 or 3 had a bunch of holes in it from escaping the sandbox. It's been done before! Aside from minor security improvements, it's active x too.
Let's find out how insecure it can be. Let adobe write an app for it and then give security researchers a few weeks.
Worst of all, they used C++. LLVM has terrible support for C++. It's getting better, but it's not there yet.
MidnightBSD: The BSD for Everyone
What?
C or its bastard offspring C++ are considered low level?
Microcode and assembler programmers of the world should unite against this slander!