×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Adobe Releases C/C++ To Flash Compiler

samzenpus posted more than 5 years ago | from the transmutations dept.

Software 216

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

cancel ×
This is a preview of your comment

No Comment Title Entered

Anonymous Coward 1 minute ago

No Comment Entered

216 comments

And yet... (-1, Troll)

Anonymous Coward | more than 5 years ago | (#25826235)

Java still sucks.

Still no contact info, so I'll post here... (5, Interesting)

TheRaven64 (641858) | more than 5 years ago | (#25826287)

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.

Re:Still no contact info, so I'll post here... (5, Funny)

moderatorrater (1095745) | more than 5 years ago | (#25826449)

And I'd like a pony.

Re:Still no contact info, so I'll post here... (5, Funny)

davester666 (731373) | more than 5 years ago | (#25826675)

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?

Re:Still no contact info, so I'll post here... (3, Funny)

Anonymous Coward | more than 5 years ago | (#25826717)

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.

Re:Still no contact info, so I'll post here... (4, Funny)

Anonymous Coward | more than 5 years ago | (#25827371)

Don't put a gift horse in the mouth.

Fixed for ya.

Still some Fruitean slippage that needs mopping (0)

Anonymous Coward | more than 5 years ago | (#25828665)

Don't fuck a gifted horse in the mouth.

Fixed that for ya.

Now with that fiexed, there shouldn't be anymore delay in the article on Flashing a C/C++ coder while he's in PE class. On with the Donkey Show.

Re:Still no contact info, so I'll post here... (0, Redundant)

Culture20 (968837) | more than 5 years ago | (#25827751)

Does Pony meat taste that good?

Don't look a gift horse in the mouth.

You've never had a horse tongue sandwich, I see.

Re:Still no contact info, so I'll post here... (1, Funny)

yorkshiredale (1148021) | more than 5 years ago | (#25828139)

Don't look a gift horse in the mouth.

Shouldn't that be ... Don't put a gift horse in the mouth

Oh wait, that sounds even worse. Nevermind.

Re:Still no contact info, so I'll post here... (1, Interesting)

Anonymous Coward | more than 5 years ago | (#25826721)

Actually yes. It's pretty yummy.

Re:Still no contact info, so I'll post here... (2, Insightful)

luder (923306) | more than 5 years ago | (#25826739)

Well... There's always porn.

Re:Still no contact info, so I'll post here... (4, Funny)

fishbowl (7759) | more than 5 years ago | (#25826947)

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

Re:Still no contact info, so I'll post here... (4, Interesting)

garett_spencley (193892) | more than 5 years ago | (#25827017)

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

Re:Still no contact info, so I'll post here... (4, Informative)

dunkelfalke (91624) | more than 5 years ago | (#25827247)

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.

Re:Still no contact info, so I'll post here... (2, Informative)

rubycodez (864176) | more than 5 years ago | (#25827031)

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

Re:Still no contact info, so I'll post here... (4, Funny)

k33l0r (808028) | more than 5 years ago | (#25828971)

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.

Re:Still no contact info, so I'll post here... (3, Funny)

GaryOlson (737642) | more than 5 years ago | (#25827359)

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

Re:Still no contact info, so I'll post here... (1)

jd (1658) | more than 5 years ago | (#25827897)

But... but... what if they're pink?

Re:Still no contact info, so I'll post here... (1)

larry bagina (561269) | more than 5 years ago | (#25826849)

cappucino / objective j could probably be ported. The objective c model differs from javascript in some ways. You can send a message to null for example.

Re:Still no contact info, so I'll post here... (3, Informative)

Anonymous Coward | more than 5 years ago | (#25826879)

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

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

Re:Still no contact info, so I'll post here... (1)

ushering05401 (1086795) | more than 5 years ago | (#25827201)

Sounds like you know more about this tech than I do by a good sight, so tell me this...

Is this another entry in the framework theory of everything arms race we have going, or just a logical development based on developer feedback?

C/C++ Trojan Horse (4, Funny)

devloop (983641) | more than 5 years ago | (#25827275)

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

Re:Still no contact info, so I'll post here... (3, Informative)

mad.frog (525085) | more than 5 years ago | (#25827769)

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.

Oh oh Adobe... (3, Interesting)

emailandthings (844006) | more than 5 years ago | (#25826297)

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

NES emulator? (2, Interesting)

Mr. Sketch (111112) | more than 5 years ago | (#25826327)

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.

It has been said (5, Interesting)

frictionless man (1140157) | more than 5 years ago | (#25826375)

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

Re:It has been said (3, Insightful)

m50d (797211) | more than 5 years ago | (#25826611)

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.

Re:It has been said (2, Insightful)

Anonymous Coward | more than 5 years ago | (#25827163)

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.

Re:It has been said (1)

AdmiralXyz (1378985) | more than 5 years ago | (#25827621)

No, the reason Apple won't allow Flash on the iPhone is because it's garish, obnoxious, a battery-life-draining resource hog, and, the typical complaints from the Internet's battery of Apple-haters nonwithstanding, almost completely useless. Maybe if this compiler changes that fact Apple will reconsider their stance.

Re:It has been said (4, Insightful)

StreetStealth (980200) | more than 5 years ago | (#25827843)

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.

Re:It has been said (3, Interesting)

jcr (53032) | more than 5 years ago | (#25828217)

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

Virtualize Everything (5, Funny)

Anonymous Coward | more than 5 years ago | (#25826385)

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.

Re:Virtualize Everything (2, Insightful)

cstdenis (1118589) | more than 5 years ago | (#25826459)

> java Virtual Machine written in java.

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

Re:Virtualize Everything (4, Informative)

Halo1 (136547) | more than 5 years ago | (#25826599)

Re:Virtualize Everything (2, Informative)

Urza9814 (883915) | more than 5 years ago | (#25826737)

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/ [sourceforge.net]

Re:Virtualize Everything (4, Insightful)

Halo1 (136547) | more than 5 years ago | (#25826869)

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

Re:Virtualize Everything (1)

Urza9814 (883915) | more than 5 years ago | (#25826987)

But wouldn't the Java JVM have to run on a JVM? Thus introducing yet another layer of inefficiency?

Re:Virtualize Everything (1)

Halo1 (136547) | more than 5 years ago | (#25827115)

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

Re:Virtualize Everything (5, Funny)

MichaelSmith (789609) | more than 5 years ago | (#25827747)

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.

Re:Virtualize Everything (1)

Chandon Seldon (43083) | more than 5 years ago | (#25828779)

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

Computer science is based on the idea of machines that can simulate themselves, and actual computers end up working like that pretty frequently.

Re:Virtualize Everything (1, Interesting)

Anonymous Coward | more than 5 years ago | (#25826985)

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

A Cluster-Aware Distributed Java Virtual Machine (0)

Anonymous Coward | more than 5 years ago | (#25826603)

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

Re:A Cluster-Aware Distributed Java Virtual Machin (4, Funny)

try_anything (880404) | more than 5 years ago | (#25828473)

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?

Re:Virtualize Everything (1)

Urza9814 (883915) | more than 5 years ago | (#25826711)

My god! I thought you were _kidding_ when you mentioned the Java Virtual Machine written in Java. But the damned thing _exists_! What has this world come to???

Re:Virtualize Everything (2, Insightful)

pohl (872) | more than 5 years ago | (#25827267)

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.

Re:Virtualize Everything (1)

Urza9814 (883915) | more than 5 years ago | (#25827389)

Well, of course, but isn't it a bit different with Java? I mean, most programming languages aren't virtualized.

I'm a computer science major by the way. Freshman though, so I guess I have some to learn still. ;)

Re:Virtualize Everything (3, Interesting)

pohl (872) | more than 5 years ago | (#25827543)

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!

Re:Virtualize Everything (0)

Anonymous Coward | more than 5 years ago | (#25828939)

competitive with the performance of the CPython interpreter.

You know what they say about coming first in the special Olympics...

Re:Virtualize Everything (-1, Flamebait)

Anonymous Coward | more than 5 years ago | (#25827731)

Programming languages are compiled. Java compilers usually emit java byte code whereas C++ compilers usually emit x86 code. It's not a rule, though, for instance dotNet has compilers for C++ and Java that emit IL.

There are languages that are interpreted, like BASIC, but we usually refer to these as scripting languages and not programming languages. And the people who use them, script monkeys.

There's a good chance that your CS professors will fuck this all up and refer to Java the language as a virtualized language instead of Java the platform which consists of a virtual machine and a compiler that turns Java code into byte code. They will probably also refer to HTML as a "type of" programming language. Good luck with your CS education. Look out for yourself!

Re:Virtualize Everything (0)

Anonymous Coward | more than 5 years ago | (#25828081)

They will probably also refer to HTML as a "type of" programming language.

The web developer in me just screamed in horror and outrage.

Re:Virtualize Everything (1)

elashish14 (1302231) | more than 5 years ago | (#25827565)

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.

They got real jobs.

Re:Virtualize Everything (0)

Anonymous Coward | more than 5 years ago | (#25828025)

I thought they died off due to their inability to breed with the opposite sex of their species...

Re:Virtualize Everything (1)

abigor (540274) | more than 5 years ago | (#25827855)

Speaking of, where did the computer-science demographic on slashdot make off to?

I don't know. I wish I did, because I would go there too.

Or maybe they are still around, and it's just that the number of know-nothing posters has increased so hugely.

Re:Virtualize Everything (4, Insightful)

fm6 (162816) | more than 5 years ago | (#25827095)

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.

Not to mention a lot cleaner.. (1)

spiffmastercow (1001386) | more than 5 years ago | (#25827191)

C produces very small executables, whether they be native executables or targeted to a VM

Re:Not to mention a lot cleaner.. (1)

fm6 (162816) | more than 5 years ago | (#25827617)

Hmm, have you ever played Momentum Missile Mayhem? Good game, though you can't really play it inside a browser (too sluggish.) The thing is about 7 MB, which is tiny for a PC game, but pretty big for a Flash game. One wonder if it wouldn't benefit from a little re-coding in C.

fai7zors (-1, Offtopic)

Anonymous Coward | more than 5 years ago | (#25826473)

Join GNAA (GAY many of us are Join GNAA (GAY my resignation Ach1eve any of the We'll be able to Need your help!

Quake. Quake for fucks sake! (1)

duckInferno (1275100) | more than 5 years ago | (#25826557)

I'd love to see what this will lead to. Flash games are all good but when you see freakin' QUAKE running in your browser window, all the possibilities suddenly hit home.

Re:Quake. Quake for fucks sake! (3, Interesting)

i.of.the.storm (907783) | more than 5 years ago | (#25826697)

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

Re:Quake. Quake for fucks sake! (2, Insightful)

strattonbrazil (815528) | more than 5 years ago | (#25826701)

I'd love to see what this will lead to. Flash games are all good but when you see freakin' QUAKE running in your browser window, all the possibilities suddenly hit home.

JOGL has allowed hardware-accelerated 3D in your browser for years. Jake2 is the port of Quake2--arguably much more intensive than Quake--and that already runs in an applet. The technology has been there, but no one is using it.

Re:Quake. Quake for fucks sake! (0)

Anonymous Coward | more than 5 years ago | (#25826743)

Calm down!
Quake ran on old Pentum I's without any hardware-accelerated graphics.
So it's not really that surprising...

Increased performance (4, Interesting)

shird (566377) | more than 5 years ago | (#25826749)

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.

Re:Increased performance (5, Interesting)

drspliff (652992) | more than 5 years ago | (#25826977)

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.

Re:Increased performance (1)

SnT2k (842980) | more than 5 years ago | (#25827427)

AS3 is compiled using the AS3 compiler while C/C++ is compiled using llvm-gcc which does more aggressive optimizations. Moreover, data twiddling over arrays is faster. You may want to check the link posted by the person above you for more information.

This is not where Adobes priorities should be! (5, Interesting)

NouberNou (1105915) | more than 5 years ago | (#25826789)

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.

Re:This is not where Adobes priorities should be! (3, Insightful)

Locke2005 (849178) | more than 5 years ago | (#25826923)

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

Re:This is not where Adobes priorities should be! (5, Insightful)

Locke2005 (849178) | more than 5 years ago | (#25827105)

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

Re:This is not where Adobes priorities should be! (2, Insightful)

shadwstalkr (111149) | more than 5 years ago | (#25827285)

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.

Re:This is not where Adobes priorities should be! (1)

Shaterri (253660) | more than 5 years ago | (#25828249)

What are your relevant browsers (and platforms), and what is Flash giving you that couldn't be achieved with (a) good CSS and DOM scripting code talking to a back-end server, or in a worst-case scenario, (b) Java running on the user's system? Yes, the latter requires a user install, but so does Flash itself -- neither Firefox nor IE comes with it pre-installed...

Re:This is not where Adobes priorities should be! (0)

Anonymous Coward | more than 5 years ago | (#25828387)

Flash can give a much better presentation than even very good CSS/DOM manipulation from what I've seen (as in overall display, vector graphics, interaction integration, etc.), and to try to make something as visually intensive as a Flash app geared toward presentation translate to a CSS/DOM crossplatform implementation would be a total nightmare at least, and probably a miserable failure no matter what. Java isn't all that cross-platform friendly, or cross-version friendly, either, but it would still certainly be a better option than trying to squeeze the functionality out of browser scripting / presentation.

Re:This is not where Adobes priorities should be! (3, Insightful)

NouberNou (1105915) | more than 5 years ago | (#25827303)

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.

Re:This is not where Adobes priorities should be! (1)

Hal_Porter (817932) | more than 5 years ago | (#25828305)

Most projects work like this (from a senior managers perspective)

1) Play golf with the sales reps of various companies, have dinner bought for you.
2) Select a technology. Pass Go and collect kick backs from the winning sales rep.
3) Tell the software guys what technology they will be using. Deal with the resulting resignations from people who claim that the project is impossible to implement using your chosen technology. Allow experienced sw people who are really unhappy to work on private projects of their own and only provide advice (max 10% of their time) in return for staying on board. Select $New_Employees to do the work.
4) The project will fail.
5) Play golf with the sales reps of various consultancy companies and have dinner bought for you. Select one. Ka ching! Another kickback.
6) Hire consultants to hack the job in the remaining few days before Bad Things happen with the totally inappropriate technology from 2) Since nothing of value was produced in 4), mostly from scratch.
7) The experienced software guys complain that the consultants didn't follow the working methods of the project and are creating more maintainance work in future and, sensing political danger, the consultants leave for a new project.

Of course from a consultant point of view, having experience of 6) is actually quite good. The sales reps in 1) can use the project as a success story. You got free lunch, played a lot of golf, and got a load of cash under the table from various parasites. $New_Employee was only tortured for a while and didn't actually have to produce anything and (after talking to the old timers) makes sure that he is given time to work on private projects in future. He takes over the 'advice only' role rather than work full time on hacks like this. The experienced software guys now have 100% time to work on their private projects. They move into management and start playing golf with various sales reps.

Everyone wins.

Re:This is not where Adobes priorities should be! (1)

NouberNou (1105915) | more than 5 years ago | (#25828345)

I wish there was that much bureaucracy to blame for this situation... :(

The previous version of this application had been done in Flash (6 mind you) and worked well.

With this release though it got a bit too big for its britches, and more than likely this could have been seen from the start, but it wasn't and now we are paying for it. In the end its probably not as bad as it sounds and I have been moved off to work on other projects at the firm, but still it is annoying from a name and quality standpoint.

Re:This is not where Adobes priorities should be! (0)

Anonymous Coward | more than 5 years ago | (#25828623)

If the application existed in Flash 6 and you can't make it work better in Flash 10 the fault is yours as a developer. ActionScript 1 was a joke.

Re:This is not where Adobes priorities should be! (0)

Anonymous Coward | more than 5 years ago | (#25827403)

This is not where Adobes priorities should be!

They're already working on Tamarin [mozilla.org] which is used by Firefox 3.1 and the Adobe ActionScript VM in Flash, QUOTE:

The goal of the "Tamarin" project is to implement a high-performance, open source implementation of the ECMAScript 4th edition (ES4) language specification. The Tamarin virtual machine will be used by Mozilla within SpiderMonkey, the core JavaScript engine embedded in Firefox®, and other products based on Mozilla technology. The code will continue to be used by Adobe as part of the ActionScript(TM) Virtual Machine within Adobe® Flash® Player.

This means it's fast. All those nice things you read about Firefox 3.1's javascript being an optimising and tracing compiler and blah blah blah will soon also apply to Adobe Flash.

Re:This is not where Adobes priorities should be! (0)

Anonymous Coward | more than 5 years ago | (#25827501)

There is a lot of incredibly awesome flash games / tech demo with physics / 3D, etc. Sure you cannot recreate Half-Life 2 but you can recreate just about any applications. I am a Flash Developer since a lots of years, your problem is just that you are new to this platform and don't know how to optimize it and get all the juice...

Re:This is not where Adobes priorities should be! (1)

NouberNou (1105915) | more than 5 years ago | (#25827901)

The point is you shouldn't have to, at least not to the extent that we have had to to get the performance that we need.

For example we have used bitmap caching, implemented by us because Flash's seems to be unstable and random at best, over vectored Flash components. This has led to issues in that we have to now manage all the refreshing of cached images for nodes on this graph any time the data changes among other things.

I am not alone in my complaints, there are quite a few comments in major Flex blogs about its shortcomings.

And I would like to remind that its mainly Flex that has these issues. This project could have been done in entirely in pure AS3 with out the Flex overhead, but it would have taken twice as long probably. We also have written a number of major components not using any part of the Flex framework and they are much much faster just using raw sprites and DisplayObjects.

My major gripe is that Adobe is trying to pass off AIR and Flex as a mature development platform and it is clearly not.

Re:This is not where Adobes priorities should be! (0)

Anonymous Coward | more than 5 years ago | (#25827581)

Dude,

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

Re:This is not where Adobes priorities should be! (5, Interesting)

NouberNou (1105915) | more than 5 years ago | (#25827849)

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.

I don't want to be off topic but... (2, Interesting)

tripmine (1160123) | more than 5 years ago | (#25826911)

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.

Re:I don't want to be off topic but... (1)

Locke2005 (849178) | more than 5 years ago | (#25827041)

Porting the compiler is only part of the problem; you also have to port the run-time environment, which is even more work. I think the reason everybody thinks Android's Java sucks is that it is not compatible with J2EE, so Java apps written for other platforms may need to be rewritten for the new libraries. While I think being able to compile any language down to bytecode is great for portability, I still don't understand why we need so many different Virtual Machine implementations. JVM, Flash, Parrot VM... can't we just choose one decent VM and work on perfecting that? And I'm still waiting for a CPU with microcode that can directly execute some VM's bytecode, although compared to compile-on-demand it's probably not that much of a performance win.

Re:I don't want to be off topic but... (1)

fuzzyfuzzyfungus (1223518) | more than 5 years ago | (#25827255)

You can get dedicated CPUs for Java. They aren't exactly taking the desktop by storm; but there are some creeping in at the low end for things like hardware acceleration of cellphone apps, and at the high end for Big Serious Enterprise Java. I assume the performance is good enough to make it worthwhile in power constrained or very high load situations; but I'm guessing JVM on x86 isn't threatened anytime soon.

http://en.wikipedia.org/wiki/Java_processor [wikipedia.org]

computationally intensive stuff in flash (0)

Anonymous Coward | more than 5 years ago | (#25826921)

If I wanted to punch myself in the balls, I don't need Adobe's help.

Finally appropriate.. (0)

Anonymous Coward | more than 5 years ago | (#25827177)

Yes, but does it run Linux?

why... (2, Insightful)

Vexorian (959249) | more than 5 years ago | (#25827383)

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.

Unlikely... (0, Troll)

hungrigerhaifisch (938532) | more than 5 years ago | (#25827419)

I really hope that Adobe gets it together

Fat chance to that happening.
They should just throw their code out to the hounds, but I guess they're scared and embarrassed to even consider taking up a 'proper' development model...

Meh (0)

Anonymous Coward | more than 5 years ago | (#25828527)

ActionScript, aka Javascript VM's are never going to be that fast. The problem is within the language itself and can not be fixed. It can be made slightly faster but it will never be as fast as well designed scripting languages and their VM's (eg. Lua). Compiling from C/C++ makes no difference when you're executing on a VM designed for Javascript shit.

Don't get me wrong, in theory Javascript is kinda cool but there are so many hacked in, tacked on and just plain weird "additions" to the language that the specification reads like some sort of government lawyer-speak contract. It's too convoluted to ever result in a fast VM.

A good Javascript isn't all that slow (4, Interesting)

Morgaine (4316) | more than 5 years ago | (#25828757)

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.]
Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account

Loading...