A beginner-friendly compiled programming language with a built-in desktop IDE.
Fractal bridges the gap between Python's friendliness and C's discipline - strict types, readable syntax, and helpful error messages.
- Types:
:int,:float,:char,:boolean,:array,:list,:struct - Control flow:
!if,!elif,!else,!for,!while,!break,!continue - Functions:
!funcwith typed parameters and return types - Modules:
!module,!import - Type casts:
:int(value)- explicit and visible
!start
:int age = 25;
:float score = 9.5;
:int result = age + :int(score);
!func fib(:int n) -> :int {
!if (n <= 1) { !return n; }
!return fib(n - 1) + fib(n - 2);
}
:int result = fib(10);
!end
# Quick install (recommended)
wget -O install.sh https://raw.githubusercontent.com/Pixelrick420/Fractal/main/executable/install.sh && sudo bash install.sh
# Or build from source
git clone https://github.com/Pixelrick420/Fractal.git
cd Fractal
cargo build --release
sudo cp target/release/fractal-compiler target/release/fractal-editor /usr/bin/- Install Rust (MSVC toolchain)
- Install Visual Studio Build Tools with C++ workload
- Build:
git clone https://github.com/Pixelrick420/Fractal.git
cd Fractal
cargo build --releasefractal-editorfractal-compiler path/to/file.fr # compile
fractal-compiler debug path/to/file.fr # compile with debug info
fractal-compiler --emit-rust path/to/file.fr # output Rust sourceOr with Cargo:
cargo run --bin fractal-editor
cargo run --bin fractal-compiler -- path/to/file.fr- Syntax highlighting & auto-indentation
- Integrated terminal
- Multi-tab editing
- Search & replace
- Built-in documentation
- Debugger with variable inspection
- AST tree viewer
- Light/dark themes
| Function | Description |
|---|---|
print(format, args...) |
Print formatted output |
input(prompt, var, ...) |
Read user input into variable(s) |
append(list, value) |
Add to list |
pop(list) |
Remove last element |
insert(list, index, value) |
Insert at position |
delete(list, index) |
Remove at position |
len(collection) |
Get length |
find(collection, value) |
Find index |
abs(number) |
Absolute value |
sqrt(float) |
Square root |
pow(float, float) |
Power |
floor(float) / ceil(float) |
Round |
min(a, b) / max(a, b) |
Compare |
to_int/to_float/to_str |
Convert type |
Fractal/
├── src/
│ ├── bin/ # Entry points
│ ├── compiler/ # Lexer, parser, codegen, etc.
│ ├── ui/ # Editor components
│ └── files/ # Example programs
├── web/ # Landing page
└── executable/ # Install scripts
MIT License