On Tue, Nov 25, 2008 at 10:13, Joe Wölfel email@example.com wrote:
Math/stats libraries still seem to need a bit of work compared to other Ruby
libraries. The most comprehensive one I’ve used is RubyGSL.
I strongly agree with both points. However, there are lots libraries
available that have worked well for many (as others have suggested).
Personally, I’ve made do with NArray + rb-gsl + hand-rolled. This
has been a solid performer for me over several years. However, there
have been some annoyances. For the simple stuff, I try and stick with
NArray as I think it’s lightweight, easy and elegant. Since rb-gsl
is a larger C-binding, it can trigger some occasional bus-errors in
ruby. These have all seemed resolved by using newer versions of ruby
if repeatedly encountered. Any of these tie you to Matz’ ruby
interpreter (MRI) which has never been a concern of mine (but it’s
worth pointing out).
I certainly do not think Python is “today’s FORTRAN” (sidenote:
there are a lot of fun comparisons in there beyond the scope of Joe’s
suggestion), Python is better than that. I’ve found my solutions
in ruby to be quite sufficient, although I’ll concede they are not as
comprehensive with repect to SciPy and/or PDL (perl!). There appears
to be more focus on the latter two from the US science community (at
least in astrophysics, which is what I’m most familiar with).
To speak to Joe’s wish, I have felt for years that most of the pieces
are there to build a more cohesive umbrella for
math/statistics/analysis packages. In one form, this already exists
in http://ruby.gfd-dennou.org/. My problem with this solution and
also with SciPy / PDL is their monolithic structure which have
complicated dependencies and/or maintenance woes. Coming up with a
lighter-weight alternative isn’t a small task. So it’s not worth
doing unless it’s done right, and doing it right will take a good deal
of time. In addition, most of the necessary functionality is already
available in the above libraries – which means there might not even
be a good consensus of what “right” is for numerical computing in
ruby. (Let’s be clear, this is solely my rambling speculation on why
it doesn’t yet exist.)
I digress. Getting back to Ken’s question: if you need C-like
numerics and don’t mind being tied to MRI – NArray and/or rb-GSL have
been very helpful and reliable for me.