Slashdot Mirror


Google Native Client Puts x86 On the Web

t3rmin4t0r writes "Google has announced its Google native client, which enables x86 native code to be run securely inside a browser. With Java applets already dead and buried, this could mean the end of the new war between browsers and the various JavaScript engines (V8, Squirrelfish, Tracemonkey). The only question remains whether it can be secured (ala ActiveX) and whether the advantages carry over onto non-x86 platforms. The package is available for download from its Google code site. Hopefully, I can finally write my web apps in asm." Note: the Google code page description points out that this is not ready for production use: "We've released this project at an early, research stage to get feedback from the security and broader open-source communities." Reader eldavojohn links to a technical paper linked from that Google code page [PDF] titled "Native Client: A Sandbox for Portable, Untrusted x86 Native Code," and suggests this in-browser Quake demo, which requires the Native Code plug-in.

367 comments

  1. doesn't sound too secure yet by alain94040 · · Score: 5, Insightful

    This is not a good thing: by definition x86 code is not portable across platforms.

    Secure or not, it goes against the main founding principle of the web, which is portability. There are other ways to solve the performance issue, I thought just-in-time compilers were getting pretty close anyway (50% according to http://www.mobydisk.com/softdev/techinfo/speedtest/index.html).

    On the security side, I'll just quote Google's description: "modules may not contain certain instruction sequences". That doesn't sound like a robust way to detect malicious code.

    http://fairsoftware.net/ where software developers share revenue from the apps they create together

    1. Re:doesn't sound too secure yet by Sockatume · · Score: 4, Funny

      You could work around that compatability issue easily, just set up the browser so it runs inside a preset virtual machine or emulator on the host, so that you can just write x86 code for that virtual machine/emulator rather than executing it directly.* (I heard you like programs, so I put a machine in your machine so you can execute while you execute.)

      *Someone may have thought of this already.

      --
      No kidding!!! What do you say at this point?
    2. Re:doesn't sound too secure yet by Anonymous Coward · · Score: 3, Insightful

      On the security side, I'll just quote Google's description: "modules may not contain certain instruction sequences". That doesn't sound like a robust way to detect malicious code.

      Why not? It just means that the permissible instruction sequences are limited to a subset that can be statically analyzed and verified to be safe. The Java VM has similar verification algorithms that are run whenever untrusted code is first loaded.

      It's true that this does not allow all x86 code to run; it's at least practically (and probably theoretically) impossible to correctly determine whether or not a piece of code is safe, but as long as the VM errs on the side of caution, there shouldn't be any problems with this approach.

      I will grant that this makes it unclear what the advantage is over (say) Java applets. What can this technology do that the Java VM couldn't? As far as I'm concerned, the failure of Java in the browser has more to do with the lack of a standard library for high-performance multimedia applications (think: Flash) than with shortcomings in the bytecode language.

    3. Re:doesn't sound too secure yet by Anonymous Coward · · Score: 2, Informative

      by definition x86 code is not portable across platforms

      Sure it is, you just write a JIT compiler from x86 to your native machine code, thus COMPLETELY nulling any advantage this has over other JIT languages :)

    4. Re:doesn't sound too secure yet by rallymatte · · Score: 1

      Well, that's a good point.
      However, it would be very useful for certain applications. Today already we have portability issues. It's not like we're sticking to just html and css as it is. Just think of Java for example.

    5. Re:doesn't sound too secure yet by MightyYar · · Score: 1

      Yeah, but you'd still have the issue where your subnotebook/phone/PS3/Mac/etc runs slower than your desktop because it has to emulate an x86. This on top of the fact that it may be running a much slower chip...

      --
      W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
    6. Re:doesn't sound too secure yet by Anonymous Coward · · Score: 0

      no.

      java has a securoty manager to which most of the api refer to, and different profiles for application, for applets and for jnlp programs.

    7. Re:doesn't sound too secure yet by larry+bagina · · Score: 5, Insightful

      Those that don't understand java are doomed to repeat it.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    8. Re:doesn't sound too secure yet by AKAImBatman · · Score: 4, Insightful

      Why not? It just means that the permissible instruction sequences are limited to a subset that can be statically analyzed and verified to be safe. The Java VM has similar verification algorithms that are run whenever untrusted code is first loaded.

      One of the key differences is that Java code and data are separated to the point of paranoia. I cannot load a classfile as data and pass through execution to the native system. With the x86 instruction set, I can load a data file and execute a jump to a data segment without the code having passed through any sort of system loader. A VM would have to take this into account. Not to mention common issues of stack smashing, heap overflows, and other common memory tricks to execute unwanted code.

      When you're managing native code, it only takes one slip-up to hand over the keys to the kingdom. That slip-up may be as simple as a two byte exploit, but it's a slip-up none the less. One must be VERY careful with native code because there is no way to prove that it is safe to execute natively.

      Hypervisor features in modern processors simplify the issue somewhat, but it is still not proven that hypervisors are without exploits. Not to mention the overhead of running dozens of simultaneous hypervisor environments.

      Java and Javascript have it right. Java bytecode is provably correct because it targets an ideal machine. Thus the code can be translated into well-behaved native code with the linkage between data and code managed during or after translation. Javascript is just as good because it provides an abstract execution environment that must rely on exposed APIs to accomplish any interaction with the system. It is provable not possible (shy of an underlying flaw in the browser) for Javascript to break through its execution engine into a native runtime.

      The two platforms may be paranoid, but when you're dealing with security on the scale of the World Wide Web, "better safe than sorry" is a good motto.

    9. Re:doesn't sound too secure yet by larry+bagina · · Score: 1

      Historically, there have been a LOT of undefined x86 opcodes that cause the cpu to shit all over itself, stomp memory, elevate priveleges, etc.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    10. Re:doesn't sound too secure yet by jellomizer · · Score: 2, Interesting

      Yes all new technology is bad even R&D concepts. Dag Nabbit I want my ASCII (no freaking colors) 300BPS BBS back you know the ones where you need to put your phone headset into the modem. Back then everything was secure. The password was the telephone number that you dialed. Brute force attacks were expensive. And if the BBS had a Password protection you were secured to no end, where no one can get in who you didn't want.

      Um the way things work with software is the program sends opt-codes to the CPU which interns translates them to particular basic actions. You could emulate X86 across platforms and it has been done before. Virtual PC did that in the past allowing you to run x86 code on a PowerPC processor. For applications all that we really care about putting input in a black box that will do stuff and getting output back. The Web Interface is good at taking input and giving output (By no means the best, but it can get the job done with a lot of tricks) So if google approach is server side then it would in general be available across clients platforms. Allowing you to run a wide array of applications regardless of your client.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    11. Re:doesn't sound too secure yet by Chyeld · · Score: 2, Insightful

      Isn't Java run in an emulated fashion on all platforms? Isn't that part of the 'slow' image that it cultivated in it's early years, that it was too slow due to the emulation of the java 'virtual machine'?

      Is the problem here that this could mean some machines won't be as slow as others or just that its x86?

      What exactly is the difference, outside of one having a much larger code base to 'exploit' and the potential for a huge speedup on machines that can natively handle x86 code?

    12. Re:doesn't sound too secure yet by K.+S.+Kyosuke · · Score: 3, Funny

      The industry will solve it the usual way: They will put an x86 chip inside!

      --
      Ezekiel 23:20
    13. Re:doesn't sound too secure yet by VGPowerlord · · Score: 2, Funny

      It's a Java system! I know this!

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
    14. Re:doesn't sound too secure yet by penguinbrat · · Score: 1

      This is not a good thing: by definition x86 code is not portable across platforms.

      I think the article/download site may disagree with you, and I believe that VMWare and VirtualBox would also disagree.

      FTA...

      "1. Download the Native Client distribution for your development platform: Linux, Mac, or Windows."

      Secure or not, it goes against the main founding principle of the web, which is portability.

      How is this going against the principles? Having the same code, run on multiple platforms I would have sworn is the definition of portability...

      All this is, is virtualization ported to the browsers - why wouldn't this be a good/cool thing?

    15. Re:doesn't sound too secure yet by phoenix321 · · Score: 2, Funny

      Yep, they're re-inventing the wheel, how cool is that?

    16. Re:doesn't sound too secure yet by fbjon · · Score: 4, Informative

      Java is compiled Just-in-time, though I don't know about smaller, obscure or embedded platforms.

      --
      True confidence comes not from realising you are as good as your peers, but that your peers are as bad as you are.
    17. Re:doesn't sound too secure yet by characterZer0 · · Score: 1

      Java failed in the browser because MS abused its monopoly position to prohibit the OEMs from pre-installing a functional JVM.

      --
      Go green: turn off your refrigerator.
    18. Re:doesn't sound too secure yet by Ed+Avis · · Score: 4, Interesting

      x86 code runs natively on 90% of the processors out there. Java or .NET bytecode runs natively on about 0% of them (Sun did have a Java chip once but it is long dead). So it is hardly any worse than the alternatives. There are many x86 emulators and some of them have reasonable performance.

      If we were starting from scratch now, nobody would choose the barnacle-encrusted i386 instruction set as a way to distribute programs. But given the hardware and software that exists, it's not such a bad choice.

      On the security side, I'll just quote Google's description: "modules may not contain certain instruction sequences". That doesn't sound like a robust way to detect malicious code.

      Of course, the way to do it is to define what instruction sequences are safe and allow only those. I assume that's what they are doing and 'modules may not contain certain instruction sequences' is just the one-line summary.

      That said, you can make any instruction sequence you like using the assembler and run it on your Linux system, and it cannot break out of the process virtual machine to access hardware or memory belonging to other processes or the kernel. If it can, this would be a bug in Linux. So there is no reason why arbitrary instruction sequences couldn't be allowed in principle, if you let the operating system do the work of sandboxing the process. After all why reinvent the wheel?

      --
      -- Ed Avis ed@membled.com
    19. Re:doesn't sound too secure yet by meepzorb · · Score: 0, Redundant
      With the x86 instruction set, I can load a data file and execute a jump to a data segment without the code having passed through any sort of system loader.

      ...and that won't be insecure at all!

      (I just love it when my browser runs unmanaged code full of unverified branch statements!)

    20. Re:doesn't sound too secure yet by saforrest · · Score: 1

      Java is compiled Just-in-time, though I don't know about smaller, obscure or embedded platforms.

      Not all Java is compiled JIT.

    21. Re:doesn't sound too secure yet by Keith_Beef · · Score: 1

      http://code.google.com/p/nativeclient/?tbbrand=GZEZ&utm_campaign=en&utm_source=en-et-osrcblog&utm_medium=et

      Native Client is an open-source research technology for running x86 native code in web applications, with the goal of maintaining the browser neutrality, OS portability, and safety that people expect from web apps.

      This sounds to me like the Native Client is a virtual machine that will execute x86 code inside a browser, regardless of the underlying OS. It doesn't specifically mention hardware, but why not go the whole hog and make this work on any hardware?

      K.

    22. Re:doesn't sound too secure yet by tomhudson · · Score: 2, Interesting

      Those that don't understand java are doomed to repeat it.

      Worse - their example doesn't even make sense ...

      Today, you could provide this feature using a combination of JavaScript and server side processing. This approach, however, would cause huge amounts of image data to be transferred between browser and the server, leading to an experience that would probably be painfully slow for users who just want to make a few simple changes. With the ability to seamlessly run native code on the user's machine, you could instead perform the actual image processing on the desktop CPU, resulting in a much more responsive application by minimizing data transfer and latency.

      So you still end up downloading code ... and probably a lot more code, since you don't have libraries like javax.swing sitting on the users' machine to tap into, you have to download an entire UI ...

      What would be better would be to more tha apps out of the browser completely. There's no reason that a java app sitting on your local machine can't do the photo touch-ups w/o having to be embedded in a browser, just like there's no reason you can't open up a remote file in the GIMP and edit it directly if you have the url, username, and password, without having to go through the hassle of right-click in your browser, save to disk, open in GiMP, edit, save to disk, then ftp'ing it back.

      Of course, if too many people start relying on apps that interact directly with the net rather than through a web browser, google's business is threatened.

    23. Re:doesn't sound too secure yet by binarylarry · · Score: 4, Interesting

      Pretty much all of Sun's offerings have HotSpot built in, which provides JIT compilation for the JVM. IBM's JVM, BEA, etc. all have JIT features. Google's Android has Java-like Dalvik, which is slow as balls and doesn't have JIT functionality.

      Some ARM processors are capable of executing Java bytecode natively. The device developers have to pay for that feature though.

      Really, it sounds like Google is poorly trying to reinvent Java. They've tried this with Android already and it doesn't work so hot from a performance standpoint.

      --
      Mod me down, my New Earth Global Warmingist friends!
    24. Re:doesn't sound too secure yet by MightyYar · · Score: 2, Interesting

      Well, a couple of things...

      First, today there isn't a "first class" platform for Java. It's JIT everywhere (excepting a few devices with chip-based Java execution). So a web developer has to consider performance when using Java or Flash. In contrast, native x86 execution obviously favors x86 machines and creates a web ghetto - similar to ActiveX, though not quite as bad.

      The second problem is that while Java, and now even Javascript, have been pretty well optimized on non-x86 hardware, I've yet to see a x86 bytecode emulator perform as well. Earlier in the thread someone pointed out how JIT-compiled languages are now about 50% as efficient as natively compiled languages. If this is true, then it seems really foolish to eek out that extra 50% by destroying the performance on all other platforms - especially when those platforms are growing so fast.

      My experience with emulation is a bit underwhelming. My G5 Mac can emulate an x86 processor using Virtual PC, but it's slow enough that anything beyond Windows 98 is pretty annoying. I'd hate to see performance of x86 emulation on a phone!

      --
      W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
    25. Re:doesn't sound too secure yet by Flying+Scotsman · · Score: 1

      This sounds to me like the Native Client is a virtual machine that will execute x86 code inside a browser, regardless of the underlying OS. It doesn't specifically mention hardware, but why not go the whole hog and make this work on any hardware?

      From the article linked from the story, emphasis mine:

      The release contains the experimental compilation tools and runtime so that you can write and run portable code modules that will work in Firefox, Safari, Opera, and Google Chrome on any modern Windows, Mac, or Linux system that has an x86 processor. We're working on supporting other CPU architectures (such as ARM and PPC) to make this technology work on the many types of devices that connect to the web today.

      So it is OS dependant and CPU dependant (won't work on my SPARC box running Solaris).

    26. Re:doesn't sound too secure yet by Anonymous Coward · · Score: 0

      >which is slow as balls

      Why are balls slow?

    27. Re:doesn't sound too secure yet by davecb · · Score: 2, Informative

      One might say the same thing about p-code (;-))

      --dave

      --
      davecb@spamcop.net
    28. Re:doesn't sound too secure yet by LordKazan · · Score: 2, Insightful

      that and applets are slow as shit. The National Weather Service still uses a java applet for their single-radar radar loops (uses animated gifs for larger views).. takes forever to load because the JVM is initializing, whereas the animated gif takes exactly as long as it takes to download.

      Java failed in the browser.. because java is slow.

      --
      If you cannot keep politics out of your moderation remove yourself from the Mod Lottery.. NOW!
    29. Re:doesn't sound too secure yet by Anonymous Coward · · Score: 0

      I think that was his point. That being able to do that through a browser is insecure.

    30. Re:doesn't sound too secure yet by Jeffrey_Walsh+VA · · Score: 1

      Of course, if too many people start relying on apps that interact directly with the net rather than through a web browser, google's business is threatened.
      Maybe thats why google is doing this: to intentionally make it not work.

    31. Re:doesn't sound too secure yet by H0p313ss · · Score: 3, Insightful

      Those that don't understand java are doomed to repeat it.

      Given that Java started as a poor re-implementation of other VM based OO languages that just makes me want to weep.

      --
      XML is a known as a key material required to create SMD: Software of Mass Destruction
    32. Re:doesn't sound too secure yet by Wescotte · · Score: 4, Funny

      (I just love it when my browser runs unmanaged code full of unverified branch statements!)

      Bah! Where's your sense of adventure?!?

    33. Re:doesn't sound too secure yet by Anonymous Coward · · Score: 0

      No, JVM initialization is slow, and only for your platform it seems.

      I have no such problems, on my system the JVM starts nearly instantly, and because of that, so do the applets.

    34. Re:doesn't sound too secure yet by AKAImBatman · · Score: 1, Informative

      For example, imagine that you run a photo-sharing website and want to let your users touch up their photos without leaving your site. Today, you could provide this feature using a combination of JavaScript and server side processing.

      Or you could write an application that downloads the photo into the browser and manipulates it in a Canvas. It's not like these APIs are any huge secret. You'd think that someone working for Google would know about that. I won't even get into using the ubiquitous Flash 9 plugin to accomplish the same goal.

      As you said, their example is AWFUL.

    35. Re:doesn't sound too secure yet by online-shopper · · Score: 4, Insightful

      x86 does not run natively on 90% of the processors out there. ARM beats it by a bit.

    36. Re:doesn't sound too secure yet by X0563511 · · Score: 1

      Do VMWare and VirtualBox (and the Native Client Distribution) run under an ARM chip, a PowerPC chip? How about a Cray?

      Platform != OS.

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    37. Re:doesn't sound too secure yet by Anonymous Coward · · Score: 0

      x86 code runs natively on 90% of the processors out there.

      Most CPUs out there aren't x86. Most are ARM-based - enough so that ARM processors outsell x86 by a fairly wide margin (doesn't help that the average PC has at least one ARM processor somewhere). And there are no x86-based cellphones (yet), nor x86-based PDAs (yet). And few game consoles had x86 CPUs, all no longer made.

      Now, on the desktop and server world, yes, x86 makes up a good 90% of the market, but with mobile browsing becoming fairly significant in certain areas, and with most mobile browsers running on fleapower CPUs (few phones run CPUs faster than 624MHz or so), you'd want performance optimizations on them, rather than the x86...

    38. Re:doesn't sound too secure yet by Xargle · · Score: 5, Informative

      x86 code runs natively on 90% of the processors out there. Java or .NET bytecode runs natively on about 0% of them (Sun did have a Java chip once but it is long dead). So it is hardly any worse than the alternatives. There are many x86 emulators and some of them have reasonable performance.

      ARM Jazelle (in quite a number of the ARM revisions deployed all over the place) includes DBX for direct bytecode execution of Java. That includes the iphone and loads of other stuff.

    39. Re:doesn't sound too secure yet by X0563511 · · Score: 3, Informative

      From the article linked from the story, emphasis mine:

      The release contains the experimental compilation tools and runtime so that you can write and run portable code modules that will work in Firefox, Safari, Opera, and Google Chrome on any modern Windows, Mac, or Linux system that has an x86 processor. We're working on supporting other CPU architectures (such as ARM and PPC) to make this technology work on the many types of devices that connect to the web today.

      Reading Comprehension FTW!

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    40. Re:doesn't sound too secure yet by LordKazan · · Score: 3, Interesting

      my "platform" would be very linux and windows machine i've ever run - all on x86

      try this for a "Slow platform"

      Athlon 64 x2 6000+, 4GB DDR2-800, 250GB SATA-II drive

      JVM initialization is slow because the JVM weights 9 million metric tons.

      and initialization of the VM of any language is an important factor in it's effective performance - no matter if it's per-instruction performance once it's VM is started is almost as good as native code, it will take a long time for that to outweight the initial startup time.

      --
      If you cannot keep politics out of your moderation remove yourself from the Mod Lottery.. NOW!
    41. Re:doesn't sound too secure yet by Blakey+Rat · · Score: 1

      This is not a good thing: by definition x86 code is not portable across platforms.

      By definition? Which definition are you using here? I don't see anything in the definition of "x86" that would imply it's not portable across platforms; in fact, I know that there are several platforms it's portable across because I've used them (OS X, x86 Linux, and Windows).

    42. Re:doesn't sound too secure yet by LostInTransportation · · Score: 1

      Historically, there have been a LOT of undefined x86 opcodes that cause the cpu to shit all over itself, stomp memory, elevate priveleges, etc.

      Citation required.

    43. Re:doesn't sound too secure yet by billcopc · · Score: 1

      Yep it's the initialization that kills. Execution speed typically doesn't matter for most apps on today's hardware, but it's quite irritating to wait 3-4 seconds on a bleeding-edge machine for the stupid JVM to start up, and watch it thrash memory for a few seconds more until it's got all the cruft classes loaded.

      --
      -Billco, Fnarg.com
    44. Re:doesn't sound too secure yet by jambox · · Score: 1

      That doesn't mean it isn't virtualised! If they can make it work on ARM then it can't just be a straight plug through to native code.

      --
      You thought you could break the laws of physics without paying the PRICE?
    45. Re:doesn't sound too secure yet by Anonymous Coward · · Score: 0

      I like the reference... I got it if no one else did.

    46. Re:doesn't sound too secure yet by Anonymous Coward · · Score: 0

      My question is, since when are java applets dead and buried??

      They just call them different things under new marketing names.

    47. Re:doesn't sound too secure yet by Hatta · · Score: 1

      Java is compiled Just-in-time

      How is that different than an interpreter?

      --
      Give me Classic Slashdot or give me death!
    48. Re:doesn't sound too secure yet by should_be_linear · · Score: 5, Interesting

      I also noticed that Google is very aggressively trying *not* to use Java JRE anywhere, as Dalvik VM or this x86 nonsense demonstrate. I have no idea why is that, given Java and JRE are FOSS now. One thing is for sure: Their Google Docs and other office-like applications would only start to make much more sense if they use new JavaFX clients (that can be dragged from browser to desktop, becoming standalone app) alongside with improving JRE support in Chrome and Firefox.

      --
      839*929
    49. Re:doesn't sound too secure yet by msuarezalvarez · · Score: 1

      He's probably using the correct definition whereby a platform is quite a bit more than an OS...

    50. Re:doesn't sound too secure yet by Ilgaz · · Score: 1

      I noticed Sun FINALLY puts a prefetcher and enables by default in latest Java/Win32 installation. They did it the right way too, no performance difference in system startup and no "disk eating", running in lowest priority.

      How many years now? 10? More?

      For years, I was wondering why the heck we extract gigantic ZIP files...

      ps: I can speak as easily on "not effecting boot speed" since I installed it to MS VPC 7, emulating x86 on PPC G5 :)

    51. Re:doesn't sound too secure yet by Anonymous Coward · · Score: 0

      "This is not a good thing: by definition x86 code is not portable across platforms."

      Really now... just how many valid non-x86 client desktop platforms are left now?

    52. Re:doesn't sound too secure yet by TubeSteak · · Score: 4, Funny

      Um the way things work with software is the program sends opt-codes to the CPU which interns translates them to particular basic actions.

      Ah ha!
      So that is the secret!!

      Cheap intern labor!

      --
      [Fuck Beta]
      o0t!
    53. Re:doesn't sound too secure yet by DamageLabs · · Score: 5, Informative

      An interpreter compiles each instruction every time it gets executed.
      JIT compiles blocks of code only on first execution. Next time, the compiled code is already in memory.

    54. Re:doesn't sound too secure yet by Moochman · · Score: 0, Redundant

      It's first compiled to an intermediate "Java bytecode" which is THEN upon being run compiled "Just in Time" to the native bytecode.

      The difference is that an interpreter is compiling "Just in Time" directly from the source code, which as a rule is considerably slower.

    55. Re:doesn't sound too secure yet by Moochman · · Score: 2, Informative

      Have you tried Java 6 Update 10?

    56. Re:doesn't sound too secure yet by fractalspace · · Score: 1

      Let see ...
      Firefox Dialog: "Open Executable File ?":
      "junk.exe" is an executable file. Executable files may contain viruses or other malicious code that could harm your computer. Use caution when opening this file. Are you sure you want to launch "junk.exe"?
      [OK] [Cancel]

      User also checks "Dont ask me this again"
      Next ...
      Windows Dialog: "Open File - Security Warning":
      "The publisher could not be verified. Are you sure you want to run this software ? "
      [RUN] [Cancel]

      User also un-checks "Always ask before opening this file">
      The file "junk.exe" is free to roam around now, and will do so more freely next time.
      Seems like all google needs to do is to add two vague warnings just like that and the "security level" of this technology will match with the existing one (if any).
      --- If you cant make it secure, make it extremely boring to hack.

    57. Re:doesn't sound too secure yet by ColdWetDog · · Score: 1

      God yes, somebody wake those guys up. Loading that app freezes the whole browser. On XP it tends to freeze the whole system.

      --
      Faster! Faster! Faster would be better!
    58. Re:doesn't sound too secure yet by poot_rootbeer · · Score: 2, Insightful

      x86 code runs natively on 90% of the processors out there.

      Among desktop PCs, maybe. But have you heard that they've started putting the web on devices such as cellular phones and set-top boxes? You're not going to find a lot of x86 CPUs in those.

      Of course, the way to do it is to define what instruction sequences are safe and allow only those. I assume that's what they are doing and 'modules may not contain certain instruction sequences' is just the one-line summary.

      Doesn't change the fact that there's no practical and all-encompassing way of whitelisting "safe x86 code" nor blacklisting "dangerous x86 code".

    59. Re:doesn't sound too secure yet by Anonymous Coward · · Score: 0

      x86 is a nasty "language" to just-in-time compile, especially for arbitrary code that can write to random memory addresses or even self-modifies the machine code.

    60. Re:doesn't sound too secure yet by Enter+the+Shoggoth · · Score: 3, Informative

      On the security side, I'll just quote Google's description: "modules may not contain certain instruction sequences". That doesn't sound like a robust way to detect malicious code.

      Why not? It just means that the permissible instruction sequences are limited to a subset that can be statically analyzed and verified to be safe. The Java VM has similar verification algorithms that are run whenever untrusted code is first loaded.

      It's true that this does not allow all x86 code to run; it's at least practically (and probably theoretically) impossible to correctly determine whether or not a piece of code is safe, but as long as the VM errs on the side of caution, there shouldn't be any problems with this approach.

      I will grant that this makes it unclear what the advantage is over (say) Java applets. What can this technology do that the Java VM couldn't? As far as I'm concerned, the failure of Java in the browser has more to do with the lack of a standard library for high-performance multimedia applications (think: Flash) than with shortcomings in the bytecode language.

      All this means is that google have created a VM in which the "bytecodes" happen to be executable on real hardware, but some of these "bytecodes" have to be intercepted and replaced at runtime with substitute code... this aught to sound familiar; this is what a software hypervisor does (eg VMware).

      In other words every man and his dog has jumped aboard the "I can write an x86-hypervisor" bandwagon, the difference being that google have decided to take theirs and embed it into the browser rather than run as a standalone app.

      Interestingly enough it took the momentum that VMware created to get intel to correct some of the issues with its' ISA to make it much easier to virtualise, perhaps someone the size of google can prod intel into adding a third wave of virtualisation accelartion extensions to their ISA so as to make this idea safer* with low overhead

      *I think virtualisation is a useful thing (I make a living from consulting on it), however I am unconvinced of it being possible, to truly secure it.

      --
      Andy Warhol got it right / Everybody gets the limelight
      Andy Warhol got it wrong / Fifteen minutes is too long.
    61. Re:doesn't sound too secure yet by ultranova · · Score: 1

      The second problem is that while Java, and now even Javascript, have been pretty well optimized on non-x86 hardware, I've yet to see a x86 bytecode emulator perform as well.

      Modern x86-compatible processors are actually emulating the instruction set on processor-specific microcode. They could thus be considered x86 machine code emulators :).

      Earlier in the thread someone pointed out how JIT-compiled languages are now about 50% as efficient as natively compiled languages.

      Seeing how JIT-compilation means that the code is compiled to native code just before being executed, this is clearly rubbish. JIT-compilation results in native code, just like any other compilation; the program is simply stored in some intermediate form (bytecode) rather than in the final compiled form.

      My experience with emulation is a bit underwhelming. My G5 Mac can emulate an x86 processor using Virtual PC, but it's slow enough that anything beyond Windows 98 is pretty annoying. I'd hate to see performance of x86 emulation on a phone!

      Yes, this is true. Emulation is horrible for performance. This whole idea is ludicrous.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    62. Re:doesn't sound too secure yet by Anonymous Coward · · Score: 0

      VMWare and VirtualBox only do virtualization, not emulation. They take x86 code and translate it into x86 code that runs in a sandbox.

      You can do full emulation with qemu and other software, but it's really really slow.

    63. Re:doesn't sound too secure yet by equex · · Score: 0

      shh. the raptor might hear you!

      --
      Can I light a sig ?
    64. Re:doesn't sound too secure yet by cheftw · · Score: 0

      I got it.

      Does that mean you didn't?
      If so why do you like it?

      --
      Always back up, never back down. ---- Think you're cool 'cos your uid is prime? Take mine, modulo the one digit integers
    65. Re:doesn't sound too secure yet by Anonymous Coward · · Score: 0

      Yeah, but they slapped a google sticker on it. So I'm buying it whatever the cost.

      my Credit Card # is XBCD-DDDS-KRYS-4033

      I want 2 please.

    66. Re:doesn't sound too secure yet by larry+bagina · · Score: 1

      Citation? Check intel's processor erratum. Or ask Linux or the BSD guys about it (I'd guess there are at least half a dozen slashdot stories about intel/AMD not providing adequate details on their latest processor bugs). Or you could just f00f yourself.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    67. Re:doesn't sound too secure yet by Eli+Gottlieb · · Score: 1

      What would be better would be to more tha apps out of the browser completely. There's no reason that a java app sitting on your local machine can't do the photo touch-ups w/o having to be embedded in a browser, just like there's no reason you can't open up a remote file in the GIMP and edit it directly if you have the url, username, and password, without having to go through the hassle of right-click in your browser, save to disk, open in GiMP, edit, save to disk, then ftp'ing it back.

      But that would kill the web-app business, and then where would all the code monkeys work?

    68. Re:doesn't sound too secure yet by prockcore · · Score: 5, Funny

      Knock Knock.
      Who's there?
      .
      .
      .
      (long pause)
      .
      .
      .
      Java.

    69. Re:doesn't sound too secure yet by bpkiwi · · Score: 4, Interesting

      Two reasons they didn't use a JVM for Android:

      1) They started the Android project before Java was open-sourced.

      2) Sun has slightly different licenses for desktop and mobile use. The desktop license is GPL with a classpath exception (letting you write non-GPL java apps to run on the virtual machine), the mobile license is straight GPL. Google didn't want to force developers to only produce GPL apps for Android, so they could not use this.

      See Stefano's blog

    70. Re:doesn't sound too secure yet by Free+the+Cowards · · Score: 2, Insightful

      Seeing how JIT-compilation means that the code is compiled to native code just before being executed, this is clearly rubbish. JIT-compilation results in native code, just like any other compilation; the program is simply stored in some intermediate form (bytecode) rather than in the final compiled form.

      ...

      Yes, this is true. Emulation is horrible for performance. This whole idea is ludicrous.

      You contradict yourself here. JIT is one way to perform emulation. Either JIT isn't as fast as native code or emulation isn't horrible for performance, you can't have it both ways!

      --
      If you mod me Overrated, you are admitting that you have no penis.
    71. Re:doesn't sound too secure yet by Billly+Gates · · Score: 0, Troll

      Thanks to Microsoft's known influence to corrupt all the standard bodies the "(applet)" tag is now depreciated. ITs been depreciated since html 3 last century. (forgive the lack of brackets as Slashdot's garbage filter will cut them out)

      In essence I am guessing html tidy and other web authoring tools declare java objects as errors as applets are no longer part of the html standard.

      I am still mad that MS did this and it killed java overnight as IE has 90% marketshare at the time so everyone ran away from it fearing IE would not accept an applet tag anymore.

      I wish we can add applet or other tags back into the standards bodies so web designers wont be so afraid to use it.

    72. Re:doesn't sound too secure yet by Billly+Gates · · Score: 2, Interesting

      Don't modern processors that are pentium IV's and above feature protection from data vs application code? Windows XP service pack 2 features it and I am aware that programs have to be recompiled to take advantage of it.

      In a few years it will make sense just to compile the code for the pentium IV and above and you can have the extra protection in your programs like RISC processors.

    73. Re:doesn't sound too secure yet by Dolda2000 · · Score: 2, Informative

      When you're managing native code, it only takes one slip-up to hand over the keys to the kingdom. That slip-up may be as simple as a two byte exploit, but it's a slip-up none the less. One must be VERY careful with native code because there is no way to prove that it is safe to execute natively.

      Hypervisor features in modern processors simplify the issue somewhat, but it is still not proven that hypervisors are without exploits.

      That's not at all true, though, and you certainly don't need any supervisor CPU features. It is quite easy to run native code completely securely -- all you need to do is set up a private virtual memory space for the managed code, and only provide it with a call gate to your own program code through which it can do controlled requests. It's done at large scale -- it's called a "process" in normal OS parlance. You may have heard of the term

      The normal problem is just that the operating system gives too much privilege to all processes, such that any running process can access the filesystem, the network stack, can allocate limitless amounts of memory (swappable memory, but nevertheless) and so on. However, that's a problem with the operating system, not with the CPU. In fact, later versions of Linux has a special process mode called SECCOMP, in which the process may only call exit(), read() and write() (the latter two only on already open file descriptors), which could certainly be used to implement Google's idea completely securely.

      The problem in this case, that the OP complained about was that Google seems to only blacklist certain program data bytes, which is most likely unsafe, as there are probably other code paths left that could be used to execute unsafe code that noone would have thought to blacklist.

      My point is just that there's no reason to think that a JVM is inherently more secure than an x86 CPU. It's just the Java class library that's more secure than your standard off-the-shelf operating system.

    74. Re:doesn't sound too secure yet by cmacb · · Score: 2, Insightful

      Thanks for your comment and the links. Every time I run across an article like this and sigh, wishing I had the technical cojones to explain why it is that we were doing things like this on mainframes in the 80s with complete safety... and continuing to wonder why Intel couldn't just COPY the damned concepts if they can't figure out how to implement them from scratch.

      Our world continues to be saddled with a half assed operating system running on a third rate architecture and for no other reason that technology takes a back seat (or maybe it's more like back of the bus) to marketing, bribery and collusion (with an unhealthy dose of buyer ignorance thrown in for good measure).

      I continue to hope that good technology will win out eventually, although I'm almost convinced at this point that it will have to come from some country that hasn't been bought out by the Borg.

      I wonder though, and maybe you know, why isn't the Power-PC mentioned in the Wikepedia article. I would assume because of its origin that it is closer to the 370 than to the Intel architecture in being fully virtualizable, a concept apparently not on the "roadmap" that Steve Jobs kept referring to in his rationale for Apple's switch to Intel. The Power-PC represented our best hope of escaping the Intel monoculture and I'd like nothing better than to once again have a mainstream non-Intel (and non-Intel-like) choice when I pick my next laptop.

      Of course if Intel had a deserved (I'm being generous) third of the market then what Google is doing with this initiative would be dead in the water (as it probably should be).

    75. Re:doesn't sound too secure yet by MedBob · · Score: 0

      I'll just quote Google's description: "modules may not contain certain instruction sequences".

      From looking over the paper, "may not contain" means simply that these instructions either won't work or will make the code break. The statement appears to be a comment from the perspective of the white hat programmer rather than a statement of the necessity to own a white hat...

    76. Re:doesn't sound too secure yet by nstlgc · · Score: 1

      I heard you like programs

      You herd wrong. I liek Mudkips.

      --
      I'm Rocco. I'm the +5 Funny man.
    77. Re:doesn't sound too secure yet by Anonymous Coward · · Score: 0

      the main founding principle of the web, which is pornability.

      fixed that for you

    78. Re:doesn't sound too secure yet by jonbryce · · Score: 2, Informative

      You can type the brackets for <tags> by using the html codes such as &lt; and &gt;.

    79. Re:doesn't sound too secure yet by IamTheRealMike · · Score: 5, Informative

      Holy crap. AKAImBatman I usually enjoy your posts, but it's painfully clear nobody on this thread - including you - has actually read the paper.

      If you had, you'd see that this system is secure. It's simple yet clever at the same time. By using a combination of x86 segmentation (which ironically you say is never used anymore!), alignment rules, static analysis and - crucially - masked jumps, it's possible to ensure that native code cannot synthesize unverified code in memory and then jump into it. If you can prevent arbitrary code synthesis, you can control what the program does. It's as simple as that.

      Even though the verifier for this system is microscopic (compared to, say, a JVM), and so much more likely to be correct, NativeClient also includes a ptrace sandbox to provide an additional redundant level of protection.

      One must be VERY careful with native code because there is no way to prove that it is safe to execute natively.

      I don't blame you, because until I read the paper I also believed this. Once you read it you'll slap your forehead and say, my god, it's so simple. Why didn't I think of that?

    80. Re:doesn't sound too secure yet by IamTheRealMike · · Score: 2, Informative

      I used to think Jazelle meant actual Java bytecode execution on the chip, until I talked to an Android developer about it. It turns out that Jazelle is quite incomplete and traps out to native code quite frequently ... for instance, to call a method.

      That said, so what? You already have to write special web pages for mobile devices if you want a truly great user experience. The performance/power profiles of mobile devices are so radically differen to desktops that being unable to run x86 code natively isn't a big deal ... even if there was some kind of hardware neutral IL you still wouldn't want to use it on mobiles, for the same reason mobile browsers don't download and run WebStart applets.

    81. Re:doesn't sound too secure yet by Marcus+Green · · Score: 1

      Java runs on more actual physical devices than all the Windows,Linux,OSX, and Solaris installations put together

    82. Re:doesn't sound too secure yet by Lokitoth · · Score: 2, Insightful

      Thanks to Microsoft's known influence to corrupt all the standard bodies the "(applet)" tag is now depreciated. ITs been depreciated since html 3 last century.

      Realize that the <object> tag is vastly superior to the <applet> tag in that it can be used for other things, like Adobe's Flash and Microsoft's Silverlight, as well as new technologies yet to be developed. It is that Java was very slow (pre-JIT), loaded very slowly (pre-"New Bytecode Verifier") and was a pain to do anything good looking or active in - see Flash and Silverlight - added to the fact that Javascript was easier and faster to write and gave developers a platform nearly as robust that killed applets. The tag has nothing to do with it.

    83. Re:doesn't sound too secure yet by IamTheRealMike · · Score: 1

      Well maybe you should watch this presentation and then you'd understand why Dalvik was created. Hint: it has nothing to do with licensing, and everything to do with the performance characteristics of mobile phones.

    84. Re:doesn't sound too secure yet by IamTheRealMike · · Score: 1

      A blur filter implemented in JavaScript is unusably slow.

      Yes, JavaScript engines are getting better. But they started so slow they were useless for anything beyond trivial control logic, so that's hardly a ringing endorsement. Even if JavaScript were to somehow achieve native speeds, its memory footprint would be awful compared to C++, which is a large part of the reason Java sucks for desktop work.

    85. Re:doesn't sound too secure yet by Goaway · · Score: 1

      Which are both forbidden by the x86 subset used by NaCl.

    86. Re:doesn't sound too secure yet by Goaway · · Score: 1

      With the x86 instruction set, I can load a data file and execute a jump to a data segment without the code having passed through any sort of system loader.

      But not with the subset of x86 that NaCl allows, you can't.

    87. Re:doesn't sound too secure yet by XNormal · · Score: 1

      This is not a good thing: by definition x86 code is not portable across platforms.

      Using dynamic translation techniques (a la valgrind) it should be possible to run x86 code on other platforms with excellent performance.

      With dynamic translation you can either design a completely new bytecode that is equally alien to all platforms or choose an existing platform as a "bytecode". I think x86 is actually a pretty good choice. The x86 architecture has segment registers that help isolate untrusted code. These segment registers are accessible from user mode on all major x86 operating systems (unlike the paging hardware that is available only to the OS kernel). Also, all other major architectures sets have more general purpose registers than x86. This makes it possible to devote a dedicated register to each of the emulated x86 register while still having a few free registers to manage the state of the dynamic translation engine.

      Ok, so x86 assembly is a weird and not very orthogonal instruction set. So what? This merely makes the lookup and translation tables in the dynamic execution engine a bit bigger when compared to some "ideal" bytecode. I don't think this makes a good argument against an otherwise very elegant solution.

      --
      Stop worrying about the risks of nuclear power and start worrying about the risks of not using nuclear power.
    88. Re:doesn't sound too secure yet by aliquis · · Score: 1

      JAVA applets surely have to be more standard than Flash? Or at least as much? I can't see why anyone would be pushed off from using JAVA applet except for it requiring JAVA to be installed on the machine.

    89. Re:doesn't sound too secure yet by toriver · · Score: 1

      For code that runs for a long time, the translation to (fast) native code instead of emulated bytecode is done rarely, so for e.g. long-running server programs the speed will be better than so-called "native" (i.e. ignorant) static compilation simply becasuse the runtime can monitor the behavior and "recompile" as needed if the call pattern makes it sensible to optimize some code (unrolling loops etc.).

      JIT (which really just means dynamic compilation) is only slower for interpreted for code that is run once and then exits.

    90. Re:doesn't sound too secure yet by Bert64 · · Score: 1

      Exactly, if you're going to put native code into a browser applet, it should be arm code because it is embedded devices that need the performance more than quad core desktops...

      --
      http://spamdecoy.net - free throwaway anonymous email - avoid spam!
    91. Re:doesn't sound too secure yet by onitzuka · · Score: 2, Informative

      Java is compiled Just-in-time, though I don't know about smaller, obscure or embedded platforms.

      On mobile phones that use ARM chips Java byte-codes can also be executed directly by the CPU if the ARM chip implementes Jazelle. These ARM chips have a "J" in their names (eg. ARM926EJ-S).

      Read about it here: ARM Jazelle.

    92. Re:doesn't sound too secure yet by i.of.the.storm · · Score: 1

      Oh man, p-code. Actually, IIRC, I think p-code executables were smaller than regular exes, which back then might have been a fair tradeoff for speed if you wanted something manageable to download over dialup, although I don't think the difference would have been big enough to warrant it.

      --
      All your base are belong to Wii.
    93. Re:doesn't sound too secure yet by Anonymous Coward · · Score: 0

      Those that don't RTFA are doomed to make dumb statements.

    94. Re:doesn't sound too secure yet by i.of.the.storm · · Score: 1

      I've had it for a while, since it first was in beta and it's still slow to load applets. Java is the main language I program in right now so I usually update whenever something interesting comes up and I did not see much worth talking about in Update 10. It feels a little faster than previous versions, but that's like comparing a turtle's pace to a snail's. Neither is exactly ideal.

      --
      All your base are belong to Wii.
    95. Re:doesn't sound too secure yet by Anonymous Coward · · Score: 0

      | Once you read it you'll slap your forehead and say, my god, it's so simple. Why didn't I think of that?

      This is a small variation on a paper by Howell et al on Xax that is appearing OSDI this week. Unlike the google paper, this has been peer reviewed and accepted for publication. Unfortunately, Howell et al work for Microsoft...

    96. Re:doesn't sound too secure yet by IamTheRealMike · · Score: 1

      The paper compares NativeClient to Xax. It sounds quite different.

    97. Re:doesn't sound too secure yet by jasonharrop · · Score: 1

      I have the "draggable applet" feature working in docx4all. See http://dev.plutext.org/blog/2008/12/09/unifying-the-web-browser-and-the-desktop/ To be honest, I'm not sure that this capability is as important as your post suggests. Yes, you can close your browser and the app keeps running. And there might be a way to resize the app. But what else does it buy you?

    98. Re:doesn't sound too secure yet by Anonymous Coward · · Score: 0

      FWIW, and to give myself props, I made the same argument as you here (after reading the paper): http://tech.slashdot.org/comments.pl?sid=1056231&cid=26048889

      I'm glad someone on this thread got a word in edgewise on why this has a chance to be a safe system.

    99. Re:doesn't sound too secure yet by Jeremi · · Score: 1

      This is not a good thing: by definition x86 code is not portable across platforms.

      Sure it is... x86 byte code is a byte code like any other.... bytes are bytes. That's why programs like VirtualPC are able to run Windows executables on PowerPC-based Macs.

      Of course, you might be able to get higher efficiency on an x86-based host due to the similarity between this bytecode and its hardware instruction set... but that's just a convenient detail ;^)

      --


      I don't care if it's 90,000 hectares. That lake was not my doing.
    100. Re:doesn't sound too secure yet by AKAImBatman · · Score: 1

      A blur filter implemented in JavaScript is unusably slow.

      Maybe I'm missing something, but since when was less than a second "unusably slow"? (FF 3.04) If it was a really large image, I imagine that it might be wise to put up a progress bar and break up the work into small chunks that execute every few milliseconds, but I don't see that as a large problem. Nor would a user touching up his image, I would imagine. It's certainly a lot faster than the suggested round trip to the server.

    101. Re:doesn't sound too secure yet by Anonymous Coward · · Score: 0

      No they won't. Forehead slap back to you sir.

      Virtual machines are showing up everywhere, these supposed hardware emulators or hypervisors are exploitable. So this new beast isn't? 'splain yourself.

    102. Re:doesn't sound too secure yet by Enter+the+Shoggoth · · Score: 1

      Thanks for your comment and the links. Every time I run across an article like this and sigh, wishing I had the technical cojones to explain why it is that we were doing things like this on mainframes in the 80s with complete safety... and continuing to wonder why Intel couldn't just COPY the damned concepts if they can't figure out how to implement them from scratch.

      I suspect that that is precisely what intel have done... badly

      Our world continues to be saddled with a half assed operating system running on a third rate architecture and for no other reason that technology takes a back seat (or maybe it's more like back of the bus) to marketing, bribery and collusion (with an unhealthy dose of buyer ignorance thrown in for good measure).

      This is simply a corollary of the Peter Principle

      I continue to hope that good technology will win out eventually, although I'm almost convinced at this point that it will have to come from some country that hasn't been bought out by the Borg.

      I think you hope in vain, markets bring competition but they also tend to ubiquity and uniformity, this is their downside, however centrally planned economies (or hybrid one's, as I assume the "some country" you mention is probably China) tend to end up in a pretty similar place due to bureaucratic inertia, and political corruption. In any case it is the general public's unwillingness to be more than slightly discerning in the way it consumes that ultimately drives things, it is the appeal to authority that is the problem, and the authority is not the geeky guy in the lab coat it's the marketing type in the $10K armani suit.

      I wonder though, and maybe you know, why isn't the Power-PC mentioned in the Wikepedia article. I would assume because of its origin that it is closer to the 370 than to the Intel architecture in being fully virtualizable, a concept apparently not on the "roadmap" that Steve Jobs kept referring to in his rationale for Apple's switch to Intel. The Power-PC represented our best hope of escaping the Intel monoculture and I'd like nothing better than to once again have a mainstream non-Intel (and non-Intel-like) choice when I pick my next laptop.

      As I have mentioned previously there is still another architecture that has the potential to knock x86 off it's pedestal, ARM outsells x86 by around 7 to 1, it is still a long shot of course but not impossible (although I wouldn't wager money on it)

      Of course if Intel had a deserved (I'm being generous) third of the market then what Google is doing with this initiative would be dead in the water (as it probably should be).

      Actually I'm not completely upset about what google are doing here... if we are to end up with a monoculture of x86 only it actually makes a lot of sense to take what we've learnt from x86 virtualisation and use it in novel ways, it certainly aught to be more energy efficient than java or flash.

      --
      Andy Warhol got it right / Everybody gets the limelight
      Andy Warhol got it wrong / Fifteen minutes is too long.
    103. Re:doesn't sound too secure yet by Nazlfrag · · Score: 1

      How on earth would running non-GPL code on a GPL'd virtual machine violate the GPL? I'm really confused about your second point. Unless someone is modifying the GPL'd code such as the VM itself, there should be no problems right?

    104. Re:doesn't sound too secure yet by gaspyy · · Score: 1

      Flash has native blur, glow, displacement, etc. and you can also program your own effects that can be applied on images and video: check Pixel Bender

    105. Re:doesn't sound too secure yet by Anonymous Coward · · Score: 0

      Hmm. If it works that way, then that suggests: why don't all OSs run every user program, system service, and most hardware drivers that way? That'd be secure and stable. I suspect there's a performance penalty, but since so much of the work is already handled in hardware, it should be a smallish fraction of the penalty the JVM pays - after all, a translation of x86 to x86 is going to be a lot easier than translating java bytecode to x86.

      Which reminds me of the recurring rumor that Google will make its own OS. I'd always dismissed that, but Google pretty much demonstrated it has a similar kind of expertise as what you'd need to write an OS.

    106. Re:doesn't sound too secure yet by ultranova · · Score: 1

      You contradict yourself here. JIT is one way to perform emulation. Either JIT isn't as fast as native code or emulation isn't horrible for performance, you can't have it both ways!

      Sure you can. The key here is to understand that the lower level the input code is, the harder it is for the compiler (JIT or otherwise) to separate platform-specific details and optimizations from description of algorithm. In other words, it is more difficult to compile efficient native code from some other (real) platforms assembly than from Java bytecode. And the more different that source platform is from the target one, the more difficult this becomes.

      Compilation typically loses information, and the more information a compiler has available, the better job it can do. However, even some emulators nowadays include JIT compilers, since even sub-optimal native code is faster than running every instructor through a parser as it's executed by the emulator.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    107. Re:doesn't sound too secure yet by Secret+Rabbit · · Score: 1

      So much for the performance benefit.

    108. Re:doesn't sound too secure yet by Ed+Avis · · Score: 1

      Of course you can define a subset of x86 code which is 'safe'. The difficulty comes in defining one which is both safe and still powerful enough for useful work.

      --
      -- Ed Avis ed@membled.com
    109. Re:doesn't sound too secure yet by paradoja · · Score: 1

      Any sufficiently complicated virtual machine thingy contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of a JVM.

    110. Re:doesn't sound too secure yet by Bert64 · · Score: 1

      Not quite...
      What you are thinking of is the NX bit, which was introduced by the first 64bit chips from AMD...
      Intel added something similar to later P4 revisions, but earlier ones lack support for it.

      --
      http://spamdecoy.net - free throwaway anonymous email - avoid spam!
    111. Re:doesn't sound too secure yet by EsbenMoseHansen · · Score: 1

      Java is compiled Just-in-time

      How is that different than an interpreter?

      JIT is a marketing word. The real term could be something like "caching interpreter".. it is simply an interpreter that caches the resulting code. Meaning that if you managed to write a program that has every line executed once, it would be just like an interpreter in effect.

      Personally I like to call JIT for "slightly too late", since "just in time" in my world would imply the code is compiled when you need it, not a bit later.

      --
      Religion is regarded by the common people as true, by the wise as false, and by rulers as useful.
    112. Re:doesn't sound too secure yet by Adam+Jorgensen · · Score: 2, Interesting

      Quite a bit I'd say. Last time I checked, every Tom, Dick and Jane has a Cellphone (Mostly running on ARM chips). The same can not be said for x86...

    113. Re:doesn't sound too secure yet by Anonymous Coward · · Score: 0

      thats so 1999...

    114. Re:doesn't sound too secure yet by davecb · · Score: 1

      In that era, the bandwidth to memory was pitiful, too, so anything that made the instructions smaller was good. We've passed through the inverse case around the time of the first RISC chips, and are now back in that timing regime.

      --dave

      --
      davecb@spamcop.net
    115. Re:doesn't sound too secure yet by Lproven · · Score: 1

      > x86 code runs natively on 90% of the processors out there.

      Er, no, it doesn't. X86 is a minority, for all that it totally dominates the desktop. The most widespread CPU architecture in the world, in terms of total units, is ARM, by a large margin. They sell /billions/ of the things each year. Don't believe me, go look it up.

      --
      Liam P. ~ "Intelligence is a lethal mutation." (me)
    116. Re:doesn't sound too secure yet by Ed+Avis · · Score: 1

      Thanks to everyone who corrected me on this. Of course I was considering only the desktop so I forgot ARM. Particularly bad of me since I used to have an ARM-based Archimedes system as my main desktop ;-p.

      --
      -- Ed Avis ed@membled.com
    117. Re:doesn't sound too secure yet by PipsqueakOnAP133 · · Score: 1

      Just as a counterargument, for any business which depends on widespread external distribution, FOSS/GPL is considered dangerous if used incorrectly.

      Just because it's FOSS doesn't mean Google has a good reason to pick it up.

      On the other hand, x86? Really? Who in their right mind thought that was a good idea?

    118. Re:doesn't sound too secure yet by poot_rootbeer · · Score: 1

      Of course you can define a subset of x86 code which is 'safe'. The difficulty comes in defining one which is both safe and still powerful enough for useful work.

      Safe instructions: NOP*
      Potentially unsafe instructions: all the rest

      (* may be unsafe if used in conjunction with potentially unsafe instructions)

    119. Re:doesn't sound too secure yet by Coop · · Score: 1

      x86 code runs natively on 90% of the processors out there.

      No it doesn't. Don't forget iPhones, Android phones, and many other mobile devices that aren't x86 compatible. To Java's advantage, it's becoming increasingly important that websites work well on mobile devices and future devices and processors yet to be envisioned. Trust me, suppliers to the mobile market would rather use Java than start developing an x86 emulator. As for what application vendors would prefer, I suppose it depends on their legacy codebase. Many companies understood in 1995 why they wanted a portable codebase, and started developing in Java despite it's slow performance at the time, but others didn't see the point and so Google's work is an attempt to bring the Java runtime's advantages to non-Java code.

      --
      "If you're not passionate about your operating system, you're married to the wrong one."
  2. The important (and finally valid!) question by Faw · · Score: 4, Funny

    Does it run Linux??

    1. Re:The important (and finally valid!) question by Anonymous Coward · · Score: 2, Funny

      Does it run Linux??

      I just tried Debian PPC, and apparently, no it doesn't.

    2. Re:The important (and finally valid!) question by mikeee · · Score: 3, Funny

      So as if javascript isn't bad enough, now we're going to have the inevitable beowulf cluster running across the tabs of our browsers?

    3. Re:The important (and finally valid!) question by Anonymous Coward · · Score: 0

      I can imagine that.

    4. Re:The important (and finally valid!) question by the_humeister · · Score: 1

      No, but there is a unix-like environment written in javascript!

    5. Re:The important (and finally valid!) question by Shotgun · · Score: 1

      In the Google browser virtual machine, Linux runs YOU!

      --
      Aah, change is good. -- Rafiki
      Yeah, but it ain't easy. -- Simba
    6. Re:The important (and finally valid!) question by nsaneinside · · Score: 1

      Given that most of Google's interesting "new" toys (the official Google Talk client, for example) don't run on Linux, I doubt that this one will either.

      What, you wanted to run Linux on Google StackSmasher on Windows? Oh, never mind then...

  3. Two steps backward by AKAImBatman · · Score: 4, Insightful

    Google has announced its Google native client, which enables x86 native code to be run securely inside a browser.

    Because all that we need is to further promote an archaic instruction set that won't die because of all the pre-existing code compiled for it. An instruction set that was finally starting to loosen its grip as the industry worked toward more abstract solutions.

    With Java applets already dead and buried

    And with good reason!!! Plugin engines do not provide a very smooth browsing experience. You must wait for them to download and activate before you can start using the widget. Meanwhile, Javascript is designed for execution as the page is loading.

    The heavyweight JVM was probably the worst offender, but look at Flash for another example of an engine that most developers would rather eliminate. While it was hip to create entire websites out of Flash for a while, the platform was very user-unfriendly and almost died out. Thanks to infighting over video standards however, Flash was able to hold on as a video delivery platform and even gained a margin of success as a web-gaming platform. (About the only area where Java Applets really shined back when they were popular.)

    My personal opinion* is that this is a step in the wrong direction. Javascript engines are getting good. Damn good. I'd like to see more R&D poured into these engines and the underlying technologies rather than reinventing ActiveX and Java. If researchers wanted to invent a more efficient or usable browser language other than JS, I'd be all for it. But I don't run a browser to become a part of a compute farm. I run a browser to access web information and applications. Very little of which is compute-intensive enough to require a new execution engine over a more advanced set of APIs.

    * ...and 50 cents won't buy you a cup of coffee anymore, so take it for what it's worth.

    ** As an aside, C/C++ is an incredibly complex build environment. Why anyone would want to continue subjecting developers to the angst of compiler differences, makefiles, configure scripts, and other irritants is beyond me. As is typical with such platforms, I can't even get the examples running on my machine. The run.py script dies with an "Invalid Argument" on line 42 and the nacl-gcc compiler fails with syntax errors a-plenty. I'm sure I'll figure it out eventually, but WHY oh why do we want to promote such a complicated method of compiling code?

    1. Re:Two steps backward by Anonymous Coward · · Score: 0

      Not really... they'll just end up developping a VM for it once it's at an advaneced enough state...

    2. Re:Two steps backward by Anonymous Coward · · Score: 3, Interesting

      f researchers wanted to invent a more efficient or usable browser language other than JS, I'd be all for it.

      I really hope so. Does anyone actually enjoy programming JavaScript? No real objects, weak typing, etc. It's fine for small bits of code, but for larger apps? Ugh.

      A "lite" version of Python would be nice. Shove (erm, specify) lots of interesting libraries into the browser itself, and let us use those.

    3. Re:Two steps backward by MikeBabcock · · Score: 5, Interesting

      The only problem you seem to have with Java plugins is the load time -- this is only resolved by Javascript because JS is pre-loaded by the browser at all times (in modern browsers at least).

      If other plugins were to be marked as 'frequently used' by the plugin engine and loaded at runtime instead of page load-time, they'd obviously be just as responsive as Javascript (or more so, since Java is compiled to native code in many cases).

      Making a browser that integrates Java in a reasonable way and makes it work just as seamlessly as Javascript was tried already (by Netscape) but it was before we had computers with enough RAM to handle it IMHO.

      --
      - Michael T. Babcock (Yes, I blog)
    4. Re:Two steps backward by Anonymous Coward · · Score: 0

      ** As an aside, C/C++ is an incredibly complex build environment. Why anyone would want to continue subjecting developers to the angst of compiler differences, makefiles, configure scripts, and other irritants is beyond me. As is typical with such platforms, I can't even get the examples running on my machine. The run.py script dies with an "Invalid Argument" on line 42 and the nacl-gcc compiler fails with syntax errors a-plenty. I'm sure I'll figure it out eventually, but WHY oh why do we want to promote such a complicated method of compiling code?

      Because JavaScript is fully standardized across browsers? Right. Good luck with that.

      And before you make the same response as every other web monkey, that all you need to do is use XYZ library (which one? No one can decide which is why there are so many) to make your web app 'work' with most browsers. Oh, and you have to completely subvert the HTTP protocol, there's that too.

      Rather than putting x86 on the web, why not ditch the HTTP/HTML/CSS/JavaScript abomination once and for all? Are web developers so blinded that they can't see just how horrible a solution this is? Year after year, they keep turning out more and more libraries, frameworks, and buzzwords to try and overcome the simple fact that the Web wasn't designed for applications. Anything more complicated than a simple HTML form, and you're done for.

      Scrap all this nonsense and come up with something truly new. A company like Google could pull this off.

    5. Re:Two steps backward by ardor · · Score: 2

      Whats the problem with JavaScript? I have written JS code with >20k lines already, and it was quite ok. Among the things that irritate me is this "var" nonsense (declaring a variable without var puts it in the global namespace!), but other than that, it was fine. Also, you are wrong, JS has real objects. And, weak typing can be a very powerful tool if used properly. Note that Python has weak typing too...

      --
      This sig does not contain any SCO code.
    6. Re:Two steps backward by thsths · · Score: 1

      > Making a browser that integrates Java in a reasonable way

      No, it is not. My browser starts faster than the JVM - and I would like to keep it that way.

    7. Re:Two steps backward by AKAImBatman · · Score: 4, Insightful

      The only problem you seem to have with Java plugins is the load time -- this is only resolved by Javascript because JS is pre-loaded by the browser at all times (in modern browsers at least).

      The Java runtime was compiled into early browsers like Netscape. So the load time is not caused by the plugin itself. (Though that does play a role in the first activation.) The load time is the time it takes to download the complete application, dearchive the components, load the components into an interpreter or JIT, initialize the environment and/or APIs used, and finally present the application to the user.

      Javascript fits in better with the way web browsers are designed in that the browser executes each individual module during the page load. The makes page loading more asynchronous and thus a better experience for the web user. The web developer can still throw up a "loading" progress bar for applications must preload, but they are the exception rather than the rule.

      Making a browser that integrates Java in a reasonable way and makes it work just as seamlessly as Javascript was tried already (by Netscape) but it was before we had computers with enough RAM to handle it IMHO.

      There is more to the issue than meets the eye. Besides the synchronous aspect I mentioned, the client Java runtime has also grown to meet the expansion in system memory and complexity. Which is a good thing from the perspective of writing rich applications for deployment on the server or desktop. It's a bad thing when we're talking about the time-sensitive environment of the web browser. If you want an ideal JVM for the browser, Sun is going to have to strip it down again and make the platform a better fit than it has been in the past. (A version that relies heavily on the DOM for APIs would be preferable.)

      They're also going to have to work out a good method of solving the load problem. Even Flash allows for partial execution prior to the load being complete. (This is how most Flash games show a LOADING screen.) Java was not designed with this in mind and the platform shows it. There are ways a developer could work around it using dynamic class loading, but this requires a great deal of knowledge, effort, and skill on the part of the developer.

      My own feeling is that it's best to let sleeping dogs lie. I love the Java platform, but it currently has a higher calling. Best to let it work where it excels and focus on the aspects of the browser that currently excel. (e.g. Javascript)

    8. Re:Two steps backward by Anonymous Coward · · Score: 0

      > Does anyone actually enjoy programming JavaScript?

      Um... Yes? Stunning, really, that language preferences can vary. Never see that in the modern computing world...

    9. Re:Two steps backward by ardor · · Score: 1

      Agreed. The web is not a place for applications. HTML is designed for hyper_text_.

      A "webapp browser" would essentially be the view and one half of the controller in the MVC pattern. An interesting idea would be to have the browser as an environment for Adobe Adam & Eve scripts: http://lambda-the-ultimate.org/node/563 .

      --
      This sig does not contain any SCO code.
    10. Re:Two steps backward by Anonymous Coward · · Score: 1

      you need to learn the difference between weak and strong typing. python and javascript have strong typing, but uses dynamic typing to ensure safety.

      C/C++ have weak typing, due to void pointer casts, among other things. For example, dividing an integer by zero, or dereferencing a null pointer in c will cause your program to take a shit, while in Python or Javascript such conditions are checked *at run time* to prevent an illegal action. If the check fails, an exception is thrown, and offending action skipped.

    11. Re:Two steps backward by maxume · · Score: 1

      Python has strong, dynamic typing (identifiers are not constrained to a type, but you have to create a new object to coerce something).

      --
      Nerd rage is the funniest rage.
    12. Re:Two steps backward by Anonymous Coward · · Score: 0

      Still, you have to download a Java app before you start using it. And you can make JavaScript app that's usable before it's even fully downloaded.

    13. Re:Two steps backward by vrai · · Score: 2, Interesting

      As an aside, C/C++ is an incredibly complex build environment ...

      C/C++ are programming languages, not build environments. There's nothing to stop developers using qmake, or Jam, or one of many more user friendly build systems. The fact that the examples don't is more indicative of the intended audience (expert native-code developers) than anything else.

      As to "why build this at all" ... because they can, they want to and it has the possibility to provide a feature set not currently available. No one who isn't a graphic designer likes websites made entirely out of flash; but flash games are undoubtedly popular and fun. In general I don't like the use of Javascript (if I see another stupid fading menu I'm going to hunt down the developer who wrote it and kill them as they sleep) but I love the GMail interface and wouldn't be without it.

      The web is nothing if not Darwinian. If this technology has no real use it will go the way of Java applets and VRML. If a killer app can be found it will become part of the landscape and we'll all forget what it like to live without it.

    14. Re:Two steps backward by characterZer0 · · Score: 1

      Unless your browser is lynx and you start your JVM in server mode, I do not believe you.

      --
      Go green: turn off your refrigerator.
    15. Re:Two steps backward by ardor · · Score: 1

      Hmm, right, confused this with dynamic typing.

      --
      This sig does not contain any SCO code.
    16. Re:Two steps backward by Anonymous Coward · · Score: 0

      Note that Python has weak typing too...

      No, it doesn't. Python has dynamic, strong typing. JavaScript is dynamic, weak. Consult your undergrad Programming Languages textbook for the definitions, or just see here. Python will throw a TypeError if you try to do crap like 1 + "2". And JavaScript will silently concatenate to "12", right? Strong typing means 1 + "2" is nonsense, and you have to explicitly convert the types.

      It's a minor aesthetic benefit if you're, say, reading numbers from a form on a website. But in more complex situations, weak typing tends to make programming errors harder to find.

    17. Re:Two steps backward by AKAImBatman · · Score: 4, Interesting

      Does anyone actually enjoy programming JavaScript?

      I do. And so can you. It's the C-based syntax that throws most programmers for a loop. Once you realize that the language is actually of a functional design similar to LISP, everything gets a lot easier.

      No real objects, weak typing, etc.

      Javascript has one of the most flexible Object systems I have seen in my 20+ years of programming. And its typing system is actually quite strong. Like another poster mentioned, it's dynamically typed not weakly typed. Which is an issue that fades into obscurity once you understand how to properly utilize the language.

      It's fine for small bits of code, but for larger apps? Ugh.

      Javascript (like most functional languages) is perfect for building large apps out of a massive number of small bits. Look up scoping in Javascript sometime and you'll understand that larger apps get built by having machines within machines within machines to go from simple tasks to ever more complex tasks. It is, in many ways, a more scalable solution than APIs and packaging. But it is different and therein lies the crux of its failure in the minds of many programmers.

    18. Re:Two steps backward by CompSci101 · · Score: 1

      I don't think the latest trend in RIAs and the associated frameworks is about changing the way we browse the web. I think it's about unifying desktop and web application development. You can sort of see it happening already with Silverlight, where you're effectively writing against the same WPF API, using the same XAML and .NET classes, for desktop apps and web apps intended to be run against the Silverlight runtime.

      I think you're right in that all these schemes are effectively a reinvention of ActiveX and applets. But, honestly, I don't think that's a bad thing. The technologies themselves were bad and poorly implemented, but the ideas and motivations behind them were not.

      One problem of adoption in the past, however, was that implementing any of these custom controls was prohibitively expensive from a bandwidth and "user education" perspective -- you absolutely could not count on a user waiting for your plugin to install (or, in Java's case, waiting for the full JRE to come down) or knowing how to install it properly. It's almost braindead with Flash and people still have problems from time to time. Silverlight has the advantage here, as Windows users will already have the runtime installed on their machines. Bandwidth is less of an issue today, but there's still the issue of platform (and which version, etc., etc.). It'll be interesting to see if that piece finally gets worked out.

      Anyway, I for one will be glad to see the DOM and its many many many incompatible implementations go. HTML is meant for laying out pages, not for describing user interfaces. It has been 15 years and we still don't have a combobox, for fuck's sake!

      C

      --
      The Sun is proof that we can't even do fire properly.
    19. Re:Two steps backward by pizzach · · Score: 1

      Fine then. Build Java into the underlying OS platform like Mac OS X. Take that.

      --
      Once you start despising the jerks, you become one.
    20. Re:Two steps backward by Rich0 · · Score: 1

      but it was before we had computers with enough RAM to handle it IMHO.

      IMHO, we still don't have computers with enough RAM to handle it. :) I can pretty much count on runnning anything java-based to eat up 50X as much RAM as the equivalent done in C (or anything else).

      In fact, I normally run with ulimit -v 1200000 (for all non-root or init.d processes) so that I don't have to worry about a swap-storm when a process goes out of control. I never notice the limit except when I go to launch some java app. Then I have to raise the limit and watch my swap go nuts (and this is on a system that otherwise does fine with apache, mysql, mythbackend, and smbd all running at once with maybe a compile job or two running - granted, with appropriate (io)niceness set on everything).

      Sure, I could add an extra GB or two of RAM just so that java would behave, but why would I want to?

    21. Re:Two steps backward by rcallan · · Score: 1

      Yes, I wish this existed. The problem might be that without modification you need a new JVM instance for each new applet, but it could probably spawn a new one each time one is used so it's ready immediately. There are some projects to run multiple programs within one JVM so that might work too. It's odd to an outsider that there's so much work going into optimizing javascript and flash (and from the crazies, silverlight) when java could fill all those roles. It strikes me (a java fanatic) that java is the unix of the web, it's secure and scalable and to those that use it, it seems perfect for the job, but no one uses it, instead everyone uses a solution cobbled together from different sources (adobe, microsoft, google). Again, I'm just an outsider looking in...

    22. Re:Two steps backward by dword · · Score: 1

      JavaScript has objects. The thing is, it has prototypes instead of classes and in it's current state, native inheritance and properties (using the classic setters/getters we're so accustomed to) are impossible without using some hacks. Please! This language simply has different concepts and is looking at OOP from a different perspective. I actually enjoy programming in JavaScript and I've quickly learned to love it. If you look at it and say "ewww, this is different than what I know and I have to actually LEARN something to be able to program in JS" you will clearly find it difficult and useless. The main difference between classic OOP and prototypical OOP is not so subtle but learning to program in JavaScript takes more than just learning it's syntax.

      It's great for small and large applications (I've written things you only dream of, in JS) but the thing is that most people are used to writing quick web hacks in JavaScript that they don't see it's true power outside the world of the web and in the world of large apps. Because most of what you see is either obfuscated because it's made to run as quickly as possible or it's a small piece of code that uses some libraries (ie, jQuery), you're simply not used to seeing large applications built using beautiful JavaScript.

      I was about to go on and on about this but I'm already waaay off-topic. My point is simple: JS is also fine for larger apps; the fact that you haven't tried that flavor properly doesn't mean it doesn't taste good. Basically you said something like "chicken are good for laying eggs but do they taste good? Ugh" in a world where very few people discovered fire and the others are still afraid of it. Now I have to pass the bong of analogies to someone else. Cheers.

    23. Re:Two steps backward by AKAImBatman · · Score: 3, Insightful

      Strong typing means 1 + "2" is nonsense, and you have to explicitly convert the types.

      That example has nothing to do with strong typing, but rather operator overloading. Both Java and Javascript understand "+" to be a string concatenation symbol when dealing with strings. Thus they attempt to coerce the values into strings. In Java's case, the resulting output looks something like this:

      new StringBuffer().append(String.valueOf(1)).append("2");

      Javascript does have implicit type casting (e.g. '1' - 1 = 0), but this is a feature that can be found in quite a few strongly languages. (e.g. int x = 10; char val = 10; x += val) Javascript is actually STRONGER than C when it comes to typing. When I cast a variable to a new type, its original type information is redefined and/or completely lost. This can create problems when programmers start using (void *) pointers for everything. Javascript remembers the underlying type of a value at all times. Values are never modified or destroyed, but can be coerced to create a new value with an implicitly cast type.

    24. Re:Two steps backward by fuzzyfuzzyfungus · · Score: 1

      Given the volume of whining about Java on OS X, even among hardcore Macheads, that might not be such a good plan. Nothing stopping you from just loading java into memory on startup, though.

    25. Re:Two steps backward by AcidPenguin9873 · · Score: 1

      Because all that we need is to further promote an archaic instruction set that won't die because of all the pre-existing code compiled for it.

      I'm sick of people spouting off this FUD. What is "archaic" about modern x86? Have you ever looked at it? Have you looked at a modern x86 microprocessor's implementation of the x86 ISA?

      I would argue that we use x86 not just because of legacy code, but also because everyone on Earth already has an x86 processor somewhere which performs quite well on a wide range of code. Specifically:

      • Variable-length instructions make more efficient use of the instruction cache because they can be, on average, smaller than fixed-length instructions for the same code sequence. And we've known how to efficiently decode variable-length instructions in hardware for about 20 years.
      • CISC processors look like RISC processors internally. You spend a little extra chip area on a microcode ROM to implement the nastier, longer CISC instructions.
      • SSE gives you vector processing.
      • The 64 bit support cleaned up some of the cruft and added other missing things (RIP-relative addressing, more GPRs).
      • Virtualization is supported by ISA extensions from both Intel and AMD.
      • Development tools for x86 are very mature, probably the most mature of any instruction set.

      If researchers wanted to invent a more efficient or usable browser language other than JS, I'd be all for it. But I don't run a browser to become a part of a compute farm. I run a browser to access web information and applications. Very little of which is compute-intensive enough to require a new execution engine over a more advanced set of APIs.

      The only reason to do any of this is speed. You're right, JS is fine for lots of things, but even the best JavaScript JIT won't be as fast as native x86.

      I'm sure I'll figure it out eventually, but WHY oh why do we want to promote such a complicated method of compiling code?

      Once again, speed. The only reason they are doing any of this is speed.

    26. Re:Two steps backward by angel'o'sphere · · Score: 1


      I really hope so. Does anyone actually enjoy programming JavaScript? No real objects, weak typing, etc. It's fine for small bits of code, but for larger apps? Ugh.

      Erm, see below, my second quoting from you, but first: JavaScript has real objects and has strong typing, what you mean is dynamic typing (Hint: C has weak typing). What you mean is: javaScript has no classes but uses prototypes (a far stronger/more expressive concept than classes).

      A "lite" version of Python would be nice. Shove (erm, specify) lots of interesting libraries into the browser itself, and let us use those.
      This does not make much sense if I relate it to the first part of your post, that I quoted above: Python has a similar type system like JyvaScript (dynamic typing, object oriented) but unlike JabaScript it uses classes and not prototypes (prototype onjects) to define objects.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    27. Re:Two steps backward by The+End+Of+Days · · Score: 1

      Agreed. The web is not a place for applications.

      The web disagrees with you, and given the nature of logic, the web wins the argument.

    28. Re:Two steps backward by cowwoc2001 · · Score: 3, Informative

      Try Java6 update 10 and you'll be surprised. The plugin loads instantaneously and I believe applets load jars on demand as well.

    29. Re:Two steps backward by AKAImBatman · · Score: 2, Informative

      I'm sick of people spouting off this FUD.

      You seem to be confusing the instruction set with the underlying implementation. Core 2 is awesome. The instruction set is not. So much so that it must be translated into a decent set of instructions by microcode before the processor can pass it through the decoder and ALU.

      What is "archaic" about modern x86?

      Oh, I don't know. Instructions for 64-bit programming piled upon instructions for 32-bit programming piled upon instructions for 16-bit programming piled upon instructions for 8-bit programming, all with a half-dozen memory modes to choose from, four different register access methods, special use of particular registers in certain modes, complex instructions added willy-nilly only to be deprecated into slow microcode later on, four different SIMD schemes, a few different floating point modes, a variety of segmentation schemes (none of which are used), support for context switching (that no one uses), variable length instructions, etc, etc, etc.

      x86 is about the worst instruction set known to man. (Which is kind of amusing when you consider that it became the most used instruction set ever.) Even if we assume that the system will only allow a small subset of x86 code, there is still the very real possibility that it will be impossible to protect against the full ISA when executing code natively. Just off the top of my head, I'm already thinking of carefully crafting instructions so that they seem correct when the verifier passes over them in sequence, but actually execute as different instructions when the jump is executed into what appears to be the middle of an instruction. Oops.

      Have you looked at a modern x86 microprocessor's implementation of the x86 ISA?

      Yeah, I have. I could kill my cat by accidentally dropping heavy reference manuals sitting on my shelf. The x86 instruction set is far too large, overly complex, redundant, antiquated, and poorly suited as a replacement for VM-targeted instruction sets like Java bytecode.

      The only reason to do any of this is speed. You're right, JS is fine for lots of things, but even the best JavaScript JIT won't be as fast as native x86.

      "We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." --Donald Knuth

      "Speed" is a terrible excuse for attempting a platform like this. Especially when APIs can cover the 3% performance gap that Knuth referred to. I don't need to write a GL renderer in Javascript. I can simply call the necessary APIs to manipulate the native GL instance for me. That's more than fast enough for compute-intensive graphics.

    30. Re:Two steps backward by rgo · · Score: 1

      But with Javascript, Python, Ruby, etc, you don't even need to use tools like qmake, Jam.

    31. Re:Two steps backward by AKAImBatman · · Score: 1

      Try Java6 update 10 and you'll be surprised

      While some optimizations were made, the primary thing Sun did was to add a loading screen to replace the classic "gray box" problem. This doesn't actually make anything faster or let the user use the application any earlier. However, it does inform the user that something is happening and that the applet has not crashed.

      Perceptual performance FTW! ;-)

    32. Re:Two steps backward by thisisauniqueid · · Score: 1

      Try Java 1.6 release 10+ -- Java applet load time has reduced by an order of magnitude. (NB this is not yet in Java 1.7)...

    33. Re:Two steps backward by vrai · · Score: 1

      Well yes, and if you drive a car instead of flying a plane you never need to learn to land. As I said: you can do things in native code that can't be done in a scripting language (or can't be done in anything approaching an optimal manner).

      Most of what people want to do on the web can be handled by HTML/CSS, some requires Javascript and some Flash (or its equivalents). Being able to run sandboxed native code opens the door to new functionality. Most of this new functionality will suck but some might be quite good. There's no harm in providing this sandbox and seeing what people can do with it.

    34. Re:Two steps backward by Anonymous Coward · · Score: 0

      The web is not a place for applications. HTML is designed for hyper_text_.

      Sooner or later you'll be eating those words...

    35. Re:Two steps backward by cowwoc2001 · · Score: 3, Insightful

      No, you're thinking of Java6 (no updates). Java6 update 10 introduced many client-side enhancements, such as preloading of the browser plugin so the first time you hit applets they load instantaneously.

    36. Re:Two steps backward by pizzach · · Score: 1

      I seriously don't think loading Java memory into startup would provide any real speedups (if it isn't already). It's the work required to prepare the Java byte code for execution for every individual program that causes the problems. Things like recompiling it using just in time compilers and such. There is another poster around here that details it better than myself.

      --
      Once you start despising the jerks, you become one.
    37. Re:Two steps backward by jonaskoelker · · Score: 1

      But I don't run a browser to become a part of a compute farm. I run a browser to access web information and applications. Very little of which is compute-intensive enough to require a new execution engine over a more advanced set of APIs.

      The applications you're running today and want to run today are limited by the technology available today.

      "Build it, and they will come." Do you think everybody was eager to fly over the Atlantic in 1880?

      Your needs may remain fairly stable, but I let time tell about mine, rather than my own unfounded predictions.

    38. Re:Two steps backward by AcidPenguin9873 · · Score: 1

      You seem to be confusing the instruction set with the underlying implementation.

      I'm not confusing anything.

      So much so that it must be translated into a decent set of instructions by microcode before the processor can pass it through the decoder and ALU.

      I don't know why you consider this a downside any longer; we've been able to do efficiently and fast for 20 years. And many times it can be an upside, by eliminating the need for long instruction sequences that x86 can accomplish in a single instruction. Want to add 5 to a memory location in x86? Add [mem], immediate. The same thing in RISC is: Load reg, [mem]; add reg, imm, store [mem], reg.

      Oh, I don't know. Instructions for 64-bit programming piled upon instructions for 32-bit programming piled upon instructions for 16-bit programming piled upon instructions for 8-bit programming,

      All the instructions are the same. There are some mode bits which take you to and from the different modes, which changes the default opsize/address size. That's about it. Stick with one mode as I'm sure 99% of people do, and you never have to worry about it.

      all with a half-dozen memory modes to choose from

      This allows expressiveness in your program without lots of address-computation instructions. Want to access a struct member in an array of structs? rbx is your array base pointer, rcx is your counter, and disp is your struct member offset. mov rax, [rbx + rcx + disp]. Saves instructions!

      four different register access methods,

      Yes, this allows you to use partial registers without lots of masking.

      special use of particular registers in certain modes,

      That is a problem in 16-bit mode *only*, and I'll agree wholeheartedly with you, it sucks. However, those register restrictions were removed in 32-bit mode when the 80386 came out in the late 80s. 20 years ago.

      complex instructions added willy-nilly only to be deprecated into slow microcode later on

      Microcode is at least as fast as executing a longer sequence of native instructions. But the upside of having complex instructions in microcode is, again, that it lets you express a complex operation using a single ISA instruction. That means it takes up less space in your instruction cache. More instructions fit in your instruction cache. Programs are smaller.

      Just off the top of my head, I'm already thinking of carefully crafting instructions so that they seem correct when the verifier passes over them in sequence, but actually execute as different instructions when the jump is executed into what appears to be the middle of an instruction.

      If you would RTFP, you'd see that they enforce branch targets in such a way so that you explicitly *cannot* jump into the middle of an instruction and make it do something else.

      The x86 instruction set is far too large, overly complex, redundant, antiquated, and poorly suited as a replacement for VM-targeted instruction sets like Java bytecode.

      Large, yes. Complex, yes. Redundant, don't know what you're talking about. Antiquated, no way. It certainly is poorly suited as a replacement for Java bytecode, which is poorly suited for just about any performance-critical task known to man.

      "Speed" is a terrible excuse for attempting a platform like this.

      Speed is just about the *only* reason to do this! So you disagree with their entire premise of their paper, fine. Don't bash native x86 in general because it's not suited for web applications.

    39. Re:Two steps backward by powerlord · · Score: 1

      Because JavaScript is fully standardized across browsers? Right. Good luck with that.

      And before you make the same response as every other web monkey, that all you need to do is use XYZ library (which one? No one can decide which is why there are so many) to make your web app 'work' with most browsers. Oh, and you have to completely subvert the HTTP protocol, there's that too.

      True. Thats one reason Flash is gaining popularity again. The latest rev of Flash has a scripting language very much like JavaScript, and with the plug-in available on most (desktop) systems, you are more sure of a "standardized environment".

      --
      This space for rent. All reasonable inquiries will be entertained at proprietors discretion.
    40. Re:Two steps backward by PitaBred · · Score: 1

      Too bad there's still no 64bit Java plugin.

    41. Re:Two steps backward by cowwoc2001 · · Score: 1

      There is, actually ;) No promises, but from what I hear it might be included in the next update release.

    42. Re:Two steps backward by AKAImBatman · · Score: 1

      No, the VM loads instantaneously. The applets do not. The applets still take a few seconds to download and initialize the correct APIs. For very small Applets this is a marked difference. For larger applets, the difference is far less apparent. For example, if you run these demos, you get to see two loading screens. The first is the Java plugin generating a loading screen. This takes time while the necessary code is downloaded. Then you get to see the program's loading screen as it loads the necessary data files.

      Javascript does not have this problem. No loading screen is necessary because code modules are immediately executed as they are loaded. If I chose to have a loading screen, there will be only one loading screen. But I can choose to begin execution immediately if I so choose. I do not have that choice with a Java JAR. At least, not without creating a sophisticated loader program that (ideally) loads fast enough to avoid the applet loader screen.

    43. Re:Two steps backward by cowwoc2001 · · Score: 1

      I don't think that's true. I remember reading that applets support loading JAR files on demand. This is especially true in Java6 update 10 where they folded in a lot of the Java Webstart functionality into applets. That isn't any worse than what JS can do.

    44. Re:Two steps backward by Billly+Gates · · Score: 1

      On my AMD TUrrion notebook it takes about 6 seconds to load a JavaFX app. Flash is instantaneously on it. However I do admit I have high cpu usage for stupid flash banner adds that I do not get from java.

    45. Re:Two steps backward by cowwoc2001 · · Score: 1

      What Java version are you using? What JavaFX app are you running?

    46. Re:Two steps backward by AKAImBatman · · Score: 2, Informative

      I'll put this as simply as I can. Javascript execution is like this:

      1. Read <script src="a.js">
      2. Execute a.js
      3. Read <script src="b.js">
      4. Execute b.js
      5. Read <script src="c.js">
      6. Execute c.js

      See how that happens as part of the page load? Now let's look at a similar Java app:

      1. Read <applet src="app.jar" code="a">
      2. Create a new thread and turn over execution to the JVM
      3. Download app.jar
      4. Read Manifest.mf to load references to any necessary libraries
      5. Extract a.class
      6. Verify a.class
      7. Extract b.class
      8. Verify b.class
      9. Extract c.class
      10. Verify c.class
      11. Initialize a.class
      12. Initialize b.class
      13. Initialize c.class
      14. Execute a.class

      Somewhere in there the JVM downloads library JARs referenced by app.jar. When this happens and how is dependent on the classloader. It could be during the initial load, or it could be after execution starts. Either way, the entire applet must be downloaded before execution can begin. That's just the nature of the JAR format.

      Javascript files are not archived and can be executed on demand. Flash files are written out in an odd linear format that allows for streaming of the file. This allows execution to begin even before the file has completed downloading.

    47. Re:Two steps backward by what+about · · Score: 1

      It is possible to load a tiny "bootstrapping" classloader that handle loading of classes in different way, can be done

      However, the low acceptance of Java on the browser can be tracked down to

      • JWM load time (because it is rarely preloaded)
      • Difficult integration with the browser DOM

      In any case, if I had to do a web application now I would do it using Google Web Toolkit

    48. Re:Two steps backward by nine-times · · Score: 1

      My personal opinion* is that this is a step in the wrong direction. Javascript engines are getting good. Damn good. I'd like to see more R&D poured into these engines and the underlying technologies [whatwg.org] rather than reinventing ActiveX and Java.

      I agree with that, except for in my personal opinion (and I know that others will disagree), I'd like to see all of that R&D put to making a an application that runs web apps that's entirely separate from the browser. Go ahead and make a simple cross-platform application development framework, but also please leave me with an plan html+css viewer that doesn't present the security risk from such extensive scripting.

      Maybe I'm alone in wanting that, though.

    49. Re:Two steps backward by cowwoc2001 · · Score: 2, Interesting

      Either way, the entire applet must be downloaded before execution can begin.

      Wrong. Here are some enhancements that have been added recently:

      Java6: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4690736

      Java6 update 10: "Lazy Downloading" at the bottom of http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html

      I'm not certain whether the latter feature also works for applets (I suspect so) but it proves my point that this is technically possible and already implemented.

    50. Re:Two steps backward by AKAImBatman · · Score: 1

      With all due respect friend, you need to actually read your own links.

      http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html#JAR%20Index

      The JarIndex mechanism collects the contents of all the jar files defined in an applet and stores the information in an index file in the first jar file on the applet's class path. After the first jar file is downloaded, the applet class loader will use the collected content information for efficient downloading of jar files.

      Nothing happens until the first JAR is downloaded. Period. End of Story. It does not compare to Javascript in any way, shape, or form.

      I should know. I've written more classloaders and designed more AJAX code-loaders than I doubt you and all your coworkers will write in your entire lives. So listen to an old bear when he tells you: Java Applets are disadvantaged for web use.

      Yeash. Kids these days. Get off my lawn, will 'ya! :P

    51. Re:Two steps backward by cowwoc2001 · · Score: 1

      Nothing happens until the first JAR is downloaded. Period. End of Story. It does not compare to Javascript in any way, shape, or form.

      How is this any different than a webpage that links to an external JS file (as most websites do)? In both cases, you need to download the initial JS or JAR file before loading the rest on demand.

    52. Re:Two steps backward by IamTheRealMike · · Score: 1

      Even if we assume that the system will only allow a small subset of x86 code, there is still the very real possibility that it will be impossible to protect against the full ISA when executing code natively. Just off the top of my head, I'm already thinking of carefully crafting instructions so that they seem correct when the verifier passes over them in sequence, but actually execute as different instructions when the jump is executed into what appears to be the middle of an instruction. Oops.

      You're making the same mistake I made when I first started working at Google. I tended to assume I was smarter than average, and there, it just isn't true. Google engineers aren't perfect but 99% of the time, when I've looked at some colleagues work and thought "that looks really stupid", it turned out to have a really good reason.

      Case in point, why does Android use a custom Java ISA instead of native code? I thought that was so dumb! On a mobile device performance is at a premium and interpreting code just seemed like a massive battery and performance sink. And it is. But I forgot something crucial - RAM is expensive on mobile device, and the Dalvik VM is extremely compact and optimized for minimal memory usage.

      In this case, you haven't read the paper. Jumping into the middle of instructions is forbidden by the alignment rules, which are enforced by a small but extremely fast static verifier.

      What's more, any other attacks you can think of have likely been considered already. The NativeClient team ran extensive fuzz tests against their implementation, fuzz tests sophisticated enough to detect several CPU bugs (!) and all of them have been sealed. The people behind this have extensive track records in the security community and speak the x86 ISA fluently.

      That doesn't mean there won't be faults or mistakes. It does mean you should not underestimate this software.

    53. Re:Two steps backward by AKAImBatman · · Score: 1

      How is this any different than a webpage that links to an external JS file (as most websites do)?

      Did you or did you not just read that huge sequence I spelled out for you two posts ago? You know, the one that showed the exact string of actions that have to happen in order to load a JAR file vs. a set of Javascript files?

      In both cases, you need to download the initial JS or JAR file before loading the rest on demand.

      You don't need to do any such thing in Javascript. A JAR is a collection of ALL the files in the applet while Javascript loads and executes each file independently. This works because Javascript is a classless language. There is no object called "MyObject" that I need to download a class file for before I can use it. If I want an object in Javascript, I simply create it:

      var STATES = {ALIVE: 0, DEAD: 1};
      var myobject = {x: 10, y: 10, state: STATES.ALIVE};

      I can fit hundreds of such definitions in a very small amount of space. Meanwhile, Java requires one of these for each object type:

      public class MyObject
      {
          public static final int STATE_ALIVE = 0;
          public static final int STATE_DEAD = 1;
       
          private int x = 0;
          private int y = 0;
          private int state = STATE_ALIVE;
       
          public int getX() { return x; }
          public int setX(int x) { this.x = x; }
          public int getY() { return y; }
          public int setY(int y) { this.y = y; }
          public int getState() { return state; }
          public int setState(int state) { this.state = state; }
      }

      As you probably know, you tend to need at least a couple of class files before you can get your program working. Even simple programs often reach a dozen class files or more. Which isn't necessarily a bad thing. Except that with Java, I need to download all of that before my program can start running. Javascript has no need for such gobs of metadata. Which makes it less powerful from a structural perspective, but makes it ideal as a compact web language that can load and execute as the browser loads the page.

      Even more interesting is that I can do this:

      <body>
      Stuff goes here...
      <script>
      document.write("<div>Hello world!</div>");
      </script>
      More stuff goes here...
      </body>

      You cannot perform those sorts of inlined tasks with Applets. They're not designed for it.

      FWIW though, it is possible to use Java as a replacement scripting language for Java. Look up the DOM bridge for Applets and the LiveConnect APIs sometime. If you're clever enough, you should understand how to hand-off control from Javascript to Java. Shortly thereafter, you should come to an understanding of why it is not a practical solution using the current Java runtime.

    54. Re:Two steps backward by PitaBred · · Score: 1

      That'd be awesome. Konqueror works as a stopgap, since it loads the JVM directly, but it'd still be nice to have a proper, supported plugin under a modern OS.

    55. Re:Two steps backward by cowwoc2001 · · Score: 1

      I honestly don't see what you mean.

      In your original post you list 6 lines of JS code that loads 3 external scripts. I agree with you that Java can't do the equivalent of inline-JS but I argue that this doesn't matter because most websites use external JS files.

      So, assuming those 6 lines of code are found in some external file (say main.js) I would argue this is no different from downloading main.jar which then downloads a.jar, b.jar and c.jar on-demand as it hits the relevant lines of code. Yes, main.jar has to be fully downloaded in order to run, but so does main.js.

    56. Re:Two steps backward by AKAImBatman · · Score: 1

      In your original post you list 6 lines of JS code that loads 3 external scripts.

      No, no I didn't. I listed the steps the browser took for each technology, in order. Are you at all familiar with the Javascript language? If not, you may want to consider brushing up before you make comparative statements about Java and Javascript. The two serve very different needs and operate in very different fashions.

    57. Re:Two steps backward by toriver · · Score: 1

      The JSE 1.6/Java 6 VM for Mac OS X is only 64-bit - but the browsers refuse to use it for applets...

    58. Re:Two steps backward by ardor · · Score: 1

      The Web does not disagree with me. What we have today is hypertext distorted to behave like an application. If anything, the web proves it everyday, when heaps of constructs are necessary to twist HTML into a webapp form. For example, what sense does a back button make in _web apps_? Why isn't there a proper solution for correct asynchronous communication (Ajax is only browser->server, for server->browser you need (long) polling or comet)? Etc. A web designed for webapps would look differently.

      --
      This sig does not contain any SCO code.
    59. Re:Two steps backward by ardor · · Score: 1

      I doubt it. Hypertext is the very core of HTML. Its even in the name: HYPERTEXT markup language. For example, a proper webapp description language would include layouts, and a standard set of widgets that is NOT used like a form. And guess what stuff like XUL and XAML does. Guess why they even *exist*....

      --
      This sig does not contain any SCO code.
    60. Re:Two steps backward by cowwoc2001 · · Score: 1

      In your original post you list 6 lines of JS code that loads 3 external scripts.

      No, no I didn't. I listed the steps the browser took for each technology, in order. Are you at all familiar with the Javascript language? If not, you may want to consider brushing up before you make comparative statements about Java and Javascript. The two serve very different needs and operate in very different fashions.

      I believe I am quite familiar with Javascript. Can you please provide a JS code sniplet that would generate the 6 lines of behavior you mentioned? I have some in mind but I suspect you are thinking of something else.

    61. Re:Two steps backward by AKAImBatman · · Score: 1

      Can you please provide a JS code sniplet that would generate the 6 lines of behavior you mentioned?

      Why would I re-implement the browser's parsing and Javascript engine in Javascript? That seems pretty silly.

      I was describing in abstract terms how the browser loads Javascript vs. Java. I don't understand what is confusing there? In Javascript, the script is read in and executed as soon as it finds the tag. Parsing STOPS until the script is finished executing. In Java, the JVM is spun off in a new thread as soon as the applet tag is seen. The JVM then takes the steps I described.

      I believe I am quite familiar with Javascript.

      I seriously doubt the truth of this statement. 99% of Java programmers I've conversed with have only a passing understanding of the technology. Considering your questions, I find it likely that you are in that 99%. In your defense, most developers in that 99% overestimate their familiarity with Javascript.

    62. Re:Two steps backward by springbox · · Score: 1

      It's still annoying. Like I really need Java preloading junk when I log in.

    63. Re:Two steps backward by cowwoc2001 · · Score: 1

      Well, you can hardly blame them. Everyone complains that application/plugin X isn't as fast as Flash or Internet Explorer. Yes, that's nice but both of those are preloaded with the OS.

      Application developers will stop preloading their applications the second users stop implicitly demanding that they do :) By the way, this preloading feature is disabled in Vista because there the OS is supposed to be smart enough to preload *any* application that is frequently used.

    64. Re:Two steps backward by cowwoc2001 · · Score: 1

      Why would I re-implement the browser's parsing and Javascript engine in Javascript? That seems pretty silly.

      That's not what I was asking for. You wrote:

      1. Read <script src="a.js">
      2. Execute a.js
      3. Read <script src="b.js">
      4. Execute b.js
      5. Read <script src="c.js">
      6. Execute c.js

      I believe this corresponds to this code:

      <script type="text/javascript">
      // main logic goes here
          <script src="a.js" type="text/javascript"></script>
          <script src="b.js" type="text/javascript"></script>
          <script src="c.js" type="text/javascript"></script>
      </script>

      and I was arguing that this is no different than running an applet:

      - load main.jar
      - applet starts running (run "main logic goes here")
      - run some code that causes a.jar to load
      - run some code that causes b.jar to load
      - run some code that causes c.jar to load

    65. Re:Two steps backward by AKAImBatman · · Score: 1

      a) That's not Javascript. It's HTML.
      b) The HTML code you printed has nothing to do with the discussion of how the browser operates other than placing the tags in a useless context. Which was the point that seems to have gone "WHOOSH" right by you.
      c) You don't seem to understand how Javascript OR Java operate.
      d) Because JARs have absolutely no class files in them, right?

      No offense young man, but I'm done attempting to explain this to you. It's obviously over your head. That's okay. If you're really interested, I recommend the following:

      1) Learn more about Javascript. I recommend Douglas Crockford's introduction videos along with the Javascript Core Reference and Javascript Guide.
      2) Learn more about Javascript engines and how they operate. I recommend programming a significant chunk of code that targets Rhino. If you create new APIs in Java for the engine, you'll learn the internals of the engine pretty well.
      3) For the love of God, figure out what a JAR file is, will you?
      4) Dive deep into the Java classloaders. I recommend writing your own when you get the chance. It's an enlightening experience. Try writing a command line shell for Java programs. That's a fairly simple use of a custom classloader.
      5) Investigate the Applet life-cycle more thoroughly. There are obviously significant holes in your knowledge.

      And a word of advice? Stop trying to refute arguments you don't understand. I have a feeling you still don't understand why you were horribly off base to post a link to JAR Indexes.

    66. Re:Two steps backward by cowwoc2001 · · Score: 1

      I'll pretend I'm not offended :)

      I have experience writing Java classloaders and I've worked extensively with JAR files. I have fairly good knowledge of JS too. I think we're having a communication problem here. I keep on asking you to paste a code sniplet to demonstrate what you're trying to say and you keep on making up reasons for why you won't do so. So I attempt to read your mind (which I'll be first to admit, is hard) and paste some code to work with but honestly you can save both of us a lot of trouble by simply providing a concrete example of what you mean.

      I know I quoted HTML. We are comparing how JS and Java execute in the context of a *webpage* after all. If you're referring to a different scenario feel free to explain it.

    67. Re:Two steps backward by mcrbids · · Score: 1

      Meanwhile, Javascript is designed for execution as the page is loading.

      I guess you don't do much with Javascript - it only begins execution when the page has completed downloading. This can be (somewhat) offset by downloading a simple page that contains the javascript, which then executes and downloads the rest of the page, but this has the disadvantage that now none of your pages will be indexed by Google, you now require javascript to use your site, and the end result isn't much different than waiting for the page to download in the fist place, except that it's taken longer because now you have the latency of TWO (or more) tcp connections to initiate and download instead of just one.

      --
      I have no problem with your religion until you decide it's reason to deprive others of the truth.
    68. Re:Two steps backward by shutdown+-p+now · · Score: 1

      C/C++ are programming languages, not build environments. There's nothing to stop developers using qmake, or Jam, or one of many more user friendly build systems.

      C/C++ have some features in them that make it much harder to write good build environments for them. The culprit is #include (especially when combined with preprocessor conditionals) - it makes it so much harder to track file dependencies for C++ code for incremental rebuilds.

    69. Re:Two steps backward by shutdown+-p+now · · Score: 1

      I'm already thinking of carefully crafting instructions so that they seem correct when the verifier passes over them in sequence, but actually execute as different instructions when the jump is executed into what appears to be the middle of an instruction. Oops.

      If you read the paper, you'll see this kind of attack is something they specifically protect from by 1) requiring all instructions to be aligned at specific boundaries by padding, and 2) requiring every jump to a computed address to be preceded by a masking AND instruction that resets the lower bits, thus ensuring that every jump is made to an address aligned at the same boundaries.

    70. Re:Two steps backward by Anonymous Coward · · Score: 0

      Agreed. I just came back to Javascript with a new project, after over 3 years in C#, and I'd forgotten how much I love this little language. Yes, its different, but its so flexible that it can be almost as powerful as you want it to be...

    71. Re:Two steps backward by AKAImBatman · · Score: 1

      I guess you don't do much with Javascript - it only begins execution when the page has completed downloading.

      I do, and you're wrong. Javascript is executed as it is loaded, and in the same thread as the HTML engine. Here's a simple experiment to demonstrate:

      test.js:

      alert("We've stopped at 'One'.");
      document.write("<div>Two</div>");

      test.html:

      <html>
      <body>
      <div>One</div>
      <script src="test.js"></script>
      <div>Three</div>
      </body>
      </html>

      You'll note that when the alert box pops up, the rendering has stopped with only "One" displaying. The final output is "One, Two, Three" in order, not "One, Three, Two" as you would expect if the script waited until the page was loaded.

      But what about header scripts? They also must execute first. Here's another example:

      test2.js:

      function myalert()
      {
        alert("You'll notice that this function exists by the time it is called!");
      }

      test2.html:

      <html>
      <head>
      <script src="test2.js"></script>
      </head>
      <body>
      <div>One</div>
      <script>
      alert("Stopped at 'One', calling myalert().");
      myalert();
      </script>
      <div>Two</div>
      <div>Three</div>
      </body>
      </html>

      Obviously, myalert() could not execute if the test2.js file had not yet been executed and thus entered the myalert function into the Javascript environment.

      As it happens, one of the tips for optimizing web page loads is to place your Javascript code as far down the page as possible. This allows more of the page to become visible before you take the hit of downloading and executing the JS file.

      This can be (somewhat) offset by downloading a simple page that contains the javascript, which then executes and downloads the rest of the page

      I'm not sure what you're trying to solve here, but I'm fairly certain that the problem isn't what you think it is. If you could describe the issue you're having, I'm sure I could easily provide a solution.

    72. Re:Two steps backward by AKAImBatman · · Score: 1

      I keep on asking you to paste a code sniplet to demonstrate what you're trying to say and you keep on making up reasons for why you won't do so.

      You are looking for something that would take a few very large chunks of C/C++ code to "demonstrate". I explained in detail the steps that the browser takes when it encounters similar code in Javascript vs. Java. Apparently that is over your head. And for that I am sorry.

      This:

      <script src="a.js"></script>
      <script src="b.js"></script>
      <script src="c.js"></script>

      vs. this:

      <applet code="a" archive="app.jar">

      Are already in the example given. So is the contents of "app.jar":

      META-INF/MANIFEST.MF
      a.class
      b.class
      c.class

      It is doubtful that repeating that information will get the point through to you any more clearly. It is doubtful that repeating that information will get the point through to you any more clearly. The steps shown are the steps the web browser takes when it encounters these files. It's very simple. The Javascript engine internalizes the code via execution. No more, no less. The Java engine has to obtain the entire JAR, extract the contents, load the meta data from the manifest, verify the classes, initialize the classes in the classloader, and then FINALLY execute the one class you asked for. After which it can then worry about libraries. Why that is so hard to understand, I have no idea.

      I have experience writing Java classloaders and I've worked extensively with JAR files. I have fairly good knowledge of JS too.

      Bullshit. And the sooner you learn that it's bullshit, the faster you can get up to speed. There is absolutely nothing in what you've said that gives me any confidence in your understanding of the JVM and Javascript execution environments. Can you write code for the environments? I'm sure. So could I back in 1998 when I also was young and silly enough to post random links to prove how Java was going to save the world*. But there's a huge difference between knowing enough to be dangerous and truly knowing the underlying technologies you're working with. You cannot understand my argument. That tells me that you'll still got a long way to go. I wish you the best and hope you get offended often and curious even more often. There are no better motivating factors than those two.

      * BTW, we - the early adopters - already completed that task. As cool as we thought they were, Applets had to die to accomplish the task. Please leave them dead. They're nothing but a pain in the ass these days. Focus more on Webstart and new distribution technologies rather than the antiquated design of Applets.

    73. Re:Two steps backward by MikeBabcock · · Score: 1

      Actually, Javascript requires loading every bit as much as Java does -- whether its embedded in the HTML or in JS files, the code is still downloaded and parsed by the browser. As larger and larger Web 2.0 applications are written, this is more and more of an issue.

      There are times Javascript is a better solution (in place edit windows like Slashdot), and times Java would be a much better one (forms, games).

      --
      - Michael T. Babcock (Yes, I blog)
    74. Re:Two steps backward by MikeBabcock · · Score: 1

      It doesn't run any of my significant Java software, so its useless to me. But the release notes were fun to read.

      --
      - Michael T. Babcock (Yes, I blog)
    75. Re:Two steps backward by Coop · · Score: 1

      The load time is the time it takes to download the complete application, dearchive the components, load the components into an interpreter or JIT, initialize the environment and/or APIs used, and finally present the application to the user.

      Over any network, the first part of this -- downloading -- is 99% of the time used. Fortunately the enormous library of standard Java classes is already on the user's machine and doesn't have to be downloaded.

      There are ways a developer could work around it using dynamic class loading, but this requires a great deal of knowledge, effort, and skill on the part of the developer.

      Actually this is trivially easy, at the expense of many connections being established and disconnected. All the programmer has to do is leave the archive argument off of the applet tag, so that the classes are downloaded individually as needed, rather than as part of a jar file.

      Maybe what you're getting at is, it would be nice if the programmer could clump classes that are used together into a jar, and have several different jars on the server, and have the applet's JVM load some kind of "table of contents" so that it knew which jar to request when a class was used that wasn't on the local machine yet. Dunno how, or if, Flash solves this problem.

      --
      "If you're not passionate about your operating system, you're married to the wrong one."
  4. Obligatory by Anonymous Coward · · Score: 0

    I for one welcome our new sentient web-based overlords.

  5. I can see the appeal; but it sucks. by fuzzyfuzzyfungus · · Score: 3, Insightful

    Yeah, as the title suggests, I can see why this would be attractive. x86s are everywhere, as is code for them, sidesteps the hassle of working it out in javascript, etc, etc. That said, though, it seems really, really gross. For those applications where dealing with an embedded add-on is an acceptable tradeoff for higher performance, we already have java, which is designed for platform independence(JVM), sandboxability, etc. and has had years of development and wide support. Particularly given the increasing popularity of web on embedded(read non-x86) devices, "sorta-kinda-quasi-java-that-only-runs-on-x86s" seems like an enormous step back. Why would you do that?

    1. Re:I can see the appeal; but it sucks. by Anonymous Coward · · Score: 0

      Especially given the improvement we've seen in java performance over the last few years.

    2. Re:I can see the appeal; but it sucks. by 0xABADC0DA · · Score: 1, Insightful

      we already have java, which is designed for platform independence(JVM), sandboxability, etc. and has had years of development and wide support. Particularly given the increasing popularity of web on embedded(read non-x86) devices, "sorta-kinda-quasi-java-that-only-runs-on-x86s" seems like an enormous step back. Why would you do that?

      Isn't it obvious? Google standardized on C++, Java, and Python. As you point out, Java is already there. This 'any x86' lets them use their other two languages, C and Python. It kills two birds with one stone, and securing x86 is a hell of a lot easier than securing C++.

      Of course, if they just straight up told people they wanted to choose the wrong tool for the job just because it's what they know they would have been laughed off the web.

  6. This is really f--- cool. by tjstork · · Score: 1

    I understand the whole portability issue is just terrible, but, as a technology goes, I have to say that this is really cool. Everyone else can talk about Javascript, but this technology opens up the browser to any kind of a language in it.

    I think it is fascinating, and fun. Assembly language on a browser, why not?

    --
    This is my sig.
  7. sandboxed desktop app by Anonymous Coward · · Score: 0

    sandboxing aside, how is this different from a desktop app accessing a server?

    my 2 cents: the web is full of hyped, rehyped, and overhyped ideas that have been reinvented again and again. I think this plain 2D web page + http + xml is already very saturated. Time to move on to VR internet, ala Ghost in the shell.

    1. Re:sandboxed desktop app by Sancho · · Score: 1

      The code is executed natively, which means that execution will not tax the remote server and output can be displayed immediately without waiting for the server to respond to a request.

      That said, I'm not a fan of adding sandboxes willy-nilly. They're hard to get right, and this is just one more security issue to be concerned about.

  8. Off topic, but by C_Kode · · Score: 0, Offtopic

    Is anyone else having issues with Google and Gmail lately? (specifically partnerpage.google.com)

    It's been slow and sometimes not working at all over the last two days.

    1. Re:Off topic, but by IIRCAFAIKIANAL · · Score: 1

      Yes, I have. Really frustrating.

      --
      Robots are everywhere, and they eat old people's medicine for fuel.
    2. Re:Off topic, but by Cowmonaut · · Score: 1

      Actually yes. I've noticed issues with some of the other Google domains such as gmodules.com as well. Will be interesting to find out what the cause is. I thought it was Firefox for a bit there but it turns out one of the domains on TechDirt has a script that was crashing Firefox (hurray for NoScript; didn't have it on my work PC before today).

      On topic though: I seriously hope they don't plan on hosting virtual x86 boxes, just provide the code. They seem to be obsessing over the whole cloud computing thing but I can't a) think of any practical use to do so or b) see any thing good coming from that.

      Does anyone know what the point is to this anyways? Its non-portable really and x86 hardware is fairly cheap. Its also not hard to hook it up to a network so you can access from anywhere. So really, what is the point?

  9. Did they really just... by geminidomino · · Score: 5, Funny

    The only question remains whether it can be secured (ala ActiveX)

    HAHAHAHAHAHAHAHAHAHAHAHAHAHA *gasp* HAHAHAHAHAHAHAHAHAHAHAHHAAHHAHA *wipes eyes*
    HAHAHAHAHAHAAHHAAHAHAHAHAHAHAH

    1. Re:Did they really just... by Anonymous Coward · · Score: 0

      Those funny google guys..!

    2. Re:Did they really just... by Anonymous Coward · · Score: 0

      Was about to respond, "Since when has ActiveX been secure?", but you beat me to it in a much more eloquent manner.

    3. Re:Did they really just... by Anonymous Coward · · Score: 0

      They're using ActiveX as an example that wasn't secured. . .

    4. Re:Did they really just... by Linker3000 · · Score: 1

      INT 5
      INT 5
      INT 5
      INT 5
      INT 5

      Hahaha - watch your printer go haywire!!

      INT 5
      INT 5
      INT 5
      INT 5
      INT 5

      --
      AT&ROFLMAO
  10. "secured (ala ActiveX)" by fgaliegue · · Score: 4, Insightful

    Talk about an oxymoron.

  11. Beta by rodrigoandrade · · Score: 2, Insightful

    "We've released this project at an early, research stage to get feedback from the security and broader open-source communities."

    Just slap a "Beta" on it and move on, that's the Google way, right?

    1. Re:Beta by ionix5891 · · Score: 2, Insightful

      Nope the google way is:

      1. slap "Ads by Google" on everything
      2. ???
      3. PROFIT !

    2. Re:Beta by YourExperiment · · Score: 1

      Just slap a "Beta" on it and move on, that's the Google way, right?

      No, that's what they do when it's finished.

    3. Re:Beta by Hognoxious · · Score: 1

      In theory, that's correct.

      In practice, we don't know, since they haven't ever finished anything yet.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    4. Re:Beta by badboy_tw2002 · · Score: 1

      I think the ??? in this case is "Cash the check"

  12. Finally ... by Lazy+Jones · · Score: 1
    After posting rants about crappy interpreted languages, incompatible HTML/CSS/JS implementations, ridiculous W3C "standards" (that their own browser never supported properly), I'm glad that someone finally did this (as suggested here a few days ago).

    Security isn't a problem when even safe (in theory) content like PDF is plagued by exploits regularly. People need to learn to a) switch on such features only on trusted web sites (use Noscript e.g.) and b) distinguish trusted from untrusted web sites (i.e. avoid phishing). If they fail at these, they shouldn't be using the web. We had the same security implications with ActiveX when MSIE was much more dominant and unsafe and the world didn't end because of it.

    Now let's see some hosted apps with decent performance and good UIs and let's make sure that hitting backspace doesn't destroy all our work.

    --
    "I love my job, but I hate talking to people like you" (Freddie Mercury)
    1. Re:Finally ... by Beyond_GoodandEvil · · Score: 1

      Now let's see some hosted apps with decent performance and good UIs and let's make sure that hitting backspace doesn't destroy all our work.
      Amen to that brother, I can't remember the site, but somehow trying to backspace an error in a form did the old back browse and I lost everything. Like alt-arrow was too hard to do why the hell did backspace need to be tasked to this function?

      --
      I laughed at the weak who considered themselves good because they lacked claws.
    2. Re:Finally ... by Lazy+Jones · · Score: 1

      but somehow trying to backspace an error in a form did the old back browse and I lost everything.

      This happens when the input forms temporarily lose focus because the browser loads something (switches to bee / hourglass icon), then apparently "backspace" gets sent to the browser window and interpreted as "back" instead of just being applied to the text field of the form.

      --
      "I love my job, but I hate talking to people like you" (Freddie Mercury)
    3. Re:Finally ... by VGPowerlord · · Score: 1

      Security isn't a problem when even safe (in theory) content like PDF is plagued by exploits regularly.

      While people could be more careful, allowing native code means that things that used to rely on exploits can now run natively instead!

      I, for one, do not welcome our net Botnet overlords.

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
  13. Regardless by bigattichouse · · Score: 1

    Browser security not withstanding... By effectively emulating a CPU, it does open up some interesting experiments in distributed computing - and, yes, I'd like to see a tiny linux distro running in a browser :)

    --
    meh
  14. So can I run by Anonymous Coward · · Score: 0

    Firefox within Firefox within Firefox within Firefox?

  15. Something similar from Microsoft by Doodhwala · · Score: 4, Interesting

    Microsoft is doing something similar and is, in fact, presenting a talk today on leveraging legacy code to deploy desktop applications on the web.

    You can find more details here.

    1. Re:Something similar from Microsoft by Ilgaz · · Score: 1

      They forgot about ActiveX too? :)

      Also speaking of "native", signed Java applets can do amazing things, in binary. As you can see at http://housecall.antivirus.com/ (go with FF 2.x+). There you have a full feature AV scanner.

      They keep re-inventing the wheel. Companies with too much money and time in their hands I guess. Another issue is Sun. Why wouldn't they advertise such use of Java? Even Vuze's (Azureus) Desktop Java? Of course people will keep thinking Java is that JVM 1.1 stupid text tricks and nothing else.

    2. Re:Something similar from Microsoft by shutdown+-p+now · · Score: 1

      At least Microsoft has the decency of calling it a solution for "legacy" stuff (which makes sense - they have Silverlight and XBAP for the rest), while Google is pushing theirs as the next great thing.

  16. GREAT IDEA by scsizor · · Score: 5, Funny

    BIG thanks from Russia. i hope it catches on!

  17. google x86 by ablizz · · Score: 3, Funny

    Does this mean I can run old DOS games in a browser?
    Silent Service II!

    1. Re:google x86 by John+Hasler · · Score: 3, Funny

      It means you can run old DOS games in your neighbor's browser.

      --
      Warning: this article may contain humor, sarcasm, parody, and perhaps even irony. Read at your own risk.
    2. Re:google x86 by tbj61898 · · Score: 1

      Oh yeah... I can't wait to go there and run Lemmings and Frontier Elite II!

      --
      nop, nop, nop #VBLANK
    3. Re:google x86 by Sloppy · · Score: 2, Funny

      It means you can DoS your neighbor's browser.

      --
      As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
    4. Re:google x86 by Ianopolous · · Score: 1

      you already can with JPC... http://www-jpc.physics.ox.ac.uk/

    5. Re:google x86 by davidsyes · · Score: 1

      More IMPORTANTLY, will it help to make windows obsolete?

      --
      Previously: "Linux... Toward the Sunrise..." Now: "Linux... Toward the-- No, now, part of Every Sunrise"
    6. Re:google x86 by bytta · · Score: 1

      Does this mean I can run old DOS games in a browser?

      I think others will be more interested in running DDOS programs in your browser.

  18. 5 years of beta - like gmail? by Anonymous Coward · · Score: 0

    5 years of beta - like gmail?

    Way to go Google!

  19. A remarkably bad idea. by John+Hasler · · Score: 5, Insightful

    It will go far.

    --
    Warning: this article may contain humor, sarcasm, parody, and perhaps even irony. Read at your own risk.
    1. Re:A remarkably bad idea. by ionix5891 · · Score: 1

      all jokes aside it might go far,

      hows this for an idea

      google can farm out computing resources ala seti @ home style to the users browsers (maybe offer financial rewards like adsense credits or something)

      dont underestimate how evil google are and how users blindly trust their brand

    2. Re:A remarkably bad idea. by freddy_dreddy · · Score: 3, Interesting

      from page 3 in the paper:

      "In Native Client we disallow such [self-modifying code] practices through a set of alignment and structural rules that, when observed, insure that the native code module can be disassembled reliably, such that all reachable instructions are identified during disassembly."

      Ok, when I read the post I had to chuckle when I read the asm joke. I've been programming in asm for 16 years now and there are a few rules of thumb:
      - if assembly is allowed then the only real security is executed by hardware.
      - malware writers love a challenge like this.

      --
      "Violence is the last refuge of the competent, and, generally, the first refuge of the incompetent" - Thing_1
    3. Re:A remarkably bad idea. by Anonymous Coward · · Score: 0

      As Leeloo said, "Senno Ekto Gamat" (never without my permission)

    4. Re:A remarkably bad idea. by IamTheRealMike · · Score: 2, Informative

      Did you get past page 3? Unmasked jumps are forbidden by static analysis, so you can't create new code and jump into it. Existing code is verified against whitelisted opcode sets. Segmentation it used to prevent self-modifying code. Tricks that prevent accurate dissasembly are also forbidden by the verifier.

    5. Re:A remarkably bad idea. by shutdown+-p+now · · Score: 1

      Existing code is verified against whitelisted opcode sets.

      See, the problem with this approach (which is actually shared with Java and .NET VMs) is that you can always miss something. Java doesn't suffer much from it because its bytecode is extremely high-level - it doesn't offer any opportunity of direct memory manipulation. In contrast, CLR and native x86 dialects do allow that, and it can be pretty hard to catch all possible unsafe combinations of instructions.

      Case in point: CLR. In the past, I had myself discovered one security hole in CLR static verification rules that allowed arbitrary code execution via stack corruption and vtable patching (so the code to be executed wasn't put on the stack - a vtable of the object was patched so that entries point to system native APIs, and then that object used to call those APIs; this also happily works around NX). This actually worked even in code that was completely locked down under CAS, so it didn't use any "unsafe" instructions that explicitly manipulated with pointers - just some covert stuff with byref arguments (which are distinct from raw pointers in CLR on purpose so as to be "safe" / verifiable). This has been fixed for a while now, but I wonder how many more such corner cases are out there.

    6. Re:A remarkably bad idea. by freddy_dreddy · · Score: 1

      yes, i did get past page 3. We'll see.

      BTW, I wonder if this environment is the reason for the stripped user agents described here

      --
      "Violence is the last refuge of the competent, and, generally, the first refuge of the incompetent" - Thing_1
  20. Just don't goto fdisk.com by kbrasee · · Score: 1

    or you will be in for an unpleasant surprise.

  21. What a stupid idea by Sloppy · · Score: 5, Insightful
    Seriously, this is even worse than saving Hitler's brain by putting into the body of a great white shark armed with lasers.

    With Java applets already dead and buried

    If you want crap like this, you would be a lot better off, by just exhuming Java applets.

    I really hope this project dies a quiet death.

    --
    As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
    1. Re:What a stupid idea by mujadaddy · · Score: 1

      Seriously, this is even worse than saving Hitler's brain by putting into the body of a great white shark armed with lasers.

      Stupid... or BRILLIANT!!?!?!?!

      --
      Populus vult decipi, ergo decipiatur...
      "Force shits upon Reason's back." - Poor Richard's Almanac
    2. Re:What a stupid idea by rhizome · · Score: 1

      Stupid... or BRILLIANT!!?!?!?!

      Ah, you've flummoxed me with your crafty inquiries!

      --
      When I was a kid, we only had one Darth.
    3. Re:What a stupid idea by Anonymous Coward · · Score: 0

      > I really hope this project dies a quiet death.

      Yeah me too but they are trying to invent new shit to 'add shareholder value'

      Stick to improving js rather than reinventing yet another security and productivity nightmare.

    4. Re:What a stupid idea by Lazy+Jones · · Score: 1

      Seriously, this is even worse than saving Hitler's brain by putting into the body of a great white shark armed with lasers.

      Gee, I wonder if any of the corporations aiming at world domination would not do this if they could...

      --
      "I love my job, but I hate talking to people like you" (Freddie Mercury)
    5. Re:What a stupid idea by willisbueller · · Score: 1

      From the forums
      "... Some of you are concerned about the technical challenges in making Native Client secure. So are we, and that's why we are sharing the system in this research release, so the community can review it with a critical eye. These concerns have been with us from day one of this project, but as we continue to work on the system we have increasing confidence in what we can do with this approach. So, while feedback and discussion are very welcome, we also hope our critics will show us specific design and implementation defects that allow them to break out of the sandbox. Such specific defects are the real key to whether or not we can make this system secure. Thank you for your interest in Native Client. Brad Chen"

      Keep an open mind. This could be a very big.

    6. Re:What a stupid idea by Anonymous Coward · · Score: 0

      I will ensure that it does not. I happen to want to write code in c++ for the web. Java is abysmal and its coders are abhorrent. If you do not then so be it, just SFTU about it A55hat

  22. More importantly.... by PinkyDead · · Score: 4, Funny

    Does Linux run on it?

    (Prompting a possibly valid "In Soviet Russia" gag).

    --
    Genesis 1:32 And God typed :wq!
    1. Re:More importantly.... by PinkyDead · · Score: 0

      Never mind.

      (D'oh)

      --
      Genesis 1:32 And God typed :wq!
    2. Re:More importantly.... by Urza9814 · · Score: 1

      Ok, wait, let me try this. I've never done one of these before.

      In Soviet Russia, Linux runs browser!

      Ok, I'm done now.

    3. Re:More importantly.... by Anonymous Coward · · Score: 0

      In soviet russia, Linux runs it...

      Damn, is that the same thing?

    4. Re:More importantly.... by Anonymous Coward · · Score: 0

      Well, given the possibilities of this plugin...

      In Soviet Russia, server rootkits YOU!!!

    5. Re:More importantly.... by nschubach · · Score: 1

      That's actually an interesting question. :p could you compile Linux to run in this? What would the kernel/drivers detect for hardware?

      --
      Every time I start to have faith in humanity, I ruin it by driving to work between 7 and 8 am.
  23. Gears 2.0 by Anonymous Coward · · Score: 0

    But in a much worse state...

    I would rather they pursue improvements to JavaScript than waste time on this.
    JavaScript is a powerful language, with some changes over time (such as similar permissions to Java, file creation within a sandbox?), it could be much better.
    And of course, with the future of HTML and CSS kept in mind when doing such improvements.

    Don't add yet another bloody plugin / extension to the web... Java and Flash were bad enough, now we have SilverLight and a bunch more all over the place...

    JUST IMPROVE JAVASCRIPT!

  24. Irony, thy name is "chrome" by argStyopa · · Score: 1

    Is it ironic that this doesn't work in Chrome?

    --
    -Styopa
    1. Re:Irony, thy name is "chrome" by Kaenneth · · Score: 1

      1) Steal underpants
      2a) Make a new browser.
      2b) Release a plug-in for other browsers that causes huge security hole.
      2c) Claim your browser is more secure.
      3) Profit!

    2. Re:Irony, thy name is "chrome" by Anonymous Coward · · Score: 0

      Is it ironic that this doesn't work in Chrome?

      No.

      For god's sake, what is so difficult about learning the definition of the word "irony"?

    3. Re:Irony, thy name is "chrome" by Anonymous Coward · · Score: 0

      What are you smoking, it's running in my Chrome as we speak.... it's a plugin, and Chrome is listed as supported.

      As another poster said, reading comprehension is a problem these days....

    4. Re:Irony, thy name is "chrome" by argStyopa · · Score: 1

      "For god's sake, what is so difficult about learning the definition of the word "irony"?"

      irony Definition
      irony (r n, r n)
      noun pl. ironies -nies
            1.
                        1. a method of humorous or subtly sarcastic expression in which the intended meaning of the words is the direct opposite of their usual sense the irony of calling a stupid plan "clever"
                        2. an instance of this
            2. the contrast, as in a play, between what a character thinks the truth is, as revealed in a speech or action, and what an audience or reader knows the truth to be
                  often dramatic irony
      3. a combination of circumstances or a result that is the opposite of what is or might be expected or considered appropriate an irony that the firehouse burned
            4.
                        1. a cool, detached attitude of mind, characterized by recognition of the incongruities and complexities of experience
                        2. the expression of such an attitude in a literary work
            5. the feigning of ignorance in argument: often called Socratic irony (after Socrates' use of this tactic in Plato's Dialogues)

      Example: "It's ironic the Anonymous Coward posting about knowing the meaning of 'irony' apparently didn't know what it meant, but then again he was probably looking up the meaning of 'rhetorical'."

      --
      -Styopa
  25. Whats with all the hate? by giemer · · Score: 0

    I can only see good possibilities for this.

    As long as a proper framework is put together, you can avoid any major pitfalls. Its basically just another VM ... ?

    Its a pretty large step in terms of making virtual web based OS's have value, which is something Google is going for, no?

    I can foresee the end of client side applications.

  26. Java applets already dead and buried? by Anonymous Coward · · Score: 0

    Really? When did this happen? Someone forgot to tell Sun, and IBM/Lotus. Since Notes is one of the most popular email servers on the planet, and their web access uses Java when available, that's millions of users in just one application. That's hardly the only one.

    Sounds like Wired Magazine's obsessing over "wired/tired/retired" every week they would have something marked as obsolete that was the new hot thing two weeks ago. Get real. Languages have a much longer lifecycle than that, and people are still writing Java applets today.

  27. Silverlight & other JIT compilers? by Anonymous Coward · · Score: 0

    C# and VB.NET over Silverlight give quite a good performance. Silverlight v3 will support also GPU's with DirectX or OpenGL for Macs (MoonLight for Linux though they are coming late), that should do the job for the few points (games and similar applications) to use this kind of high performance computing.

  28. Java applets Dead and buried by Chrisq · · Score: 1

    Java applets may be dead and buried on the internet but in many corporate environments they are alive and well. The "Oracle Forms Runtime" is a good example.

    1. Re:Java applets Dead and buried by Tony+Hoyle · · Score: 1

      Or Cisco SDM, which is the java applet from hell (Windows only, and IIRC only the Microsoft VM even. On most of the others it'll appear to run but nothing will work).

  29. With Java applets already dead and buried by Hognoxious · · Score: 2, Funny

    With Java applets already dead and buried

    Nothing on Netcraft yet...

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  30. Could just be another JavaScript optimization... by XDirtypunkX · · Score: 1

    I mean, it makes sense, instead of interpreting and then JIT'ing the JavaScript, compile it down to x86 code and super-optimize it ahead of time. Browser supports native code? It runs, otherwise, download the Javascript.

    Means you can get a whole lot more optimizations into the Javascript code running on the majority of machines and run "decently" on the others.

  31. Native x86 code can not be secured by hAckz0r · · Score: 1
    There are just too many ways to make the tail wag the dog when dealing with native binary execution. Anyone who knows the x86 processor well enough will understand that truth. ActiveX was a big mistake. Using a 'trust model' for something that can't be trusted sure makes a lot of sense. What you are trusting is the key that signed the applet, not the original owner nor the app itself. With a little social engineering even you can own a Microsoft key for signing applets. Others have.

    Oh and I noticed this little titbit in the paper:

    Better segment support in the operating system might allow us to resolve this problem and allow for better hardware exception support in untrusted code.

    Oh yea, right. Like Microsoft is going to rewrite Windows just for Google? On the bright side, if the browser apps only run on Linux then that would certainly be a switch.

  32. catch all error by BlackSnake112 · · Score: 0

    I haven't coded java in a while but is java still missing the catch all error? For example, in C you can code a for any error that I didn't handle do this... That was missing from java when I worked with it. I thought that was wrong. The program writer should code in a way to exit the program cleanly without crashing for an unexpected event.

    1. Re:catch all error by AKAImBatman · · Score: 1

      Um... what?

      try
      {
        int x = 10/0;
      }
      catch(Throwable e)
      {
        System.out.println("Caught divide by zero error.");
        System.exit(0);
      }

      That's always worked in Java. Are feeling alright, son?

    2. Re:catch all error by Anonymous Coward · · Score: 0

      Yeah, it's called catch Throwable at the program entry point. It's existed since JDK 1.0, that is, the start of time in Java.

    3. Re:catch all error by Anonymous Coward · · Score: 0

      I should not have to code errors for "file doesn't exit" "disk full" "User is Idiot", those should be handled by the os and reported back to me.

    4. Re:catch all error by ArsonSmith · · Score: 2

      Bad, only if it is handled bad. Logging an unhanded exception may be a good thing in showing programmers that something is happening that they didn't think of.

      --
      Paying taxes to buy civilization is like paying a hooker to buy love.
  33. Quake in the browser! by yeremein · · Score: 2, Funny

    Clearly, playing Quake in the browser is the killer app for this technology.

    1. Re:Quake in the browser! by shutdown+-p+now · · Score: 1

      Clearly, playing Quake in the browser is the killer app for this technology.

      They would be late to the party: behold, Silverlight Quake.

      Personally, I think the killer app for this particular Google tech will actually be playing DN4E in the browser...

  34. Innovation(tm) by IGnatius+T+Foobar · · Score: 1

    Great ... Google just invented ActiveX.

    --
    Tired of FB/Google censorship? Visit UNCENSORED!
    1. Re:Innovation(tm) by Anthony_Cargile · · Score: 1

      I find this incredibly ironic, especially since I just posted a blog post (indexed last night) about writing the first documented CGI web page in x86 assembly: http://www.anthonycargile.com/blog/?p=118. Is this proof I need to start wearing that tin foil hat again?!

  35. Re:This is really f'n cool scary. by wild_berry · · Score: 1

    Security? Is there any evidence that any of Google's products have a robust security attitude to security? From direct stuff like GMail allowing people to MiTM your session cookie (if you're not using HTTPS) to almost anything going unecnrypted through the text-based web, there isn't a lot to inspire my confidence about the Google approach to computer security.

    It might be safe on a local node -- but then you could write straight to the hardware. There's something about virtual machines (Java, ActiveX) having already been done and only with a certain degree of success that puts me right off. But maybe Google will disallow certain opcodes and have a robust product. Most likely not.

  36. Web Services Are Bad by Anonymous Coward · · Score: 0

    Most web services are just data collection machines, designed primarily to capture as much data about the user as possible. Yes, they are sometimes useful to the user but the amount of data collected by companies is ridiculous. I think applications should be run locally on local machines so the user can have a bit of privacy. Companies are recording our every move and that kinda sucks. We live in a big brother world and the only way to escape is to unplug yourself the net.

  37. Already possible, really. by mad.frog · · Score: 1

    Adobe Alchemy lets you compile C/C++ code into efficient bytecode for Flash.

    Doesn't handle x86 ASM directly, but IMHO C/C++ is a much better target to start with in the first place.

    The Alchemy toolchain is open-sourced, as is the Tamarin-backend that it uses. (Theoretically it doesn't require all of Flash to be deployed, just Tamarin.)

  38. this is for chess-lovers! by tbj61898 · · Score: 1

    beside any heavy computing task (like bruteforcing a bank account or chess games) this *may* help big software company to go web.

    That means a way to 'port' an application to web with minimal compiling issues. Like what is said in google blog, adobe will finally deliver a plugin to let you photoshop on the web. This will improve our experience with photo-printing web sites, I already see new facebook applications coming out with "let's do so-and-so to your friends faces!"

    And, lastly, in time of crisis one can imagine that big company are not going to fund IT dept. as in the past, and this is a good chance to share some computing load with clients!
    I'd love a in my homepage! :-)

    In fact all activies which requires big load on servers can be moved on clients. It's like: let me open my gmail to run antispam plugin!

    It really sounds like IKEA leit motif: it's cheap because you do part of the work, like help yourself food buffet (you pay what you take, not the service).

    Hope in the future users will be able to create computing groups, like "Let my machine do part of my friends machine work when I'm finished".

    Whoa, this will also have impacts on so-called cyber-strikes, web-strikes!

    so many dreams.. so little time... let's go play google quake (gooake?) online! :-)

    --
    nop, nop, nop #VBLANK
  39. I thought Google was smarter than this. by Anonymous Coward · · Score: 0

    They went to all the work of writing an in-browser sandbox for a real world instruction set, and they choose x86? Really? What the hell are they thinking?

    At least choose something that we can code in without gouging out our eyeballs. ARM, 68k, anything but x86, please! Just 'cuz that turd's been polished the most doesn't mean it should be propagated into yet another execution space.

  40. errata corrige by tbj61898 · · Score: 1

    - I'd love a in my homepage! :-)

    was meant to be "I'd love a seti at home plugin in my homepage! Find extraterrestrial while you read my terrestrial blog!"

    --
    nop, nop, nop #VBLANK
  41. What is the idea? by 140Mandak262Jamuna · · Score: 1
    Is google providing a virtual environment to execute x86 instruction set in the security context of the browser in all platforms? So that people with legacy programs in their local machines could just emulate x86 in a standard browser? In that case it would be a good idea. If you have, say an old version of PhotoShop in a dying Xp machine and want to migrate to a shiny new Linux box and want to give that old copy of software that you have paid for a new lease of life, and if Google provides the emulator to do it, it would be great.

    If the idea is to let websites stream in precompiled excutables to your browser and then execute the code in your machine to supplant Javascript, Java, Flash and Silverlight, it is a remarkably stupid idea. We do not want undecipherable cruft coming down the ethernet executing commands in the local machine.

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
  42. Just more software virtualization by nurb432 · · Score: 1

    Sounds like a cross between VMWare and streaming, delivered in a browser-sandbox.

    --
    ---- Booth was a patriot ----
    1. Re:Just more software virtualization by nschubach · · Score: 1

      That is, if it remains in that sandbox. Each sandbox would require devices that drivers could be written for and disk drives could be linked to folders or disks by the plug-in. Video could be a virtual device that translates calls to a "window" and sound could be mapped to the OS audio device. In other words, a virtual machine.

      --
      Every time I start to have faith in humanity, I ruin it by driving to work between 7 and 8 am.
    2. Re:Just more software virtualization by nurb432 · · Score: 1

      A java version of QEMU :)

      --
      ---- Booth was a patriot ----
  43. WTF? Do you know what you're talking about? by gbutler69 · · Score: 1, Insightful


    class Main implements Object {

        public staic void main ( String[] args ) {

            try {
                // Do a bunch of stuff and call whatever
                ...
            }
            catch ( Throwable T ) {
                // Handle any exception that is not otherwise handled
               ...
            }
        }
    }

    --
    Over-the-top Response Guy! Giving "Over-the-Top Responses" since 1970.
    1. Re:WTF? Do you know what you're talking about? by bluefoxlucid · · Score: 1

      This is C++, not C.

    2. Re:WTF? Do you know what you're talking about? by Lokitoth · · Score: 1

      If you try really hard, you can hook into the exception handling system using C, because it is an artifact of the C++ runtime. Therefore there is no reason you cannot set up a catch-all exception handler in C for C++ exceptions. C standard libraries also provide top-level error management faculties, and the static errno constant is another way to propagate errors (which is not resilient to multiple errors occuring at once, but what can you do?) In Java, you can set up exception handlers on a Thread Group level, though doing that, if I remember correctly, will still result in the death of the thread in question, since control passed out of the Run() method.

  44. One main problem remains ... by angel'o'sphere · · Score: 1

    So, if we have a "plug in" that virtualizes/emulates 80x86 code, we still need a language to program in.

    What I want to say, is: if you want to make the plug in "safe" you need to prohibit downloaded code from accessing something outside of this "sandbox". The only way to do that is by restricting the instruction set or even sequences of instructions to a subset. In other words: load address from data area into register X (who knows where this points to?) and then jump to contents of register X is an illegal combination of instructions, further more: a data flow analyzer needs to know that register X now contains a tainted value and has to guarantee that this value is never "abused".

    Long story made short: existing C/C++ compilers (not to speak about assemblers) basically everything that is generating 80x86 code, in other words every existing programming/compiling environment currently produces code that a sandbox would reject.

    Remember what the Browser does with JavaScript and what the Java VM does with Java Byte Code and what the .NET runtime does with JIL: they sandbox it. Access to internet sites except the original site (I simplify) from where the code came is restricted. Access to the file system of the client is restricted. Access to the process memory in which the code is running is "impossible" etc.

    If you want to have a browser that has an emulator/sandbox for c86 code, you also need to compile the code against this sandbox, in other words you wont be able to just choose freely what "standard libraries" you use in programming your "browser plugins" ... you end with the very same problem that Java and AWT faced: if I want to create a widget on the client computer I have "to ask the sandbox" to make me a widget and this will likely be different on Linux, Mac, Windows etc. Not to mention: the software I craft is written in Java ... and is not running on x86 machines exclusively but also on HPs (oops, what processors do they even use in our days? Still PA RISC?) SUNs and finally x86 windows machines.

    Bottom line: the "byte code" is not that relevant. Who cares if it is emulating x86? I rather find it interesting to emulate x86 code in Java or in .NET :D than having a x86 sandbox. Everything .NET and Java offers has to crafted again for such a sandbox ... IMHO a waste of time (except for academic/research/playing/exploring purpose).

    Regards,

    angel'o'sphere

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    1. Re:One main problem remains ... by gravisan · · Score: 1

      you obviously haven't RTFA or the main purpose of its release

  45. This is rather clever by Animats · · Score: 5, Informative

    This is a fascinating effort. Read the research paper.

    This is really a little operating system, with 44 system calls. Those system calls are the same on Linux, MacOS (IA-32 version) and Windows. That could make this very useful - the same executable can run on all major platforms.

    Note that you can't use existing executables. Code has to be recompiled for this environment. Among other things, the "ret" instruction has to be replaced with a different, safer sequence. Also, there's no access to the GPU, so games in the browser will be very limited. As a demo, they ported Quake, but the rendering is entirely on the main CPU. If they wanted to support graphics cross-platform, they could put in OpenGL support.

    Executable code is pre-scanned by the loader, sort of like VMware. Unlike VMware, the hard cases are simply disallowed, rather than being interpreted. Most of the things that are disallowed you wouldn't want to do anyway except in an exploit.

    This sandbox system makes heavy use of some protection machinery in IA-32 that's unused by existing operating systems. IA-32 has some elaborate segmentation hardware which allows constraining access at a fine-grained level. I once looked into using that hardware for an interprocess communication system with mutual mistrust, trying to figure out a way to lower the cost of secure IPC. There's a seldom-used "call gate" in IA-32 mechanism that almost, but not quite, does the right thing in doing segment switches at a call across a protection boundary. The Google people got cross-boundary calls to work with a "trampoline code" system that works more like a system call, transferring from untrusted to trusted code. This is more like classic "rings of protection" from Multics.

    Note that this won't work for 64-bit code. When AMD came up with their extension to IA-32 to 64 bits, they decided to leave out all the classic x86 segmentation machinery because nobody was using it. (I got that info from the architecture designer when he spoke at Stanford.) 64-bit mode is flat address space only.

    1. Re:This is rather clever by exhilaration · · Score: 2, Informative

      I'd just like to thank you for posting the first intelligent comment in this thread.

    2. Re:This is rather clever by BennyBigHair · · Score: 1

      Are you saying that random comments on /. about the most obvious of security problems aren't intelligent? How dare you.

    3. Re:This is rather clever by Anonymous Coward · · Score: 0

      ditto

  46. Use JPC instead! by Ianopolous · · Score: 1

    Why not use JPC to run x86 code in Java. They already do that in an applet! That's bulletproof security for you! http://www-jpc.physics.ox.ac.uk/

  47. Why not buy Sun? by Anonymous Coward · · Score: 0

    One wonders why Google don't just buy Sun - they'd get Java (which Google are massively dependent on in their backend), the new JavaFX (Flash/Silverlight competitor) which could replace Native Code and has a massive install base, which Native Code just isn't going to achieve overnight and there is a vast amount of Java libraries out there.

    Things like Niagara are quite possibly interesting to a company like Google too.

    Not to mention that Sun is massively undervalued - their market cap is similar to their cash balance, in other words, Sun is basically 'free'.

    1. Re:Why not buy Sun? by FunkyELF · · Score: 1

      Sun will be bought by HP or Dell before they'd be bought by Google. Java is free, why would Google need to buy the company? To control the direction of Java? It is too late. JavaFX is still horrible and doesn't address any of the issues why applets suck. JavaFX still takes way too long to get loaded.

    2. Re:Why not buy Sun? by Anonymous Coward · · Score: 0
  48. coincidence? by Lazy+Jones · · Score: 1
    Google releasing this early and MS presenting it today, hm...

    I love MS's numbers showing Xax being faster on Linux than native code on XP ...

    --
    "I love my job, but I hate talking to people like you" (Freddie Mercury)
  49. But does it run inside a box embedded in the page? by thisisauniqueid · · Score: 1

    If it just runs in a box inside the page, then this may die the same death as Java applets. That was the main thing that killed them (other than the startup speed, which is fixed in Java 1.6r10 and later). I filed a feature request for Java to have full access to the DOM through Gears here: http://code.google.com/p/gears/issues/detail?id=368 This would allow a whole new generation of web apps...

  50. And here it comes by jonaskoelker · · Score: 1

    (Prompting a possibly valid "In Soviet Russia" gag).

    In Soviet Russia, Linux runs it on You!!

    1. Re:And here it comes by Pebby · · Score: 1

      According to the article from a few days ago...

      In Soviet China, Linux runs YOU!

  51. Interpreter vs. compiler by Anonymous Coward · · Score: 0

    The paradigm examples of "interpreters" involve directly interpreting an abstract syntax tree of the program being run. Basically, a simple interpreter will have a parser spitting out an AST for the program, and a core that "runs" the AST. A compiler, on the other hand, will transform the program AST into a substantially different object code that's simpler than the language AST. In particular, language ASTs tend to be recursive tree structures, while object code tends to be sequences of instructions. Therefore, a pure interpreter would deal with a complex algebraic expression by recursing into the expression tree; a compiler would transform it into a linear sequence of instructions to compute the result.

    However, don't put too much thinking behind the compiler/interpreter distinction; nowadays, mixed systems like bytecode compilation are common, if not the norm. Basically, a lot of "intepreters" out there actually consist of a first part that looks just like a compiler, which outputs bytecode, and a bytecode VM, which looks like an interpreter, though written for a dramatically simpler language than pure interpreters (sequences of instructions, no recursive syntax).

  52. Advantage of x86 is that C++ works by tepples · · Score: 1

    just write a JIT compiler from x86 to your native machine code, thus COMPLETELY nulling any advantage this has over other JIT languages :)

    The C++ language can be compiled to x86 bytecode. As far as I know, it can't be compiled to JVM or CLR bytecode. There are plenty of other languages in this same situation.

    1. Re:Advantage of x86 is that C++ works by binarylarry · · Score: 1

      Actually, Microsoft's .NET compiler can compile fairly generic C++ source into .NET IL.

      It would be awesome to see something similar for Java, which is more portable.

      --
      Mod me down, my New Earth Global Warmingist friends!
    2. Re:Advantage of x86 is that C++ works by Anonymous Coward · · Score: 0

      JVM bytecode is Turing-complete. The only problem is that a lot of poorly-written C++ code still uses casts to and from raw pointers, which would have to be emulated (supporting them directly a la C# would be a colossal mistake).

  53. I will not be using this. by Anonymous Coward · · Score: 0

    And anyone who works for me who downloads it will be fired. Native code running in a browser is the WORST FUCKING IDEA I HAVE EVER HEARD. We might as well install telnet and run it as root without a password on a well known port.

    And here I thought Google had some intelligent programmers.

    FUCK.

  54. I read the white paper by tjstork · · Score: 1

    They do disallow certain opcodes. They don't allow at least some computed jumps and they don't allow ret, and they don't allow int or syscall.

    --
    This is my sig.
    1. Re:I read the white paper by mzs · · Score: 1

      Not allowing int breaks making a debugger simply. Most VMs are vulnerable to a cpuid bug that is a security vulnerabilty waiting to happen. It does not and probably never will work on Vista due to missing vm syscalls used to create the sandbox.

  55. Why are you laughing? by hey! · · Score: 1

    Of course it can be secured "a la ActiveX". Just like my super powers make me faster than a speeding monument.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  56. Don't think we need another player by Anonymous Coward · · Score: 0

    Flash/Flex, Silverlight, JavaFx, JavaApplets, and JavaScript. Yeah, we totally need another runtime environment for the browser.

  57. Ironically,... by Anonymous Coward · · Score: 0

    their demo is the Quake game engine, which is a virtual machine that allows untrusted third parties to contribute game mods.

  58. Only an AC needs to ask... by Tenebrousedge · · Score: 2, Insightful

    If you had any, you'd know.

    --
    Those who advocate genocide deserve every protection afforded by law, and none afforded by common human decency.
  59. Java Not Dead by Doc+Ruby · · Score: 2, Insightful

    Java applets are not "dead and buried". Neither on the Web, nor on mobile phones (with the distinction increasingly meaningless), or on embedded devices, like DVD players and settop boxes (most of which have Java VMs in them, especially Blu-Ray players and other HD players for menus).

    What is "dead and buried" is ActiveX, which is x86 code running in a browser's "sandbox". But even that is clearly no barrier to resurgence, as this story shows.

    x86 is a lousy architecture for modern purposes. Its design was determined by optimizations for executing Pascal programs, which was the primary programming market for the IBM PC when it was originally designed. That was a long time ago, and only the huge legacy of existing apps (and their forward momentum maintained by huge backwards compatibility design and sacrifices) keeps x86 code popular. I'm all for a SW x86 emulator, especially for newer CPUs so they don't have to be shackled to design compromises just to run the legacy code, instead of doing it newer and better ways with a more modern instruction set. Just like I'm all for the game emulators that will play old Atari 2600 games on Core Duo PCs and ARM mobile phones. Let's just not enslave ourselves to 1980 design priorities optimizing for a really dead language for yet another decade of programming, now going on 30 years, which is 20 generations under Moore's Law.

    --

    --
    make install -not war

    1. Re:Java Not Dead by hguorbray · · Score: 1

      Hear Hear!

      The company I work for makes a pretty nifty financial markets tracking tool based on Java Applets and it is very nearly as good as our desktop applications:

      http://esignal.com/market-q/default.aspx

      (shameless plug)

      -I'm just sayin'

    2. Re:Java Not Dead by jasonmanley · · Score: 1

      Hmmm ... interesting. I have nothing against Java applets per se, but whenever I wanted to get them to intereact with the OS I had to jump through all sorts of hoops with certs and permission files and whatever (was a while ago can't remember too much). So does your company's applet have the option to print, save etc ...? becuase that is where it started getting really tricky for me. The reason I ask is that I have an idea for a really cool RIA and I was wondering if a Java Applet was still a viable option these days?

      --
      http://projectleader.wordpress.com
    3. Re:Java Not Dead by hguorbray · · Score: 1

      yeah it supports printing locally -just a screenshot, but other than the UI that's the only local interaction

      user profile/preferences are saved back on the server, but we may implement a local save for some data some time down the road

      -I'm just sayin'

  60. If only it was IE6 compatible by Bob+The+Magic+Camel · · Score: 1

    The only purpose of this I can see is to force a compile of Firefox before serving my page. I'd never have to edit a standards compliant page again. But alas, Google have yet to heed this wish.

    --
    This signature is esoteric
  61. Re:Mod parent as "Troll" by ColdWetDog · · Score: 1

    Enough with the pointless Google-hating attitude.

    Right you are. Let's go after Apple now. Gotta be something in here we can jump on Jobs for.

    --
    Faster! Faster! Faster would be better!
  62. So... by Anonymous Coward · · Score: 0

    Does this mean I can play World of Warcraft in my web browser!?~

  63. FORTH by gravisan · · Score: 1

    FORTH FTW!

  64. Emulation speed by Rob+Y. · · Score: 2, Insightful

    The problem with Virtual PC on the G5 is that it needs to emulate the X86 application code plus the Windows OS.

    Since most apps strike a pretty reasonable balance between application logic and library calls, most emulators only need to emulate a relatively small portion of the code. They can drop down into native implementations as soon as the app calls library code. That's why script languages are viable at all.

    Where I work, we had a large set of applications written in assembler (don't ask) for an '80s vintage minicomputer that was discontinued. Rather then junk the whole thing, we wrote a machine emulator and reimplemented key libraries in C on unix. The result was faster than the original minis, since modern unix hardware was so much faster and the app/library mix was skewed toward the native libraries.

    I think one of the problems with traditional desktop Java apps was that major libraries (like Swing?) were not available on all platforms as native code. Again, that leaves you essentially emulating the application plus the platform, which shouldn't be necessary. Don't know if that's still an issue with Java. Certainly Eclipse seems to perform pretty well (once it starts up)...

    --
    Posted from my Android phone. Oh, I can change this? There, that's better...
    1. Re:Emulation speed by hfranz · · Score: 1

      Note that the Eclipse UI does not use Swing but SWT, which is essentially a native library with Java wrapper classes.

  65. Finally Google puts GIMP in the cloud!! by Anonymous Coward · · Score: 0

    There you go! Google has done it. With this you can download GIMP natively to your browser from the "cloud" and run it. Taking innovation to the next step!

  66. Fast Libraries by FloDo · · Score: 1

    You all seem to not notice something: This stuff is mainly for writing (fast) libraries that JavaScript can use. Try calling Java from JavaScript!

  67. you can have both! by ajrs · · Score: 2, Funny

    JIT emulation is the worst of both possible worlds! The extra overhead of the bytecode to native translations and the extra overhead of emulation!

    1. Re:you can have both! by szundi · · Score: 1

      Bullshit

      You will never compile your C++ code with -O7 because it needs too much time!

      But JIT compiler will compile -O7 your most used hotspots, so actually Java code can be much faster. Anyway, who said java is slow? The one who never used it really in the last 5 years... Slow to start does not mean it's just slow :)

  68. Not a new idea. by Anonymous Coward · · Score: 0

    Already been done.

    Well, except for the daft part about embedding it in a browser.

  69. Native Code Impossible to Sandbox. by hackus · · Score: 1

    I have not read the paper.

    But, Native Code doesn't seem likely to be sandboxed.

    Sand boxed virtual machine code I could see.

    Secondly, the idea that Java applets are dead and buried I think is a little too naive.

    The first implementation of Applets was prone to lots of problems.

    Secondary implementations are being thought out right now, and with access to numerous cores on a typical desktop system, would be much more practical, and WAY WAY safer than executing native code.

    As others have also pointed out here, you would need a emulator for x86 machine code on certain platforms as well (phones...web tablets....Nokia for example.)

    Also, I would like to point out, we tried native code already. On the server side at least it was called CGI a long time ago.

    It was also shown to be incredibly risky to do.

    Execution must take place with instructions which cannot be executed on the secured hardware should something go wrong with the sandbox.

    Java solves that very important problem, and at both ends (client and server).

    With what I already know, I will be reading his paper tonight and will probably hack it too pieces. :-)

    -Hack

    --
    Got Geometrodynamics? Awe, too hard to figure out? Too bad.
  70. LLVM by AlastairLynn · · Score: 1

    I personally think that a sending out LLVM IR bytecode to be run sandboxed is a much better idea, since that can be JIT'd to the native platform on which the browser is running, or interpreted if JIT is unavailable; almost as fast on x86, much faster on other architectures, and very portable.

  71. C++ /clr:safe by tepples · · Score: 1

    Actually, Microsoft's .NET compiler can compile fairly generic C++ source into .NET IL.

    True, Visual C++ 2005 can recompile generic C++ into /clr:pure MSIL, but it won't run in Silverlight or XNA. You have to rewrite the C++ into Microsoft's /clr:safe (verifiably type-safe) dialect of C++ to get it to run in such fully managed environments. Because a C++ program in /clr:safe can't use the C++ standard library, porting a C++ program to /clr:safe would probably be almost as much work as rewriting it into C# in the first place.

  72. "securely inside a browser" by Technomancer · · Score: 1

    Thats a new joke, right?
    Imagine the possibilities of new worms and malware using this amazing feature.

  73. Sweet, we'll finally get Linux in a Browser! by dannys42 · · Score: 1

    Actually, this makes perfect sense to me. Java's real problem is that the VM is tied to the language (Java people would disagree with me, but I challenge you to show me a Java Applet written in C).

    I want a web-based VM/OS that really is just that, an OS (ala Inferno/Plan9). Let me as a programmer decide what language I want to write the thing in. Python, Java, C, C++, Intercal, whatever.

    Java, C#/Mono, etc... all suffer from this problem. (Well that's not exactly true, .Net is probably the closest in offering a real VM OS... but they really don't talk about languages outside of C# and VB).

    Now I'm not sure x86 is the "best" platform to use as your "platform independent architecture." Though it is definitely one of the most prevalent and well supported architectures out there.

    The upshot of all this, though, is that we can get Linux running in a web browser (I'm sure someone will figure out some cleaver caching), which will *finally* get us all of our Gnome/KDE/Xaw tools available to larger audiences.

    This means *finally* a write once, run anywhere world.

    And it means we've just turned all web application developers into Linux developers.

    1. Re:Sweet, we'll finally get Linux in a Browser! by CBravo · · Score: 1

      I second that. And mod the guy up for being extremely insightful.

      I do have some wishes for your plan9-like VM: I would like to do software partitioning with namespaces (some memory adresses map on VM/system/resource X, other on Y, some opcodes executed on resource X other on Y) . Second: I would like late namespace determination, driven by the application. I'm no plan9 expert so maybe it can be done already.

      Some people keep wondering what we can do with all those 1000's of cores on our future processors. Now we know.

      --
      nosig today
  74. QuakeLive by CranberryKing · · Score: 1

    This thing will probably be secure before QuakeLive EVER gets out of testing. Give me an account!

  75. All applets run in the same JVM. This has ALWAYS been true. Each one has its own isolated class loaders and the security manager isolates threads, etc., but your browser will not start multiple JVMs.

    That being said, the class loader isolation does mean that aside from standard JavaSE classes (which are already on the client) even stuff which is identical between two applets will get loaded individually by each one.

    --
    "Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
  76. Can't get the Quake demo to run by Anonymous Coward · · Score: 0

    Meh... I'm running Linux x86_64 but using the 32-bit Firefox. With the 3.2 alpha version of Firefox I get an empty black box. Clicking in it and pressing space does nothing. Using 3.0.4 Firefox crashes when I go to the Quake demo page. The plugin seems to be loaded and active (about:plugins) but otherwise it seems totally broken on Linux.

  77. In Soviet Russia... by Anonymous Coward · · Score: 0

    Your browser runs your operating system!

  78. 100% flamebait summary by Anonymous Coward · · Score: 0

    With Java applets already dead and buried

    Please come back when you pull your head out of your ass. thanks.

  79. Um... what? by Estanislao+Mart�nez · · Score: 2, Informative

    An interpreter compiles each instruction every time it gets executed.

    Um, a pure interpreter never "compiles" its program, in the sense of transforming the code into equivalent code in an object language. A pure interpreter usually works this way:

    1. Parse source code and produce an abstract syntax tree representation of the program.
    2. Traverse that AST according to the interpretation rules of the language, keeping track of the program state at each point.

    The easiest example to learn here would be a typical Lisp meta-circular evaulator.

    A compiler, on the other hand, translates the AST into equivalent object code in a different language, which can then be run in an implementation of that second language (which can be either a real machine, a virtual machine, a language interpreter, ). For a pure interpreter to "compile each instruction every time it gets executed," there would have to be a program in the object language involved somewhere... and there isn't one, only an model of the successive states of a computation.

  80. Javascript by weston · · Score: 1

    Does anyone actually enjoy programming JavaScript?

    Yes.

    No real objects

    You might have meant "classes" rather than objects, which is a legitimate formal point, though on a practical level, creating things that act very much like classes is easy.

    weak typing

    Sometimes, this is a feature, not a bug.

    It's fine for small bits of code, but for larger apps?

    There are increasing numbers of proofs by example that dynamic languages are able to create large applications.

    In fact, there's a half-decent chance that you're browsing this comment in a browser that's a collection of components scripted and glued together via... Javascript.

  81. Google Chemistry by noppy · · Score: 1

    From TFA, Native Client is abbreviated as NaCl aka table salt?

  82. LMFAO by Anonymous Coward · · Score: 0

    I just read this sentence "enables x86 native code to be run securely inside a browser."

    After Chrome and Android...I'm just glad I wasn't drinking milk or it would've squirted it of my nose and that would've been lame for a while.

  83. Bochs by Anonymous Coward · · Score: 0
  84. Closed Source Web by nikanth · · Score: 1

    The motive could be to deploy client-side web applications without code. This would give more control without creating network traffic. But...

    1. Re:Closed Source Web by CBravo · · Score: 1

      would the gpl be enforcable?

      --
      nosig today
  85. What's the point? by shutdown+-p+now · · Score: 1

    So, this thing:

    1. Requires user to download and install a plugin to run.
    2. Requires developer to recompile his code specifically for that plugin (no, it doesn't run arbitrary x86 code).
    3. Kills many advanced native code optimization techniques due to verificator restrictions.
    4. Only runs on x86 (as described in the paper, it won't even work on an x64 OS!)

    So, how, exactly, is it any better than Java applets or .NET browser controls and Silverlight?

    Looks like a bad case of NIH syndrome combined with "we can do it in more perverted way than you could even think of". And particularly surprising from Google, as they are one of the bigger Java backers - it would make much more sense for them to work on improving Java applets; say, make a small & fast JIT to improve loading times, better compression for applets for faster download, and a cut-down version of JRE with simplified install a la Flash/Silverlight.

  86. Compute Client by Anonymous Coward · · Score: 0

    The web browser was originally designed as a distributed network-based display client.

    Web 2.0, flash, RIA, JavaFX, Silverlight, etc . are attempting to turn the browser into a processing or compute client.
    The browser *can* be a compute client, but it is not an ideal one with the current architecture.

    This is yet another attempt to turn the browser into a compute client.

    Meanwhile the cloud and GRID guys are working on making the compute server infrastructure.

    It would be nice if someone actually designed a robust, secure, scalable and well-thought-out compute client/ compute server net infrastructure.

    *NOT* the web.
    Maybe the grid?
    The cloud?

    The Matrix?

  87. This does not really make sense. by youknowwhat · · Score: 1

    Why some one wants to run native program in a web browser? Does quake look cooler in a web browser? I do not think so. Especially when today every browser are becoming so bloated, running program on an extra complicated layer is just wrong.

    1. Re:This does not really make sense. by RMH101 · · Score: 1

      Because it'd lead to Google OS, and deprecate the traditional operating system. You wouldn't care whether you were running Windows, OS X, Linux, etc - you'd just need a compliant browser. Take it a stage further and you'd just need a stub OS that boots the machine, recognises the hardware and gives you a browser - everythign else could be done via this method. Voila, Google OS.

  88. x86 emulation already available online via applet! by fortapocalypse · · Score: 1

    Per a list of online emulators (written in Java as applets) at http://www.atariage.com/forums/index.php?showtopic=129627, there has already been online x86 emulation done for a while: x86 PC Online Emulator: http://www-jpc.physics.ox.ac.uk/ (try for example: type "c:", then "cd mario", then "mario") PC/XT emulator: http://www.xs4all.nl/~rjoris/retro/ "With Java applets already dead and buried" - umm... I think you are either thinking Java 1.1 or you are exaggerating a bit. While applet development went down quite a bit, there are still an abundance of Java applets around the web and a number of them still being developed. I think that applets will be around and continue to be developed for as long is it is supported in-browser.