Julia 0.2 Community Tour

Julia is a dynamic language for technical computing with familiar, script-friendly syntax, an extensive mathematical library and array-oriented computing built-in, and a high performance (< 2x of C code) just-in-time compiler.

The release of Julia 0.2 marks the culmination of 9 months of work and nearly 4,600 commits to the Julia core, resulting in numerous bug fixes as well as fundamental improvements to language performance and functionality (as detailed in the 0.2 NEWS section).

Alongside core language work, the Julia community and package ecosystem have grown dramatically, and this post highlights some developments in the Julia community which may be of particular interest to new users.

Community and contribution

The main hubs of Julia activity are:

Major Developments

Shareable workflows with IJulia

This post is written in IJulia, a backend for the remarkable IPython system resulting from close collaboration between the two communities. IJulia supports code blocks with highlighting and auto-completion, inline plots, and auxiliary cells containing Markdown, $\LaTeX$, static graphics, and much more! Here is an example of the logistic function plotted inline using PyPlot.jl:


In [2]:
using PyPlot

S(t) = 1 / (1 + exp(-t))
t = -6:.01:6

figure(figsize=[7,2])
plot(t, S(t))


Out[2]:
1-element Array{Any,1}:
 PyObject <matplotlib.lines.Line2D object at 0xad29550>

PyCall: Seamlessly call Python libraries from Julia

Existing Python libraries can be easily accessed from Julia using the PyCall package. PyCall is used in the PyPlot package referenced above to call Matplotlib, and PyCall has been used to access other libraries such as scikit-learn, NLTK, and PySide.

Julia Stats and DataFrames

The JuliaStats project is the home of DataFrames, a library and framework for working with tabular data (and a spiritual descendant of the R DataFrame, Pandas in Python, and similar systems). JuliaStats is also the hub of development for Julia's statistical functionality including distribution generators and a variety of modeling including Markov Chain Monte Carlo (MCMC) methods, Generalized Linear Models, time series modeling, and more.

Gadfly: Crafty statistical plotting

Gadfly is a system for plotting and visualization based largely on Hadley Wickhams's ggplot2 for R, and Leland Wilkinson's book The Grammar of Graphics. It renders publication quality graphics to PNG, Postscript, PDF, SVG, and Javascript. The Javascript backend uses d3 to add interactivity like panning, zooming, and toggling.


In [1]:
using Gadfly
Gadfly.plot(x=1:10, y=2.^rand(10),
     Scale.y_sqrt, Geom.point, Geom.smooth,
     Guide.xlabel("Stimulus"), Guide.ylabel("Response"))


Out[1]:

Optimization in Julia

The JuliaOpt project is an umbrella for optimization-related work in Julia, including JuMP, an algebraic modeling language for optimization problems, along with interfaces to several high-quality solver libraries (Coin, Gurobi, GLPK, NLopt, and more).

Grids

Grid.jl provides support for common operations on continuous objects, such as functions or images, which are frequently sampled on a regularly-spaced grid of points.

Winston

Winston is a native Julia graphics system offering easy-to-use plot command to create figures without any fuss.

randomwalk(n) = (r = randn(n); [sum(r[1:i]) for i=1:n])
plot()
oplot(randomwalk(300))
oplot(randomwalk(300))

Graphs

Graphs.jl is a Julia package that provides graph types and algorithms. The design of this package is inspired by the Boost Graph Library (e.g. using standardized generic interfaces), while taking advantage of Julia's language features (e.g. multiple dispatch).

Images and ImageView

Images.jl is a library for image i/o and image processing, developed in close concert with the ImageView.jl package for image viewing, region selection, histogramming, and more.

SQLite interface

SQLite.jl is a Julia interface to the SQLite library with support for operations on DataFrames.

GSL interface

GSL.jl is a wrapper for the GNU Scientific Library, providing access to a variety of special functionality not available in the Julia base distribution.

MATLAB interface

MATLAB.jl is a package to support calling MATLAB functions and manipulating MATLAB arrays in Julia, thus making it easier to use the sheer amount of toolboxes available in MATLAB.

Web libraries

Recent Hacker Schoolers and other contributors have put together a budding suite of web-related functionality written in pure Julia.

  • HttpServer.jl is a basic, non-blocking HTTP server in Julia.
  • HttpCommon.jl provides types and helper functions for dealing with the HTTP protocol in Julia.
  • WebSockets.jl is a server-side implementation of the WebSockets protocol in Julia. If you want to write a web app in Julia that uses websockets, you'll need this package.

In the oven

Here are a few work-in-progress projects we would like to highlight for future potential. These are not fully ready for end-user release, but new contributors are encouraged to join in, and conscientious testers are very much welcome!

Highly-parallel and GPGPU Computing

  • OpenCL.jl is a wrapper for the OpenCL 1.2 parallel computation API, aiming to be a complete solution for OpenCL programming in Julia, similar in scope to PyOpenCL for Python. Example notebook: OpenCL fractals from Julia

  • CUDA.jl provides access to Nvidia's Compute Unified Device Architecture (CUDA) Driver API.

Large-scale compute environments

  • ClusterManagers.jl is an interface for cluster engines, currently supporting SunGridEngine and Sclyd.
  • AWS.jl is a native julia interface to the Amazon Web Services API.

GUI libraries

  • Gtk.jl is an interface to the Gtk library for cross-platform GUI creation.
  • PySide.jl is an interface to the PySide Qt wrapper, utilizing PyCall.