JuliaCon 2020

mug shot

Julia is an exciting new language (1.0 released in 2018) well suited for scientific computing. More impressive is the vibrant Julia community of users and developers. JuliaCon is an annual meetup that showcases the exciting work going on around the Julia ecosystem. This was my first year attending (albeit virtually!) and I am still working to get caught up on all of the great talks! In this post I’ll curate some of my favorite talks from this year and their relevance to my work.

Building Microservices and Applications in Julia

This is a great workshop on how to organize Julia code into modules for effective code reuse. At first I found the compiled nature of Julia to make building Julia modules and packages more complicated than doing so in Python, Jacob Quin does a nice job breaking the process down.

Using VS Code for Julia Developement

I use VS Code as my IDE of choice for most work and find that the Julia extension is a must when writing Julia. I learned several new tips from this talk including how to run julia scripts e.g. script.jl like Jupyter Notebooks! E.g. <ctrl> + <enter> to run a single line to the REPL (or printing the result right next to the line itself aftering changing the settings) and <shift> + <enter> to run a cell Jupyter style.

## cell 1
a = 1
b = 2
c = a + b
println("The sum of $a and $b is $c")
## cell 2
println("hitting <shift> + <enter> runs the next cell")


I find Pluto to a be a real joy to experiment in. I find it great for following along with tutorials where I can write notes and link to resources, much like a Jupyter notebook 1.

A key difference where Pluto notebooks stand apart from Jupyter Notebooks is that it is a reactive notebook which didn’t really set in for me until I started playing around with Pluto for a while. Basically whenever I change a variable or function in one cell, all other cells referencing that variable get updated automatically. This avoids a recurring issue in Jupyter Notebooks that each cell must be run sequentially, jumping around and changing variable names or values can affect the reproducibility of the results. This is avoided in Pluto where all values are updated simultaneously. Additionally Pluto makes use of multiple threads so this all feels pretty lightweight and responsive when doing small computations.

I have however experienced some friction while using Pluto for large array calculations common in my imagnig research work. In these instances I experience Pluto feeling lagging and sometimes crashing requiring a <ctrl> + c kill in the terminal. My current workflow is to experiment and take notes with toy examples in Pluto then move to writing a script in VScode for a more performant feel.

All in all I think many of these wrinkles will be ironed out in time. While I still use Jupyter notebooks regularly, what ultimately What keeps me coming back to Pluto is the reactive notebook and the ease of using version control such as git which makes the notebooks easier to share.


DrWatson.jl is another Julia package that I learned about from this year’s JuliaCon that I have incorportated into many of my research projects. What initially sold me were several of the defined convenience functions such as initialize_project and @quickactivate that help me better organize and share my projects (consistent with the recommendations of one of my favorite best practices papers).

While there is much more functinality in this package these are the first two functions I started using immediately and continue to use it in my projects today. I even have using DrWatson in my ~/.julia/config/startup.jl to more easily run @quickactivate anytime I cd into my project directory and run Julia.

  1. Fun fact: Jupyter stands for Julia, Python, and R, even though many language kernels are supported.