Research / experiment
Thiran
tensor-first programming language with native CPU/GPU compilation, autodiff and ownership
The idea, made real.
What if you could write mathematics with the simplicity of MATLAB, control memory with Rust-inspired safety, and compile numerical programs into native machine code? That's the idea behind Thiran, an experimental open-source numerical systems programming language I've been building from the ground up. I started Thiran because I wanted a language where mathematical experimentation and low-level performance engineering could coexist. Researchers shouldn't necessarily have to rewrite their numerical algorithms in a different language just to gain more control over execution and memory. Thiran uses a hybrid compiler architecture: ordinary functions and control flow remain structured, while eligible mathematical operations become optimized tensor-dataflow regions. Its compiler includes static type checking, ownership and alias analysis, automatic differentiation, and native CPU/GPU compilation infrastructure. The project has progressed from a compiler experiment to a working toolchain with native numerical execution, reproducible tests, and an expanding general-purpose language foundation. It's still experimental, and there is substantial work ahead. But the long-term vision is simple: write mathematical ideas naturally, understand their execution precisely, and progressively turn research code into native software without changing ecosystems. I'm making Thiran public to invite technical feedback, experimentation, and contributions from people interested in compilers, programming languages, numerical computing, and AI infrastructure.
The approach
I designed Thiran around a hybrid structured-program and tensor-dataflow compiler. The language draws inspiration from MATLAB's mathematical notation, Rust's memory-safety discipline, and C++'s native-performance engineering.
The building blocks.
Start here.
Make your first contribution.
Improving compiler diagnostics and error messages, Expanding language features and standard libraries, Optimizing native CPU/GPU execution and tensor operations, Building numerical examples, benchmarks, and regression tests
A little history.
Shared with Drop
#1 overall · 10 supports
See permanent results#1 overall · 10 supports
See permanent results#1 overall · 10 supports
See permanent results