[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

SWIG vs Ruby/DL

Martin DeMello

10/7/2004 9:16:00 AM

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
8 Answers

gabriele renzi

10/7/2004 10:56:00 AM

0

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 :)

> 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)

Sean Russell

10/7/2004 1:13:00 PM

0

> 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

Sean Russell

10/7/2004 1:19:00 PM

0

> 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

Takaaki Tateishi

10/7/2004 1:43:00 PM

0

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-20030...

Regards,
--
Takaaki Tateishi <ttate@ttsky.net>



gabriele renzi

10/7/2004 3:41:00 PM

0

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 ?

Takaaki Tateishi

10/7/2004 4:13:00 PM

0

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>


ptkwt

10/7/2004 4:54:00 PM

0

In article <5h99d.29153$H11.906124@twister1.libero.it>,
gabriele renzi <rff_rff@remove-yahoo.it> wrote:
>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 :)

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

10/7/2004 6:02:00 PM

0

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++.