"Replacement is a copy, orchestration is a breakthrough." - Pilot0253
Get Started · Language Tour · Standard Library · Ecosystem · Downloads
Note
Nebania is consistently looking for new members. Feel free to join if you'd like to contribute!
| 🚀 Introduction | 🧠 Language Tour | 📦 Built‑in Standard Libraries |
| 🖥️ Runtime Modes | 🪐 The Nebania Ecosystem | 🗂️ File Extensions |
Caution
Nebula OS does not like to be poked. You can learn this the hard way on our website.
"...Is that a penguin on my desk? Who authorized this?" - Nebula OS responding to a Tux plushie.
Nebula OS is a snarky, crass, no-nonsense AI android. She has a sharp, dry sense of humor, extremely competent, and responds to a ridiculous situation with a cutting remark rather than panicking.
However, beneath all her sarcasm and sardonic behavior, Nebula OS is genuinely loyal and protective.
See? Nebula OS can be sweet as well.
Nebula OS is deeply integrated with Nebania. She isn't a computer sitting in a server room, she is a part of the technical backbone of Nebania.
|
Clean, indentation‑based blocks like Python — or use |
Drop raw C++ straight into a |
GUI (Raylib), audio, low‑level TCP networking, shell execution, file I/O, and a full math/string library ship with the language — no package manager required. |
| Capability | Details |
|---|---|
| Dynamic Typing | Integer · Float · String · Char · Boolean · Lists · Dictionaries |
| Math Engine | + - * / with full operator precedence (PEMDAS) and parentheses |
| Logic & Comparison | > < == != and or |
| Control Flow | if / elif / else, while, for (numeric range), try / catch |
| I/O | Built‑in print() and input() |
| Block Style | Whitespace‑indented or brace‑delimited — mix freely |
| Comments | # single‑line |
Chain reads like pseudocode, but underneath it's running through a hand‑built AST interpreter.
# Fibonacci, the Chain way
class Fibonacci
init(self, limit)
this.limit = limit
method run(self)
a = 0
b = 1
for i in range(this.limit)
print(a)
temp = a + b
a = b
b = temp
fib = new Fibonacci(10)
fib.run()
🔀 Prefer braces? Same language, C‑style blocks:
class Fibonacci {
init(self, limit) { this.limit = limit }
method run(self) {
a = 0
b = 1
for i in range(this.limit) {
print(a)
temp = a + b
a = b
b = temp
}
}
}
⚡ Drop into native C++ with extern "c"
speed = 42
extern "c"
// Raw C++, compiled & cached automatically.
// Shares variables with Chain via shared memory.
std::cout << "Speed from Chain: " << speed << std::endl;
print("Back in Chain-land!")
This is the language's marquee feature — genuine native interop without writing a single binding.
📦 Splitting code across files with import
import "math_utils.chain"
import "graphics.chain"
result = math_utils.square(9)
print(result)
| Module | Prefix | What it does |
|---|---|---|
| 🖼️ GUI Engine | gui_ |
Powered by Raylib — windows, shapes, text, mouse & keyboard input |
| 🔊 Audio Engine | audio. |
Stream MP3/WAV music or load SFX into RAM for game dev |
| 🌐 Networking | net. |
Low‑level, cross‑platform TCP sockets — clients, servers, port scanning |
| 🖥️ System & OS | os. io. |
Shell execution (os.exec), file I/O, environment variables |
| 🔢 Math & Strings | math. str. |
RNG, trigonometry, splitting, replacing, trimming |
┌──────────────────────┬─────────────────────────────────────────────┐
│ File Mode │ chainlang script.chain │
│ Interactive REPL │ Smart shell, multi-line blocks (⇧ + ⏎) │
│ AST Debug Mode │ ./link --debug → visualize the AST │
└──────────────────────┴─────────────────────────────────────────────┘
Important
You'll need a C++ compiler (G++ recommended) and Raylib installed before building.
1 · Clone the repository
git clone https://github.com/Pilot0253/chain-lang.git
cd chain-lang2 · Install dependencies (Linux)
sudo apt install libraylib-dev3 · Build
| Command | Result |
|---|---|
make |
Standard build |
make debug |
Build with debug symbols, for development |
make release |
Optimized build |
4 · (Optional) Install to PATH
sudo make installThis keeps the chainlang binary in the project folder and symlinks it into /usr/local/bin as both chain and chainlang — run either command from anywhere.
chainlang examples/hello.chainTip
.link files still run for backwards compatibility, but print a friendly deprecation warning nudging you toward .chain.
| Extension | Meaning |
|---|---|
.chain |
✅ Current, standard Chain source file |
.link |
Chain is the core of a growing suite of tools built for NebulaOS — collectively, the Penthouse Apps.
|
A custom shell for NebulaOS with job control, command history, aliases, and tab completion — extensible via a native Chain plugin system. |
A terminal‑based file manager. Browse the filesystem, open |
A terminal text editor with full Chain syntax highlighting, configurable through a |
Together, Bellhop, Martini, and Sucrose form the NebulaOS user environment: a shell, a file manager, and an editor, all designed natively around Chain.
📥 Download the Penthouse Apps → nebania.site
Built from scratch in C++ · Lexer → Parser → AST → Runtime

