2014-07-02

Trying out Julia


This is a fairly quick post, though I previously considered making it longer and more trollish. A handful of my friends have told me about Julia, the amazing programming language made for numerical computations and other scientific computing uses. For the 14.15 — Networks final project this past semester, one of my group partners used Julia to simulate large ensembles of 10000-node random networks, and it worked far quicker than MATLAB. I vowed to get a bit more familiar with Julia (the programming language, not a woman [yet]) this summer. It was actually pretty quick to get used to, considering its syntactical similarities to MATLAB, to which I am more accustomed. I was even able to use it to port over the MATLAB code used for data analysis in 8.13/8.14 — Experimental Physics I/II to Julia. The only issue that I have consistently run into has been plotting. For some reason, the plotting packages that interface with Julia do not work in the ways that I want: Winston is too basic, Gadfly doesn't work at all (which is unfortunate because it has all the features I need and more), and Gaston being a frontend for Gnuplot while having to deal with the quirks of Julia's plot execution order means that I might as well use Gnuplot itself. Indeed, that is what I've done: I've been able to write Gnuplot scripts to plot processed data that Julia outputs into a file. Although Gnuplot's syntax is a little arcane, it is so powerful that I'm OK with using it from a script of commands and changing only a few things here and there as needed. Other than that, Julia works like a charm; its speed is fantastic, and I really like how much structure it brings compared to MATLAB (including things like types and indexing). Plus, it combines the great features of both procedural and functional programming. Given that course 18 has largely switched over to Julia, I wonder when course 8 will do the same....