The scientific computing world of Julia

Mariel | Dec 29, 2022

This seems to be a festive season and I decided to give my fresh Linux OS a new programming language: Julia. I heard of it during my MSc, but I never took the time to dig in deeper in the language. Here are my first impressions of Julia.

Why Julia?

I still remember when I first heard of Julia, it was circa 2020 or early 2021. I had a colleague at my previous job that I was into scientific computing that told me that if I liked Python and NumPy, then I would love Julia. Casually, I have a friend with that name ðŸĪŠ

Months later, Julia became more popular among the cohort because of a dissertation project. It seems that lots of us wanted to get it. The project was about creating a JuMP interface for an open source optimization solver. I didn’t get the project, but it certainly caught my curiosity.

While I was configuring my development environment this week, I thought… why not?

Penny for your thoughts?

To say that I didn’t expect a lot of Julia, would be an utter lie. Frankly, after reading so many things and all the hype around Julia, I don’t know what I expected. Every single blog post I have read about Julia describes it as “Python simplicity with the speed of C”, so I expected something massive.

Here are some things I didn’t like a lot:

  1. 1-based indexing. OMG. This one put me off. I know, it’s a subjective and quite a controversial topic among programmers. I thought I left that indexing behind with Fortran, R, and SQL. It will take me some time to rewire to start counting array elements again with 1, 2, 3…
  2. Julia is basically for scientific computing, and as such, it is not a chunky language. It feels niche.
  3. The preferred way to use Julia, or so I’ve seen in many tutorials is either with Jupyter notebooks or Julia REPL. I used Jupyter notebooks a lot during my early days of Python, however now I prefer writing scripts can be invoked without “pressing the play buttons” of notebooks.
  4. As far as I understand, Julia does not support OOP fully. I have seen some elements of functional programming like map, still it does not support FP fully either.
  5. Dork Duck typing ðŸĶ†
  6. I am not a big fan of the end keyword at the end (sic) of every control flow. Feels a lot like VB.
if (x > 5)
  println("true")
else
  println("false")
end

Why, Julia? 😔

However, not all is lost. There are good things!

  1. Pkg package manager. It’s way simpler than pip 😄
  2. Flexibility when changing the backend of the plots. This was quite awesome, to be fair. I could use the PlotlyJS backend and make the plots interactive.
  3. Following up on Plotly, I felt that it was easier to use this library with Julia than with Python ðŸ˜ē (n.b. Plotly is one of many pending assignments)
  4. I like the ternary operators and the anonymous functions here.
  5. It does share a lot of common traits with Python. A Python programmer can swiftly pick up Julia. I’m happy to see that comprehensions are also part of Julia 😁
  6. Julia has a lot of momentum building up among the scientific community. This means that there will be many more features added in the next releases.

Next plans

Curiosity was not the only driver that pushed me to explore and learn Julia. I am hoping to participate in a small scientific computing hackathon next month. It’s a good excuse for refreshing my skills, as I haven’t really done much of scientific computing in the last half of this year.

I will be trying JuMP as soon as I finish the Julia Academy learning material and hopefully, by then, I will see the speed of Julia.