What Is SciRuby? A Guide to Ruby's Scientific Computing Ecosystem

Updated

SciRuby is an open-source collection of tools for scientific computing and data visualization in Ruby. It is aimed at Ruby developers who want to do numerical work — linear algebra, machine learning, statistical modelling, and plotting — without leaving the language. The project's centerpiece is NMatrix, a linear algebra library with dense and sparse matrix storage and tensor support. SciRuby is released under the BSD three-clause license, and its components are described by the project itself as tested but "not battle-hardened," so it suits exploration, research code, and tooling rather than mission-critical systems without caution.

What SciRuby includes

The project spans several areas rather than being a single library:

  • Linear algebra — NMatrix is the flagship component, supporting both dense and sparse matrix storage. Tensor support was added more recently. MDArray is a related linear algebra effort the project lists among its goals.
  • Visualization — Several experimental plotting libraries exist, including Rubyvis, Plotrb, and Nyaplot. The project also expresses interest in improving existing APIs such as Gnuplot.
  • Machine learning and statistics — The site mentions tools for machine learning and linear mixed modelling as part of the ecosystem.

The project's stated short-term goals are improved visualization software and continued development of its linear algebra software (NMatrix and MDArray).

Who it is for

SciRuby targets people who already value Ruby and want to use it for scientific work. The project's manifesto argues that Ruby is a good choice for scientific computing and data visualization, acknowledging that other languages have more libraries while maintaining that Ruby "has its own place in Science." If you are comfortable in Ruby and prefer not to switch languages for numerical tasks, SciRuby is the ecosystem built for you. If you need a mature, heavily battle-tested numerical stack, the project's own warning about bugs is worth taking seriously.

Project status and maturity

The site is direct about maturity: the gems "have been tested, but are not battle-hardened." It explicitly cautions against using NMatrix or other SciRuby components for mission-critical code — the examples given are a self-driving car or controlling an ARKYD 100 satellite — and advises expecting bugs. Treat SciRuby as a capable but evolving toolkit, and plan for debugging.

Getting started

Installation instructions for the various SciRuby components are available in the project's docs, and NMatrix documentation is hosted separately. The site does not list prices or login requirements, so check the docs directly for current setup details.

Community and contributing

  • Google Group — The site offers an email subscription form to join the SciRuby Google Group.
  • IRC — The project's channel is #sciruby on Freenode.net. It is most active during Google Summer of Code months, though a few people are generally around.
  • Contributing — The best entry point for new contributors is the NMatrix issue tracker on GitHub: pick something that interests you and fork the project. If matrices are not your focus, the SciRuby issue tracker is the alternative.
  • Developers — A full roster is maintained on the project wiki.

License and history

SciRuby and NMatrix are available under the BSD three-clause license. The project acknowledges Google Summer of Code participation across 2013, 2014, 2015, and 2016–2019, along with Google's Open Source Programs Office.