[ruby-core:28561] Ruby::DL vs Ruby::FFI

Ruby.DL and FFI libraries are great for programmers like me who are not internet programmers, but are more interested in scientific and number processing etc.

I really like FFI, though I started with DL since at that time FFI won't build on windoz. Good part of DL is that it is part of standard libary, not supported (fully) by JRuby though. FFI on the other hand has matured and is available on windoz, greatest joy is same script will, in all probability run across all implementations.

recently few days back I saw some svn msgs suggesting that DL's dependency on libffi was removed, since libffi won't build on windoz (again!). so my question is will DL in future be based on libffi ? why just not use FFI. Its API and idea is very good and ruby like, against DL's idea of giving in C snippets to be interpreted by DL ?

Aston

      The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/

Just wanted to get my two cents worth in: I use Ruby for DSP processing, so all this is very important to me too.

cheers,
e

···

On Mar 8, 2010, at 10:56 AM, Aston wrote:

Ruby.DL and FFI libraries are great for programmers like me who are not internet programmers, but are more interested in scientific and number processing etc.

I really like FFI, though I started with DL since at that time FFI won't build on windoz. Good part of DL is that it is part of standard libary, not supported (fully) by JRuby though. FFI on the other hand has matured and is available on windoz, greatest joy is same script will, in all probability run across all implementations.

recently few days back I saw some svn msgs suggesting that DL's dependency on libffi was removed, since libffi won't build on windoz (again!). so my question is will DL in future be based on libffi ? why just not use FFI. Its API and idea is very good and ruby like, against DL's idea of giving in C snippets to be interpreted by DL ?

Aston

The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.

FFI will build on Windows, so long as you're using mingw and gcc.
Actually, FFI won't build on any platform without gcc at the moment as
far as I know, so if you were thinking of building it with the Sun
Studio Compiler or the HP-UX compiler, for example, you're out of
luck.

DL, so far as I know, will build on any platform with any compiler.

Regards,

Dan

···

On Mar 8, 8:56 am, Aston <blackapache512-tic...@yahoo.com> wrote:

Ruby.DL and FFI libraries are great for programmers like me who are not internet programmers, but are more interested in scientific and number processing etc.

I really like FFI, though I started with DL since at that time FFI won't build on windoz. Good part of DL is that it is part of standard libary, not supported (fully) by JRuby though. FFI on the other hand has matured and is available on windoz, greatest joy is same script will, in all probability run across all implementations.

recently few days back I saw some svn msgs suggesting that DL's dependency on libffi was removed, since libffi won't build on windoz (again!). so my question is will DL in future be based on libffi ? why just not use FFI. Its API and idea is very good and ruby like, against DL's idea of giving in C snippets to be interpreted by DL ?

Why not build DL atop FFI, and get FFI into Ruby 1.9.2?

JRuby already has a partial start on a DL that just uses FFI:

http://github.com/jruby/jruby/blob/master/lib/ruby/1.8/dl.rb

and

http://github.com/jruby/jruby/blob/master/lib/ruby/1.8/dl

A DL that uses FFI would work without modification or build hassles on
any impl+platform that supports FFI.

- Charlie

···

On Mon, Mar 8, 2010 at 9:56 AM, Aston <blackapache512-ticket@yahoo.com> wrote:

recently few days back I saw some svn msgs suggesting that DL's dependency
on libffi was removed, since libffi won't build on windoz (again!). so my
question is will DL in future be based on libffi ? why just not use FFI. Its
API and idea is very good and ruby like, against DL's idea of giving in C
snippets to be interpreted by DL ?

JRuby supports FFI on Windows just fine.

- Charlie

···

On Mon, Mar 8, 2010 at 10:08 AM, Daniel Berger <djberg96@gmail.com> wrote:

FFI will build on Windows, so long as you're using mingw and gcc.
Actually, FFI won't build on any platform without gcc at the moment as
far as I know, so if you were thinking of building it with the Sun
Studio Compiler or the HP-UX compiler, for example, you're out of
luck.

Here's a project that is providing the beginning of win32ole support for jruby [1]. Please try it out with your application to see if it works. File tickets or provide patches for broken or missing functionality.

cr

[1] GitHub - bpmcd/win32ole: WIN32OLE JRuby Native Extension

···

On Mar 10, 2010, at 11:37 PM, Aston wrote:

________________________________
From: Charles Oliver Nutter <headius@headius.com>
To: ruby-talk ML <ruby-talk@ruby-lang.org>
Sent: Wed, 10 March, 2010 8:12:11 PM
Subject: Re: Ruby::DL vs Ruby::FFI

On Mon, Mar 8, 2010 at 10:08 AM, Daniel Berger <djberg96@gmail.com> wrote:

FFI will build on Windows, so long as you're using mingw and gcc.
Actually, FFI won't build on any platform without gcc at the moment as
far as I know, so if you were thinking of building it with the Sun
Studio Compiler or the HP-UX compiler, for example, you're out of
luck.

JRuby supports FFI on Windows just fine.

- Charlie

JRuby is of course an excellant option for us, but it can still improve if it starts supporting win32ole
we need win32ole since we are required to parse some MS apps generated *.xml files
and they are generated by MS DOM impl, sometimes REXML just errors out and MSXML does it fine