[ANN] RubyJS 0.6 - pre-RubyConf version

M

Michael Neumann

Hi all,

After 9 months, the second incarnation of RubyJS is out (a complete rewrite).
RubyJS compiles Ruby to Javascript and tries to be as efficient as possible
without sacrifying Ruby's beauty.

This is a pre-release. I hope I can import some local code that lies here around
till RubyConf.

A small example:

# hw.rb
require 'rwt/DOM'

class HelloWorld
def self.main
out = DOM.getElementById('out')
DOM.setInnerText(out, 'hello world')
end
end

<!-- index.html -->
<html>
<body>
<script src="hw.js"></script>
<a href="#" onclick="main()">say hello</a>
<div id="out"/>
</body>
</html>


Compile it:

rubyjs_gen --main HelloWorld hw.rb > hw.js

And start index.html inside your browser.
Oh, and don't forget the optimization flags:

rubyjs_gen --show-options


What works?
===========

* Most if not all Ruby constructs!
* Accessing/modifying DOM in your browser
* JSON

What is missing?
================

* The port of Google Web Toolkit is not yet completed.
* Applications ;-)
* A lot of methods in the core library

DOWNLOAD
=========

It's available from:

http://ntecs.de/hg-projects/rubyjs/

Best use Mercurial (www.selenic.com/mercurial) to check it out:

hg clone static-http://ntecs.de/hg-projects/rubyjs/


Have fun and see you at RubyConf!

Regards,

Michael
 
J

James Britt

Michael said:

Very cool!
Best use Mercurial (www.selenic.com/mercurial) to check it out:

hg clone static-http://ntecs.de/hg-projects/rubyjs/

Ah, Yet Another Mercurial User.
Have fun and see you at RubyConf!

Looking forward to it.



--
James Britt

www.ruby-doc.org - Ruby Help & Documentation
www.risingtidesoftware.com - Wicked Cool Coding
www.rubystuff.com - The Ruby Store for Ruby Stuff
www.jamesbritt.com - Playing with Better Toys
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top