Juslyn is a lightweight, experimental programming language built entirely from scratch in Python. It is designed to be simple, expressive, and educational, showing how programming languages are made while also being fun to use for small projects.
Unlike mainstream languages, Juslyn introduces its own unique keywords and syntax, making programs easy to read and visually distinct.
Juslyn was created to explore:
- 🏗️ How interpreters work – from parsing to execution.
- ✨ Readable syntax – keywords that feel natural and minimal.
- 🎓 Educational design – great for learning programming concepts without boilerplate.
- 🧪 Experimentation – a sandbox to play with recursion, loops, math, and lists.
It’s not built to replace mainstream languages, but to teach, inspire, and experiment.
- 🗃️ Variables → store values with
POCKET - ➕ Math expressions → supports
+ - * / ~(power) - 🔗 String concatenation →
"Hello " + name - 🔀 Conditionals → clean branching with
CHECK,OTHERWISE,FINISH - 🔁 Loops → controlled iteration with
REPEAT ... TO ... STEP - 🧑💻 Functions → define reusable logic with
TASK ... SEND - 🔂 Recursion → supports calling functions within themselves
- 📋 Lists → create, append, and measure length
- 🖨️ Printing → output values with
PRINT - 📂 Script runner → execute external
.juslynfiles withRUN("file.juslyn")
If you want to try Juslyn yourself, follow these steps:
git clone https://github.com/yourusername/Juslyn-Programming-Language.git
cd Juslyn-Programming-Language- Python 3.8+
- No external libraries needed — Juslyn is built in pure Python.
python shell.pyYou’ll see:
Juslyn v1.0.0 >
This is the interactive REPL where you can run Juslyn code:
Juslyn v1.0.0 > PRINT("Hello Juslyn!");
Hello Juslyn!
Create a file called HelloWorld.juslyn:
PRINT("Hello, World!");
Run it from the REPL:
Juslyn v1.0.0 > RUN("HelloWorld.juslyn")
Hello, World!
| Keyword / Syntax | Description |
|---|---|
POCKET x = 10; |
Declare a variable with value 10 |
PRINT(x); |
Print value of x |
"Hello " + name |
Concatenate strings |
a ~ b |
Raise a to the power of b |
CHECK cond THEN ... OTHERWISE ... FINISH; |
If-else statement |
REPEAT i = 0 TO 10 STEP 1 THEN ... FINISH; |
Loop from 0 to 10 (step 1) |
TASK name(args) ... SEND value; |
Define a function |
APPEND(list, val); |
Add item to list |
LEN(list) |
Get length of a list |
RUN("file.juslyn") |
Run another Juslyn program |
SEND value; |
Return from a function |
FINISH; |
End a block (loop, function, or conditional) |
POCKET name = "Juslyn";
POCKET year = 2025;
PRINT("Welcome to " + name + " in " + year);
POCKET a = 5;
POCKET b = 2;
PRINT("a + b = " + (a + b));
PRINT("a - b = " + (a - b));
PRINT("a * b = " + (a * b));
PRINT("a / b = " + (a / b));
PRINT("a power b = " + (a ~ b));
POCKET n = 10;
CHECK n > 5 THEN
PRINT(n + " is greater than 5");
OTHERWISE
PRINT(n + " is not greater than 5");
FINISH;
REPEAT i = 1 TO 5 STEP 1 THEN
PRINT("Loop index: " + i);
FINISH;
TASK factorial(n)
CHECK n == 0 THEN
SEND 1;
FINISH;
SEND n * factorial(n - 1);
FINISH;
PRINT("Factorial of 5 = " + factorial(5));
POCKET nums = [];
APPEND(nums, 100);
APPEND(nums, 200);
PRINT("Numbers: " + nums);
PRINT("Length = " + LEN(nums));
The repo includes 5 demo programs (ready to run):
HelloWorld.juslyn→ Minimal “Hello World”Math.juslyn→ Variables & arithmeticFunctionsLists.juslyn→ Recursion + listsControlFlow.juslyn→ If/else + loopsHardcore.juslyn→ Tower of Hanoi recursion
Run them directly:
RUN("Math.juslyn")
Under the hood, Juslyn is a Python-based interpreter.
- Lexer → Converts raw code into tokens (
POCKET,PRINT,123,"string", etc). - Parser → Builds an Abstract Syntax Tree (AST) from tokens.
- Interpreter → Walks through the AST and executes the logic.
This mirrors how real-world languages like Python, Java, or C are executed — but in a much simpler way, so anyone can study and extend it.
Juslyn v1.0.0 > RUN("HelloWorld.juslyn")
Hello, World!
Juslyn v1.0.0 > RUN("Math.juslyn")
a = 10
b = 5
a + b = 15
a - b = 5
a * b = 50
a / b = 2
a power b = 100000
MIT License – free to use, modify, and share. Created By : Justin Thomas