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."

72 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 rustalot42684 · · Score: 2, Informative

      Er, disregard that, I was wrong

    2. Re:Browser-based OS by Hatta · · Score: 5, Insightful

      Well this just underscores how silly the whole web-application thing is. An application running on a browser is a silly idea for the same reason an OS running on a browser is. We already have operating systems to run programs on. Give us native programs, not some horrid mishmash of technologies.

      --
      Give me Classic Slashdot or give me death!
    3. Re:Browser-based OS by Yold · · Score: 4, Insightful

      What the hell are you talking about? Web applications have some really good uses in the real-world (read business world). Instead of updating every computer in the office with a new version of some data management app, it is deployed once.

      Native programs are optimized for speed, Web Applications are optimized for Rapid Application Development. Remember visual basic? Thats what web apps do nowadays, and trust me, its better.

      As for "your horrid mishmash of technologies" statement, I agree that AJAX is overused, but believe me it is very nice to be able to do stuff on the server side (think form validation), and then not have to redo on the client-side in javascript.

    4. Re:Browser-based OS by rustalot42684 · · Score: 2, Insightful

      Right, I got that. My point was that it's not really a very good idea to build open-source programs which are dependent on some proprietary library/toolkit/framework/etc, especially when the proprietary part is very large and complex (eg Java), or when a free alternative exists but the original remains patent-encumbered (Mono). If the underlying framework is proprietary, the freedom of the other software is made irrelevant by the fact that the owners of the framework have total control over it. Things can resolve themselves, however; see the KDE free Qt foundation as an example.

    5. 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?

    6. 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
    7. Re:Browser-based OS by bestinshow · · Score: 5, Insightful

      Not really. I do agree that native applications are nicer than web applications, especially if you compare, e.g., Google Docs to Office, or even WordPad.

      However what we have discovered is that (1) web applications are easier to write, and (2) it's nice having a consistent platform to develop to, even if that platform is mildly ridiculous (HTML + CSS + JavaScript + Browser-Workarounds + JavaScript canvas thing). Getting stuff to display and layout on this platform is easy, and simple to prettify, far easier than most native platforms have been in the past. There are also a dozen different ways to write the server side of things, and I think for many developers it is nice to be forced to split up the client interface from the meat of the system.

      Of course, things are going too far. What should be happening is the simplification of native application programming, with a common platform, etc, without the overhead of having to run a Javascript or HTML rendering engine, and native full-speed canvases. I think that Apple is getting there, QT and KDE4 may be getting there but I haven't really looked into that platform. Java should have gotten there but early design mistakes (AWT, Swing) have killed that off, and SWT is a last-generation UI library. Maybe something like Fenggui on Java might help this platform, but I think Java's dead on the home desktop (and extremely alive and profitable on the server).

    8. Re:Browser-based OS by rustalot42684 · · Score: 4, Insightful

      Instead of updating every computer in the office with a new version of some data management app, it is deployed once.

      Or you could have a sensible package system which does updates (eg, one of the Linux package managers), or have the program itself do the updates (eg, Firefox). Your problem is solved.

      A commonly mentioned benefit of web apps is portability, but this isn't really true either because of the variety (and inconsistency) of web browsers. What I think is a better approach is something like the solution we see with Qt, where you write your program once, then compile it for different platforms, and it looks native every time. You get the speed and the portability and the UI consistency and the tech support only needs to support one program.

      I agree with you, however, that web apps are the new Visual Basic. They're slow, crappy, and often insecure.

    9. Re:Browser-based OS by Hatta · · Score: 3, Insightful

      Web applications have some really good uses in the real-world (read business world). Instead of updating every computer in the office with a new version of some data management app, it is deployed once.

      Oh come on, it's not that hard to push an application onto every computer in the office. This is a cop out.

      Native programs are optimized for speed, Web Applications are optimized for Rapid Application Development. Remember visual basic? Thats what web apps do nowadays, and trust me, its better.

      Then use python with wxwidgets or something. Every bit as easy and portable, a lot faster and safer.

      As for "your horrid mishmash of technologies" statement, I agree that AJAX is overused, but believe me it is very nice to be able to do stuff on the server side (think form validation), and then not have to redo on the client-side in javascript.

      Frankly, you should be doing everything on the server side.

      --
      Give me Classic Slashdot or give me death!
    10. Re:Browser-based OS by Yold · · Score: 5, Insightful

      #1, Yes, it is hard to push out an application to every University computer when you are at one w/ 50,000 students.

      #2, see #1

      #3, everything is done on the server-side, and prior to AJAX, it was redone in Javascript on the clientside for a more responsive user interface. Now, both the client and server use the server-side procedure.

    11. 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!

    12. Re:Browser-based OS by Hairy+Heron · · Score: 5, Informative

      especially when the proprietary part is very large and complex (eg Java)

      You're about 3 years out of date on calling Java proprietary, kiddo. In case you forgot, it's been GPLed for over a year now.

    13. 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.
    14. 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.

    15. Re:Browser-based OS by JebusIsLord · · Score: 2, Interesting

      Using a package management system does not make for "poof! problem solved." At work we have an entire team of packagers, plus ~1500 applications to maintain. Library conflicts and such are a nightmare, as are bad vendor packages.

      Web apps honestly aren't much better... they usually tie you to a specific version of IE (activex) or Java (even worse in my opinion... i think we have 5 or 6 different slightly incompatible runtime packages out there now).

      --
      Jeremy
    16. Re:Browser-based OS by Anonymous Coward · · Score: 3, Insightful

      "Or you could have a sensible package system which does updates (eg, one of the Linux package managers), or have the program itself do the updates (eg, Firefox). Your problem is solved."

      What if your office runs Windows, Mac OS X, Symbian OS, Debian, Plan 9, Red Hat, MS-DOS and OpenBSD?

      I don't know about you, but I'd still rather just update a web application. There are many ways to solve the cross-platform issue, but the web's a particularly zippy one that's very easy to develop for, so why not?

    17. Re:Browser-based OS by grasshoppa · · Score: 4, Insightful

      Or you could have a sensible package system which does updates (eg, one of the Linux package managers), or have the program itself do the updates (eg, Firefox). Your problem is solved.

      That certainly is a simplistic concept. Now, let's talk about largish environments. You know, where the user is running as a limited user, therefore the app can't update itself. Or where windows is required, so we can't use linux's update mechanisms.

      Or how about the simple logic that updating one app once is more likely to go smoothly than updating one application 100 times. Or a thousand. No matter how automated, problems crop up.

      Honestly, if you are going to argue the point, at least think about your arguments first.

      --
      Mod me down with all of your hatred and your journey towards the dark side will be complete!
    18. Re:Browser-based OS by jsebrech · · Score: 4, Insightful

      A commonly mentioned benefit of web apps is portability, but this isn't really true either because of the variety (and inconsistency) of web browsers. What I think is a better approach is something like the solution we see with Qt, where you write your program once, then compile it for different platforms, and it looks native every time.

      That still doesn't solve the deployment problem. You need rights on the local system to install that software. Why do you need those rights? Because native apps can interact in too many ways, and they can't be trusted, so rights are not automatically granted.

      The clever thing about the web platform, and what sets it apart from other platforms, is that the security model by default lets you run any app, even one you don't trust, on any system, without it causing major catastrophes.

      The web platform is building on a new concept: ubiquitous internet. The idea is that your applications and data live in the cloud, and are available to you on any device, anywhere, any time. Off-line support is only necessary as a short-term stopgap until the cloud is visible again (like the offline support of google docs).

      This is why the web makes sense: it just works. No installs, no administration, no lost data when your local machine fails, no shuttling different versions around on usb sticks. It's true that it's less powerful, but it doesn't matter because the ease of use gained from having the apps and the data "out there" will vastly outweigh the lack of capability for the majority of users.

    19. Re:Browser-based OS by Ant+P. · · Score: 2, Insightful

      What if your office runs Windows, Mac OS X, Symbian OS, Debian, Plan 9, Red Hat, MS-DOS and OpenBSD?

      You're fucked either way. Ever tried developing a complex web app that runs on even 7 out of the 8 of the above?

    20. Re:Browser-based OS by Tablizer · · Score: 3, Insightful

      Well this just underscores how silly the whole web-application thing is. An application running on a browser is a silly idea for the same reason an OS running on a browser is. We already have operating systems to run programs on. Give us native programs, not some horrid mishmash of technologies.

      Ideally, web apps should have 3 main advantages over native apps:

      1. Easy deploy-ability - No "install" step

      2. Vendor-neutral user-interface conventions - Developer only writes to "web standard" and not to Windows nor KDE nor Mac, etc. (X-windows tried to be this, but it is not HTTP-friendly.)

      3. Sandbox Security - The web app would not be able to touch local resources, such as user's file system, without explicit permission.

      In practice, it has not been quite that simple. For one, standard web interfaces have lack-luster and incomplete widget choices. And, different browsers support JS/DOM differently.
                 

    21. Re:Browser-based OS by kundziad · · Score: 3, Insightful

      Or where windows is required, so we can't use linux's update mechanisms.

      The truth is that Windows is a corporate OS too (or... in the first place), so it has perfectly working corporate software management mechanism. You just have to be maintain it well and have support from the application developers (who need to stick to good practice while coding their applications - that's usually the most difficult part).

    22. Re:Browser-based OS by bill_kress · · Score: 2, Insightful

      >Or you could have a sensible package system which does updates (eg, one of the Linux package managers), or have the program itself do the updates (eg, Firefox). Your problem is solved.

      There are a couple apps that I will never run outside a browser again.

      Mostly Gmail and Google docs.

      You literally cannot offer any significant improvement by running it native, and you remove their primary abilities when you do so.

      I can access my gmail on virtually every platform, from a PC in my local coffee shop to almost any phone to any "non-mine" computer in the world.

      Google apps gets to be the same way--I keep notes on their word-processor (like snippets of code I might need elsewhere), share documents/spreadshets for collaboration, and keep important documents with information that I may need to refer to from elsewhere.

      Finally google maps.

      All these apps have native alternatives--and I have used them. I never will again.

      Although there are issues with the way they are usually implemented--a toolkit like GWT reduces quite a few of the variables since something like a browser incompatibility or security issue can be addressed in one place (within the toolkit) and not in 30 places within your app.

      I'm not saying that browser apps are the only way to go--there are obviously issues--but you certainly would block yourself off from a lot of extremely appropriate usage scenarios if you took an absolute stance against them.

    23. Re:Browser-based OS by grasshoppa · · Score: 2, Insightful

      I'm not so sure I'd be willing to call it a "perfectly working corporate software management mechanism".

      MSI is a decent format...sorta. However, the format itself allows for all sorts of abuse ( binary executable wrapped up in a MSI? Sure, been there done that ). Further, configuration is often dependent on the developers writing the tools for custom configuration transforms( as apposed to a simple text ini file ).

      While MSIs are useful when employed correctly, I'd hardly call it perfectly working. Hell, it'd be a stretch to call it corporate since it doesn't have any built in reporting features.

      --
      Mod me down with all of your hatred and your journey towards the dark side will be complete!
    24. Re:Browser-based OS by dbIII · · Score: 2, Insightful
      The Qt thing was because all of the other non GPL free licences (MIT, BSD etc) had far more of a following so it would have been a much more difficult fight. It was a very embarrassing time for free software but at least we got gnome out of it. The most embarassing thing was the ill feeling that existed long after Qt changed to GPL.

      I lost nearly all respect for RMS after that and the LiGnuX (later gnu/linux) renaming thing. Surely spreading the message to the unconverted is better than bickering with the converted?

    25. Re:Browser-based OS by lena_10326 · · Score: 2, Informative

      X-Windows doesn't work well in HTTP environments because it does not handle latency well.

      While I understand your point, I don't know why you mentioned it. A low level correlation was not what I intended. I was speaking high level.

      If you spend a lot of money you may be able to get decent widgets

      There are tons of free frameworks and one off widgets. http://en.wikipedia.org/wiki/Comparison_of_JavaScript_frameworks

      For some, you do still have to style them a little to fit within your page design if you want a seamless look, but for the rest they work fine unmodified. Just drop them right in place and change a few text fields.

      --
      Camping on quad since 1996.
  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'.
    2. Re:what? by dgatwood · · Score: 4, Interesting

      I'd use C for everything if its string handling weren't so utterly broken. It makes sense from a pure performance, near-the-hardware perspective to handle strings the way it does, but what is desperately needed is POSIX standardization of stracat/stracpy. That one change would make it trivial to eliminate 99% of all buffer overflows in typical apps (and, ideally, kernel code)....

      char *stracpy(char *src) Returns a copy of a string in a newly allocated buffer large enough to hold the result. char *stracat(char *string1, char *string2 ...) Returns a newly allocated string that contains the concatenation of two or more strings.

      Sure, I could write my own, and pretty much everybody on the planet has done it at least once in their lives, but it seems ridiculous that such obvious operations require hand holding. Outside of embedded platforms where malloc is expensive, dynamically allocating a new buffer for concatenations should be the norm. For situations where performance takes a big hit because you can't afford to copy the source string every time, you could also add this API:

      strbuf_t strbufalloc(char *src [, size_t size_hint]) Returns a copy of a string in a newly allocated buffer large enough to hold the result. The optional second parameter size_hint allows you to specify a suggested size for the buffer. strbuf *strbufcat(strbuf_t string1, strbuf_t string2 ...) Returns a newly allocated string that contains the concatenation of two or more strings. The value of string1 must be a string buffer (strbuf_t). The value of string2 may be either a strbuf_t or char **.

      Wherein strbuf is opaquely defined as:

      struct strbuf_private {
      char *content; // null-terminated string
      size_t length;
      void *private_history_data;
      };

      struct strbuf;
      typedef struct strbuf *strbuf_t;

      and the routines automatically realloc the internal char * buffer as needed to grow the size to hold incoming content and likely future content based on historical data about prior operations on the structure, the algorithm for which would be an implementation detail outside the scope of the standard. That said, for the rare cases where a simple copy hurts performance badly enough for most folks to care, chances are your application knows its own growth policy better than the OS could guess anyway, so you probably should just roll your own buffer management code. The important bits to add to the standard are those first two functions (stracpy and stracat).

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    3. Re:what? by naasking · · Score: 4, Informative

      See The Better String Library. Haven't used it myself, but it's supposedly very portable, high performance, and has good interoperability with normal null terminated C strings.

    4. Re:what? by 42forty-two42 · · Score: 2, Informative

      Glib has something more or less exactly like this, minus the private_history_data (what's that supposed to be for?)

    5. Re:what? by springbox · · Score: 2, Insightful

      You do realize that everything you described can be written in C..

  5. Internet-C reborn? by dyfet · · Score: 3, Interesting

    There used to be a project, many years ago, which was I believe called itself something like "Internet-C". It used gcc with a pseudo-code backend to produce portable binaries which could then be ran from a plugin or through an emulator. Since gcc was tuned for register based archectures and 68k was already an existing backend, I think the pseudo-machine code he used was based at least loosely on the 68k one.

    1. Re:Internet-C reborn? by LWATCDR · · Score: 3, Interesting
      --
      See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
    2. Re:Internet-C reborn? by naasking · · Score: 3, Interesting

      The DotGNU project compiles C to the CLR, so that fits the bill.

  6. Re:Sound and Music? by 2nd+Post! · · Score: 4, Informative

    Nope. SFX is generally event driven (hit a key, hear the sword swing) where music is not (enter an area and music plays continuously in the background).

    SFX requires timing, latency, and speed to be accurate. Music requires bandwidth and a minimum level of continuous CPU cycles.

    Both have different needs so you can have one without the other (when you are talking emulation).

  7. Where did they get the Zelda on PC? by Anonymous Coward · · Score: 4, Insightful

    Is that a pirate copy? Just curious...

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

      It's a secret to everyone.

  8. am I the only one bored with the software world? by Anonymous Coward · · Score: 5, Insightful

    Everything's being constantly reinvented but no actual progress is being made. Oh look, the 100th toolkit to do exactly the same thing! Oh look, a new way of layering something old on something old on something old to give something new! Oh look, another silver bullet framework!

    Can anyone here remember the web of 10 years ago, for example? Content = text for reading + graphics for illustration. No bullcrap, just Google/Wikipedia style web sites to give me a simple navbar + content.

  9. But is it secure? by Animats · · Score: 4, Informative

    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. It can do anything the user process can do. If you're going to allow that, you may as well just load executable machine code directly, as with Active-X.

    Anyway, the article is a blog post that rehashes an interview from last year. The info in that article is better.

    1. Re:But is it secure? by ergo98 · · Score: 5, Insightful

      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. It can do anything the user process can do. If you're going to allow that, you may as well just load executable machine code directly, as with Active-X.

      You should email them and tell them about this! Surely they haven't though of such a thing!

      Sarcasm aside (sorry, I couldn't help myself), I suspect the VM needs to actually hand you a block of memory, and on accesses it validates that it is within the VM allocated range. Anything less would be silly, however such a thing would provide a huge win (I've tried to do image editing in pure managed code, and then found a massive performance win switching it over to P/Invoke native code).

  10. 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
  11. Re:Right... by Nyall · · Score: 5, Insightful

    primary? ummm... I thought the primary point of layers is so that you can do a lot with only a few simple function calls

    --
    http://en.wikipedia.org/wiki/Jury_nullification
  12. Sounds fantastic by dedazo · · Score: 2, Insightful

    And highly exploitable as well.

    --
    Web2.0: I love when people Flickr my cuil and digg my boingboing until my google is reddit and I start to yahoo
    1. 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.
    2. 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
    3. 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.

  13. Purpose? by roman_mir · · Score: 3, Insightful

    This is an interesting hack but it does not do anything for improving either computational theory or improving web application development. Combine C arrays that can be coded within a page like Javascript with a web-browser's security model and you get yourself what exactly? Is this going to improve the speed of development, the security of a thin client, the stability of a browser, the ease of memory usage, the consistency of interfaces or reusability of code? Certainly there will be more features available to a browser client but will there be enough abstraction between the machine and the code to avoid having major security/consistency problems?

    It is just not clear to me right now whethere there is a purpose to this beyond satisfaction of an interesting hack.

  14. Ah, the Memories... by Tickenest · · Score: 5, Insightful
    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.

    So Flash can simulating computing as it was back in 1998? Super....

    --
    This is the NFL, which stands for "Not For Long" if you keep making those bulls*** calls.
    1. Re:Ah, the Memories... by JoshJ · · Score: 2, Informative

      Zelda was 1986 on the Family Computer. You're 12 years off.

  15. Awesome by iXiXi · · Score: 2, Funny

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

  16. 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.

  17. 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.

  18. Adobe Systems != Open Source by mpapet · · Score: 5, Informative

    The last time I checked, Adobe Systems is about as hostile to open source as possible. They are the seldom acknowledged masters of the "first hit on the crack pipe is free" scheme.

    http://labs.adobe.com/technologies/eula/air.html

    Multiple helper libraries licensed under the MPL doesn't change the fact they are promoting another information silo.

    --
    http://www.maxineudall.com/2010/02/should-economists-be-sued-for-malpractice.html
    1. Re:Adobe Systems != Open Source by obi · · Score: 2, Informative

      Well, Tamarin is completely open source (MPL/GPL/LGPL triple licensed - see http://www.mozilla.org/projects/tamarin/faq.html#license). The Flash specs are completely open now, see http://www.adobe.com/openscreenproject/. The Flex SDK has an open source compiler for your actionscript to swf bytecode needs. You can also check http://opensource.adobe.com/ for more projects under a variety of licenses like MIT, LGPL3, etc.

      So what exactly are you complaining about? Air and the flash plugin are closed yes, but the specs and compilers and vm have been opened up by them. And there's already a lot of open source projects making use of these.

      Not that I think Adobe are the greatest thing since sliced bread; but I don't think they're "about as hostile to open source as possible", especially if you compare them to other companies their size/field.

  19. Re:Right... by twiddlingbits · · Score: 3, Informative

    And you realize all the overhead this created? It's why we needed dual core 3GHz 64 bit processors. C code, properly written is very tight and fast. Too many layers complicates the issue and introduces more chances of error. If you are looking inside Unix you'll find out the OS is written in C (and some assembler). You can have a GUI/Windows and still have C code..it's called X/MOTIF and has been around a long time, works well and is very fast. I'm pretty sure the current Linux GUIs owe a lot to to Motif.

  20. Re:Right... by camperdave · · Score: 4, Insightful

    How so? That's like saying sushi bars are there to try to get away from fishing.

    Well, it must work because I've never had to catch a fish to eat sushi.

    --
    When our name is on the back of your car, we're behind you all the way!
  21. Perl is Interpreted C by Doc+Ruby · · Score: 4, Interesting

    There's very little if any C code that can't be written basically the same for Perl to interpret it basically the same way. The exception is direct memory access, but there are ways. And besides, I'd rather access memory through an API that really manages it, like making it hard to unexpectedly overflow buffers or grant access to unauthorized other users.

    I'd love a Perl interpreter embedded in my browser. I'd love to have a Perl API directly to the browser app and the browser documents' DOM. I'd love to have a "Perl commandline" that returns text like usual, or that works on remote data by URL, or that returns icons or other data displayable in the browser.

    Javascript is a pain in the ass. I'd rather have a Perl engine, and all the Perl modules and scripts, to run against my browser the way I usually run against my terminal window.

    --

    --
    make install -not war

  22. Guitar Hero and Lumines by tepples · · Score: 4, Informative

    Nope. SFX is generally event driven (hit a key, hear the sword swing) where music is not (enter an area and music plays continuously in the background).

    SFX requires timing, latency, and speed to be accurate. Music requires bandwidth and a minimum level of continuous CPU cycles.

    Both have different needs so you can have one without the other (when you are talking emulation).

    In Parappa the Rapper, Beatmania, Guitar Freaks, Drummania, Keyboard Mania, Frequency, Amplitude, Taiko Drum Master, Donkey Konga, Guitar Hero, Rock Band, and even scenes in the Mario Party and WarioWare series, the player triggers sound effects at specific times, and these sound effects represent music that the player is performing. If the background music becomes desynchronized from the sound effects that represent music, the emulated environment becomes unusable. Even games that aren't directly about performing music, such as Rez, Lumines, and some scenes in Super Mario RPG, indicate the timing of various game world events using the music.

  23. bizarre by speedtux · · Score: 3, Insightful

    Trying to retrofit C into Tamarin seems bizarre. Why not use an on-the-fly sandboxing native C compiler? Tiny C (tcc) would seem like a good start.

    http://bellard.org/tcc/

  24. Startup latency by IamTheRealMike · · Score: 5, Interesting

    Being able to run Python or Quake inside a Flash VM sounds useful at first blush, but it seems you'd lose most of what makes webapps nice for both developers and users. In particular, C based apps are not designed to be streamed, whereas Flash or AJAX apps usually are (to some extent). Nobody wants to browse to a "web app" and then spend 5 minutes twiddling their thumbs whilst 20 megabyte of Python runtime or Quake is pulled down over the wire. Web apps just have a different DNA to desktop apps.

    I can see this being used to accelerate computation-heavy subelements of a regular Flash app though. I wonder how much of this is being driven by a desire to run a Photoshop subset inside Flash?

  25. Yes, but... by vimm · · Score: 3, Funny

    ... can it run Linux?

  26. Crazy thoughts..... by jmorris42 · · Score: 3, Interesting

    > You realise that all the OS layers, networking layers, web browsers,
    > scripting languages are primarily to try to get away from C?

    So? You are missing the bigger point. All of those layers and scripting languages you speak of are written in C. So C working in Flash means all of that other stuff can be brought over. Perl + Flash? Python + Flash? Ruby? The mind boggles at the possibilities.

    Of course since nobody will want to stuff all of Perl + half of CPAN down the pipe every time an applet loads we will end up with predownloaded versions cached for use. Let the package war begin, will flash binary packages be maintained with .deb or .rpm... I can see Windows users fighting Package Kit or Synaptic to manage the cruft needed so that "web apps" can work. We could end up with an entire GNU/Flash[1] distribution lurking on every Windows PC.

    [1] I object to the GNU/Linux misnaming abomination but this time it really will be a "GNU" distribution since Linux won't be involved. At least until we get a formal 'distribution' being shipped by Adobe.

    --
    Democrat delenda est
  27. A mighty hack, but of dubious use. by Peganthyrus · · Score: 4, Informative

    Hooray! Now C programmers can join the fun of writing sluggish applications that eat up huge amounts of CPU even when they're doing nothing!

    Deceptive headline, too, as this is just about compiling C to the bytecode that the Flash player interprets. Or even worse, now that I RTFA: "The LLVM instructions are converted into opcodes for a custom Virtual Machine that runs in ActionScript, a variant of ECMAScript and sibling of JavaScript." So your C is compiled to bytecode, that is interpreted by an interpreter that is, itself, a stream of the Flash player's bytecode.

    Moore's Law notwithstanding, this is a pretty insane use of processor cycles, guaranteed to make your program run a couple orders of magnitude slower than it would if you actually compiled it, or rewrote it in Actionscript!

    --
    egypt urnash minimal art.
  28. Re:Right... by Achoi77 · · Score: 5, Funny

    only an API of evil, Darth!

  29. Easier way... by Anonymous Coward · · Score: 5, Interesting

    chrome://browser/content/browser.xul

    Firefox inside Firefox inside Firefox...

  30. 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)
  31. Re:Right... by msuarezalvarez · · Score: 4, Insightful

    I'm pretty sure the current Linux GUIs owe a lot to to Motif.

    Indeed. The violent urge to get rid of Motif has been a driving force in most of the modern GUI development.

  32. I put C on web pages at my last start-up by istartedi · · Score: 2, Interesting

    At the now defunct start-up I last worked at, we had the usual LAMP stack driving our product. For amusement (and because I think there is an awful lot of bloat in LAMP), I did a simple front-end to our product based on an approximately 1000-line web server I wrote, and web pages with C embedded in comments. The makefile ran the web pages through a munger that transformed them into C, then built them and linked them into the server. If you didn't want the tiny web server, it could have just as easily built them as an apache module. The downside was that web developers using such a system would have had to "modify, compile, reload in browser" as opposed to their usual "modify, reload in browser" cycle. IMHO, this alone would have killed it since web devs like fast turnaround on changes. Nevermind that the web devs would have had to learn C, and that it wouldn't have been sandboxed or been able to run code client-side. I still like the idea though, and I'm glad to see others not only think in a similar way; but do so using a platform that would resolve some of the aforementioned issues.

    My toy front-end was never put into production of course; but when I wanted to debug my code without pestering the web devs, and I needed something more than text, it was quite useful.

    --
    For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
  33. Re:am I the only one bored with the software world by kestasjk · · Score: 2, Insightful

    Everything's being constantly reinvented but no actual progress is being made. Oh look, the 100th toolkit to do exactly the same thing! Oh look, a new way of layering something old on something old on something old to give something new! Oh look, another silver bullet framework!

    Can anyone here remember the web of 10 years ago, for example? Content = text for reading + graphics for illustration. No bullcrap, just Google/Wikipedia style web sites to give me a simple navbar + content.

    (Clicks reply to this, has text-box open up, clicks quote parent, has parent's comment show up, types comment)

    Yeah we all really desperately want to go to the web of 10 years ago.. Are you really saying the web is stagnating?
    It's the most quickly developing platform out there, and now more than ever. And thanks to open source it's more open than ever and browser wars are finally about being true to standards and not about breaking them.

    (Clicks preview, has comment show up, clicks submit, has comment displayed, continues reading from the comment directly beneath)

    --
    // MD_Update(&m,buf,j);