From: Sean Russell Date: 2001-05-17T01:45:54+09:00 Subject: [ruby-talk:15300] Re: Ruby in Java -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Je Merkredo 16 Majo 2001 09:24, vi skribis: > I am thinking of something much along the lines of Jython, but perhaps > a bit cleaner. Jython actually embeds the Python interpreter in Java I'm not familiar with Jython, but providing a BSF compatible interpreter would have certain benefits; primarily, that many existing applications could automatically plug the Ruby interpreter into themselves. > 1) a Ruby interpreter, and all supporting libraries, ported to Java > 2) A Ruby-Java "translator" that makes use of the above libraries and > interfaces seamlessly with Java. Is (2) a Ruby-to-Java translator? And, by (1), I'm assuming you mean that you could do all of the following: 1) String result = ruby.Ruby.eval( " %w{a b c d e f}.find{|n| n == 'c'} " ); // => "c" 2) $ java -cp ruby.jar irb.rb irb(main):001:0> p "Hello World" "Hello World" nil irb(main):002:0> 3) String result = (new ruby.Regex("/(.)(.)(.)/")).match("abc")[2]; System.out.println( result ); // => "b" I'm sure the last would be useful, although you'd lose most of the Ruby good stuff. === SER Deutsch|Esperanto|Francaise|Linux|Java|Aikido|Dirigibles|GPG === http://www.germane-software.com/~ser jabber.com:ser ICQ:83578737 I'll never forget the first time I ran Windows, but I'm trying... -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.2 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7Aq65P0KxygnleI8RAkgMAJ0bRBnEt9/AQheRkoeKHrlc9zOsegCdHEZ4 7VHbSF/YK87tisjCayE2CQo= =9QvM -----END PGP SIGNATURE-----