Language reference
Give this file to an AI agent as context when asking it to write Soma code. The authoritative builtin list is soma docs builtins (published as /docs/builtins.md and /builtins.json).
- Quick rules
- Cell structure
- Types
- Variables
- Control flow
- Functions (handlers)
- Lambdas
- Collections
- Pipe operators
- String builtins
- Math builtins
- Type conversion
- Error handling
- Matrices
- Agent configuration (soma.toml)
- Storage
- State machines
- Sum types
- HTTP server
- HTTP client, WebSocket, signal bus
- Events: emit
- File I/O
- Templates
- Time
- Verification
- Face contracts (compile-time checked)
- Tests
- Multi-file projects
- Skeleton and flesh
- Common patterns
- Linear algebra & risk (linalg)