Welcome to ProXPL! This guide will walk you through everything you need to start writing programs in ProXPL, from installation to running your first application and managing dependencies.
- Installation
- Your First ProXPL Program
- Understanding the Basics
- Working with the CLI
- Using the Package Manager (PRM)
- Building a Real Project
- Next Steps
ProXPL can be installed in several ways. We'll cover the easiest methods for getting started.
This is the fastest way to get started with ProXPL.
-
Visit the ProXPL Releases Page
-
Download
proxpl.exe -
Create a folder for ProXPL (e.g.,
C:\ProXPL) -
Move
proxpl.exeto this folder -
Add the folder to your system PATH:
- Press
Win + Xand select "System" - Click "Advanced system settings"
- Click "Environment Variables"
- Under "System variables", find and select "Path"
- Click "Edit" → "New"
- Add
C:\ProXPL(or your chosen path) - Click "OK" on all dialogs
- Press
-
Verify installation:
# Open a new Command Prompt or PowerShell proxpl --version
-
Visit the ProXPL Releases Page
-
Download
proxplfor Linux -
Make it executable and move to
/usr/local/bin:chmod +x proxpl sudo mv proxpl /usr/local/bin/
-
Verify installation:
proxpl --version
-
Visit the ProXPL Releases Page
-
Download
proxpl-macos -
Make it executable and move to
/usr/local/bin:chmod +x proxpl-macos sudo mv proxpl-macos /usr/local/bin/proxpl
-
If you get a security warning, go to System Preferences → Security & Privacy and allow the app
-
Verify installation:
proxpl --version
If you want the latest features or prefer building from source:
Prerequisites:
- C/C++ compiler (GCC, Clang, or MSVC)
- CMake 3.15 or higher
- Git
Build Steps:
# Clone the repository
git clone https://github.com/ProgrammerKR/ProXPL.git
cd ProXPL
# Create build directory
mkdir build && cd build
# Configure and build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
# The executable will be in the build directory
./proxpl --version
# Optional: Install system-wide
sudo make installFor an enhanced developer experience with watch mode and better logging:
Prerequisites:
- Node.js 14+ and npm
Installation:
cd ProXPL/src/cli
npm install
npm linkNow you can use the prox command in addition to proxpl:
prox --versionLet's write and run your first ProXPL program!
# Create a directory for your ProXPL projects
mkdir proxpl-projects
cd proxpl-projectsCreate a file named hello.prox:
// hello.prox
// My first ProXPL program!
func main() {
print("Hello, World!");
print("Welcome to ProXPL programming!");
}
// Execute the main function
main();Using the standard ProXPL executable:
proxpl hello.proxExpected Output:
Hello, World!
Welcome to ProXPL programming!
🎉 Congratulations! You just ran your first ProXPL program!
If you installed the Node.js CLI, you can also use:
prox run hello.proxThe enhanced CLI provides colored output and better error messages.
Let's explore ProXPL's core features with a more interactive program.
Create a file named greet.prox:
// greet.prox
// Interactive greeting program
func main() {
// Ask for user's name
print("╔═══════════════════════════╗");
print("║ Welcome to ProXPL Demo ║");
print("╚═══════════════════════════╝");
print("");
let name = input("What is your name? ");
print("Nice to meet you, " + name + "!");
// Ask for favorite number
let num_str = input("What's your favorite number? ");
let num = to_int(num_str);
// Perform calculations
let doubled = num * 2;
let squared = num * num;
print("\nHere are some fun facts about " + to_string(num) + ":");
print("- Doubled: " + to_string(doubled));
print("- Squared: " + to_string(squared));
// Generate a random number
let lucky = random(1, 100);
print("- Your lucky number today: " + to_string(lucky));
}
main();proxpl greet.proxSample Interaction:
╔═══════════════════════════╗
║ Welcome to ProXPL Demo ║
╚═══════════════════════════╝
What is your name? Alice
Nice to meet you, Alice!
What's your favorite number? 7
Here are some fun facts about 7:
- Doubled: 14
- Squared: 49
- Your lucky number today: 42
Let's break down what we just learned:
-
Variables: Use
letto declare variableslet name = "Alice"; let count = 42;
-
Input/Output:
print("text"); // Output to console let x = input("? "); // Read user input (returns string)
-
Type Conversion:
to_int("42") // String → Integer to_string(42) // Integer → String to_float("3.14") // String → Float
-
Standard Library Functions:
random(1, 100) // Generate random number length(list) // Get collection size
ProXPL provides several ways to run your code.
Most common way - just run the file:
proxpl myfile.proxInteractive mode for testing code snippets:
prox replAutomatically re-run your program when files change:
prox run myfile.prox --watchThis is great for development - edit your file, save, and see results immediately!
# Show version
proxpl --version
# Show help (enhanced CLI)
prox --help
prox run --helpPRM (ProX Repository Manager) helps you manage dependencies and create structured projects.
# Create a new project directory
mkdir my-app
cd my-app
# Initialize with PRM
prm initThis creates:
prox.toml- Project manifest filesrc/main.prox- Entry point for your application.gitignore- Git ignore file
After running prm init, you'll see a prox.toml file:
[package]
name = "my-app"
version = "0.1.0"
authors = ["Your Name <you@example.com>"]
edition = "2025"
description = "A ProXPL application"
license = "MIT"
[dependencies]
# Add your dependencies here
[build]
target = "bytecode"
optimize = falseEdit src/main.prox:
// src/main.prox
// Main entry point for my-app
func main() {
print("My ProXPL Application v0.1.0");
print("============================");
// Your application logic here
let result = calculate_something();
print("Result: " + to_string(result));
}
func calculate_something() {
// Some calculation
return 42 * 2;
}
main();From the project root directory:
# Run using PRM
prm run
# Or run the main file directly
proxpl src/main.proxLet's say you want to add a JSON parsing library (when available):
# Add a dependency
prm add jsonThis will:
- Download the package
- Add it to
prox.toml - Create/update
prox.lock(lockfile)
Your prox.toml will be updated:
[dependencies]
json = "1.0.0"// Import the dependency
use json;
func main() {
// Use the imported module
let data = json.parse("{\"name\": \"ProXPL\"}");
print(data["name"]);
}# List all installed packages
prm list
# Search for packages
prm search http
# Update dependencies
prm update
# Remove a dependency
prm remove json
# Show package info
prm info jsonLet's build a simple calculator application that demonstrates multiple concepts.
mkdir calculator-app
cd calculator-app
prm initEdit src/main.prox:
// src/main.prox
// Simple Calculator Application
func main() {
print("╔══════════════════════════╗");
print("║ ProXPL Calculator v1.0 ║");
print("╚══════════════════════════╝");
print("");
let running = true;
while (running) {
print("\nOperations:");
print("1. Add");
print("2. Subtract");
print("3. Multiply");
print("4. Divide");
print("5. Power");
print("6. Square Root");
print("0. Exit");
let choice = input("\nEnter choice: ");
if (choice == "0") {
running = false;
print("Thank you for using ProXPL Calculator!");
} else if (choice == "1") {
perform_operation("add");
} else if (choice == "2") {
perform_operation("subtract");
} else if (choice == "3") {
perform_operation("multiply");
} else if (choice == "4") {
perform_operation("divide");
} else if (choice == "5") {
perform_operation("power");
} else if (choice == "6") {
perform_sqrt();
} else {
print("Invalid choice! Please try again.");
}
}
}
func perform_operation(op) {
let a = to_float(input("Enter first number: "));
let b = to_float(input("Enter second number: "));
let result = 0.0;
if (op == "add") {
result = a + b;
print("Result: " + to_string(a) + " + " + to_string(b) + " = " + to_string(result));
} else if (op == "subtract") {
result = a - b;
print("Result: " + to_string(a) + " - " + to_string(b) + " = " + to_string(result));
} else if (op == "multiply") {
result = a * b;
print("Result: " + to_string(a) + " × " + to_string(b) + " = " + to_string(result));
} else if (op == "divide") {
if (b == 0.0) {
print("Error: Cannot divide by zero!");
} else {
result = a / b;
print("Result: " + to_string(a) + " ÷ " + to_string(b) + " = " + to_string(result));
}
} else if (op == "power") {
result = pow(a, b);
print("Result: " + to_string(a) + " ^ " + to_string(b) + " = " + to_string(result));
}
}
func perform_sqrt() {
let num = to_float(input("Enter a number: "));
if (num < 0.0) {
print("Error: Cannot calculate square root of negative number!");
} else {
let result = sqrt(num);
print("Result: √" + to_string(num) + " = " + to_string(result));
}
}
main();prm runOr:
proxpl src/main.prox╔══════════════════════════╗
║ ProXPL Calculator v1.0 ║
╚══════════════════════════╝
Operations:
1. Add
2. Subtract
3. Multiply
4. Divide
5. Power
6. Square Root
0. Exit
Enter choice: 5
Enter first number: 2
Enter second number: 8
Result: 2 ^ 8 = 256
Congratulations! You now know the basics of ProXPL. Here's what to explore next:
- Language Specification - Complete language reference
- Standard Library - All 75+ built-in functions
- Examples - More example programs
- Architecture Guide - How ProXPL works internally
- Fibonacci Generator: Write a program that prints the first N Fibonacci numbers
- File Reader: Use
read_file()andwrite_file()to process text files - List Processor: Work with lists using
push(),pop(),length() - Dictionary Manager: Create a simple contact book using dictionaries
- Module System: Create reusable modules with
use - Type System: Understanding static typing and type inference
- Performance: Using the LLVM backend for native compilation
- Debugging: Using the LSP and debugger tools
Write a program that prints numbers 1-100, but:
- Print "Fizz" for multiples of 3
- Print "Buzz" for multiples of 5
- Print "FizzBuzz" for multiples of both
Click to see solution
func fizzbuzz() {
for (let i = 1; i <= 100; i = i + 1) {
if (i % 15 == 0) {
print("FizzBuzz");
} else if (i % 3 == 0) {
print("Fizz");
} else if (i % 5 == 0) {
print("Buzz");
} else {
print(to_string(i));
}
}
}
fizzbuzz();Check if a string is a palindrome.
Click to see solution
func is_palindrome(text) {
let reversed = reverse_string(text);
return text == reversed;
}
func reverse_string(s) {
let result = "";
let len = length(s);
for (let i = len - 1; i >= 0; i = i - 1) {
result = result + s[i];
}
return result;
}
func main() {
let word = input("Enter a word: ");
if (is_palindrome(word)) {
print("'" + word + "' is a palindrome!");
} else {
print("'" + word + "' is not a palindrome.");
}
}
main();If you run into issues:
- Check the docs: Most questions are answered in docs/
- Browse examples: See examples/ for working code
- Ask the community: GitHub Discussions
- Report bugs: GitHub Issues
Solution: Make sure ProXPL is in your system PATH. On Linux/Mac, try:
which proxplIf nothing is returned, reinstall or add the directory to PATH.
Solution: Make sure you're running the command from the correct directory:
# Check current directory
pwd
# List files
ls
# Run from correct location
cd /path/to/your/project
proxpl myfile.proxSolution: ProXPL syntax is strict. Common issues:
- Missing semicolons
;at end of statements - Mismatched braces
{} - Using
=instead of==in conditions - Forgetting
letwhen declaring variables
// Comments
// This is a single-line comment
// Variables
let name = "Alice";
let age = 25;
let active = true;
// Functions
func greet(name) {
return "Hello, " + name;
}
// Conditionals
if (age >= 18) {
print("Adult");
} else {
print("Minor");
}
// Loops
for (let i = 0; i < 10; i = i + 1) {
print(to_string(i));
}
while (active) {
// Do something
}
// Collections
let list = [1, 2, 3];
let dict = {"key": "value"};// I/O
print("text") // Print to console
input("prompt") // Get user input
// Type Conversion
to_string(42) // → "42"
to_int("42") // → 42
to_float("3.14") // → 3.14
// Math
random(1, 100) // Random integer
sqrt(16) // Square root → 4
pow(2, 8) // Power → 256
abs(-5) // Absolute value → 5
// Strings
length("hello") // → 5
to_upper("hello") // → "HELLO"
to_lower("HELLO") // → "hello"
// Lists
push(list, item) // Add to end
pop(list) // Remove from end
length(list) // Get size
Happy Coding with ProXPL! 🚀
Build something amazing!