tinkerlab.dev
/julia
§J · Julia · 20 sections

Julia cheat sheet

Written for someone who already writes Go, Elixir, Python, Java and Node, and is starting Julia in 2026 (Julia 1.12 era). It assumes you know what a loop is; it does not assume you know what a Vector{<:Real} is or why A[:, 1] is faster than A[1, :].

Section 01 gets a working environment. Read 02 and 03 back to back, then write something. Come back to the rest as needed.

Conventions used here

  • julia> prompts are omitted; code blocks are things you can paste.
  • # comments after a line show the result where useful.
  • Anything marked trap is a mistake most people make exactly once.

The one-paragraph orientation

Julia is a dynamically typed language with an aggressive JIT, whose organising abstraction is multiple dispatch rather than objects or modules. Types exist mainly to select methods and to let the compiler generate specialised machine code; you can ignore them and the program still runs, but you’ll leave a factor of 50 on the table. There is no class, no inheritance of data, no interface keyword, no null, and no BEAM. The standard library is large and numerics-heavy. Packages are just modules with a Project.toml, and the package manager is genuinely good.

Take it with you

PDF The whole thing, with a table of contents julia-cheatsheet-complete.pdf · 2.8 MB

Every section below is also a standalone PDF — the pdf link in its row. Both are built from the same Markdown by pandoc + typst on each deploy.

Reading order

§SectionContentsWhenPDF
01 Setting up juliaup, environment variables, editors, JETLS, self-hosted extras First pdf ↓
02 Syntax basics Variables, control flow, operators, printing, the shape of the language First pdf ↓
03 Gotchas Where Julia contradicts your instincts. 1-based, column-major, silent overflow, copies vs views First pdf ↓
04 Types Abstract/concrete, parametric, unions, invariance Early — needed for everything else pdf ↓
05 Multiple dispatch The organising principle. How it differs from OO and from Elixir clauses Early pdf ↓
06 Structs Immutability by default, constructors, @kwdef Early pdf ↓
07 Functions Keyword args, splatting, do blocks, closures, destructuring Early pdf ↓
08 Arrays and broadcasting Slicing, views, the dot, loop fusion, comprehensions Early pdf ↓
09 Strings and symbols Interpolation, byte indexing, regex, Symbol As needed pdf ↓
10 nothing, missing, NaN Three different holes, three different behaviours As needed pdf ↓
11 Errors and exceptions try/catch, custom exceptions, why there's no supervisor As needed pdf ↓
12 Modules and packages using vs import, package layout, Pkg REPL Before your second project pdf ↓
13 Interfaces Informal protocols: iterate, getindex, show When you define your own types pdf ↓
14 Metaprogramming Expr, quoting, macros, hygiene, generated functions When you get curious, or when you need to read a package pdf ↓
15 Concurrency and parallelism Tasks, threads, channels, and what does not transfer from the BEAM When you need it pdf ↓
16 Performance Type stability, @code_warntype, allocation, benchmarking Once your code works pdf ↓
17 Testing Test stdlib, testsets, test items, Aqua, JET Before you publish anything pdf ↓
18 Standard tasks Files, processes, dates, data wrangling, HTTP, JSON Reference pdf ↓
19 Linear algebra Solves, factorisations, wrapper types Reference pdf ↓
20 The REPL and Unicode Keybindings, help mode, how to type Greek First day, then never again pdf ↓

Sources live in the site repo as plain Markdown. Corrections welcome — Julia moves, and this was written against 1.12.