[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

SWIG and Ruby/DL

Peter C. Verhage

1/5/2005 7:28:00 PM

Hi,

Just thinking out loud, but wouldn't it possible to generate Ruby/DL
code instead of Ruby C wrapper code using SWIG? This would make it a lot
more easy to use extensions cross-platform without the need for compilation.

Regards,

Peter
5 Answers

Jamis Buck

1/5/2005 7:52:00 PM

0

On 04:31 Thu 06 Jan , Peter C. Verhage wrote:
> Hi,
>
> Just thinking out loud, but wouldn't it possible to generate Ruby/DL
> code instead of Ruby C wrapper code using SWIG? This would make it a lot
> more easy to use extensions cross-platform without the need for compilation.
>
> Regards,
>
> Peter
>

I'm no SWIG expert, but I should think it would be possible.

However, my recommendation: hold off on doing anything significant
with Ruby/DL for now. Until Ruby/DL2 comes out, anyway.

- Jamis

--
Jamis Buck
jamis_buck@byu.edu
http://www.jamisbuck...
------------------------------
"I am Victor of Borge. You will be assimil-nine-ed."



Lyle Johnson

1/5/2005 9:11:00 PM

0

On Thu, 6 Jan 2005 04:31:41 +0900, Peter C. Verhage
<usenet2@nospam.no-nonsense.org> wrote:

> Just thinking out loud, but wouldn't it possible to generate Ruby/DL
> code instead of Ruby C wrapper code using SWIG? This would make it a lot
> more easy to use extensions cross-platform without the need for compilation.

You might be able to get something to work for some limited cases,
where the code to be called is regular C code. I don't know how you'd
get this to work for C++ code, however (e.g. how does Ruby/DL deal
with name mangling, calling constructors and destructors, templates,
exceptions, ?)


Carl Youngblood

1/5/2005 11:33:00 PM

0

Jamis Buck wrote:

>However, my recommendation: hold off on doing anything significant
>with Ruby/DL for now. Until Ruby/DL2 comes out, anyway.
>
>- Jamis
>
Any word on when that is going to be?

Carl


Jamis Buck

1/5/2005 11:43:00 PM

0

On 08:33 Thu 06 Jan , Carl Youngblood wrote:
> Jamis Buck wrote:
>
> >However, my recommendation: hold off on doing anything significant
> >with Ruby/DL for now. Until Ruby/DL2 comes out, anyway.
> >
> >- Jamis
> >
> Any word on when that is going to be?
>
> Carl

Not anytime soon, according to the author. Although you can follow his
progress on RubyForge: http://rubyforge.org/project.... The
code's all in CVS.

- Jamis

--
Jamis Buck
jamis_buck@byu.edu
http://www.jamisbuck...
------------------------------
"I am Victor of Borge. You will be assimil-nine-ed."



gabriele renzi

1/6/2005 2:31:00 AM

0

Lyle Johnson ha scritto:
> On Thu, 6 Jan 2005 04:31:41 +0900, Peter C. Verhage
> <usenet2@nospam.no-nonsense.org> wrote:
>
>
>>Just thinking out loud, but wouldn't it possible to generate Ruby/DL
>>code instead of Ruby C wrapper code using SWIG? This would make it a lot
>>more easy to use extensions cross-platform without the need for compilation.
>
>
> You might be able to get something to work for some limited cases,
> where the code to be called is regular C code. I don't know how you'd
> get this to work for C++ code, however (e.g. how does Ruby/DL deal
> with name mangling, calling constructors and destructors, templates,
> exceptions, ?)
>
>

it does not, DL is for C, not c++. IIRC a related note from the author
was that writing a DL for c++ would be damn close to writing a c++
compiler (ok, maybe not this exact words :)