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 ~100 million ops/sec on arithmetic benchmarks with minimal memory footprint (~11MB). Optimized bytecode VM.
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 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz with 8GB RAM (Ubuntu 24.04):

Benchmark Performance Resource
Integer Arithmetic ~100 M ops/sec Peak RAM: ~11,460 KB
Double Arithmetic ~90 M ops/sec
String Concatenation ~30 K ops/sec
Array Operations (Push) ~50 M ops/sec
Struct Access ~40 M ops/sec

Verification: Results are validated as of commit 0c81196.

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: Gilang Teja Krishna

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.