Julia: The Language

Julia: The Language


Julia is a newish programming language designed to provide high-level and high performance technical computing. It has a syntax that should be familiar to users of Matlab and Python. The languge is rapidly evolving and has a signigicantly increasing popultion of contributors. Julia is based around a LLVM (low level virtual machine) JIT (just-in-time) complier which allows for high performance at usually around 2-3x C speed and in some cases vitually equal to C speed. Unlike the usual strategy of vectorising code to increase speed, as found in python, Julia works extreamly rapidly when just using standard for loops. The main developers of the Julia language are based at MIT and have written an in depth description of the design philosophy of the language which can be found here.


For this workshop a virtual machine has been set up with Julia allready installed - the image can be found at this link. However if you wish to install Julia on your own machine their are various routes available. The easiest possible route is to follow the instructions, for your operating system, found on the Julia website. It may be necassary to add the Julia executable to your path in order to run the REPL from the terminal. If you would like to live on the bleeding edge of Julia development then you can install from source by following the instructions on the Julia Github - be aware that when following this method you will have to wait a very very long time (expect upto 3 hours!!) and there will probably be various errors because of dependencies that you lack (cmake and m4 were needed when installing on mac).

Julia can be used via the REPL or by running scripts, however an excellent working enviroment is provided by the IJulia kernal for the Jupyter (formally IPython) notebook. In order to install IJulia you will first need a version of Python, version 2.7 is recomended, along with IPython and the IPython notebook. IPython and the notebook can be installed using pip;

$ pip install 'ipython[notebook]'

Once the Python dependencies have been installed you will need to open up a Julia REPL and use the following command;

julia> Pkg.add("IJulia")

The IJulia package will then be installed and should be available in Jupyter by running the following in the terminal;

$ ipython notebook

A new browser window should appear in which the local file structure will be displayed, selecting new in the top right corner and then picking the julia kernal from the dropdown menu should start a new notebook file.

Workshop Content

The Basics

DL Notebook-The-Basics.ipynb (right click and save as..)

View Notebook-The-Basics.ipynb

Julia types

DL Notebook-Julia-Types.ipynb (right click and save as..)

View Notebook-Julia-Types.ipynb

Parallelism in Julia

DL Notebook-Parallel.ipynb (right click and save as..)

View Notebook-Parallel.ipynb

More to learn....

Some links to find out more about julia;



Package Listing


Google Group