Slashdot Mirror


Adobe Releases C/C++ To Flash Compiler

SnT2k writes "Adobe recently released the beta version of Alchemy which compiles C/C++ code into AS3 bytecode (which runs on AVM2) that can run on the Flash or Flex platform and boasts increased performance for computationally-intensive tasks (but still slower than native C/C++). It was demonstrated last year during the Chicago MAX 2007 to run Quake. A few months later it has been demonstrated to run a Python interpreter and Nintendo Emulator. One interesting tidbit is that the thing is built upon the open source LLVM Compiler Infrastructure."

63 of 216 comments (clear)

  1. Still no contact info, so I'll post here... by TheRaven64 · · Score: 5, Interesting
    On the off-chance that someone from Adobe reads this:

    I've been interested in this idea since the presentation at the LLVM dev meeting. I'd be interested in extending clang to use the native ActionScript object model for Objective-C objects, and adding a GNUstep back end to use the native flash drawing primitives so that we can easily port Cocoa apps to run in a browser. Unfortunately, there was no contact information listed anywhere on the presentation or on this site, so I haven't been able to get in touch with anyone at Adobe Labs about this.

    --
    I am TheRaven on Soylent News
    1. Re:Still no contact info, so I'll post here... by moderatorrater · · Score: 5, Funny

      And I'd like a pony.

    2. Re:Still no contact info, so I'll post here... by davester666 · · Score: 5, Funny

      Why does everybody as for a pony, but not a stable to keep it in, or food to keep it alive?

      Does Pony meat taste that good?

      --
      Sleep your way to a whiter smile...date a dentist!
    3. Re:Still no contact info, so I'll post here... by Anonymous Coward · · Score: 3, Funny

      Why does everybody as for a pony, but not a stable to keep it in, or food to keep it alive?

      Does Pony meat taste that good?

      Don't look a gift horse in the mouth.

    4. Re:Still no contact info, so I'll post here... by luder · · Score: 2, Insightful

      Well... There's always porn.

    5. Re:Still no contact info, so I'll post here... by Anonymous Coward · · Score: 3, Informative

      I believe this goes directly to the engineers over at Adobe:

      http://www.adobe.com/go/wish

    6. Re:Still no contact info, so I'll post here... by fishbowl · · Score: 4, Funny

      >Why does everybody as for a pony, but not a stable to keep it in, or food to keep it alive?

      I live all alone in a farmhouse, you insensitive clod.

      --
      -fb Everything not expressly forbidden is now mandatory.
    7. Re:Still no contact info, so I'll post here... by garett_spencley · · Score: 4, Interesting

      I don't know first hand, but apparently horse meat is supposed to be very tasty. "The F-Word" (Gordan Ramsay cooking show in the UK) did an episode where they prepared horse meat, talked about the history of horses and talked to a farmer that raises them for their meat etc. It was really interesting.

      In one part they were handing out samples near a horse-race track (they do that with lots of "exotic" foods. Go out into public and get people to try it and give their reactions etc.) and got asked by the police to leave. Not relevant but I thought it was funny.

      -1 OT

    8. Re:Still no contact info, so I'll post here... by rubycodez · · Score: 2, Informative

      no, but boiling their skins, bones, tendons and tissues makes the most awesome wood glue.

    9. Re:Still no contact info, so I'll post here... by dunkelfalke · · Score: 4, Informative

      horse meat does taste good, low fat and kind of sweet. i think the closest analogy to horse meat is ostrich meat. i would prefer a horse steak to a beef steak every time.

      just don't try the mongol horse salami. it doesn't taste very good and the meat sticks between your teeth.

      --
      "It's such a fine line between stupid and clever" -- David St. Hubbins, Spinal Tap
    10. Re:Still no contact info, so I'll post here... by Sebilrazen · · Score: 3, Funny

      Hey, Fucko, we like to call it inter-species erotica.

      --
      "There are no facts, only interpretations." --Friedrich Nietzsche.
    11. Re:Still no contact info, so I'll post here... by GaryOlson · · Score: 2, Funny

      Neigh...

      --
      Every mans' island needs an ocean; choose your ocean carefully.
    12. Re:Still no contact info, so I'll post here... by GaryOlson · · Score: 3, Funny

      Zoning regulations for Slashdot do not allow for the boarding of ponies in this thread.

      --
      Every mans' island needs an ocean; choose your ocean carefully.
    13. Re:Still no contact info, so I'll post here... by Anonymous Coward · · Score: 4, Funny

      Don't put a gift horse in the mouth.

      Fixed for ya.

    14. Re:Still no contact info, so I'll post here... by mad.frog · · Score: 3, Informative

      Post the question to tamarin-devel@mozilla.org -- all the relevant people at Adobe are on that list, and although Alchemy is not technically part of the Tamarin project, it's related enough.

    15. Re:Still no contact info, so I'll post here... by k33l0r · · Score: 4, Funny

      Why does everybody as for a pony, but not a stable to keep it in, or food to keep it alive?

      Does Pony meat taste that good?

      Because when it's a pony from Adobe you know that it will soon crash and die, and it wouldn't know what stable is anyway.

    16. Re:Still no contact info, so I'll post here... by ArsenneLupin · · Score: 2, Interesting

      In one part they were handing out samples near a horse-race track (they do that with lots of "exotic" foods. Go out into public and get people to try it and give their reactions etc.) and got asked by the police to leave.

      Probably more due to his poor choice of venue, than because of the meat.

      In some countries (such as Luxembourg), horse meat is a very normal thing to eat, with some restaurant's even specializing in it. Nobody thinks anything bad about it.

      Germany is fun too: here, some restaurants put up fake signs "we serve horse meat", but that's only to keep the gypsies away...

    17. Re:Still no contact info, so I'll post here... by BertieBaggio · · Score: 2, Funny

      think the closest analogy to horse meat is ostrich meat

      Thanks! I'm glad you cleared that up for everyone.

      :^P

      --
      If all you have is a grenade, pretty soon every problem looks like a foxhole -- MightyYar
    18. Re:Still no contact info, so I'll post here... by genner · · Score: 2, Funny

      Ostrich doesn't really taste like beef at all. In fact I can't think of anything else it does taste like.

      It's little bit like emu

  2. Oh oh Adobe... by emailandthings · · Score: 2, Interesting

    Adobe, Adobe, Adobe.. you are asking for it :) Just remember Borland Delphi, Novell, OS/2, and the many products that at one point competed with M$'s dev monopoly.. Now where is that Linux suite of publishing tools? now that may #@!# M$ a bit...

  3. NES emulator? by Mr.+Sketch · · Score: 2, Interesting

    Where I can find info on the NES emulator in Flash? That link didn't have any info that I could find.

    I had started such a project a while back, but never quite finished due to poor performance.

  4. It has been said by frictionless+man · · Score: 5, Interesting

    It has been said that the reason apple doesn't want flash on their iPhones is that it would create a competing application infrastructure over which they would have no control. I can see this development reinforcing that position.

    This seems to further cement flash as a worthy application environment, especially given the perceived problem in flash appeared to be its inefficiency.
    Looking forward to better flash games... (Or perhaps not if im not wanting to procrastinate).

    1. Re:It has been said by m50d · · Score: 3, Insightful
      This seems to further cement flash as a worthy application environment, especially given the perceived problem in flash appeared to be its inefficiency.

      Huh? You think this method is going to give anything remotely resembling the efficiency of native code? Unless the flash script language is really badly written, the performance will be even worse than programs that were manually written in flash.

      --
      I am trolling
    2. Re:It has been said by Anonymous Coward · · Score: 2, Insightful

      Huh? You think this method is going to give anything remotely resembling the efficiency of native code?

      It won't be fast but Good Enough is good enough.

    3. Re:It has been said by StreetStealth · · Score: 4, Insightful

      I'd be willing to wager that you've used responsibly designed Flash applets before and simply assumed them to be cleverly implemented Javascript because they didn't explode all over the screen in a cavalcade of light and sound.

      Nothing about Flash compels the developer or designer to author something "garish and obnoxious" any more than Javascript or CSS do. Its versatility merely allows for greater abuse.

      --
      Your mind is clear / The things that you fear / Will fade with how much you / Believe what you hear
    4. Re:It has been said by slimjim8094 · · Score: 2, Informative

      Jailbreak it. There's a quake4iphone in Cydia that's been there for months, with hardware acceleration and everything.

      --
      I have developed a truly marvelous proof of this comment, which this signature is too narrow to contain.
    5. Re:It has been said by jcr · · Score: 3, Interesting

      the perceived problem in flash appeared to be its inefficiency.

      I'd have to say that seeing Flash_enforceLocalSecurity() in the backtrace just about every time Safari crashes would be a somewhat bigger factor in Apple's rejection of Flash.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    6. Re:It has been said by jonaskoelker · · Score: 2, Informative

      I'd be willing to wager that you've used responsibly designed Flash applets before and simply assumed them to be cleverly implemented Javascript [...]

      I bet he didn't even notice pressing the big f/play button to make it run ;)

      [FlashBlock firefox extension, a godsend; even worth it when you use noscript, for those video players that start playing straight away despite your wishes].

    7. Re:It has been said by internerdj · · Score: 2, Funny

      And you forgot the most important thing, now they can port linux to flash and appease all the slashdot haters with one question and one answer: Does it run linux? and Yes, it does.


      And before someone responds to this as if it were a serious post: I very sincerely hope this is and will remain a joke.

  5. Virtualize Everything by Anonymous Coward · · Score: 5, Funny

    Wow, I can compile my C/C++ code to run on a slow virtual machine instead of a native cpu architecture.

    I haven't had this much fun ever since I discovered the java Virtual Machine written in java.

    It brings back the heady days of my 8088.

    1. Re:Virtualize Everything by cstdenis · · Score: 2, Insightful

      > java Virtual Machine written in java.

      Link? This sounds completely useless, but it would be interesting to look at the source if available.

      --
      1984 was not supposed to be an instruction manual.
    2. Re:Virtualize Everything by Halo1 · · Score: 4, Informative
      --
      Donate free food here
    3. Re:Virtualize Everything by Urza9814 · · Score: 2, Informative

      Wow. Even worse. Apparently there's more than one, because if you notice my previous comment...well, that wasn't the one I found.

      http://joeq.sourceforge.net/

    4. Re:Virtualize Everything by Halo1 · · Score: 4, Insightful

      There's nothing inherently bad about the concept. It's in fact quite interesting to have the JVM optimise itself along with the programs running inside it. And while the JikesRVM, being a research VM, does not run as fast as Sun's VM or IBM's commercial VMs, it's not that slow either (definitely not as slow as you'd first think of a JVM implemented in Java).

      --
      Donate free food here
    5. Re:Virtualize Everything by fm6 · · Score: 4, Insightful

      If you have a complete C++ application that runs fine on native code, then obviously this would be silly. But if you bothered to RTFA, you know that this serves a simple and obvious purpose: reuse. If you need rendering code for your Flash game, and the best code available is in C or C++, it's a lot easier to just recompile the code than it is to hand-translate the code into ActionScript.

    6. Re:Virtualize Everything by pohl · · Score: 2, Insightful

      Speaking of, where did the computer-science demographic on slashdot make off to? You know, the guys who are aware of historical minutiae like the time-honored milestone of a programming language becoming self-hosting? Just asking.

      --

      The "cue the foo posts in 3, 2, 1..." posts will commence with no subsequent foo posts in 3, 2, 1...

    7. Re:Virtualize Everything by pohl · · Score: 3, Interesting

      OK, sorry to be so hard on you. It turns out that there are copious buttloads of languages that use some sort of bytecode under the hood. The thing that really makes it stick in your mind with Java is just that it's the format that you're expected to distribute your programs in. Contrast that with Python: The reference implementation (CPython) is also a bytecode interpreter. I'm not sure, it may be possible to distribute a python program in bytecode, but I've neither seen nor heard of anyone doing it. Other interpreted languages are currently moving towards a bytecode-based implementation (Ruby is moving to YARV, Perl to Parrot...) and some implementations are even attempting to be self-hosting yet fast.

      Google the term "PyPy", for example. It's a daring implementation of Python written in a strict subset of Python called RPython. It plans to use the LLVM infrastructure to eventually become competitive with the performance of the CPython interpreter. Pretty cool stuff!

      --

      The "cue the foo posts in 3, 2, 1..." posts will commence with no subsequent foo posts in 3, 2, 1...

    8. Re:Virtualize Everything by MichaelSmith · · Score: 5, Funny

      JikesRVM has a small "bootstrap" VM that is used to get the main VM going, but after startup everything is run in the main VM (including the main VM itself).

      I am getting mental stack overflows just trying to parse that.

  6. More details by supermansuper · · Score: 5, Informative

    More details here: http://www.llvm.org/devmtg/2008-08/ (Look for the topic - Flash C Compiler: Compiling C code to the Adobe Flash Virtual Machine)
    You post your ideas for Adobe here: http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=72&catid=755&entercat=y These forums are closely watched by the flash player team.

  7. Re:Quake. Quake for fucks sake! by i.of.the.storm · · Score: 3, Interesting

    Well, I don't know whether Quake is that much of a benchmark. I can run Quake on my Nintendo DS through homebrew, and it was ported by one guy on his own, although I think he is a professional game developer for XBox 360, but I may be confusing him with someone else or may have misconstrued a forum post by him. Here's the site for anyone interested: http://quake.drunkencoders.com/

    --
    All your base are belong to Wii.
  8. Increased performance by shird · · Score: 4, Interesting

    compiling C/C++ code into AS3 bytcode (which runs on AVM2) that can run on the Flash or Flex platform and boasts increased performance for computationally-intensive tasks

    Increased performance over what exactly? Is there some other 'slower' bytecode that the VM runs? The summary fails to mention this. I don't see how compiling C++ to the AS3 bytecode would be any faster than compiling some Flash language to AS3 bytecode, or writing AS3 bytecode directly. I assume it is the AS3 bytecode itself that is faster, in which case the 'compiling C++' part is irrelevant to the increased performance.

    --
    I.O.U One Sig.
    1. Re:Increased performance by drspliff · · Score: 5, Interesting

      The point is that the LLVM project can do far more optimization before being compiled to bytecode than Adobe's ActionScript compiler is doing, and as a result it runs faster.
      Yes... Adobe's ActionScript compiler sucks at generating bytecode for their own VM, and even they admit it.

  9. This is not where Adobes priorities should be! by NouberNou · · Score: 5, Interesting

    I have been working on two large enterprise class applications using their Flex/AIR framework and the performance is absolutely dismal!

    The Flash VM is slow beyond belief when getting into large data-structures, event its native array parsing is incredibly slow.

    Object instantiation is slower than molasses. We were averaging about 7 seconds to instantiate about 500 fairly complex objects that in most any other language, compiled or interpreted would have easily been created in a thousandth of that time.

    The Flash VM's garbage collection is perfectly incapable of doing anything that involves long application run-times and leaks memory all over the place, even inside its native low-level components. It got to the point that even doing any proactive cleanup in our code was totally fruitless and I am sorry to add that a lot of the proactive steps we were taking have been left by the wayside because it is utterly hopeless to release all the memory you have taken back to the system.

    Loading an SWF inside another SWF and then disposing of it will not stop the loaded SWF's playback and it does not release it from memory. Instead of Adobe fixing this obvious bug they just added a different method in Flash 10 called "unload and stop" or something like that. This requires anyone who wants to fix this issue to go back and refactor their code!

    There are also numerous inconsistencies between applications that run in Flash and those that run in AIR, even though the code base is the same and the idea is that you do not have to change any obvious code to make it work in one platform or another.

    Even flashes most basic function, doing vector drawings and animations fails horribly under load. We have had to hack and jury-rig numerous fixes in to compensate for Flash's seemingly random graphical glitches.

    If Adobe wants to be taken seriously as a application platform developer, especially one that is used on the desktop they need to get their shit together because right now it feels like a childs toy or half-assed attempt to enter a new market.

    Unfortunately the project, the client, and the management have chosen this path for us and we are stuck with it so I really hope that Adobe gets it together because its been a royal pain doing this sort of work on their platform.

    1. Re:This is not where Adobes priorities should be! by Locke2005 · · Score: 3, Insightful

      This is why I'm actually pleased to see Microsoft pushing Silverlight; if nothing else, it forces Adobe to get off their ass and actually make the Flash 10 SDK available platforms other than Mac OS and Windows! I'm still waiting for Flash 8/Flash 9 content to work on my Wii and on my Android G1 phone, since almost all 'net video is using Flash now. (Looks like the Android Flash support will be there pretty soon. I still think Silverlight gave them a powerful incentive to get their act together on this.)

      --
      I've abandoned my search for truth; now I'm just looking for some useful delusions.
    2. Re:This is not where Adobes priorities should be! by Locke2005 · · Score: 5, Insightful
      I have been working on two large enterprise class applications using their Flex/AIR framework...

      I think I see your problem right there... there is nothing like using the right tools for the job, and this is nothing like using the right tools for the job. ;-)

      --
      I've abandoned my search for truth; now I'm just looking for some useful delusions.
    3. Re:This is not where Adobes priorities should be! by shadwstalkr · · Score: 2, Insightful

      Well, Flash is the only tool for the job when you need an application that runs the same in all (relevant) browsers on all (major) platforms with no installation by the end user. Flash solves a lot of problems, and Flex has a really nice UI toolkit. Flash 10 still hasn't fixed a lot of the performance issues, so the door is open for Unity or Silverlight, but I'm not holding my breath.

    4. Re:This is not where Adobes priorities should be! by NouberNou · · Score: 3, Insightful

      I completely agree... :( But we are stuck with it.

      Really though they are not that big. One is a graphing and reporting application, and another is a web interface for a CMS that we developed in house as a product.

      The first could have been done in Java, or a cross-platform C++ framework like Qt (though that would remove the selling point that it runs on the desktop and the browser), and the second could be done purely in JS, so there were alternatives, maybe more appropriate ones, but they were not taken.

    5. Re:This is not where Adobes priorities should be! by NouberNou · · Score: 5, Interesting

      Dude,

      Have you stopped to think that maybe your code has something to do with it?

      Yes, many times, and no I do not think my code is ever perfect, or even near perfect, but the proof is in the pudding, you can make very simple test cases and see very obvious drawbacks using just their code/UI components.

      One of the problems with working with Flex is that sometimes you have to do things that seem incredibly retarded to get things done. Look at the extensive use of the callLater method in a lot of the Flex SDK code. This method basically says "ok things aren't done, so do it later." Not only does this seem to just patch a problem with not correctly sequencing your methods to fire when they are able to, but it creates huge memory leaks and is horribly hard to debug as you rarely can see past the point of the callLater in the stack.

      This reminds me of another problem, in the fact that you can not catch run-time errors at the "root/base" level of the Flash/Flex/AIR application, and even better, if you do not have a debug version of Flash player (and forget it in AIR) then it just completely ignores the error and continues on as if nothing has happened. This then causes Flash to start chucking random errors and glitches that might get caught in your own try-catch blocks much, much later, and you will find that code that works perfectly under every imaginable situation is now glitching with really no known cause. Debugging can be quite the nightmare in Flash.

    6. Re:This is not where Adobes priorities should be! by gaspyy · · Score: 2, Interesting

      I will say the exact opposite. We made a large enterprise application for a UK health insurer. All interface and logic was flash (not even Flex) with custom-built components. It was a lot better than the alternatives (the initial plan was to use ASPX for the interface). It was nice and fast too (the bottlenecks were on the server). By my last count there were over 200K lines of AS code.

      I also made a chess game in AS3. It's not Deep Blue but after optimizations it's fast enough to have fun with (and strong enough to beat you if you're not careful).

      Some of the parent poster's comments are valid, but I could bitch and moan the same about PHP, Java or .NET.

    7. Re:This is not where Adobes priorities should be! by YAN3D · · Score: 2, Interesting

      We had a similar experience with Flex 2/3. Flash would hold onto objects through invisible references that were almost impossible to track down and release. We even went so far as setting all object properties for all objects to null before unloaded, and still nothing. It got so bad at one point that each user click increased memory usage by 10mb without ever returning it. This problem occurred both with our own custom code and with the base components provided by Adobe/Flex. This leads me to believe that it wasn't not our code that was the problem, but a fundamental problem with the Flash runtime. Oh yeah, objects instantiated through MXML are even harder to track down and release.

  10. I don't want to be off topic but... by tripmine · · Score: 2, Interesting

    Why is it that whenever someone says "I don't want to be off topic" something copletely off topic follows?

    Anyway, compiling C/C++ into the Actionscript VM might start (or reinvigorate) a trend of broader programing language support for VM's. The specific platform that came to mind was Android. One of the main complaints I've been hearing is that developers are contained by Android's own (some say retarded) implementation of Java. I think it would be awesome to see something like a C/C++ compiler for other VM platforms, making it easier for developers to port their applications to a wider range of devices.

  11. C/C++ Trojan Horse by devloop · · Score: 4, Funny

    "Compiler", is that the new spelling for "Automated Buffer Overflow Generator" ?.

    1. Re:C/C++ Trojan Horse by noppy · · Score: 5, Funny

      Compile once, exploit everywhere.

  12. why... by Vexorian · · Score: 2, Insightful
    Righty...

    Let's say... SDL gets a flash port, then you basically can turn your simple C++ game into a game that people can run in flash computers without downloading... At least it sounds interesting.

    --

    Copyright infringement is "piracy" in the same way DRM is "consumer rape"
  13. Re:A Cluster-Aware Distributed Java Virtual Machin by try_anything · · Score: 4, Funny

    http://www.google.com/url?sa=t&source=web&ct=res&cd=5&url=http%3A%2F%2Fcs.anu.edu.au%2F~Peter.Strazdins%2Fseminars%2FdJVM.pdf&ei=FK0kSafSAZSo0gScxs3FDw&usg=AFQjCNHrPDWFanLbyUu3kX-lEkzZrWR6bw&sig2=jcMo0CIWzGg_nZVLvDHpxA

    My first thought on reading this post was that the super-long Google url WAS the cluster-aware distributed virtual machine.

    So, how long until Google reveals its next project: Compile C++ to a Google URL, and visit the URL to see your program running?

  14. A good Javascript isn't all that slow by Morgaine · · Score: 4, Interesting

    Javascripts vary in quality, but the latest ones are pretty fast:  for example, Javascript V8 (the Javascript from Google's Chrome browser project) is nearly as fast as Lua, which is the fastest widely used scripting language at the moment.

    Here are some basic timings I made just to give a rough feel for the relative speeds (don't read too much into them).  The first entry provides the timings for C, which is obviously compiled, purely as a basis for comparison with the scripting languages.  Note that the times for C are in milliseconds, while the rest are in seconds, lower is better:

    Execution times for recursive F/P factorial(n) to /dev/null
    Langs @ 2008     Times:  n=1         n=170       difference

    C                      0.000 ms      0.090 ms      0.090 ms
    Lua                    0.001 s       0.005 s       0.004 s
    Parrot-opt/iterative   0.013 s       0.018 s       0.005 s
    Parrot/iterative       0.014 s       0.019 s       0.005 s
    V8-Javascript          0.007 s       0.013 s       0.006 s
    Ocaml                  0.022 s       0.029 s       0.007 s
    Python                 0.013 s       0.027 s       0.014 s
    Parrot-opt/recursive   0.013 s       0.029 s       0.016 s
    Mozilla-Javascript     0.001 s       0.018 s       0.017 s
    Perl                   0.002 s       0.021 s       0.019 s
    Nickle                 0.031 s       0.065 s       0.034 s
    Parrot/recursive       0.014 s       0.056 s       0.042 s
    Ruby                   0.041 s       0.095 s       0.054 s
    Lua_on_Parrot          0.303 s       1.314 s       1.011 s

    Although every scripting language is still at least some 50 times slower than compiled C, interpreters and language VMs in general have been improving steadily over recent years, and Javascript in particular is getting a lot of attention now, with more optimizations in the pipeline from all the major players.

    The gap will shrink, guaranteed.

    [Sorry about the Code posting mode, it's not very easy on the eyes ... but Slashdot no longer accepts the <pre> tag in HTML mode for displaying formatted output.]

    --
    "The question of whether machines can think is no more interesting than [] whether submarines can swim" - Dijkstra
    1. Re:A good Javascript isn't all that slow by david.given · · Score: 2, Interesting

      Javascripts vary in quality, but the latest ones are pretty fast: for example, Javascript V8 (the Javascript from Google's Chrome browser project) is nearly as fast as Lua, which is the fastest widely used scripting language at the moment.

      You might be interested in my project Clue, which is fairly similar to the Adobe project --- it compiles ANSI C into dynamic programming languages. The current released version does Lua, Javascript and Perl5; the version in SVN also does C and has a half-finished Common Lisp backend as well (code generator is done, but the contributor didn't include a libc).

      I'm seeing speeds of about 1/5 of native with LuaJIT. Javascript via V8 is a bit slower. Unaccelerated SpiderMonkey produces about 1/100, and Perl5 is appalling 1/500 of native. Unfortunately, most dynamic languages don't support GOTO, which given Clue's fairly naive code generation spoils performance. (The Javascript backend has to emit a big switch statement in a loop for every function to handle control flowing from one basic block to another.) The Lua back end does nasty bytecode patching tricks to make GOTO work, which I've had to take out of the SVN version because it was just too horrible. Eventually I need to implement some sort of basic block graph reforming system to try and reduce the number of GOTOs in the generated code, but it's a lot harder than it looks.

      However, unlike Adobe, all this is running on stock, unmodified VMs --- instead of implementing lots of specialised VM opcodes to make things like byte memory accesses work, I'm bending the ANSI C standard as far as it'll go to make it fit the dynamic world rather better. It's all standards-compliant, but the coding environment is odd: sizeof(char) == sizeof(int) == sizeof(double) == 1; sizeof(void*) == 2. So if nothing else, it'll make a decent testing environment.

      Any volunteers to do Parrot, Ruby, Python etc back ends? Better still, any compiler theory gurus who are interested in the basic block reforming code? Nah, thought not...

  15. a free ride when you've already paid by Anonymous Coward · · Score: 2, Funny

    In an ironic twist, I'm learning compiler theory from one of the professors who worked on it.

    Wow!!!! That's like rain on your wedding day! That's like like ten thousand spoons when all you need is a knife!!! That's like good advice that you just didn't take!!!

  16. Broken unicode input for years by randuev · · Score: 2, Interesting

    While I salute to new possibilities, Adobe Flash is still unusable for anyone who wants to allow Linux users to input anything other than english in their application. How about fixing http://bugs.adobe.com/jira/browse/FP-40 bug?

  17. Horse Meat babyfood by BHS_Turf · · Score: 2, Insightful

    In Italy, there is horse-meat (cavallo) babyfood. The first real culture-shock experience I had while grocery shopping.

  18. Now for hassle-free Java applets by mgiuca · · Score: 3, Funny

    Finally! Java applets are always so full of hassle to get running compared to Flash objects.

    Now I can compile the JVM to Flash and run my Java applets inside Flash - no more need to install those meddlesome Java plugins!

    1. Re:Now for hassle-free Java applets by drspliff · · Score: 2, Funny

      Are you sure you don't want to port Bochs first so you can run Java on Windows 98 in your Flash?

  19. Designflow -- Very Cool by smcdow · · Score: 4, Interesting

    More details here: http://www.llvm.org/devmtg/2008-08/ (Look for the topic - Flash C Compiler: Compiling C code to the Adobe Flash Virtual Machine)

    While scrolling down looking for the Adobe talk, I found this:

    Designflow: using LLVM to compile to Hardware - This project uses LLVM to compile code to a mixed hardware and software implementation. This detects pieces of programs that may be efficiently compiled to VHDL and synthesized them onto an FPGA. The rest of the program is compiled to PowerPC code and uses to drive the FPGA. The system automatically handles data migration and other handshaking between the two systems.

    Waaaayyyy more interesting than LLVM for flash. This is cool!!!

    --
    In the course of every project, it will become necessary to shoot the scientists and begin production.