object.toJavascript?

Z

zimba

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello ruby-talk,

I have already looked in different corners of the Internet and found a
javascript.toRuby converter [1].
why said both language are pretty similar [2].

So.. do you perhaps know if there is a ruby to javascript converter
out there ?

If you want to know why I need this, well... I'm doing a lot of stuff
that's duplicated under ruby and javascript. DRY, you know.. :p
JSON is nice for that, but it isn't enough since I also need to
replicate methods.

Cheers,
zimba



[1] http://www.rubyist.net/~tamura/ruby/ruby-js/
[2]
http://redhanded.hobix.com/inspect/theJavascriptRubyConnectionSlims.html





-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDRCIcBPd9MK2EeAsRAuWOAJ4lAEbCgaHwtAdy+/Eb82+TjCPFOACg1Gln
MWA7XccYin3nP79oZpMop88=
=M1ZP
-----END PGP SIGNATURE-----
 
G

Gavin Kistner

Something like this could be really useful. You'd need to have at
least some
parse-tree representation of the Ruby code.
http://rubyforge.org/projects/parsetree/

Smells like a not-small project, depending on how much Ruby you want
to include. Modules and mixins? You won't be able to use existing JS
objects with .prototype chains in a simple 1-1 relationship for your
runtime ruby instances, but instead parse ruby code and manually
traverse arrays of hierarchies.
 

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
474,184
Messages
2,570,973
Members
47,527
Latest member
RoxanneTos

Latest Threads

Top