From: "M. Edward (Ed) Borasky" Date: 2006-10-12T23:40:35+09:00 Subject: Re: Use Perl modules from Ruby ? Dr Nic wrote: > Booker C.Bense wrote: >> Dr Nic wrote: >>> I am hoping the elusive ruby -> perl hooks mean I don't have to. >>> >>> #2 scares me. >>> >> _ If you've done #2 for perl, doing it for ruby is about a >> zillion times easier... The internal ruby interface is very >> clean and simple to work with at least in comparision to XS. >> >> _ Booker C. Bense > > I was lucky - someone else did it in Perl. But they won't do it for Ruby > :) > > Wrapping C is on my list of things to do. I don't want to be scared any > more. I want to be freeeee. > > Nic > As near as I can tell after a couple of weeks of experimentation, wrapping *C* is a piece of cake with SWIG, and you get interfaces for Ruby, Python, Perl, PHP, tcl, clisp, lua, pike and a couple of variants of Scheme with little additional effort. Wrapping C++ with SWIG, on the other hand, does require a bit more detailed reasoning. But the documentation on the Ruby/C++ interface is very good, and if the C++ is well-written, it's at least doable.