The Julia programming language: a missed opportunity for AI

A laptop suspended in the air by 6 colourful balloons. The screen shows the word JULIA.

Admittedly, it was the headline that caught my attention, and I’ve only briefly looked a bit into Julia. Of course, there is also more to a language than just speed, such as wealth of libraries, wealth of documentation and tutorials, cross-platform compatibility, etc.

Its creators, in a 2012 blog post, stated they aimed to combine the speed of C with the ease of use of Python, while adopting additional positive qualities from various other leading programming languages.

On the face of it, Julia is pretty easy to pick up if you know any high-level language well. Python users could quite easily adapt to using it once you know some of the minor differences such as indexing of arrays starting at 1 instead of 0, concatenation of strings is with a “*” and not a “+”, etc. Julia’s syntax is straightforward and intuitive, similar to that of Python, meaning it can be used extensively for exploratory programming and data analysis. They have a good FAQ itemising the differences to many other common languages such as Python, Common Lisp, C/C++, MATLAB, and R.

A FAQ is often why they did not just plug a Matlab or Python front-end into a Julia back-end (or “transpile” code to Julia) in order to get all the performance benefits of Julia without requiring programmers to learn a new language. Julia’s performance advantage derives almost entirely from its front-end: its language semantics allow a well-written Julia program to give more opportunities to the compiler to generate efficient code and memory layouts. If you tried to compile Matlab or Python code to Julia, the compiler would be limited by the semantics of Matlab or Python to producing code no better than that of existing compilers for those languages (and probably worse).

There is also a build_executable function, but it is noted that this compatible across Windows and macOS, but not on Linux. To increase the portability, they suggest you use an older “cpu_target” target as “core2” instead of “native”.

Importantly, too, the language is open-source and not affiliated to any company. That said, one programmer who no longer recommends Julia, state it was because the community swept some problems under the rug.

It is already used in many areas, for example NASA has deployed Julia to calculate the courses of spacecraft. It excels is financial analysis, weather forecasting and car crash simulations, etc. Its creators, in a 2012 blog post, stated they aimed to combine the speed of C with the ease of use of Python, while adopting additional positive qualities from various other leading programming languages.

Given that Julia’s big advantage over Python is where speed, becomes a primary factor, it would be well suited you’d think for AI. If you need to scale your workload, Julia should offer a strong basis to keep growing. But Python has a mass adoption and people don’t change languages just for the sake of it, especially when there is such a wealth of documentation and assistance out there for Python. Still, if speed is a primary factor, then it may well be worth considering Julia, especially given that is also quite easy to learn.

See https://www.techzine.eu/blogs/devops/118517/the-julia-programming-language-a-missed-opportunity-for-ai/