f



Re: Ruby to java or java to ruby converter

Vinod Kone wrote:

> hi,
> 
> am a newbie to ruby and was wondering whether there is any ruby2java or
> java2ruby converter? we are planning to compare both the languages based
> on some benchmarks..so thought a converter would come in handy. any
> suggestions?

I have implemented a rudimentary Ruby to Javascript converter. So I don't 
think it should be much harder to do the same with Java. Of course as Java is 
static typed, one would need to pass Objects everywhere and do runtime 
type-casting all the time, unless one implements some kind of type inference 
for Ruby (which I think is possible and usable is some situations). So in the 
end, I don't think it would be much faster than Ruby, maybe even slower. 
Well, it would probably be faster than JRuby but much less flexible (as I'm 
talking only about a subset of Ruby, without the whole dynamism Ruby provides 
you with).

Regards,

  Michael

0
mneumann (589)
1/22/2007 2:56:35 PM
comp.lang.ruby 48886 articles. 0 followers. Post Follow

0 Replies
618 Views

Similar Articles

[PageSpeed] 4

Reply:

Similar Artilces:

Ruby to java or java to ruby converter
hi, am a newbie to ruby and was wondering whether there is any ruby2java or java2ruby converter? we are planning to compare both the languages based on some benchmarks..so thought a converter would come in handy. any suggestions? thanx, vinod -- Posted via http://www.ruby-forum.com/. From: "Vinod Kone" <vinodkone@yahoo.com> > > am a newbie to ruby and was wondering whether there is any ruby2java or > java2ruby converter? we are planning to compare both the languages based > on some benchmarks..so thought a converter would come in handy. any > suggestions? ...

Ruby before Ruby ???
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi there. I was searching some stuff about Ruby and found this: http://www.cooper.com/alan/father_of_vb.html There was a Ruby before "our" Ruby, and it's known as Visual Basic today!= Jesus! Something that worried me was these words: "Because Microsoft owned exclusive rights to Ruby, they could do with it = as they pleased." Argh! Is the actual "Ruby" name ok, regarding the mark stuff? Some more links about that: http://www.forestmoon.com/BIRTHofVB/BIRTHofVB.html http://www.webword.com/interviews/cooper.ht...

I saw the beauty of Ruby Re: 1. Ruby result: 101 seconds , 2. Java result:9.8 seconds, 3. Perl result:62 seconds
--0-173157539-1119746706=:72153 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Thank you for everyone who replied my first post with my first Ruby program here directly or indirectly. It is really a great community, a lot of fun. I did not expect I could learn so much. Here are some of I learned from everyone: 1) everything is object,so all are method calls (to_i, to_f, each, ...) . 2)open class even for Integer, String... ,.3) method chain , 4) .yield and code block and more. And especially I have to thank the following people: Florian Frank : not , enum, .f...

the power of Ruby and #ruby-lang
Two days ago, I mentioned I'd like to be able to read .dbf files. Yesterday, I mentioned it again. One of the replies I got was essentially "it's easier than you think, just build it. here's a link to the specs. I've written an xBase interface before, and I'll help you if you get stuck." That said, I looked. 24 hrs later, I now have a tool that will open and read .dbf files - including memos. It can't write them yet, but I've spec'd that out, and have the basics done (and tested). When I started this, I knew nothing about the xBase file specs, ...

Tk Ruby / Fx Ruby / Wx Ruby
I have looked at these three GUI's for Ruby, and would like to know which the community feels is the better of these three (or is there a better one that I haven't listed). I am building small applications with UI's that are not too complicated, and wrapping the apps into exe files with rubyscript2exe. I like the smaller size of the final product when using Tk, but the native look of Fx and Wx. What has been your experience with GUI toolkits for Ruby? Jayson Jayson Williams wrote: > I have looked at these three GUI's for Ruby, and would like to know > which the communi...

What is better Java with Python or Java with Ruby ?
Hi every one I'm tying to use out script in java code. and I want to be OS Independent sometime function which is java can not provide it like e.x. ICMP So I was wondering if any one can help me with this what is better ? Java with Python or Java with Ruby Best Salim On 10/27/2011 8:34 AM, sahm wrote: > Hi every one > > I'm tying to use out script in java code. and I want to be OS > Independent I'd try to not use either one, actually. Installing a second runtime package doesn't sound like something an end user would want to do. Plus ICMP is an often- and easily-abused protocol. I'd stay the heck away from it. Off the top of my head, I think both provide about the same level of OS independence. If you must choose, pick either and then just use it. On 27.10.2011 17:34, sahm wrote: > I'm tying to use out script in java code. and I want to be OS > Independent > sometime function which is java can not provide it like e.x. ICMP I would assume that you cannot use this from Python or Ruby either if the JVM does not support it. And if the JVM supports it why would the Java standard library lack support? > So I was wondering if any one can help me with this > what is better ? > Java with Python > or Java with Ruby I haved successfully used JRuby to script Java code and would recommend it any time. I can't speak for Python. Kind regards robert -- remember.guy do |as, often| as.you_can - without e...

