Unnarize

A high-performance bytecode interpreter for a dynamic, C-style scripting language with "Gapless" Generational Garbage Collection and native Async/Await support.

Get Started GitHub

What is Unnarize?

Unnarize is a modern scripting language designed for speed, reliability, and ease of use. It compiles source code to bytecode and executes it on a high-performance virtual machine featuring:

Key Features

High Performance
Achieves ~275 million ops/sec on loop benchmarks. Optimized bytecode VM with specialized opcodes for common operations.
Gapless GC
Production-grade generational garbage collector with concurrent marking and parallel sweeping. No more STW pauses.
Async/Await
First-class support for non-blocking concurrency with async functions, await expressions, and native event loop.
Module System
Hierarchical imports with relative path resolution. Organize code into reusable modules.
Rich Standard Library
7 built-in core libraries: HTTP server, JSON, web scraper, string manipulation, file I/O, timers, and UON database.
Clean Syntax
Familiar C-style syntax with modern touches. Easy to learn if you know JavaScript, C, or Java.

Quick Example

// Hello World
var name = "Unnarize";
print("Hello, " + name + "!");

// Function
function factorial(n) {
    if (n <= 1) return 1;
    return n * factorial(n - 1);
}
print(factorial(10)); // 3628800

// HTTP Server
function handleApi(req) {
    return "{\"status\":\"ok\"}";
}
ucoreHttp.route("GET", "/api", "handleApi");
ucoreHttp.listen(8080);

Installation

git clone https://github.com/gtkrshnaaa/unnarize.git
cd unnarize
make
sudo make install
unnarize -v  # unnarize 0.1.6-beta

Performance Benchmarks

Tested on Intel Core i5-1135G7 @ 4.20GHz with 8GB RAM:

Benchmark Result
Heavy Loop (10M iterations) ~275 M ops/sec
Fibonacci(30) Recursive ~70 ms
GC Stress (50K allocations) Stable, <10ms pause
String contains (14KB) 24.5 M ops/sec
HTML parseFile (370KB) ~340 ops/sec

Core Libraries

Library Description
ucoreString Text manipulation: split, join, replace, trim, regex match/extract
ucoreScraper HTML parsing with CSS selectors, fetch/download, web scraping toolkit
ucoreJson JSON parse/stringify, read/write files, full type support
ucoreHttp HTTP client (GET/POST/PUT/DELETE) and server with routing, middleware, static files
ucoreTimer High-precision monotonic timing (now) and sleep
ucoreSystem File I/O, shell exec, environment variables, args, exit
ucoreUon UON format database with schema, streaming cursor, and generate
ucoreTui Terminal UI: tables, input boxes, streaming layouts, colors

About the Author

Unnarize is created by gtkrshnaaa, a 22-year-old programmer from Indonesia known as "The Polymath Artisan Prince". With a passion for language design, systems programming, and pushing the boundaries of what scripting languages can achieve, this project represents the culmination of deep expertise in compiler construction, virtual machine design, and garbage collection algorithms.