Skip to content

Julia

Julia version 1.0 was released on 08 Aug 2018. Julia was specifically designed for scientific and numerical computing. Although it is a flexible and dynamic language, it can achieve performance comparable to traditional statically-typed languages like C or Fortran. See The Julia Programming Language home page and read the Julia 1.0 release blog post for a general overview of the language.

On our cluster the latest Julia is installed under the shared network location /shared/opt/julia-1.6.2/
The examples below are for Julia 1.0

Quick Start with Julia

Starting an interactive julia session. To exit the interactive session, type CTRL-D or type exit().

$ /shared/opt/julia-1.0.0/bin/julia
julia >

To obtain help type a ? at the Julia> prompt:

julia> ?
help?> 
Welcome to Julia 1.0.0. The full manual is available at
https://docs.julialang.org/
as well as many great tutorials and learning resources:
https://julialang.org/learning/
For help on a specific function or macro, type ? followed by its name, e.g. ?cos, or ?@time, and press enter. 
Type ; to enter shell mode, ] to enter package mode.
julia>

Try getting help on the cosine function by typing ?cos at the Julia> prompt.

Invoking the Julia package manager can be done in either of two ways:

julia> using Pkg
julia> Pkg.status()
    Status `~/.julia/environments/v1.0/Project.toml`
  [c5f51814] CUDAdrv v0.8.5
  [91a5bcdd] Plots v0.19.2
julia>

or by using the interactive command-line invoked by typing the ] character:

julia> ]
(v1.0) pkg> status
Status `~/.julia/environments/v1.0/Project.toml`
[c5f51814] CUDAdrv v0.8.5
[91a5bcdd] Plots v0.19.2
(v1.0) pkg>

You should definately read the package manager documentation as this covers some of the useful features of Julia for repoducible research using Project and Manifest files.

References

Documentation & Tutorials

The Julia Programming Language home page https://julialang.org
Julia documentation https://docs.julialang.org
Julia tutorials and learning resources https://julialang.org/learning/
The Julia Express 1.0 manual is available as a PDF document https://github.com/bkamins/The-Julia-Express
Cheat sheets and Tutorials: There is “The Fast Track to Julia” at https://juliadocs.github.io/Julia-Cheat-Sheet/ and a single page PDF sheet at https://github.com/stevengj/1806/blob/master/julia/Julia-cheatsheet.pdf. Note that both of these are for older Julia versions.

Packaging

A list of all registered packages for the Julia programming language https://julialang.org/packages/ “Julia Observer” https://juliaobserver.com is a web based package browsing tool for Julia packages.
This site https://github.com/svaksha/Julia.jl aggregates and curates Julia programming resources.

Profiling

If you wish to profile your Julia code (and you should) then read Profiling and Visualization of Julia profiling data.

Examples

A High Precision Calculation of Feigenbaum’s Alpha Using Julia