The Julia language is a young programming language designed to provide the abstraction and ease of use of languages like Python, R or Matlab, while offering performance on par with C or Fortran. In this talk, I go through my experience learning Julia over the last 6 months, the design behind Julia's performance and give an overview of Julia's current package ecosystem. This talk is meant as an introduction for people curious about Julia.
Slides and code from my March 2020 Julia talk
The slides were made with Marp.
All code examples were made in Julia 1.3.1, but they should work on 1.2.0 as well.
The latest version of Julia can be downloaded on the official website. The creators of Julia have also started a company called Julia Computing, that provides various services around Julia, including editor support and curated packages.
Here are some links for those looking for more arguments in favour of Julia.
- Julia: A Fast Dynamic Language for Technical Computing : The 2012 paper in which Julia was unveiled by its creators.
- Why we created Julia : a blog post stating their reasons for creating Julia.
- Automatic Differentiation in 10 minutes with Julia : a short video by one of Julia's creators showcasing how Julia's design enables doing Automatic Differentiation, i.e. exact computation of derivatives without symbolic computation in a manner that is both efficient and elegant.
- SC19 Awards Presentation: IEEE-CS Sidney Fernbach Award - Alan Edelman, MIT : One of the creators of Julia talking about High Performance Computing, and how Julia was designed with it in mind.
- JuliaCon 2018 | Why Julia is the most suitable language for science | George Datseris : Another talk in the same vein as mine, that covers some features of Julia I didn't talk about.
One of Julia's main selling points is the ability to have the performance of C with the flexibility of Python. Here are a few benchmarks to back that up with numbers. Some of those are pretty old and/or may not be entirely up to snuff.
- Julia Micro-Benchmarks : A pretty old set of benchmarks. Take those with a grain of salt.
- Basic Comparison of Python, Julia, Matlab, IDL and Java (2019 Edition) : A comprehensive comparison of the most popular scientific computing languages. Note that the version of Julia used was already outdated when they made it.
- Julia vs R: Freeing the data scientist mind from the curse of vectoRization : A comparison of R and Julia made in August 2019.
- Benchmark of popular graph / network packages : A comparison of libraries for network analysis, including Julia's LightGraphs.jl package.
Julia can be used from the command line in REPL form, much like R, but the JuliaPro editor, which is based on Atom, provides a workflow analogous to Rstudio or Matlab. Alternatively, one can use Jupyter Notebooks with the IJulia package. Other editors, such as VS Code, Vim or IDEA are also supported, but nowhere near the level of polish of JuliaPro. Weave.jl allows you to generate reports with a markup language à la Rmarkdown.
Given the amount of interest (and funding) Julia is getting, it's no surprise that there are plenty of learning resources. I found the manual and the occasional visit to stackoverflow to be all I need, but your mileage may vary. Users coming to Julia from another language should check out this page
Although Julia's package ecosystem is not quite mature yet compared to Python or R, contributing to packages and publishing new ones is extremely easy, as the majority of them are hosted on github under an open source license. In addition, some important packages are curated by JuliaComputing, meaning you can expect them to be well maintained and documented... for the most part.
Some packages include
-
Networks: LightGraphs.jl is an excellent package for network analysis, including generators for a wide array of static and random network models and a plethora of network algorithms. It is the core of the wider JuliaGraphs ecosystem.
-
Numerical integration and Dynamical Systems: DifferentialEquations.jl is a massive suite of solvers for differential equations. If you believe this blog post by the main author of the package, it is the most comprehensive suite of solvers on the market today. DynamicalSystems.jl is a suite of packages that builds on top of DifferentialEquations.jl to provide tools for analysing general dynamical systems.
-
Statistics: While I haven't looked much into it myself, there seems to be a fair few packages dedicated to statistics, most of them in the JuliaStats ecosystem.
-
Machine Learning: As you would expect, this is a major focus of the language, so there are a ton of packages, including the pure Julia Flux.jl as well as wrappers like TensorFlow.jl or ScikitLearn.jl. Again, this isn't really my domain, so I can't tell you much.
-
Plotting: Your first stop should be Plots.jl, which provides an interface over multiple plotting backends, meaning you can switch to pyplot with a single call, and all your plotting code will work without modifications. Statistics people should look into StatsPlots.jl and Gadfly.jl. Note that Plots.jl is mostly intended for creating static plots without interactivity. Makie.jl is a package currently under development that aims to bring the ideas from Plots.jl to the next level in an interactive way. I can't quite recommend it yet, however, since I couldn't get it to work.
-
Interfacing with other languages: Switching to Julia doesn't mean you have to throw away your old code. You can natively call C and Fortran functions and there are bindings for C++, Python, R and many more.
Some talks and blog post worth checking once you are more familiar with Julia
- JuliaCon 2019 | The Unreasonable Effectiveness of Multiple Dispatch | Stefan Karpinski
- JuliaLang: The Ingredients for a Composable Programming Language : A blog post about how Julia manages to be se remarkably composable.
- https://juliagpu.org/cuda/ : Julia running natively on NVIDIA GPUs. 'nuff said.
- JuliaCon 2019 | How We Wrote a Textbook using Julia : Some Julia and LaTeX shenanigans.
- JuliaCon 2019 | What's Bad About Julia | Jeff Bezanson
- Julia User & Developer Survey 2019
- JuliaCon 2017 | The State of the Type System | Jeff Bezanson
- JuliaCon 2019 | Porting a Massively Parallel Multi-GPU Application to Julia | Ludovic Räss
- JuliaCon 2018 | Solving Partial Differential Equations with Julia | Chris Rackauckas
- Solving Systems of Stochastic PDEs and using GPUs in Julia
- JuliaCon 2019 | Scientific AI: Domain Models with Integrated Machine Learning | Chris Rackauckas : Neural Networks and ODEs for fun and profit.
- PackageCompiler.jl : "Precompile" packages to reduce loading times. Not very active, so use at your own risk.