Welcome to Magik — a lightweight and imaginative programming language designed to feel like spellcasting!
With Magik, you write code not just to execute functions, but to craft incantations that invoke the magic of computation.
Built on top of LLVM, Magik reimagines traditional programming constructs into magical metaphors, providing a unique, minimalistic, and enchanting programming experience.
Our goal is to offer a programming language that is intuitive, expressive, and fun, while retaining essential functionality for modern development.
Magik incorporates the core features of modern programming languages — but presents them with a mystical twist:
Use the summon keyword to declare and assign variables:
summon x = 10;
summon y = 5.5;
To display output on the screen, you cast a reveal spell:
reveal** Magic activated! **
Magik uses the cast when keyword for conditional logic:
cast when myvariable beyond 30:
reveal** Power surge! **
Loops in Magik are represented by the whirl keyword, allowing you to iterate over a range:
whirl i from 0...5:
reveal*i*
Comments in Magik are written using @:
@ this is a comment
+ // addition
- // subtraction
* // multiplication
/ // division
is // ==
not // !=
beyond // >
beneath // <
notless // >=
notmore // <=
A // logical AND
O // logical OR
N // logical NOT
Magik is more than just a programming language — it's an experience. With simplicity, originality, and charm at its core, Magik provides a fresh perspective on how programming can be a creative, magical journey.
Join us in casting spells through code with Magik!
1- ensure the installation of flex/bison by "sudo apt-get update" followed by "sudo apt-get install flex bison llvm clang"
2- clone this repository using "git clone https://github.com/aadilsal/Magik.git"
3-"cd Magik" and type "make"
4- type "./mgk_compiler input1.mgk"
5- finally, type "make run"