a NEW language FOR AI AND ML

What is julia and why julia?

Julia is an open source, compiled, high level, high performance programming language. It is designed specifically for scientific computing, machine learning, data mining, large-scale linear algebra, distributed and parallel computing. Julia aims to overcome the low execution speed of Python (without compromising its accessibility!), in order to be as fast as C. It's a pretty young language becoming dominant in research fields especially for AI and ML.

It is interactive, with straightforward math friendly syntax and automatic memory management, and it natively supports concurrent and distributed programming.

A big advantage of Julia is that it is effectively interoperable with many languages (the majority of the top 20 in popular use). Moreover C and Fortran libraries can be called directly without glue code nor wrappers or APIs and there are libraries to interact with Python, R and Java as well.


πŸ“” Date and Time

  • First lecture:
    πŸ—“ Monday, November 23rd
    πŸ•š 11:00 - 13:00

  • Second lecture:
    πŸ—“οΈ Thursday, December 3rd
    πŸ•“ 16:00 - 18:00

  • Third lecture:
    πŸ—“οΈ Thursday, December 10th
    πŸ•“ 16:00 - 18:00

  • Advanced Lecture TBD

πŸ“ Platform

Microsoft Teams


The lectures will be held in English and they will be both live streamed and recorded. The registrations are saved in the Teams channel. Plus, after the course is finished we will upload it on our Youtube channel. 🎞️

Register for the online ones on Eventbrite, at this link. πŸ”–

NEWS: due to the new DPCM, the course will be held entirely on-line. There is no need to change ticket: we'll provide the link to Zoom also to everyone that booked a seat for the in-presence lessons!

The course is just for AI2S members for what concerns the students, but it's open for professors and researchers. Registrations to the association are always open, since we have both the fillable module online and the PayPal account for fast payments. See the page Join AI2S to subscribe! 🀠


FIRST LECTURE: Introduction to the Julia language

In this lecture the basics of the Julia language and its peculiarities will be explored:

  • History of Julia

  • Working in the REPL

  • Types

  • Tuples and arrays

  • Dictionaries and struct

  • Selection and iteration constructs

  • Functions

  • Multiple dispatch

  • Macros

SECOND AND THIRD LECTURES: Libraries for all uses

During the other two lectures will be briefly introduced a collection of libraries for using Julia in Artificial Intelligence and Scientific Computing.

  • Notebooks: Jupyter and Pluto. Introduction to some plotting libraries that will be used in the rest of the course.

  • Machine Learning: Flux.jl. Exploration of the Julia library Flux.jl, together with some closely related libraries to build a simple neural network from scratch.

  • Parallel and Distributed computing: Threads, Cuda.jl, DistributedArrays.jl. Introduction of the different ways Julia code can be accelerated, either by running it in multiple thread (on a single machine), on a GPU (with Cuda.jl), or in a distributed fashion (via DistributedArray.jl).

  • Interact with Python, R, and other languages: PyCall.jl and RCall.jl. One cannot expect all code to be rewritten in Julia, but it will be shown how one can integrate existing code with Julia.

  • Differential Equations: DifferentialEquations.jl. It will be seen how Julia can be used to define and solve many different kinds of differential equations.

  • Statistics with Julia: JuliaStats and the StatsKit metapackage. Introduction to some of the libraries that help doing statistics with Julia.

  • Probabilistic Programming: Turing.jl. Probabilistic programming is a way of programming where probabilistic models are specified and inference of them is performed automatically. For Julia the most prominent library in this field is Turing.jl.


Knowledge of another programming language (e.g., Python, C, R) is extremely useful, since the introductory part will mostly focus on the different syntax of Julia and the new features that are available.


Prof. Luca MANZONI

Assistant Professor at the Department of Mathematics and Geosciences at the University of Trieste

Some Julia snippets

Linear Algebra

Julia maintains the simplicity of Python even though it is a compiled, high performant language. Check for examples the following lines with some basic Linear Algebra.


A typical example of Reinforcement Learning task is the Cartpole problem. It is an inverted pendulum with a center of gravity above its pivot point. It’s unstable, but can be controlled by moving the cart to the right or to the left. The goal is to keep the cartpole balanced. The algorithm learns from its mistakes and improves its performance, since it is incentivized with punishments for bad actions and rewards for good ones.

Julia code:

Python code:

The code is take from here, while the gif is taken from here.

The main difference with respect to Python resides in the performance that Julia is able to provide.

Julia is orders of magnitudes faster than Python/Matlab on benchmark applications, which is crucial in HPC, scientific computing everyday tasks. You can find more information regarding the benchmarks here.


For any question concerning the course, please contact us at events@ai2s.it