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.
The main hubs of Julia activity are:
#### julia-dev mailing list core language and standard library discussions (note: both mailing lists are open to public)
#### The Julia Language project on GitHub: source code, issue tracker
#### Packages, see full listing here
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]:
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.
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 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]:
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 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.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.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.
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.
Recent Hacker Schoolers and other contributors have put together a budding suite of web-related functionality written in pure Julia.
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.