The YN Language
A fast, strictly typed, dynamically parsed language for the next generation of engineers. Built entirely on C. Runs like Python.
Introduction
Welcome to the official documentation for the YN Programming Language. YN brings Python-style interpolations, strict typing, and an entirely new urban-inspired syntax format down to a fast native C compiler.
Installation
For Windows users, we provide a standalone GUI installer that natively packs the compiler into a single click.
1. Get the Installer
Download the yn_install.exe standalone application.
2. Run Native Compiler
Launch the YN Language GUI Installer. It can securely download and link GCC MinGW for you.
3. Restart Terminal
Once deployed to C:\yn, restart your terminal and you're done.
yn script.yn
Did the GCC not install?
If the auto-installer failed to link the GCC compiler, you can manually install it via MSYS2.
1. Download MSYS2
Go to https://www.msys2.org/, download the installer, and follow the default instructions.
2. Install MinGW-w64 GCC
Open the MSYS2 terminal and run the following command to install the required UCRT64 toolchain:
pacman -S mingw-w64-ucrt-x86_64-gcc
3. Update System PATH
Add C:\msys64\ucrt64\bin to your User or System Environment Variable PATH.
4. Verify Installation
Close your terminal, reopen a fresh one, and verify the installation by running:
gcc --version
Hello World
Outputting text in YN is street-certified. Use hear_my_mans() to print anything to the console.
hear_my_mans("Hello, World!");
Variables
YN implements strict typing using the hold.this. prefix format. You must declare the exact type of variables when you spawn them.
hold.this.string my_name = "Young N Multi-File Edition";
hold.this.int age = 21;
hold.this.boolean isStudent = true;
Unassigned Variables & Reassignment
You can also declare a variable without jumping immediately to assigning it a value. It will be safely initialized with default null states based on its type behind the scenes.
// Declare it raw
hold.this.string name;
hold.this.int counter;
// Re-assign it later down the block
name = "Dane";
counter = 42;
hear_my_mans(f"{name} has {counter} points.");
Data Types
The streets run on strict data structures. YN natively supports four primary data types:
string
Used for text up to the default string size limit. Initialize with double quotes: hold.this.string phrase = "what up";
int
Standard integer blocks. Declare them raw: hold.this.int count = 100;
float
Precision decimal numbers. hold.this.float price = 99.99;
boolean
Straight facts only: true or false. hold.this.boolean cap = false;
Output & Strings
We support Python-style localized f-string interpolations natively into print statements.
hold.this.string city = "NY";
hold.this.int age = 21;
hear_my_mans(f"My age is {age} and I live in {city}");
Formatting Floats
When dealing with float types in f-strings, YN formats them to 2 decimal places by default for clean currency or percentage outputs.
hold.this.float bill = 45.6789;
// Outputs: "The tab is 45.68"
hear_my_mans(f"The tab is {bill}");
Loops (laps)
Running laps is fundamental. YN simplifies the classic iteration protocol into clean, expressive blocks using laps.
laps(i in range(0,3)){
hear_my_mans(f"Testing compilation block {i}");
}