Introduction to Julia for Pythonistas

<img src="http://pearsonlab.github.io/images/plab_hex_icon_gray.png" width="150", align="left", style="float:left"> <img src="http://www.duke.edu/~jmp33/assets/dibs-logo-small.png" width="350", align="left", style="float:right">


John Pearson
P[λ]ab
Duke Institute for Brain Sciences

Following along

If you have Julia...

Slides and other material available at https://github.com/jmxpearson/julia-for-pythonistas

About me

  • @jmxpearson on GitHub and (rarely) Twitter; pearsonlab.github.io
  • computational neuroscience lab at Duke
  • using Julia for about 1.5 years
  • member of JuliaStats organization

What is Julia?

  • new programming language (public since 2012)
  • brought to you by MIT, Julia Computing
  • focused on scientific computing applications
  • aims to be a high-level prototyping language that is also fast enough for serious simulation
    • as easy to learn and flexible as Python or R
    • within 2x the speed of C, C++, or FORTRAN
  • Currently (almost) 0.5, with very active developer community

Reasons to Consider Julia

  • you mostly write your own algorithms
  • you need to write code that is very fast
  • you’d like to prototype and optimize within the same language
  • you want zero overhead boilerplate calls to C, Python (and soon C++)
  • you need powerful metaprogramming/macros
  • you want access to state-of-the-art automatic differentiation and optimization
  • you want to use Greek letters in variable names
  • you are interested in programming language design
  • you want to get in on the ground floor

Reasons Julia may not be for you (yet)

  • you mostly use packages written by others
  • you rely critically on several packages that aren't available
  • you don’t have much need to optimize your code
  • you perform mostly data analysis and model building, as opposed to algorithm development
  • you prioritize long-term stability
  • you don’t want to devote time to keeping up with changes
  • you have zero background with compiled languages