Celos.Net
Programming languages
[Updated: Mark on 15 Sep 2008]
I'm fairly fluid about using different languages for different things; here are a couple of the less-well-known ones I'm keen on advocating.

The R project

The R project is a mature and stable open source implementation of a language for data analysis and statistics called S. It fits more into the category containing Matlab and IDL than other statistical systems like SPSS; it's a complete and well-designed programming language, comfortable for scripts or interactive use.

You can read about it properly at the R project website, but here are a couple of the reasons I like it:

  • Functional language: scheme-like to program in although with syntax usually more like C. Much nicer than the afforementioned Matlab and IDL for writing actual code in.
  • Vector orientated: basic data types are vectors, and virtually all operations support vectors. With some practice at coding this can make many things quite fast. (Conversely, some operations - iteration, for example - can be rather slow).
  • Flexible data handling: operates with and stores not only numerical arrays but categorical data, interval data, structures etc.
  • Extremely good built-in graphics: flexible, high-level, and usually with publication-quality appearance.
  • Many libraries covering novel statistical and numerical methods, file formats, GUIs, network, database and external langauge interfaces.
  • Easy to extend with C (or C++ if you prefer). R's own code is generally clean and easy to read.
  • Clear, accessibly, complete on-line documentation.

I use R for many medical image processing tasks; it's convenient having very high-quality statistical and modelling facilities handy, the language is pleasant to use, and `serious' number crunching code can easily be written in C and hauled dynamically.

Ruby

Ruby, despite its widespread use in Japan, is generally seen as a less popular sibling of Python; indeed it's syntactically similar, but it has more consanguinity to Perl and Scheme. Like these languages, it's interpretted and dynamically typed. Other highlights:
  • Pervasively OO: everything is a class, even basic types like integers. (You can still use it in a procedural style if you want, though). Unlike many OO languages, Ruby makes objects seem like the natural way of working.
  • Many perl-derived (but less untidy) syntax elements: built-in regexes, for example. Ex-perl programmers (like me) feel at home quickly.
  • Code blocks. In particular, these allow iterators (list comprehensions in Python come close, but aren't as flexible), building anonymous functions (for a functional programming style where appropriate), and nice resource management.
  • Extremely convenient C extensions. It's rather like writing ruby with a few more characters in the syntax.

It fills many of the same gaps as Perl and Python do: it's great as a web or database scripting language, for GUI or toplevel development, for rapid prototyping and easy deployment. But while aiming at perl's market, it supplies the readability and maintainability perl always lacked.

Ruby is slowly become more pervasive; it can be found in Mac OS X installs, it has its own rapidly growing CPAN equivalent (RAA), a mod_ruby for apache, a number of books, and so on.

Find out more at the Ruby website.