[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] Re: [jruby-user] [annonce] ffi-glpk extension demonstrator f
[Help-glpk] Re: [jruby-user] [annonce] ffi-glpk extension demonstrator for jruby
Thu, 29 Jan 2009 01:19:02 +0300
2009/1/28 Charles Oliver Nutter <address@hidden>:
> Diamantini Maurice wrote:
>> Bonjour à tous,
>> I'm trying to test a new extension provide with jruby which allows
>> to write a binding for a C library directly in ruby without
>> writing a C line of code.
>> This (ffi) extension is now part of the standard Jruby version.
>> That allows to use mixing of java library (like choco constraint
>> solver), C extensions (like glpk) directly in (j)ruby code.
>> As Pierre asked (on the Glpk list) for a java or other binding
>> for Glpk, I write this "pseudo-announce" although ffi-glpk is just
>> a demonstrator for now.
>> But it allows to write the glpk documentation minimal example
>> in **full (j)ruby** code!
> Wow, I missed this email before, but it sounds great! A very practical use
> of FFI to be sure. Will you release this as a gem?
Sorry, no (I've never build gem yet).
Also, It's just a demonstrator which implement just the few API that
allowed me to write the little glpk sample.
So I should first build a more realistic example (which use more
glpk feature), then build build a more OO shell over the ffi-glpk to
make it more higher level.
But it already shows how easy it is to call a scientific C library
directly from jruby.
However I don't use glpk very much and I hope a regular user
would be more able to do that. Also, most part of ffi-glpk is very
similar to the glpk.h file (which is big with many feature !).
So It should be a mean to automatically generate the big part of ffi-glpk,
perhaps with some reformatting of the glpk.h.