News for hackers. Stuff that matters.
Re:RubyFlux: a Ruby to Java compiler by VeejayRampay on Friday December 28, 2012 @05:45PM (#4980001)
This is great, it's nice to see people pushing the boundaries, shaking bottles and trying to get out of the "same ol' same ol'" frame of mind from time to time.

Looking forward to more.

Re:RubyFlux: a Ruby to Java compiler by sublimit on Friday December 28, 2012 @06:01PM (#4980049)
Cross-language compilers aren't a particularly new concept, though. And I fail to see how this one's exactly useful, either. Seems more like an "it can be done" sort of challenge, rather than a tool people would use in everyday programming.

But since it's currently the #1 post on Hacker News, maybe people do have some use for a Ruby-to-Java compiler, so could you enlighten me?

Re:RubyFlux: a Ruby to Java compiler by cookiecaper on Friday December 28, 2012 @06:12PM (#4980100)
See http://stackoverflow.com/questions/12487986/how-can-i-make-r... . The tl;dr of it is that MRI is atrocious at memory management. For political reasons we are stuck using Ruby in a situation like that; if we could easily, accurately compile that to Java and run it with with java -jar my_script.jar it'd be awesome.
Re:RubyFlux: a Ruby to Java compiler by drstewart on Friday December 28, 2012 @06:14PM (#4980109)
You are aware of JRuby, no?
Re:RubyFlux: a Ruby to Java compiler by chc on Friday December 28, 2012 @06:39PM (#4980197)
And just for anyone unaware, this project is by the author of JRuby.
Re:RubyFlux: a Ruby to Java compiler by VeejayRampay on Friday December 28, 2012 @06:49PM (#4980236)
Just for the sake of correctness, Charles Oliver Nutter is actually of one of the main developers of JRuby, a project created about 10 years ago but which has evolved a LOT since then. See http://en.wikipedia.org/wiki/JRuby#History
Re:RubyFlux: a Ruby to Java compiler by cookiecaper on Monday December 31, 2012 @12:29PM (#4989973)
I am aware, but I haven't really had the time to get involved in testing it. I know we'd have to make some code changes because we depend on modules with native extensions in our script, but I don't know that they'd really be prohibitive.

Much easier would be: "Make this Java with one command to a cross-compiler".

Re:RubyFlux: a Ruby to Java compiler by sublimit on Friday December 28, 2012 @06:31PM (#4980166)
Thanks, I figured there would be some situation like this that'd inspire one to write a cross compiler.
Re:RubyFlux: a Ruby to Java compiler by wr1472 on Friday December 28, 2012 @06:09PM (#4980086)
Think of this as art - it doesn't need to have a purpose.

Or think of it as the solution to a problem yet to be discovered - isn't that how most discoveries are made?

Either way great achievement.

Re:RubyFlux: a Ruby to Java compiler by sublimit on Friday December 28, 2012 @06:13PM (#4980105)
It is a feat of compiler design if it works even adequately. I was expecting to see some example output, though.
Re:RubyFlux: a Ruby to Java compiler by headius on Friday December 28, 2012 @10:30PM (#4980987)
I'll try to add some for you tonight :-)
Re:RubyFlux: a Ruby to Java compiler by VeejayRampay on Friday December 28, 2012 @06:36PM (#4980182)
Cross-language compilers are not a new concept, you're right about that. I was more enthusiastic about the fact that any person trying to offer alternatives is doing a good deed.

Whether or not this has practical applications is irrelevant for now, the project seems to be in its infancy. Nonetheless, it's a good thing that the author is trying and tackling new concepts.