Skip to content
@Nebania

Nebania Technologies

Orchestrating Hardware, Software, and Firmware.
Nebania Logo

Nebania HQ

Home of the OS since 2023

"Replacement is a copy, orchestration is a breakthrough." - Pilot0253


Platform Discord


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!


📖 Table of Contents

🚀 Introduction 🧠 Language Tour 📦 Built‑in Standard Libraries
🖥️ Runtime Modes 🪐 The Nebania Ecosystem 🗂️ File Extensions


Nebula OS -- Nebania's lovable, snarky mascot.

Caution

Nebula OS does not like to be poked. You can learn this the hard way on our website.

Nebula Thinking

"...Is that a penguin on my desk? Who authorized this?" - Nebula OS responding to a Tux plushie.

Nebula OS: Who is she?

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.

Nebula Sweet

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.


🔗 Chain -- Connecting C++, Connecting Systems.

Familiar Syntax

Clean, indentation‑based blocks like Python — or use {} braces if you prefer C‑style. Chain doesn't force a camp; hybrid syntax means both work in the same file.

Native Speed, When You Need It

Drop raw C++ straight into a .chain script with extern "c". Chain compiles, caches, and executes it, sharing variables via shared memory — no bindings, no FFI boilerplate.

Batteries Included

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.


🧩 Core Capabilities

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

🧠 Language Tour

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)

📦 Built‑in Standard Libraries

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

🖥️ Runtime Modes

┌──────────────────────┬─────────────────────────────────────────────┐
│  File Mode            │  chainlang script.chain                    │
│  Interactive REPL     │  Smart shell, multi-line blocks (⇧ + ⏎)     │
│  AST Debug Mode       │  ./link --debug   → visualize the AST       │
└──────────────────────┴─────────────────────────────────────────────┘

🚀 Installation & Build

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-lang

2 · Install dependencies (Linux)

sudo apt install libraylib-dev

3 · 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 install

This 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.


Running a script

chainlang examples/hello.chain

Tip

.link files still run for backwards compatibility, but print a friendly deprecation warning nudging you toward .chain.


🗂️ File Extension Cheat Sheet

Extension Meaning
.chain ✅ Current, standard Chain source file
.link ⚠️ Legacy extension (pre‑rename) — still runs, prints a deprecation warning


🪐 The Nebania Ecosystem

Nebania Logo
Chain is the core of a growing suite of tools built for NebulaOS — collectively, the Penthouse Apps.

🐚 Bellhop

A custom shell for NebulaOS with job control, command history, aliases, and tab completion — extensible via a native Chain plugin system. .link plugins are still accepted, but deprecated.

🍸 Martini

A terminal‑based file manager. Browse the filesystem, open .chain scripts in Sucrose, or run them directly. Its Concierge system scores .chain files (sick.chain) to detect and install Bellhop plugins on the spot — no leaving the TUI.

🍬 Sucrose

A terminal text editor with full Chain syntax highlighting, configurable through a syntax.chain file — no recompile needed to support new languages.

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

Pinned Loading

  1. chain-lang chain-lang Public

    An early C++ based scripting language used for application and function/call development.

    C++ 8 2

Repositories

Showing 3 of 3 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…