A math-first, algorithm-focused programming language for clarity and deterministic execution
Algolang is a statically scoped, bytecode-compiled programming language designed for learning algorithms, computer science fundamentals, and mathematical reasoning.
It emphasizes:
- Clarity – Code reads like the algorithm itself
- Determinism – Predictable, reproducible execution
- Education – Ideal for learning language design, algorithms, and computation
- Clean Syntax – Minimal, intuitive, focused on algorithms
- Bytecode Compilation – Efficient and predictable execution
- Stack-Based VM – Lightweight and inspectable
- First-Class Functions – Pass and return functions like values
- Lexical Scoping – Strict block-level variable rules
- Standard Library – Core mathematical functions (
abs,min,max,sqrt,pow,floor,ceil)
git clone https://github.com/AlgoLang-Programming-Language/AlgoLangSource.git
cd AlgoLangSource
# Build the compiler
makeProduces the algolang executable.
./algolang examples/fib.algo./algolangfn fib(n) {
if n <= 1 {
return n
}
return fib(n - 1) + fib(n - 2)
}
print fib(10)
let x = 10
let y = 20
let sum = x + y
fn add(a, b) {
return a + b
}
print add(5, 3)
if x > 10 {
print true
} else {
print false
}
while x < 100 {
x = x * 2
}
- Number – 64-bit float (
42,3.14) - Boolean –
true,false - Nil –
nil(no value)
- Arithmetic:
+ - * / % - Comparison:
== != < <= > >= - Logical:
and or ! - Assignment:
=
abs(x) # Absolute value
min(a,b) # Minimum
max(a,b) # Maximum
sqrt(x) # Square root
pow(x,y) # x^y
floor(x) # Round down
ceil(x) # Round up
Source → Lexer → Parser → AST → Compiler → Bytecode → VM
| Component | Description |
|---|---|
| Lexer | Tokenizes source code |
| Parser | Builds AST |
| Compiler | Converts AST → Bytecode |
| VM | Stack-based execution |
| Runtime | Values & memory |
| Stdlib | Built-in functions |
algolang/
├── include/
├── src/
│ ├── lexer/
│ ├── parser/
│ ├── bytecode/
│ ├── vm/
│ ├── runtime/
│ └── stdlib/
├── examples/
├── docs/
├── Makefile
└── README.md
- Clarity over Cleverness
- Correctness over Performance
- Simplicity over Features
- Education First
- Readable code & clear commits
- Educational clarity is priority
- All contributions welcome
Repository: GitHub
MIT License – See LICENSE
0.1.0