Amber for Mortals

This is a course, not a reference. It assumes you can program and have never used an array language, and it is ordered so that each chapter only needs the ones before it. Worked all the way through it is an afternoon; the first three chapters are the ones that change how you think and are worth doing slowly.

Every example on these pages is executed before it ships

The code blocks are extracted and run against a real Amber build as part of publishing. An example that does not work cannot reach this site.

The path

Read them in order. Chapters 1 to 4 are the language; 5 to 6 are data and querying; 7 to 8 are what Amber is for.

#chapterwhat you get
1Thinking in arraysthe mental shift; right-to-left; why there is no precedence
2Your first sessiona prompt, the type system, atoms vs vectors, nulls
3Verbsthe twelve you use constantly, grouped by intent
4Adverbseach, over, scan and prior, where the power lives
5Dictionaries and tablesthe column store, keyed tables, and what a table really is
6qSQLselect / by / where, sorted and limited selects, fby
7Time seriesjoins including as-of, temporal types, bars, attributes
8Making it fastfusion, moving windows, group aggregates, charts, parallelism

Before you start

You need a terminal and a C compiler. Nothing else: no runtime, no package manager, no daemon.

git clone https://github.com/BonucciAndrea/amber
cd amber
./a

That builds and drops you at a prompt. Keep it open while you read: every chapter assumes you are typing along, and none of this sticks by reading alone.

If you already know q or k

Start at chapter 3 and skim. The things that will catch you out are collected in Gotchas, and the dialect differences, which are real, are in the language reference under dialect notes. The short version: two-argument library functions take brackets, there is no select[n]-free ordering clause, and ss is string-search so the time accessor is sec.