_ __ ______ ____ _ _ _
/ \ \ \ / / _ \ / ___|___ _ __ ___ _ __ (_) | ___ _ __
/ _ \ \ \ / /| |_) || | / _ \| '_ ` _ \| '_ \| | |/ _ \ '__|
/ ___ \ \ V / | __/ | |__| (_) | | | | | | |_) | | | __/ |
/_/ \_\ \_/ |_| \____\___/|_| |_| |_| .__/|_|_|\___|_|
|_|
"When Turing's Proofs Meet von Neumann's Performance"
⚠️ Alpha Software: Palladium is in active development (v0.1.1). APIs and language features are subject to change.
Palladium is a systems programming language that combines Turing's correctness with von Neumann's performance.
- Memory Safety: Ownership system inspired by Rust
- Type Safety: Strong static typing with inference
- Performance: Compiles to optimized native code via C
- Simplicity: Clean, readable syntax
- Self-Hosting: 100% bootstrap capability achieved
cargo install alan-von-palladiumgit clone https://github.com/labforadvancedstudy/palladium-a.git
cd palladium-a
cargo build --release
# Add to PATH
export PATH="$PATH:$(pwd)/target/release"Create hello.pd:
fn main() {
print("Hello, World!");
}
Compile and run:
pdc compile hello.pd -o hello
./build_output/helloOutput:
Hello, World!
fn main() {
// Immutable by default
let x = 42;
let y: i64 = 100;
// Mutable variables
let mut count = 0;
count = count + 1;
// Strings
let message = "Hello, Palladium!";
print(message);
}
fn add(a: i64, b: i64) -> i64 {
return a + b; // Explicit return required
}
fn greet(name: String) {
print("Hello, ");
print(name);
print("!");
}
fn main() {
let sum = add(10, 20);
print_int(sum); // Output: 30
greet("Palladium");
}
fn main() {
// if-else
let x = 10;
if x > 5 {
print("x is greater than 5");
} else {
print("x is 5 or less");
}
// for loops
for i in 0..5 {
print_int(i);
}
// while loops
let mut count = 5;
while count > 0 {
print_int(count);
count = count - 1;
}
}
struct Point {
x: i64,
y: i64,
}
enum Result {
Ok(i64),
Err(String),
}
fn divide(a: i64, b: i64) -> Result {
if b == 0 {
return Result::Err("Division by zero");
}
return Result::Ok(a / b);
}
fn main() {
let p = Point { x: 10, y: 20 };
print_int(p.x);
let result = divide(10, 2);
match result {
Result::Ok(value) => {
print_int(value);
}
Result::Err(msg) => {
print(msg);
}
}
}
fn main() {
// Fixed-size arrays
let numbers = [1, 2, 3, 4, 5];
let zeros = [0; 10]; // Array of 10 zeros
// Array access
let first = numbers[0];
print_int(first);
// Iteration
for i in 0..5 {
print_int(numbers[i]);
}
}
fn main() {
let x = 42;
let y = &x; // Immutable borrow
print_int(*y);
let mut z = 10;
let w = &mut z; // Mutable borrow
*w = 20;
print_int(z); // Output: 20
}
# Compile a file
pdc compile program.pd -o program
# Compile with optimization
pdc compile program.pd -o program -O
# Use LLVM backend (experimental)
pdc compile program.pd -o program --llvm
# Show help
pdc --helpWhen you compile, you'll see detailed progress:
🔨 Compiling program.pd...
📖 Lexing...
🌳 Parsing...
🔍 Type checking...
🔒 Borrow checking...
🌊 Analyzing effects...
⚠️ Checking unsafe operations...
🔧 Optimizing...
⚡ Generating C code...
✅ Compilation successful!
🔗 Linking...
- Core language features (variables, functions, control flow)
- Basic type system (integers, booleans, strings, arrays)
- Structs and enums
- Pattern matching (basic)
- Ownership and borrowing
- Effects system
- C code generation backend
- Standard library (Vec, HashMap, etc.)
- LLVM backend optimization
- Package manager (pdm)
- Language server (pls)
- Generics
- Traits
- Async/await
- Closures
- Module system
- Macro system
- No implicit returns (use explicit
return) - No
else if(use nestedif) - No method syntax (
obj.method()) - Limited pattern matching
printandprint_intoutput on separate lines- UTF-8 handling in error messages needs work
# Clone repository
git clone https://github.com/labforadvancedstudy/palladium-a.git
cd palladium-a
# Build in release mode
cargo build --release
# Run tests
cargo test
# Install locally
cargo install --path .Check out the examples/ directory:
examples/tutorial/- Step-by-step tutorialsexamples/practical/- Real-world examples
# Run an example
pdc compile examples/tutorial/01_hello_world.pd -o hello
./build_output/helloWe welcome contributions! Areas where help is needed:
- Standard library implementation
- Documentation improvements
- Bug fixes
- Test coverage
- LLVM backend improvements
Please see our Contributing Guide for details.
Performance comparisons coming soon. Goal: within 10% of C performance.
Palladium aims to be:
- Safe: Memory and type safety by default
- Fast: Zero-cost abstractions, optimal performance
- Simple: Clear syntax, minimal complexity
- Practical: Designed for real systems programming
Palladium is dual-licensed:
- MIT License (LICENSE-MIT)
- Apache License 2.0 (LICENSE-APACHE)
Choose whichever license works best for you.
Special thanks to:
- All contributors who helped achieve 100% bootstrap capability
- The Rust community for inspiration
- Alan Turing and John von Neumann for their legendary contributions to computing
Project Status: Alpha (v0.1.1) | First Release: June 2025 | Bootstrap: 100% Complete
"Combining Turing's correctness with von Neumann's performance"