Pure Functional Power for
Python & Numpy

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.

Rust-Powered Speed

A custom stack-machine VM built in Rust ensures your functional code runs at native speeds, far outpacing pure Python logic.

Type Safety

Hindley-Milner type inference catches errors before your code ever runs, while keeping syntax clean and expressive.

Numpy Interop

Zero-copy integration with Numpy means you can process large datasets in Sigma without expensive data conversion.

Elegance in Action

Pure Functional Syntax

Sigma uses a clean, Haskell-inspired syntax for pattern matching, recursion, and higher-order functions. No semicolons, no boilerplate.

  • Pattern matching for complex data structures
  • First-class functions and closures
  • Native support for vectors and matrices
adv_recursion.sg
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)

Deep Python Integration

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.

  • Automatic type conversion (Lists, Numpy Arrays)
  • Pass Python lambdas into Sigma higher-order functions
  • Dynamic attribute access for loaded functions
main.py
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])

Ready to try Sigma?

pip install sigma-lang
Coming Soon

Currently in preview. Requires Python 3.8+ and Rust for source builds.

Sigma Playground

Try Sigma directly in your browser. Our WASM-powered runtime gives you full performance without any server-side execution.

sigma_playground.sg
Output
Click "Run Code" to see the result...