Hi I was looking into Ruby to actionscript 3 bytecode compilers and found a mention of a project called Red Sun but can find very little information on it.
So my Question is ... what tools are available to convert Ruby source into AS3 bytecode
Hi I was looking into Ruby to actionscript 3 bytecode compilers and found a mention of a project called Red Sun but can find very little information on it.
So my Question is ... what tools are available to convert Ruby source into AS3 bytecode
I don't know of any Ruby->AS3 converters but in the future, Iron Monkey may make it possible to run Ruby on Tamarin (AS3 virtual machine).
As an aside, I'm pretty sure there are things you can do in Ruby that you can't do in AS3, so any converter would probably only be able to convert a subset of Ruby code.
I am the lead developer on the Red Sun project. There is very little information because it is really not ready to be used yet. I worked on the original prototype and presented it to a handful of people at 360|Flex San Jose. This generated further interest and encouraged me to propose it for RubyConf, for which an introductory talk on Red Sun was accepted.
Since then, I have had the time to flesh out the framework and really see what was possible. I'll be outlining all of this publicly soon, but I decided to diverge from the idea of generating ActionScript 3 bytecode becuase of the limitations of it. Ruby and ActionScript are somewhat similar, but Ruby has some significant differences in its method dispatch semantics that require any implementation in ActionScript to use a custom method lookup solution. It could perhaps be done in JavaScript, however ActionScript 3 does not allow re-assigning the prototype field to point at a different object, and Ruby relies on modifying the inheritance hierarchy at runtime.
The presentation at RubyConf will be on Saturday, Nov 8th. You can track Red Sun's development on http://github.com here http://github.com/jonathanbranam/redsun and I will be posting information on my website at http://jonathanbranam.net. I am planning to launch a site just for information about Red Sun, but that is not completed yet to share a link.
Red Sun does not include a Ruby parser or compiler, so it relies on Ruby 1.9 bytecode being generated by a true Ruby 1.9 implementation. It is currently based on 1.9.0-4 and may need changes if there is deviation from this version. As far as capabilities, as of right now (10/27/2008) it supports basic method dispatch, classes and modules. That's really about it. The standard library has not been ported and I hope to depend on Rubinius for a good portion of this.