One short, runnable program per area of the language. The chapters taught
the ideas; this is every corner of the language and its modules in
example form, to read through once and come back to. Every block is
executed by crow test --book in both execution modes, and crow test --docs fails the build if any builtin or module has no example here or
in the chapters. For the tables, with every function linked back to the
example that shows it, see The Standard Library in
Part II.
| Page | Covers |
|---|---|
| Numbers and conversion | abs sqrt floor ceil round min max type int float str |
| Strings | trim upper lower replace starts ends repeat split join reverse len, indexing |
| Formatting | fmt with decimals commas percent width fill align |
| Regular expressions | matches find sub |
| Arrays | sort reverse slice push pop concat contains range |
| Maps | map keys values has set del |
| Files and directories | mkdir write exists read cp mv ls rm, error values from I/O |
| JSON | json encode, converting open-schema fields |
| The system: shell, environment, time, arguments | shell env time args hash |
| Moments and freshness | moment calendar parse_time now captured, fmt[t, time =] |
| Math: tensors | creating tensors, element-wise functions, shape operations |
| Math: reductions and linear algebra | sum mean min max argmax cumsum sort argsort topk unique where, solve inv det svd qr eigen norm dot lstsq |
| Math: random, signal, special, and sparse | seed rand randn normal shuffle choice, fft conv hamming stft lowpass, gamma erf bessel complex, sparse dense nnz spmv |
| Automatic differentiation | grad for one and many parameters |
Statistics: use math.stats | median std var percentile corr linreg |
Neural-network building blocks: use math.nn | relu sigmoid softmax mse |
Structured files: use io | csv lines |
Frames: use frame | frame.load filter sort select head group, column reductions |
Databases: use db | connect exec query transact |
| Web: a JSON route | route serve, a JSON response |
| Web: responses, auth, sessions, and sockets | text html redirect respond msgpack arrow bytes sign verify sessions cache limit templates render uploads send recv close smtp |
| Views: the whole element vocabulary | all 32 elements, fetch poll field |