From: Paulo Jabardo Date: 2005-07-08T03:56:23+09:00 Subject: Re: Ruby as mathematical language > One option would be to reimplement rb-gsl using > SWIG. GSL is pretty big, > but wrapping it with SWIG might not be too hard if > its interfaces are > implemented using a small number of types. You have > to write two or > three typemaps for each type, and SWIG does the > rest. ruby-gsl already wraps most of gsl. From what I've seen on this list, the problem is the Vector and Matrix libraries, even though they seem to work fine in ruby-gsl even though it does not use every OO concept available to ruby users. > I've wrapped two libraries with SWIG. and while I > don't consider myself > an expert, I have learned a few things. I'd be > willing to help get > things kicked off. > > One thing to bear in mind, however. Wrapping > (whether with SWIG or not) > often requires copying input and output parameters. > That's usually not a > big deal, but you might take a substantial > performance hit if you're > passing large numbers of large arrays through a > wrapper. This really could hurt in many situations. > Much of the value of Matlab is not the language > itself, but the large > number of libraries available for specialized > applications like control > systems and signal processing. That's much harder to > replace than the > underlying execution engine. (Which is, of course, > part of the reason > Fortran is still with us.) You hit the nail! But remember that now there are many Free/OS libraries available. But even if we wrapped and developped many numerical libraries I don't think ruby (or python) would be the ideal language for computation. R/S-PLUS, for instance, were designed for this purpose alone and I think it is a great language. Even matlab has a language appropriate to numerical computation (I don't like matlab's language). Good graphics capabilities is very important for a mathematical environment to succeed. Paulo _______________________________________________________ Yahoo! Acesso Gr�tis - Internet r�pida e gr�tis. Instale o discador agora! http://br.acesso.yahoo.com/