ShapeScript language reference
This is the reference for the ShapeScript language as the compiler in this repository implements it. The README is a tour; this document is the precise version. When the two differ, this document describes what the compiler does, and the difference is a bug in one of them.
Each diagnostic code has a section under Diagnostics. The language server links every diagnostic to its section, and shapescript explain E0401 prints it.
Contents:
- Lexical structure
- Grammar
- Names and scoping
- Shapes and sizes
- Unification and the size solver
- Functions and calls
- Broadcasting by name
- Pipes
- Pattern operations
- Indexing
- Built-in operations
- Assertions with as
- Value domains
- Conversions with to
- Dtypes
- Extern functions and the prelude
- Host scalars
- Control flow
- Iterator chains
- Models
- Changing models with mut
- Gradients
- Optimizers
- Modes and randomness
- Data and datasets
- Logs and sinks
- Checkpoints
- Modules and generic functions
- Training loops
- Devices
- Several devices
- Fixed shapes and padding
- Python interop
- Runtime checks
- Export
- Notebooks
- Running programs
- Completion and signature help
- Debugging
- Not yet implemented
- Diagnostics