Slashdot Mirror


The Next Browser Scripting Language Is — C?

mad.frog writes to tell us that in a recent talk by Adobe's Scott Petersen he demonstrated a new toolchain that he has been working on (and soon to be open-sourced) that allows C code to be run by the Tamarin virtual machine. "The toolchain includes lots of other details, such as a custom POSIX system call API and a C multimedia library that provides access to Flash. And there's some things that Petersen had to add to Tamarin, such as a native byte array that maps directly to RAM, thereby allowing the VM's "emulation" of memory to have only a minor overhead over the real thing. The end result is the ability to run a wide variety of existing C code in Flash at acceptable speeds. Petersen demonstrated a version of Quake running in a Flash app, as well as a C-based Nintendo emulator running Zelda; both were eminently playable, and included sound effects and music."

23 of 375 comments (clear)

  1. Browser-based OS by rustalot42684 · · Score: 4, Funny

    Now we can finally get this "web operating system" thing I've heard so much about...

    1. Re:Browser-based OS by Anonymous Coward · · Score: 4, Funny

      You need an operating system to run programs? Bah! Real programmers aren't afraid of programming directly to the hardware.

      This whole operating system fad won't last. Who wants to waste so many resources just to simplify development and portability? If we don't stop this operating system fad quickly, the next thing you'll see is people developing virtual machines so that girly programmers won't have to have to test their applications across various platforms. And then they'll start integrating these virtual machines into normal applications! What are they thinking? That memory and processor speeds are growing exponentially?

    2. Re:Browser-based OS by Whatanut · · Score: 5, Funny

      If you run a browser based OS... and install a browser in it. And then use that to run a browser based OS, why... we could have infinite amounts of computing power! Or space time will tear itself apart. Either way, I'm making popcorn.

      --

      yvan eht nioj
    3. Re:Browser-based OS by sjames · · Score: 4, Funny

      Sonny, back in the day we didn't need a machine to test our code. We ran it in our heads as we punched it into the cards. Sure, there were a few new guys who used pencil and paper to help them, but if they didn't shape up in a month or so, we ran them out of the industry.

      Now get off my lawn!

    4. Re:Browser-based OS by sconeu · · Score: 5, Funny

      So it's browsers all the way down?

      --
      General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
    5. Re:Browser-based OS by gladish · · Score: 2, Funny

      FYI: RAD is short for radabonzical and not rapid application development, and guess what? PyPy is gonna beat out flash simply for namesake. Just think of all the new wrappers we can write. PyPyTk, PyPyGL, PyPyMySqlAdapter, PyPyList, Vector, etc. I'm totally psyched for PyPy. Or maybe we should write Gnome bindings... GnomePyPyHashSet. You can dance to that one.

  2. Meet the new boss by vivaoporto · · Score: 4, Funny

    Same as the old boss.

  3. And once we have C... by Anonymous Coward · · Score: 5, Funny

    We can write PHP! And then browser security will be top notch.

  4. what? by thermian · · Score: 5, Funny

    You mean my preferred language has just become cool?

    Ok, this is either great news or the world is about to end.

    I think I'll go stand in a doorway for an hour or two, just to be on the safe side.

    --
    A learning experience is one of those things that say, 'You know that thing you just did? Don't do that.' - D. Adams
    1. Re:what? by eviloverlordx · · Score: 5, Funny

      I heard that COBOL is next on the TODO list.

      --
      'Loose' is when your pants are three sizes too big. 'Lose' is when you misuse 'loose'.
  5. The next breakthrough after Browser -C by 140Mandak262Jamuna · · Score: 2, Funny

    ... is definitely going to be browser-FORTRAN.

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
  6. Awesome by iXiXi · · Score: 2, Funny

    All that and a free dozen eggs every 10 secs. What will they think of next?

  7. This confirms it C is Death! by SmallFurryCreature · · Score: 3, Funny

    The more you run away from it, the closer you get to it. So now things are as inevitable as Death, Taxes and C.

    A frightful three-some indeed.

    --

    MMO Quests are like orgasms:

    You may solo them, I prefer them in a group.

  8. Re:Right... by Chris+Mattern · · Score: 5, Funny

    The circle is now complete. When C left Unix it was but the back-end. Now, it is the API.

  9. Re:Where did they get the Zelda on PC? by Rob+T+Firefly · · Score: 5, Funny

    It's a secret to everyone.

  10. Re:Sounds fantastic by UnknowingFool · · Score: 4, Funny

    I feel a great disturbance in the force as if a million admins suddenly screamed in terror . . .

    --
    Well, there's spam egg sausage and spam, that's not got much spam in it.
  11. Re:Sounds fantastic by dedazo · · Score: 5, Funny

    Those who don't remember ActiveX are doomed to reinvent it. Poorly.

    --
    Web2.0: I love when people Flickr my cuil and digg my boingboing until my google is reddit and I start to yahoo
  12. Yes, but... by vimm · · Score: 3, Funny

    ... can it run Linux?

  13. Re:Right... by Achoi77 · · Score: 5, Funny

    only an API of evil, Darth!

  14. I wonder if it supports C completely by RWerp · · Score: 3, Funny

    For example, does it support buffer overruns? Double free's?

    --
    "Long run is a misleading guide to current affairs. In the long run we are all dead." (John Maynard Keynes)
  15. Re:Sounds fantastic by DoofusOfDeath · · Score: 4, Funny

    Those who don't remember ActiveX are doomed to reinvent it. Poorly.

    A poorly re-invented ActiveX? I feel like I've just stared into the abyss, and seen Bill staring back at me.

  16. Re:But is it secure? by Anonymous Coward · · Score: 1, Funny

    If the "byte array mapped to RAM" installed in Tamarin allows the code to store anywhere in the interpreter's space, that's a huge security hole.

    Yes, it is a security hole. It is also a huge win.

    The ability to perform pointer arithmetic and manipulate RAM without overhead is indispensable in many applications. I have personally had to suffer mitigation of GC overhead, bounds checking, extra copies, etc. on the JVM, CLR and the AVM. CLR gives you a fairly easy way out with "unmanaged" code. Where you lack this ability you must struggle to prevent unnecessary copies and allocations and still end up with a lower performing result.

    Obviously this is inappropriate for insecure web distribution, but there are *many* vertical applications that could leverage this. Think smartphones. You could eradicate nearly all "native" code if you could only do pointer arithmetic in ActionScript. Down at the bottom, where it really counts, buffers are filled and buses are driven, "managed" memory is unacceptable, period.

    Low level languages such as C will not be threatened by challengers that lack pointer arithmetic. Simple as that.

  17. Re:Ah, the Memories... by Jesus_666 · · Score: 1, Funny

    That's because you're not 2.0 enough. Everything gets better when run inside a browser. If you have Firefox, you can type chrome://browser/content/browser.xul into the URL^H^H^HAwesome bar. That will run Firefox inside Firefox, exponentially increasing the awesomeness. I tried it and I came when I reached the third layer. That's how awesome running stuff inside a browser is.

    I really hope Firefox 4 will have full DirectX 12 support so I can play all my games inside it as well. Also, the next CPU enhancement (like SSE or 3DNow!) will most probably be something that specifically speeds up browsers. Because running stuff in browsers is that awesome and everyone will do it in the furure, even BIOS vendors.

    --
    USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)