[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] RubyJS 0.6 - pre-RubyConf version

Michael Neumann

10/29/2007 4:05:00 PM

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

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

hg clone static-http://ntecs.de/hg-projec...


Have fun and see you at RubyConf!

Regards,

Michael

1 Answer

James Britt

10/29/2007 5:19:00 PM

0

Michael Neumann wrote:

> It's available from:
>
> http://ntecs.de/hg-projec...

Very cool!
>
> Best use Mercurial (www.selenic.com/mercurial) to check it out:
>
> hg clone static-http://ntecs.de/hg-projec...
>

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