Ruby within Ruby
The following is a description of my situation. You may not need to read it, in which case, just skip to the part where it says "Enough of that," but you probably will need to read this. I am trying to make an online text based "hacking" game. Like, the kind where you infiltrate other people's computers and destroy their stuff. Basically, the game will be like a mud, but P2P, since I don't have/want to maintain a server for that kind of stuff. The game engine will be stored locally on the players computer. During distribution, I will use Ruby2Exe or similar ...

bad for Ruby in RUBY
...in the topic today Ruby in Ruby....talk about a hacking game using Ruby.... ****DANGER***** while a laud the game engine effort...BUT...to us business types trying to integrate this beautiful language swimming against NIH (not invented Here Syndrome) and MANY other prejudices....ANYthing the smells of Hack-idom will end any crusade for this language... and i refer also to the movie Mattew Broaderik's WAR GAMES.... -- Posted via http://www.ruby-forum.com/. Dave Rose wrote: > prejudices....ANYthing the smells of Hack-idom will end any crusade for > this language... and i ...

ruby-talk-ctl@ruby-lang.org
unsubscribe =2D-=20 I=C3=B1aki Baz Castillo <ibc@aliax.net> RTFM! Iñaki Baz Castillo wrote: > unsubscribe I think it was just a copy and paste error, nothing to shout about... Regards Florian Am 19.11.2009 um 16:18 schrieb Marc Dominik Migge: > RTFM! > > I=F1aki Baz Castillo wrote: >> unsubscribe > > ...

Using ruby-openid/ruby-yadis w/o ruby gems
Dear devs, I am trying to use the ruby-openid/ruby-yadis gems without ruby gems, ie I just copied the lib files in a local lib directory (and placed this in the LOAD_PATH). When running the application I get the following error: /usr/local/lib/site_ruby/1.8/rubygems/specification.rb:188:in `remove_method': method `description=' not defined in Gem::Specification (NameError) from /usr/local/lib/site_ruby/1.8/rubygems/specification.rb: 188:in `overwrite_accessor' from /usr/local/lib/site_ruby/1.8/rubygems/specification.rb: 331 from /usr/local/lib/site_ruby/1....

Java to Forth converter? ( was Re: Java to Forth converter? )
Is possible, to my understanding, IBM, SUN, Microsoft should be very happy to help with the assimilation, not. Java byte code is the key. many simularities, however, because no registers are used, --> the good, clean functional programming, clean return stack usage enforced thru Java bytecode compilers --> the bad, mapping functions, array iteration is slow, DSP work non competative, several 'weird' java byte code instructions to 'make up for' lack of direct register/optimize substituting only a parameter stack, First one to build a Java to Forth converter owns IBM....

Fw: [ruby-core:23371] Re: Ruby/DL Documentation
I think this thread makes more sense here instead of polluting core ML=0A= =0A=0A=0A----- Forwarded Message ----=0AFrom: Aston <blackapache512-ticket@= yahoo.com>=0ATo: ruby-core@ruby-lang.org=0ASent: Wednesday, 6 May, 2009 11:= 34:36 PM=0ASubject: [ruby-core:23371] Re: Ruby/DL Documentation=0A=0A=0Atha= nks a lot tad.bochan@bnpparibas.com and sh@sheepman.sakura.ne.jp=0A=0Atad s= eems to be using 1.8.x, i am using ruby19 on FreeBSD7.2=0A=0A[diesalunix@ra= ptor ~]$ uname -a=0AFreeBSD raptor 7.2-PRERELEASE FreeBSD 7.2-PRERELEASE #1= : Sun Mar 29 19:18:27 UTC 2009=A0=A0=A0=A0 root@raptor:/u...

mysql-ruby or ruby-mysql?
We're currently using: Apache 2.0.46 mod_ruby 1.20 Ruby 1.8.x (stable snapshot) Mysql 4.0.20 Do you recommend mysql-ruby or ruby-mysql? And what version would be most reliable given our setup? Based on the history log of mysql-ruby, we're not sure if it is compatible with Mysql 4.0 because it mentions 4.1. Thanks! Randy Lawrence wrote: > We're currently using: > > Apache 2.0.46 > mod_ruby 1.20 > Ruby 1.8.x (stable snapshot) > Mysql 4.0.20 > > Do you recommend mysql-ruby or ruby-mysql? And what version would be > most reliable given our setup? ...

