Forgot your password?
typodupeerror
Programming The Internet IT Technology

The Next Browser Scripting Language Is — C? 375

Posted by ScuttleMonkey
from the a-home-for-all-of-that-old-code dept.
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."
This discussion has been archived. No new comments can be posted.

The Next Browser Scripting Language Is — C?

Comments Filter:
  • by rustalot42684 (1055008) <(moc.tnuocca) (ta) (ekaf)> on Monday July 07, 2008 @03:12PM (#24087597)
    Now we can finally get this "web operating system" thing I've heard so much about...
    • And perhaps this will make open-source web apps possible and needed.
    • by Hatta (162192) on Monday July 07, 2008 @03:32PM (#24087875) Journal

      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.

      • by Yold (473518) on Monday July 07, 2008 @03:47PM (#24088035)

        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.

        • by rustalot42684 (1055008) <(moc.tnuocca) (ta) (ekaf)> on Monday July 07, 2008 @03:56PM (#24088187)

          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.

          • Re: (Score:3, Interesting)

            by JebusIsLord (566856)

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

          • Re: (Score:3, Insightful)

            by Anonymous Coward

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

          • by grasshoppa (657393) <skennedy AT tpno-co DOT org> on Monday July 07, 2008 @05:19PM (#24089741) Homepage

            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.

            • Re: (Score:3, Insightful)

              by kundziad (1198601)

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

              • Re: (Score:3, Insightful)

                by grasshoppa (657393)

                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,

          • by jsebrech (525647) on Monday July 07, 2008 @05:41PM (#24090087)

            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.

          • Re: (Score:3, Insightful)

            by bill_kress (99356)

            >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

        • by Hatta (162192) on Monday July 07, 2008 @03:57PM (#24088213) Journal

          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.

          • by Yold (473518) on Monday July 07, 2008 @04:04PM (#24088351)

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

          • by Surt (22457)

            You can't do everything on the server side and be scalable. There's a lot more cpu/memory on 100,000 clients than there is on any server.

        • by hitmark (640295)

          or one could go back to big irons, and issue the work force wifi/3G equiped "terminals"...

        • Re: (Score:2, Funny)

          by gladish (982899)
          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.
      • by Anonymous Coward on Monday July 07, 2008 @03:49PM (#24088065)

        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?

        • by sjames (1099) on Monday July 07, 2008 @04:09PM (#24088431) Homepage

          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!

      • by peragrin (659227)

        Oh come on now can't you see the money flow.

        MSFT can charge for Vista and Internet Explorer separately.

        Of course the question one has to ask if a browser that is free can run applications as well as the underlining OS can what purpose does the OS serve?

        The secret to network aware applications is to move them to the browser? guess that is one way to push standards.

        • by _anomaly_ (127254)

          Of course the question one has to ask if a browser that is free can run applications as well as the underlining OS can what purpose does the OS serve?

          ...to run the browser in the first place?
          Chicken and the egg...

      • by bestinshow (985111) on Monday July 07, 2008 @03:55PM (#24088175)

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

      • by Tablizer (95088) on Monday July 07, 2008 @06:17PM (#24090583) Homepage Journal

        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.
                   

    • by Whatanut (203397) on Monday July 07, 2008 @03:51PM (#24088103)
      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.
    • by ultranova (717540)

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

      Well, Linux is written in C, so...

  • by vivaoporto (1064484) on Monday July 07, 2008 @03:13PM (#24087607)
    Same as the old boss.
  • by Anonymous Coward on Monday July 07, 2008 @03:14PM (#24087631)

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

  • what? (Score:5, Funny)

    by thermian (1267986) on Monday July 07, 2008 @03:19PM (#24087687)

    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.

    • Re:what? (Score:5, Funny)

      by eviloverlordx (99809) on Monday July 07, 2008 @03:25PM (#24087779)

      I heard that COBOL is next on the TODO list.

    • Re:what? (Score:5, Interesting)

      by dgatwood (11270) on Monday July 07, 2008 @03:52PM (#24088121) Journal

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

  • Internet-C reborn? (Score:4, Interesting)

    by dyfet (154716) on Monday July 07, 2008 @03:19PM (#24087689) Homepage

    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.

  • by Anonymous Coward on Monday July 07, 2008 @03:23PM (#24087753)
    Is that a pirate copy? Just curious...
  • by Anonymous Coward on Monday July 07, 2008 @03:24PM (#24087765)

    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.

    • by LilGuy (150110)

      I also remember waiting 5 minutes for a picture to download...

      I don't mind having nice looking sites because it takes just as long for one of them to load as it does for a plain text site anymore.

      However, people have shifted more toward flashiness than content which I don't particularly like.

    • by thermian (1267986)

      Progress has slowed a little, but only because of the patents thing.

      Its just so hard at the moment to push new technology without people popping out of the woodwork and asking for their cut, even though they've done shit all except hoard bits of paper.

      Also, some of what is touted as new technology is really just something built to avoid some other buggers IP/patent trap.

      I'm sure it'll blow over. If it doesn't then dust will blow over the bleached carcass of the present IT world as the new guys (read India a

    • Re: (Score:3, Insightful)

      by kestasjk (933987)

      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

  • But is it secure? (Score:5, Informative)

    by Animats (122034) on Monday July 07, 2008 @03:25PM (#24087777) Homepage

    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. [digitalbackcountry.com] The info in that article is better.

    • by ergo98 (9391) on Monday July 07, 2008 @03:34PM (#24087893) Homepage Journal

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

    • by Yold (473518)

      Exactly what I was thinking. There isn't much space to compromise between the security of Java applet, and the speed of an Active-X plug-in. So this is basically a cross-platform version of Active-X; I am sure that will make many system administrators happy, especially the ones that grant their OS X users admin rights, thinking they are safe =) from web-installed rubbish.

  • by 140Mandak262Jamuna (970587) on Monday July 07, 2008 @03:25PM (#24087785) Journal
    ... is definitely going to be browser-FORTRAN.
  • Sounds fantastic (Score:2, Insightful)

    by dedazo (737510)

    And highly exploitable as well.

  • Purpose? (Score:4, Insightful)

    by roman_mir (125474) on Monday July 07, 2008 @03:30PM (#24087837) Homepage Journal

    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.

  • by Tickenest (544722) on Monday July 07, 2008 @03:30PM (#24087843) Homepage Journal
    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....

    • Re: (Score:3, Informative)

      by JoshJ (1009085)
      Zelda was 1986 on the Family Computer. You're 12 years off.
      • >>>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....

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

        Reading comprehension is everything. The bolded areas above contain what you missed.

  • Awesome (Score:2, Funny)

    by iXiXi (659985)
    All that and a free dozen eggs every 10 secs. What will they think of next?
  • So the language for ''real men'' will not die out! All those kids playing with their scripting or byte-code should watch out!

    Seriously, I like Perl and Python. But some things, expecially real-time stuff like audio and video are not for scripting.

    • by X0563511 (793323)

      Use scripting/interpreted stuff for some things, and for the time-critical use 'bindings'. We do that already. Python-OpenGL - python itself isn't rendering the tris... that would (indeed!) be quite silly.

      • by tepples (727027)

        Use scripting/interpreted stuff for some things, and for the time-critical use 'bindings'. We do that already. Python-OpenGL

        What do you use to decompress textures, read controllers, play sounds, or do any other signal processing or I/O that the Python standard library and OpenGL don't handle by themselves? You have to find or write a C extension, and then you have to port it to each platform that you plan to support.

  • by mpapet (761907) on Monday July 07, 2008 @03:31PM (#24087859) Homepage

    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 [adobe.com]

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

    • Re: (Score:3, Informative)

      by obi (118631)
      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 th
  • by Doc Ruby (173196) on Monday July 07, 2008 @03:44PM (#24087989) Homepage Journal

    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.

  • bizarre (Score:4, Insightful)

    by speedtux (1307149) on Monday July 07, 2008 @03:44PM (#24087997)

    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/ [bellard.org]

  • Startup latency (Score:5, Interesting)

    by IamTheRealMike (537420) * <mike@plan99.net> on Monday July 07, 2008 @03:44PM (#24087999) Homepage

    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?

  • Yes, but... (Score:3, Funny)

    by vimm (1300813) on Monday July 07, 2008 @03:56PM (#24088179)
    ... can it run Linux?
  • by zero1101 (444838)

    The potential security implications of this kind of make me queasy.

  • by Peganthyrus (713645) on Monday July 07, 2008 @04:09PM (#24088433) Homepage

    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!

  • Let me know when they get full Visual Basic up and running. Then I'm interested.

    And I don't mean that C in VB Sheep's Clothing .NET version.
  • by RWerp (798951) on Monday July 07, 2008 @04:56PM (#24089331)
    For example, does it support buffer overruns? Double free's?
  • by istartedi (132515) on Monday July 07, 2008 @09:15PM (#24092857) Journal

    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.

Entropy requires no maintenance. -- Markoff Chaney

Working...