SWIG vs Ruby/DL

I asked this in the middle of another thread but it appears to have been
lost in the noise. Assuming your library has already exposed a C AP,
does SWIG (or hand-writing C bindings) have any advantages over Ruby/DL?
The latter seems to be a far simpler way to do things, and I'm wondering
why it's not more widely used.

martin

Martin DeMello ha scritto:

I asked this in the middle of another thread but it appears to have been
lost in the noise. Assuming your library has already exposed a C AP,
does SWIG (or hand-writing C bindings) have any advantages over Ruby/DL?

well, actually I think you can write a SWIG backend that generates Ruby/DL code... trhat would be cool :slight_smile:

The latter seems to be a far simpler way to do things, and I'm wondering
why it's not more widely used.

little documentation and has been around for less time I guess, plus not automated way to do things (I mean, swig)

does SWIG (or hand-writing C bindings) have any advantages over

Ruby/DL?

I don't know, but having struggled with SWIG lately, I'm going to see
if Ruby/DL does a better job; it certainly looks cleaner than a direct
native binding solution.

Takaaki Tateishi, are you still alive? You started Ruby/DL2, but
haven't worked on it in a while... what is the status of the project?
--- SER

does SWIG (or hand-writing C bindings) have any advantages over

Ruby/DL?

I don't know, but having struggled with SWIG lately, I'm going to see
if Ruby/DL does a better job; it certainly looks cleaner than a direct
native binding solution.

Takaaki Tateishi, are you still alive? You started Ruby/DL2, but
haven't worked on it in a while... what is the status of the project?
--- SER

SER said:

Takaaki Tateishi, are you still alive? You started Ruby/DL2, but
haven't worked on it in a while... what is the status of the project?

I suspended developing Ruby/DL2 since I had no time to improve it
trying to work on other libraries and my day jobs. I'd like to
resume the development after release of Ruby2.x.

The following archive is available, and I will move it to RubyForge
in the near future.
  http://ttsky.net/src/ruby-dl2-20030516.tar.gz

Regards,

···

--
Takaaki Tateishi <ttate@ttsky.net>

In article <5h99d.29153$H11.906124@twister1.libero.it>,

Martin DeMello ha scritto:

I asked this in the middle of another thread but it appears to have been
lost in the noise. Assuming your library has already exposed a C AP,
does SWIG (or hand-writing C bindings) have any advantages over Ruby/DL?

well, actually I think you can write a SWIG backend that generates
Ruby/DL code... trhat would be cool :slight_smile:

That's an interesting idea.

The latter seems to be a far simpler way to do things, and I'm wondering
why it's not more widely used.

little documentation and has been around for less time I guess, plus not
automated way to do things (I mean, swig)

Ruby/DL isn't as well documented, especially for dealing with C++ issues.
Isn't a shared lib produced from C++ problematic for Ruby/DL because of the
name mangling issues?

Another difference:
You can only use SWIG when you've got the sourcecode to a library, whereas
you could use Ruby/DL in a case where you have API documentation for a
shared-lib, but no source code.

Phil

···

gabriele renzi <rff_rff@remove-yahoo.it> wrote:

Takaaki Tateishi ha scritto:

SER said:

Takaaki Tateishi, are you still alive? You started Ruby/DL2, but
haven't worked on it in a while... what is the status of the project?

I suspended developing Ruby/DL2 since I had no time to improve it
trying to work on other libraries and my day jobs. I'd like to
resume the development after release of Ruby2.x.

thanks a lot for the effort. What are the advantages of ruby/sl2 over
standard dl ?

Phil Tomson ha scritto:

Ruby/DL isn't as well documented, especially for dealing with C++ issues. Isn't a shared lib produced from C++ problematic for Ruby/DL because of the name mangling issues?

ahs sure, and the author highlighted that DL is for C not c++.

gabriele renzi said:

thanks a lot for the effort. What are the advantages of ruby/sl2 over
standard dl ?

I think average users won't get any advantage, but some powerful
users will be able to construct a function call by themselves in
the ruby layer.

···

--
Takaaki Tateishi <ttate@ttsky.net>