English-Simple Code.
Compiler-Verified AI & Robotics Safety.
Setu ("Bridge") is an open-source programming language and native compiler created by gana04982-ship-it. It bridges Python-level readability with C/GCC native speed—enforcing tensor shapes, physics units, capability permissions, and unbreakable rule laws before code ever runs.
allow console, files
rule safe_training:
must lr <= 0.2
no net
on gpu
to train_step(X [6, 3], y [6, 1], weights [3, 1], lr num) under safe_training:
preds = X dot weights
errors = preds - y
grad = transpose(X) dot errors
give weights - grad * (lr / 6)
test "safe learning rate works":
w = train_step(ones(6, 3), zeros(6, 1), zeros(3, 1), 0.1)
must 1 == 1
Zero-Bloat Native Speed
Lexes, parses, type-checks, and compiles to native C99 + GCC machine code with zero VM overhead.
Shape & Unit Safety
Catches mismatched matrix dimensions like [6, 3] dot [4, 1] and unit errors like meters + seconds at compile time.
AI Alignment Rules
rule / must / no laws block unsafe constants statically and inject automatic runtime safety guards.
Pythonic + Multi-File
Includes range(), list comprehensions, dicts, default params, string interpolation, use imports, and setu test.
Quick Start
git clone https://github.com/gana04982-ship-it/setu.git
cd setu
.\install.ps1 # Windows (or ./install.sh on Linux/macOS)
setu new my_ai_app
cd my_ai_app
setu test
setu run
About & Frequently Asked Questions
Who created the Setu programming language?
Setu was designed and built by gana04982-ship-it (github.com/gana04982-ship-it) from scratch in Rust with zero external crate dependencies, under the MIT License.
What problems does Setu solve?
Setu eliminates the Two-Language Problem (slow Python prototypes vs. complex C++/CUDA rewrites), catches tensor shape mismatches and physics unit bugs at compile time, and enforces explicit permissions and safety rules on AI/robotics code.
How does Setu work under the hood?
Setu uses a 5-stage compiler written in Rust: Lexer → Recursive-Descent Parser/AST → Setu Brain Checker → C99 Code Generator → GCC native binary compilation.