Sigma is a high-performance, purely functional language designed to live inside Python. Built in Rust with zero-copy Numpy integration and Hindley-Milner type safety.
A custom stack-machine VM built in Rust ensures your functional code runs at native speeds, far outpacing pure Python logic.
Hindley-Milner type inference catches errors before your code ever runs, while keeping syntax clean and expressive.
Zero-copy integration with Numpy means you can process large datasets in Sigma without expensive data conversion.
Sigma uses a clean, Haskell-inspired syntax for pattern matching, recursion, and higher-order functions. No semicolons, no boilerplate.
fib 0 = 0;
fib 1 = 1;
fib n = (fib (n - 1)) + (fib (n - 2));
fac n = guard
| n == 0 -> 1
| n > 0 -> n * (fac (n - 1))
| otherwise -> 0;
main = (fib 10, fac 5)
Sigma isn't just a language; it's a library. Load files directly into your Python context and call them as if they were native Python functions.
import sigma
import numpy as np
ctx = sigma.SigmaContext()
ctx.load("logic.sg")
# Call Sigma function with Numpy array
data = np.array([[1.0, 2.0], [3.0, 4.0]])
result = ctx.mat_mul(data, data)
# Pass Python lambda to Sigma
squares = ctx.my_map(lambda x: x * x, [1, 2, 3])
pip install sigma-lang
Currently in preview. Requires Python 3.8+ and Rust for source builds.
Try Sigma directly in your browser. Our WASM-powered runtime gives you full performance without any server-side execution.