removing Ruby success stories page from Ruby-lang.org
The list of ruby success stories page in ruby-lang.org is really lame. compared to python success stories link this looks very weak. i think this should be removed till the list looks a bit more impressive Hi -- On Sat, 6 Jan 2007, Rahul wrote: > > The list of ruby success stories page in ruby-lang.org is really lame. > > compared to python success stories link this looks very weak. > > i think this should be removed till the list looks a bit more impressive It's supposed to be informative, not impressive. Perhaps people can report their success stories and the page can be updated. David -- Q. What is THE Ruby book for Rails developers? A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black) (See what readers are saying! http://www.rubypal.com/r4rrevs.pdf) Q. Where can I get Ruby/Rails on-site training, consulting, coaching? A. Ruby Power and Light, LLC (http://www.rubypal.com) On 1/5/07, Rahul <vrahul@gmail.com> wrote: > > The list of ruby success stories page in ruby-lang.org is really lame. > > compared to python success stories link this looks very weak. > > i think this should be removed till the list looks a bit more impressive What would make it more impressive? I think this is a very subjective topic, and I think comparisons between other languages are an insufficient metric for determining whether the resource is helpful or not. Notable stories that should be added that I'm aware ...

ruby language parser in ruby
I'm looking for a ruby language parser written in ruby, that I can hack to play about with generating other ruby-like languages. I've found RubyParser. Are there any other options I should be looking at? * I see ruby 1.9 has ripper, but it's written as a C extension. I want something in pure ruby. * ParseTree is also in C I believe. * Possibly could look at the internals of rubinius? * Anything else? Thanks, Brian. -- Posted via http://www.ruby-forum.com/. On Nov 29, 2009, at 03:23 , Brian Candler wrote: > I'm looking for a ruby language p...

Nonblocking Windows Ruby popen? (was: Re: C Threads and Ruby)
From: "Francis Cianfrocca" <garbagecat10@gmail.com> > > > The impression I got from the windows select() documentation > > was that it only works with winsock sockets. > > Ruby's Kernel#select is quite different from the native select. It's deeply > intertwined with the green threads implementation. It basically knows how to > handle anything that can be wrapped in a Ruby IO object. This has been percolating in the back of my mind for a month or so now. :) I presume, even though Ruby may be able to handle anything that can be wrapped in a ...

Ruby Quiz for building up Ruby?
I put this suggestion to James Edward Gray II as a means to an end. I was thinking that if the quiz inspires people to tackle manageable problems, then it might be that we can use it to help us improve Ruby itself. We may get components for packages built up for the cases where people find them sufficiently interesting to write. So, would anyone object to this strategy? Is the problem expressed below sufficiently challenging to be of interest to those who know they could tackle it? Does it make a good quiz? James said I should ask, so I am. <quote> Date: Wed, 26 Oct 2005 18:11:1...

ruby-opengl, ruby-glut
Hello! I'm trying ruby-opengl on osx. (without x11) and so far, with some changes I managed to compile it and even run the samples once, but now it broke again. (strangely) This probably (surely) is an OSX question, but maybe someone can help me here Here's the error ruby sample/planet.rb objc: failed objc_getClass(NSObject) for GLUTApplication->isa->isa objc: please link appropriate classes in your program Trace/BPT trap I'm using ruby 1.8.1 (2003-10-30) [powerpc-darwin] on mac osx version 10.3.2 (panter) Alwin Whohoo! I've got Ruby-opengl to work on osX 10...

arrays in ruby and java
hi, i have been translating an algorithm from ruby to java. unfortunately i stuck with one line of code and would like to ask for some help. My problem is the following line: b.data[b.data.index(token)+1] and here is the context(which i not relevant in my opinion): def self.reproduce(a, b) data_size = @@costs[0].length available = [] 0.upto(data_size-1) { |n| available << n } token = a.data[0] spawn = [token] available.delete(token) while available.length > 0 do #Select next if token != b.data.last && available.inc...

Java-Annotations in Ruby?
Hi, In java one can do annotations in front of method declarations: http://java.sun.com/j2se/1.5.0/docs/guide/language/annotations.html @AjaxCallable public static void deleteImage(int imageId) { .. } I think I have not understood it completely. I am trying to "translate" this to ruby. Is there a way to associate these with a method? -- Posted via http://www.ruby-forum.com/. On Dec 23, 2007 8:47 PM, Marc Heiler <shevegen@linuxmail.org> wrote: > > I think I have not understood it completely. I am trying to "translate" > this to > ruby. Is there a...

ruby vs. java?
Hello all, just call me Franz. I study physic in Berlin, but i am from bavaria (that is in the south of germany). sorry for my bad english but foreign languages are not my strong point. i like more mathematic. I want to do a physical model calculation about the dynamics of incompressibel liquids. I am not sure which is the best programming language for this. I think about visual basic, java and ruby. I know java quite good and vb and ruby a bit. actually i wanted to do it in vb but its to powerful for me. so i am looking for something easier. can you tell me the essential differences ...

