On Thu, Dec 16, 2010 at 5:15 PM, Colin Bartlett <colinb2r / googlemail.com> wrote:
> 2. Integration with Java seems to be easy: I'm not a Java programmer, but
> I've found it easy to write Java code to do the number crunching, and mostly
> easy to integrate the "compiled" Java code with JRuby. (I say mostly because
> at the start I couldn't find a way to compile the Java code in a way that
> would reliably work with JRuby, but that was essentially me not
> understanding how Java packages really worked. I still don't understand how
> Java packages really work, but I've found a way to compile that reliably
> works for me with JRuby!) That's a big plus because I definitely don't
> understand at the moment how to compile C code and integrate that with MRI
> Ruby.

Apart from perhaps MacRuby calling ObjC and IronRuby calling .NET,
JRuby calling Java is *by far* the easiest way to pull in external
libraries. C extensions and FFI are nowhere near as easy, and never
will be.

I always recommend using JRuby to take advantage of Java/JVM libraries
over C extensions and FFI, but of course I'm a bit biased :)

- Charlie