From: "M. Edward (Ed) Borasky" Date: 2006-09-22T00:13:53+09:00 Subject: Re: Assistance wanted for integrating existing C-API into Ruby Max Lapshin wrote: >>> I am seeking assistance for writing a ruby wrapper for the c-api of an >>> existing enterprise system. This job is a paid job. >>> > > >>> For the first layer I can imagine to use SWIG (this seems to be a good >>> way to integrate a c-api from ruby; but if you know a better way just >>> tell me) > > I don't advice to use SWIG because You high level ruby logic will be > linked with low level C logic. Best choice is to describe methods > yourself. > > Well ... first of all, the original poster said he was open to approaches other than SWIG, so take what I say as personal preferences. In my application domain, scientific and statistical computing, there are at least three popular scripting languages -- Perl, Python and Ruby -- and PHP is branching out from it's "home base" of dynamic web sites. SWIG for the most part allows the user to interface with all of them at the "cost" of some extra lines in makefiles! When I wander about the web, I see vast projects, like Sage, for example, that focus on one scripting language, in this case Python. And I also see *dozens* of high-quality math packages in either C or C++. What SWIG gives the developers of these packages is the ability to expand their market to Perl, Python, Ruby, PHP, Lua, Pike, Tcl, Scheme, and a few others. And it gives the users of the scripting languages the ability to stick with their favorite scripting language. Again, to use the example of Sage, it's a very useful and wonderful environment, but I already know Perl, I'm learning Scheme and Ruby and I don't want to learn Python just to use Sage! So I'm personally a big fan of SWIG, because I think it's a big win for a lot of people, and because it's a very high quality effort. I think of it as the "automatic transmission" of scientific and statistical computing.