Home / Julia
Julia
Julia at the expert step: staged programming, union splitting, SIMD, threads and distributed work, robust packages and scientific computing from the standard library.
Intermediate Julia teaches you to measure what code costs. This course teaches you to bend the compiler, the machine, and the package around your programs. Forty-seven lessons move from code that writes code and types that carry values into measured speed, parallel machines, robust packages, and scientific work built only from the standard library.
Course contents
Work top to bottom — the sidebar is the course. Topics later in the list assume the ones before them.
Julia Advanced Introduction
Advanced · ⏱ 3 min · standalone lesson
Advanced Metaprogramming
- Julia Generated Functions in Depth
- Julia Staged Programming
- Julia Expression Walking
- Julia Macro Systems
- Julia Eval and World Age
- Julia Code Transformation
- Julia Reflection in Depth
Advanced Types
- Julia Union Splitting
- Julia Vararg Types
- Julia Tuple Types in Depth
- Julia Parametric Dispatch Edges
- Julia Abstract Design
- Julia Singleton Types
Performance in Depth
- Julia Memory Layout
- Julia SIMD Concepts
- Julia Profiling Method
- Julia Specialization and Inlining
- Julia Allocation Patterns
- Julia Benchmarking Rigor
Parallel and Distributed in Depth
- Julia Threads in Depth
- Julia Atomics and Locks
- Julia Distributed at a First Look
- Julia Distributed Patterns
- Julia Async in Depth
- Julia Parallel Design
Robustness in Depth
- Julia Error Recovery Patterns
- Julia Resource Safety
- Julia Result Patterns
- Julia Defensive Interfaces
Package Development
- Julia Package Structure
- Julia Writing Tests
- Julia Documenting Code
- Julia Versioning and Compat
- Julia Publishing Workflow
Scientific Computing
- Julia Numerical Methods
- Julia Linear Algebra
- Julia Optimization from Scratch
- Julia Differential Equations
- Julia Statistics from Scratch
- Julia Seeded Randomness
- Julia Data Fitting
- Julia Signal Smoothing
Projects
Start: Julia ML Toolkit ❯The advanced step in Julia
An intermediate programmer reads costs. An advanced programmer changes them. This course is about that change: generating code while the compiler still has it in hand, laying data out so the machine moves less, spreading work across threads and processes, and shipping a package a stranger can rely on.
Code that writes code turns from a novelty into everyday engineering here. You will walk expression trees, build macros that keep their hygiene when combined, generate functions that branch on types, and reach freshly evaluated definitions through the newest world age. With generation kept disciplined, repetition leaves the source while the checks stay in place.
The forty-seven lessons fall into eight groups and take the intermediate course as finished background. Earlier material is never repeated. Each new idea appears exactly where the next lesson needs it, and each stated output was produced by running the real Julia interpreter twice.
What you will learn
Read the eight groups in order: every group hands the next one a tool it will actually use.
- Generate code at compile time, walk and rewrite expressions, compose hygienic macros, and cross world-age boundaries safely
- Split unions, shape Vararg and tuple types, resolve dispatch edges, design abstract hierarchies, and dispatch on singleton values
- Read memory layout, use SIMD on integer sums, profile by allocation scaling, control specialization, and benchmark without clocks
- Drive threads with partials and atomics, guard state with locks, add worker processes, and pick the right parallel pattern
- Retry with fallbacks, clean resources up deterministically, return results instead of throwing, and defend interfaces with checks
- Structure a package, test it with counted checks, document it, bound its versions, and walk the publishing steps
- Solve equations, fit lines, descend gradients, step differential equations, seed randomness, and smooth signals from scratch
- Finish a machine-learning toolkit, a simulation, a tested package, and a parallel pipeline
Why the compiler is the real subject
The compiler builds every method for the exact types it gets, and advanced work means steering that build on purpose. A generated function that unrolls a tuple loop, a union argument that splits into fast paths, and a specialization annotation that stops needless recompilation are all the same skill: telling the compiler exactly what varies and what stays fixed.
Performance at this level is layout and counting, not stopwatch folklore. A struct with a small field beside a wide one carries padding you can measure with sizeof. A matrix read down its columns follows the memory order Julia actually uses. A preallocated buffer refills for zero allocations while a growing list pays for every extension. No lesson asks you to believe a speed claim that an allocation count cannot show.
Parallelism earns its place the same way, with integers as the witness. Threaded partials summed in order, atomic counters, and distributed reductions over fixed ranges all give exact totals regardless of scheduling. When a total is exact on every run, the pattern is proven, and the lesson can move on to the harder question of which pattern fits the problem.
How this course works
Each lesson starts from a short definition, works through two or three tight examples, and finishes with a complete program and an exercise. Smallness is deliberate: three lines printing an allocation count beat a page of speed advice, and five lines of generated function beat a chapter about code generation.
Four closing projects mix parts of the course that look unrelated. The machine-learning toolkit leans on least squares and prediction. The simulation leans on fixed-step state updates and integer counts. The package leans on structure, tests, and documentation. The parallel pipeline leans on worker processes and pure functions over fixed data. A skipped group announces itself as soon as its project begins.
The forty-seven lessons add up to two hours and thirty-nine minutes. Work through one group per sitting and the whole course fits into roughly two weeks of evenings. Nothing beyond Julia itself is required: linear algebra, statistics, testing, and distribution all arrive in the standard library.
Frequently asked questions
What should I know before starting Julia Advanced?
The intermediate course, or its equivalent: dispatch in depth, the type system, allocation counting, macros, generated functions, modules, data workflows, and first-look parallelism. Earlier lessons are assumed, never repeated.
What is staged programming?
It is code generation that runs at compile time and sees types. A macro rewrites syntax before type inference and never sees a type; a generated function receives the argument types and returns the code to compile. The metaprogramming group shows both sides and when each one fits.
Why does this course avoid wall-clock timings?
Because timings vary with the machine, the load, and the moment, while allocation counts for fixed code on one Julia version do not. Every performance claim here is an allocation count, a size, or an exact integer total, so you can reproduce it on your own machine.
Must I install anything extra for this course?
No. Each lesson runs on Julia itself plus its standard library: LinearAlgebra, Statistics, Test, Distributed, and Random with fixed seeds. The package group covers the workflow, yet its code only writes and reads project files instead of touching the network.
How long does Julia Advanced take?
The course totals 159 minutes. Its four projects take less than twenty of those minutes combined. Spread over one group per sitting, the pace stays gentle across roughly two weeks.
Is the Julia advanced course free?
Yes. All forty-seven lessons, all four closing projects, and every exercise are open without any account or sign-up step.
Next steps
- Julia Intermediate ❯ — Forty-eight lessons in dispatch, types, measured performance, and metaprogramming, the foundation this course assumes throughout.
- Haskell Advanced ❯ — Forty-seven lessons in another language where types and laziness shape performance, a second view of similar ideas.