INK v0.8 — the working compiler
The full pipeline — lexer, parser and code generator, all hand-written in x86-64 Assembly — compiles real programs to native binaries through LLVM.
INK is a small, safe, compiled programming language. Simple enough for a first-time programmer, fast as native code, and memory-safe by default.
show "Namaste, India!"
Namaste, India!
Real INK programs and their output — pick one and press Run. Download INK to write your own.
INK is MIT-licensed and free forever. Download the latest release, build it with one command, and write your first program in minutes.
Or with git: git clone https://github.com/uGeorgeFernandez/ink
build.sh and ink.sh — build and runLinux on x86-64 with nasm and clang. On Windows, use WSL. Full steps in Get started.
INK is built around one idea: a program should read like the instructions a person would naturally give.
show instead of print, let instead of var, text instead of str. Words a beginner can guess.
Reading past the end of a list stops with a clear error instead of silently corrupting memory, the mistake behind most security bugs in C.
Mistakes like subtracting a number from text are caught before your program runs, with a plain-English message.
INK programs become real native executables through LLVM. No interpreter, no virtual machine, no waiting.
The whole language fits on one page. A small language is one you can hold in your head.
Everywhere else, INK keeps the familiar word: if, for, while, return. Changing a good word only to look different would be its own mistake.
Would someone who has never programmed guess what it means? If yes, it belongs in INK.
Every stage of INK's compiler is hand-written in x86-64 Assembly. It owes its foundation to no other programming language.
hello.in
Breaks code into tokens (words)
Builds a syntax tree and checks types
Turns the tree into LLVM code
Compiled by clang
Stages marked in saffron are 100% x86-64 Assembly: over 9,500 lines of hand-written code.
Eight small programs from the repository's examples/ folder, each with its real output.
show "Hello from INK!"
show "Jai Hind!"
Hello from INK! Jai Hind!
show puts anything on the screen: text or numbers.
let name = "George"
let age = 30
show "Name: " + name
show "Age: " + age
Name: George Age: 30
let stores a value. Adding a number to text turns it into text automatically.
let marks = 75
if marks > 90 {
show "Grade A"
} else if marks > 60 {
show "Grade B"
} else {
show "Fail"
}
Grade B
if, else if and else read exactly like plain English.
for i in 0..5 {
show i
}
0 1 2 3 4
The range 0..5 counts up to, but not including, 5.
fn add(a: num, b: num) -> num {
return a + b
}
show add(5, 3)
8
fn defines a function. -> reads as "gives back".
let scores = [10, 20, 30, 40]
show len(scores)
show sum(scores)
show scores[0]
4 100 10
Lists hold values in order. Positions start at 0, and len and sum are built in.
let city = {"George": "Hyderabad", "Priya": "Delhi"}
show city["George"]
show "Priya lives in " + city["Priya"]
Hyderabad Priya lives in Delhi
Maps look up a value by name instead of by position.
fn biggest(xs: list) -> num {
let best = xs[0]
let i = 1
while i < len(xs) {
best = max(best, xs[i])
i = i + 1
}
return best
}
let data = [3, 9, 2, 15, 7]
show biggest(data)
15
A real little program: functions, lists, a while loop and the built-in max.
INK is young, and honest about it. Today it shines at exactly the things a new programmer starts with.
Variables, loops, functions, lists and maps — the core ideas of programming, with words a beginner can guess.
Small enough to teach in one lesson. show, let, num — plain words school students read at a glance.
Perfect for problem-solving drills — grades, the biggest number, sums and averages — where clear logic matters most.
Read what the user types, do the maths, and read or write files — small utilities that run as fast native programs.
Bigger things — modules, a standard library, graphics, the web — are on the roadmap. INK is built to grow.
INK needs NASM and LLVM/Clang. On Ubuntu or Debian:
sudo apt-get install nasm llvm clang
Clone the repository and build the compiler:
git clone https://github.com/uGeorgeFernandez/ink cd ink ./build.sh
Save a file called first.in, then run it:
show "Hello from INK!"
./ink.sh first.in
Requires Linux on x86-64. On Windows, use WSL.
Free & open source (MIT). Prefer the terminal? Use the git clone above.
We want INK to be the easiest first language to learn, especially for students. Your feedback decides what we build next.
The full pipeline — lexer, parser and code generator, all hand-written in x86-64 Assembly — compiles real programs to native binaries through LLVM.
numWe renamed int to num — the plain word for a number, friendlier for first-time and school programmers. Old int code still works.
Try INK in the browser, compare it with Python, PHP, C# and Node.js word for word, and download it in one click.
INK compiles and runs real programs today. Building operating systems, games or large applications is a long-term goal, and we say so plainly.
import and multiple filesread_file reads up to 64 KB.The most valuable contribution is a real program written in INK. Bug reports and ideas are welcome on GitHub.
Open an issueLearn the whole language in an afternoon, from your first show to maps and files.