AquaLua combines Python-like syntax with Rust-like type safety and a high-performance C backend. Built specifically for AI and machine learning development with 2-5x speedup over pure Python.
Created by Abdullah Zeyad Alshaikh
fn main() {
print("Hello, AquaLua!")
// Variables and types
let name: string = "AquaLua"
let version: float = 1.0
const MAX_ITERATIONS = 1000
// AI/ML operations
tensor weights = random([10, 5])
tensor input_data = ones([1, 10])
tensor result = matmul(weights, input_data)
tensor output = relu(result)
// Control flow
if output.sum() > 0 {
print("Positive activation detected!")
}
print("AI computation complete!")
}
Designed from the ground up for AI development with modern language features
C runtime backend delivers 2-5x speedup over pure Python with automatic fallback
Built-in tensor operations, neural networks, and ML primitives out of the box
Seamless interop with Python libraries and ecosystem using ast_exec
Clean, readable syntax inspired by Python and Rust with type safety
Full-featured development environment with syntax highlighting and debugging
Precompiled executables require no additional installations or setup
Real-world performance comparisons with Python
From simple scripts to complex AI models
// Variables and functions
let name = "AquaLua"
let age = 25
const MAX_SIZE = 1000
fn greet(name: string) -> string {
return "Hello, " + name + "!"
}
fn main() {
let user = "Developer"
let message = greet(user)
print(message)
// Control flow
if age >= 18 {
print("Adult user")
} else {
print("Young user")
}
// Loops
for i in range(0, 5) {
print("Count: " + i)
}
}
fn main() {
// Create tensors
tensor weights = random([10, 5])
tensor biases = zeros([5])
tensor input_data = ones([1, 10])
// Tensor operations
tensor result = matmul(weights, input_data)
tensor output = add(result, biases)
// Activation functions
tensor activated = relu(output)
tensor probabilities = softmax(activated)
// Create neural network layers
layer dense1 = dense(input_size=784, output_size=128, activation="relu")
layer dense2 = dense(input_size=128, output_size=10, activation="softmax")
// Forward pass
tensor hidden = dense1.forward(input_data)
tensor predictions = dense2.forward(hidden)
print("AI computation complete!")
print("Predictions shape: " + predictions.shape)
}
fn main() {
print("AquaLua + Python Integration")
// Execute Python code for data analysis
ast_exec("
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Create sample data
data = np.random.randn(1000)
df = pd.DataFrame({'values': data})
# Statistical analysis
print(f'Mean: {df.values.mean():.2f}')
print(f'Std: {df.values.std():.2f}')
# Visualization
plt.figure(figsize=(10, 6))
plt.hist(data, bins=50, alpha=0.7, color='blue')
plt.title('Data Distribution')
plt.xlabel('Value')
plt.ylabel('Frequency')
plt.grid(True, alpha=0.3)
plt.show()
")
// Continue with AquaLua operations
let result = sum([1, 2, 3, 4, 5])
print("AquaLua sum result: " + result)
print("Integration complete!")
}
Download AquaLua and start building AI applications with high-performance computing.