Reference

Ibex language reference

An overview of the language and runtime. Find the operation you need here, then follow the linked guides or specification for complete syntax and semantics.

The shape of an Ibex program

Programs bind immutable values, then transform tables with named clauses. Clauses run from left to right inside a table expression.

import "csv";
let prices = csv::read("prices.csv");

let summary = prices[
    filter volume > 0,
    select { average = mean(price), traded = sum(volume) },
    by symbol,
    order { traded desc }
];

Core forms and table operations

let name = valueBind an immutable scalar, series, table, or function result.
fn name(args) -> Type { ... }Declare a typed reusable function.
import "plugin"Load a bundled I/O plugin.
extern fn ... from "header.hpp"Declare a native function or source.
extern type Name from "header.hpp"Declare an opaque resource, such as a database connection, that functions open, pass, return, and close. See the connections guide.
Table { field = values }Create a table from column expressions or literals.
filter predicateKeep rows for which the predicate is true.
select { fields }Project fields, create computed fields, or aggregate with by.
update { fields }Add or replace fields while preserving the remaining columns.
map { name = expr, ... }Evaluate scalar fields once per input row and return exactly the named columns. Rows and fields run in order, so effectful extern calls are supported.
by keyGroup a select or update.
order { keys }Sort rows using ascending or descending keys.
rename, distinct, head, tailRename, deduplicate, or limit rows.

See the transformation tutorial for first use, and the language specification for grammar and exact rules.

Find an operation by task

Expressions and types

Arithmetic, comparisons, boolean logic, case, casts, nullable columns and scalar bindings, strings, dates, and typed scalar / series / table values.

Browse built-in functions →

Aggregation and windows

Grouped reduction, grouped update, ranking, cumulative functions, rolling windows, resampling, and TimeFrames.

Read the language guide →

Joins and reshaping

Inner, outer, semi, anti, cross, and as-of joins; row and column binding; wide-to-long and long-to-wide reshaping.

Read the language guide →

Input and output

CSV, JSON, Parquet, directory enumeration, command-line argument parsing, SQLite/ADBC, Kafka, and cloud-backed paths through plugins.

Read the I/O guide →

Functions and metaprogramming

Typed user functions, native extern functions, compile-time map expansion, and table-schema introspection.

Function reference →

Interactive and host use

The REPL, script execution, C++23 transpilation, Python notebooks, and the R/dplyr integration.

Read integration guides →

Advanced workflows

C++ code generation, continuous streams, producer queues, and formula-based model specifications.

Read advanced workflows →