Skip to main content

Overview

info

The previous tutorial has been merged with the language reference, so may be somewhat disconnected. A new tutorial is being developed in a series of smaller chunks. It will appear in this section soon.

This tutorial will take you step by step through the arr.ai language. It will be light on theory, focusing more on learning by doing. If you want a more theoretical introduction to the features of the language, Introduction to Arr.ai is a good place to start.

The following chapters start with the basics of the language, and develop steadily towards the more advanced features.

info

Arr.ai is designed to be maximally expressive, not necessarily familiar or easy to pick up. The payoff for climbing the learning curve is a powerful tool that might just change how you think about programming. Hang in there!

To follow along, use arr.ai's interactive shell, which may be started with:

$ arrai i@> _

or, if an appropriate symlink is set up (see the installation instructions):

$ ai@> _

Once you see the @> prompt, you can try the code examples in the following chapters.

Language Features#

  1. Arr.ai shell basics
  2. Values
  3. Name bindings
  4. Comparison operators
  5. Arithmetic and logical operators
  6. Set operators
  7. Relational operators
  8. (TODO) Functions and function calls
  9. Transforms
  10. (TODO) Standard library
  11. (TODO) Importing external code and data
  12. Writing tests
  13. Expression strings
  14. (TODO) Templating with expression strings
  15. (TODO) Grammars
  16. Macros

Arr.ai command line#

In addition to the interactive shell, arr.ai provides additional commands to run programs, start an arr.ai server or client, etc.

  1. run, r: evaluate an arr.ai file
  2. eval, e: evaluate an arr.ai expression
  3. (TODO) observe, o: observe an expression on a server
  4. (TODO) serve, s: start arrai as a gRPC server
  5. (TODO) sync, s: sync local files to a server
  6. (TODO) transform, x: transform a stream of input data with an expression
  7. (TODO) update, u: update a server with an expression