Auk documentation

Learn Auk, one small step at a time.

A path from your first program to the whole language, and a quick way to look up anything along it.

Never programmed in Auk before? Good. Start at step 1 and go in order; nothing assumes more than the step before it.

I want to…

The learning path

12 steps, about 53 minutes of reading. Mark each one done as you go and this page keeps your place.

0 of 12 done

Start here

New to Auk? These two pages take you from nothing installed to a tested program, then show you the whole language once.

  1. Getting started up next beginner Install Auk, then run, test and build a program. Make a project with a dependency.
  2. A tour of Auk beginner The language in one sitting, through one small program you can run at each step.

The language

One page per topic. Read them in order, or jump to what you need.

  1. Basics beginner Bindings, built-in types, strings, lists and maps, control flow, operators.
  2. Functions, clauses and patterns beginner Dot calls, closures, var parameters, functions written as clauses, every pattern.
  3. Structs, enums and shapes beginner Your own data types, structural generics, operators on your types.
  4. Errors and optionals beginner Values that may be missing (T?) or may fail (T!), and how ?, else and fail work.
  5. Effects intermediate How a function says it touches files, the network or the clock, and why that helps.
  6. Tests, contracts and holes intermediate Tests next to the code, requires and ensures, typed holes (??), peek.
  7. Modules and packages intermediate Files as modules, no imports, what pub means, how a program starts.
  8. Units of measure intermediate Numbers that know they are metres or seconds, checked before the program runs.
  9. Concurrency advanced Tasks, await, channels, cancellation and supervisors.
  10. Calling C advanced Call C libraries with extern fn.

Look something up

Tools

The commands you type, and how to get more out of them.

Reference

For looking things up once you know what you are looking for.

  • Core libraryEverything available in every program, with nothing to install.
  • Package catalogThe official packages by topic, and what each may touch.
  • Package docsEvery package's own page, with its full API.
  • Error codesEvery compiler error, with the mistake and the fix.
  • Cheat sheetThe whole language on one page. Dense: best once you have read the guide.
  • GlossaryAuk's words in plain language, each with a link to where it is explained.

Working on Auk

How the compiler, the runtime and raft are built. You do not need these to use Auk.

183 pages in all: 26 packages and 132 error codes among them.