- Published on Friday, 07 December 2012 14:00
- Written by Douglas Eadline
- Hits: 2386
You really should meet Julia
A long time ago, BASIC was "the language" in the PC world. There were other languages of course, but BASIC was well, "basic" and it was the only thing beyond machine code for many early PC enthusiasts. The name was an acronym for "Beginner's All-purpose Symbolic Instruction Code." New users could easily start writing programs after learning a few commands. It was fun and easy. Many scientists and engineers taught themselves BASIC. Of course, many would argue at the time real scientific programs were written in BASIC's big brother FORTRAN, but FORTRAN was a different world in terms of development cycle and hardware. There was this thing called a compiler that had to be run before you could execute your program. BASIC on the other hand seemed to keep track of your code and would just "RUN" whenever you wanted. Of course you might get some errors, but the "edit, run, edit" cycle was rather short and allowed one to easily play with the computer.
Before the IBM PC hit the market (and after), Microsoft BASIC was one of the most important pieces of software for any microcomputer of the day. While still popular today (in various new forms), BASIC had an enormous impact on the fledgling PC industry -- it got people in front of PCs writing programs. And, as these new wave of programmers emerged, they were able to create applications (primitive by toady's standards) with out a large mini or mainframe computer or a compiler. In particular scientific computing was now in the hands of anyone. It was easy enough for a physicist, engineer, chemist, biologist, to "hack" together a program to test an idea or crunch some data. Of course many of the large high performance programs were written in FORTRAN and run on big machines and eventually emerging supercomputers, but BASIC brought the whole computing process closer to the scientist and engineer because now they knew how to express a problem such that a computer could "execute it."
Jump ahead to today where programming PCs, servers, phones, tablets, etc. each has their own vast array of modern tools. In HPC however, programming is still largely done in FORTRAN and C/C++ with MPI and/or OpenMP. Programs must now be expressed in parallel which creates a huge learning barrier for many scientists and engineers. There are tools that help. Matlab, Octave, R, SciPy, NumPy etc. that provide a higher level of abstraction and, thus, a lower learning barrier, but, none of these were developed with HPC (mainly parallel computing) in mind. And is often the case, performance has never been the strong point of "easy" languages. There are some other interesting languages like Erlang or Haskell that offer a different view of parallel computing that is often easier for the end user to understand. These "Functional" languages, while eloquent, are often too far afield for most scientists or engineers.
The simple HPC language situation has recently changed with the introduction of the Julia language. If you want some insight into the goals of the language, read Why We Created Julia which contains the following refreshing statements:
"We want a language that’s open source, with a liberal license. We want the speed of C with the dynamism of Ruby. We want a language that’s homoiconic, with true macros like Lisp, but with obvious, familiar mathematical notation like Matlab. We want something as usable for general programming as Python, as easy for statistics as R, as natural for string processing as Perl, as powerful for linear algebra as Matlab, as good at gluing programs together as the shell. Something that is dirt simple to learn, yet keeps the most serious hackers happy. We want it interactive and we want it compiled.
While we’re being demanding, we want something that provides the distributed power of Hadoop — without the kilobytes of boilerplate Java and XML; without being forced to sift through gigabytes of log files on hundreds of machines to find our bugs. We want the power without the layers of impenetrable complexity. We want to write simple scalar loops that compile down to tight machine code using just the registers on a single CPU. We want to write A*B and launch a thousand computations on a thousand machines, calculating a vast matrix product together."
For those interested in learning more. There is an introductory tutorial series on Julia and HPC at HPC Admin Magazine. And just like BASIC, it is easy to get started with Julia. Instead of writing code for single machine, you can now set your sights on twiddling with code to drive a supercomputer. Consult the following articles for more information on Julia.
- Julia: A New Language For Technical Computing
- Parallel Julia: Part 2
- Easy Peasy Parallel: Julia Distributed Arrays
Login And Newsletter