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- Arr.ai shell basics
- Values
- Name bindings
- Comparison operators
- Arithmetic and logical operators
- Set operators
- Relational operators
- (TODO) Functions and function calls
- Transforms
- (TODO) Standard library
- (TODO) Importing external code and data
- Writing tests
- Expression strings
- (TODO) Templating with expression strings
- (TODO) Grammars
- Macros
#
Arr.ai command lineIn addition to the interactive shell, arr.ai provides additional commands to run programs, start an arr.ai server or client, etc.
- run, r: evaluate an arr.ai file
- eval, e: evaluate an arr.ai expression
- (TODO) observe, o: observe an expression on a server
- (TODO) serve, s: start arrai as a gRPC server
- (TODO) sync, s: sync local files to a server
- (TODO) transform, x: transform a stream of input data with an expression
- (TODO) update, u: update a server with an expression