Ruby and Java #2
I have a vendor product with Java APIs that I need to write against and would like to use Ruby. Does anyone have an opinion on the most reliable way to interact with Java from Ruby? I've seen some different projects, but can't tell if there is any major difference between how they are implemented or which are actively maintained. Thanks, Wayne On 21/06/2005 15:12, Wayne Pierce wrote: > I have a vendor product with Java APIs that I need to write against > and would like to use Ruby. > > Does anyone have an opinion on the most reliable way to interact with > Java from Ruby? I've seen some different projects, but can't tell if > there is any major difference between how they are implemented or > which are actively maintained. > Seems ugly to me, but anyway... Maybe you will be able to use C or C++ as a common "glue code". There is also a program called SWIG, used to make Java, Ruby, Python, etc... work with C. Jean-Claude Arbaut wrote: > On 21/06/2005 15:12, Wayne Pierce wrote: > >> I have a vendor product with Java APIs that I need to write against >> and would like to use Ruby. >> >> Does anyone have an opinion on the most reliable way to interact with >> Java from Ruby? I've seen some different projects, but can't tell if >> there is any major difference between how they are implemented or >> which are actively maintained. >> > > Seems ugly t...

Java and Ruby integration
Hi all, What is the better way to integrate java and ruby? WebServices? JMS? Thanks. -- Posted via http://www.ruby-forum.com/. [Note: parts of this message were removed to make it a legal post.] On Fri, Apr 8, 2011 at 2:38 PM, Diego Nakamashi <diegonakamashi@gmail.com>wrote: > Hi all, > > What is the better way to integrate java and ruby? > WebServices? > JMS? > You may want to take a look at protocol buffers. Pat Eyler has been blogging about it recently. http://on-ruby.blogspot.com/2011/03/ruby-and-protocol-buffers-take-one.html http://on-ruby.blogspot.com/...

Ruby Vs. Java
Which programming language is faster - Ruby or Java? This is one of the things that will decide whether I use Ruby or Java so help is appreciated greatly. Thanks. -- Posted via http://www.ruby-forum.com/. Java code is definitely faster than Ruby code. However, to solve same problem, programming in Ruby should be faster than doing that in Java. On Aug 26, 8:51 pm, Nick Nick <schaefe...@gmail.com> wrote: > Which programming language is faster - Ruby or Java? > > This is one of the things that will decide whether I use Ruby or Java so > help is appreciated greatly. > > Thanks. > -- > Posted viahttp://www.ruby-forum.com/. Nick el wrote: > Which programming language is faster - Ruby or Java? > > This is one of the things that will decide whether I use Ruby or Java so > help is appreciated greatly. > > Thanks. Development speed: Ruby, hands down Execution speed: Java, hands down That said, the main problem with execution speed are poor algorithms. With ruby, you develop it, maybe in a quarter of the time you'd need in java, then you see if it is fast enough. Most often you'll see it already is. If not, you profile. Most often you'll then notice it is one or two bottlenecks only. You'll see if you can make it faster using pure ruby, if that fails, you can always write a C extension (or use a java lib if you use jruby). In the end you spent half the time you'd spend with java and your app runs fas...

Web resources about - Re: Ruby to java or java to ruby converter - comp.lang.ruby

DC-to-DC converter - Wikipedia, the free encyclopedia
DC to DC converters are important in portable electronic devices such as cellular phones and laptop computers , which are supplied with power ...

Swim Time Converter on the App Store on iTunes
Get Swim Time Converter on the App Store. See screenshots and ratings, and read customer reviews.

Cash Converters turns to debit cards for payday loans
Cash Converters is turning to eftpos cards for its cash advances.

Freemake Video Converter gains drag and drop support
Freemake Video Converter is a great media conversion tool with a pile of features, and just one small but annoying omission. No drag and drop ...

Amazon deal: Converter turns seven types of film into digital
... old film school projects from back in the day, but you don't have a film projector. The solution is simple: You should get a digital film converter ...

New catalytic converter could fix US cars: VW CEO
Volkswagen will propose to U.S. authorities a new catalytic converter system that could be fitted to about 430,000 cars.

VW wants to fix emissions cheating with catalytic converters
Volkswagen has already promised to recall US vehicles caught up in its emissions cheating scandal, but how is it actually going to fix most of ...

VW hopes catalytic converter can fix cars
German carmaker has devised tool that will make vehicles compliant with US clean air rules

GeekWire Deals: Charge your phone off your one-port MacBook with this little converter
The newest iteration of the MacBook is a glorious thing. It’s thin, light and has a great screen. But its single USB-C port is a bit of a letdown ...

Dos2Unix Text file format converters
Win32-OpenSSH - Win32 port of OpenSSH

Resources last updated: 3/28/2016 8:22:31 PM