T — A Functional Language for Tabular Data


T is an experimental programming language for declarative, functional manipulation of tabular data. Inspired by R’s tidyverse and OCaml’s type discipline, T aims to make data manipulation clear, expressive, and extensible.

Status: Very early, exploratory phase. Entirely generated via iterative AI prompts.


Design Goals


Why T?

T is not trying to replace R. Instead, it’s a small, focused language for data wrangling, graphics, and basic stats — without general-purpose baggage.

Perfect for teaching, scripting, or exploratory work — with a REPL-first workflow.


Example

data = read_csv("data.csv")
select(data, name, age)
  

Also supports:


Standard Packages

Each package is one file per function, e.g. colcraft.select.ml


Package Philosophy

Nix Flakes-powered decentralized registry. All packages live in their respective GitHub repos. A curated, centralized registry of official packages is planned. Avoids dependency hell and all contributions are transparent.


Project Structure

.
├── flake.nix            
├── ast.ml               
├── parser.ml            
├── lexer.ml             
├── eval.ml              
├── repl.ml              
├── csv_reader.ml        
└── packages/
    ├── core/
    │   └── map.t
    ├── stats/
    │   └── mean.t
    └── colcraft/
        └── select.t
  

Building

nix develop
dune exec ./repl.exe
  

Contributing

User packages can be merged into the centralized package registry, or you can keep them private.


License: EUPL v1.2.


This site is best viewed with Netscape Navigator 3.0 or higher.
View Source on GitHub