← Go back

Fracture - A New Script Language for Real Work


Posted on May 02, 2025 at 09:18 (GMT +00:00) by Colin

Over the last few weeks, I’ve been working on a new project that’s quickly become more than just a toy. It’s called Fracture, and while it’s still in its infancy, the goal is clear: build a fast, embeddable scripting language that can stand toe-to-toe with Lua, Python, and friends — not just in the world of C++ applications, but anywhere you can load a shared library and call an API.

What is Fracture?


Fracture is a modern, bytecode-compiled scripting language with:

A compact and readable syntax

A fast, custom virtual machine

A C-style API for embedding

Native support for arrays, destructuring, chaining, and modularity

Here’s a taste of the syntax:

data = [1, 2, 3];
[&data, 4] array::append;
[data] print;

It’s designed to be embedded easily — into games, tools, services, or scientific software. Whether you're writing a command-line tool, a game modding interface, or a data analysis pipeline, Fracture is meant to drop in with minimal friction.

A Clean Embedding API


Fracture exposes a raw C API (compatible with C++ or other FFI-friendly languages) that looks like this:

void* ctx = fracture_create();
fracture_load_string(ctx, "script", "... your code here ...");
const char* result = fracture_run(ctx);
fracture_destroy(ctx);

It also supports single-line eval and calling named functions with arguments:

const char* result = fracture_call(ctx, "my_function", args, arg_count);

This isn’t just for embedding in C++ — this works just as well from C#, Rust, Python (via ctypes or FFI), or even as a scripting backend in a cross-platform mobile app.

Design Foundations


Even in these early days, Fracture has a few solid foundations:

Bytecode execution: Code is compiled to bytecode before execution, allowing for efficient dispatch and future JIT.

Built-in compiler and parser: No third-party dependencies; the entire toolchain is native.

Chaining and argument pipelines: Functions can be composed naturally using >> to build expressive, data-first logic.

Destructuring and inline control: let [a, b] = get_coords(); just works.

Use Cases (Even Now)


While Fracture is still growing, it’s already useful in these areas:

Scientific and high-volume data processing: With GPU integration in progress and fast native calls, Fracture is already ideal for numeric scripting and custom algorithms.

Web backends and API glue: Lightweight enough for embedding into servers or middleware without dragging in a heavyweight runtime.

Game scripting and mod engines: Fast dispatch and isolated contexts make Fracture a great candidate for game logic.

Tool scripting and automation: Drop-in scripting layer for your own CLI tools or GUI apps.

Why Not Lua or Python?


Python is heavy and slow to start. Lua is fast but quirky, and embedding it cleanly isn’t always as simple as advertised.

Fracture gives you predictable performance, modern syntax, full control over memory and execution, and a sane API design. No metatable magic, no imports that mutate global scope, no weird coercion. Just script code that runs fast and clean.

What’s Coming


Here’s what’s planned next:

Proper return values from script main

Expanded standard library (math, string, time, file, json)

GPU compute shader support for custom operations

Improved error handling and tracebacks

WASM backend (eventually)

Live REPL tooling

It’s early. Fracture has only existed for a few weeks. But the architecture is solid, and the vision is clear. I want this to become a serious alternative to Lua, Python, and others — not just for enthusiasts or hobby projects, but for real, production work.

More soon.

/signing off
/Programming

Search
Tags
Accident Adoption Albums Algorithms Altcoins Animal Rescue AnL Aquarium Arma ArmA nd Leg Array Partitioning Arrays Assembler Assembly Atanasovsko Award Bazaar Binary Search Bitcoin Bohemia Bootstrap Bulgaria Bulgaria Za Mladite Burgas C C++ Celerity Charity Chemical Records Chemical Shock Chemlight Code Competition Compiler Contest Converter Covid-19 CPP Crypto Cryptocurrency css Data Recovery Database DataTables Decode Dedicated Dedicated Server Delphi Development Dialogs Divide & Conquer DIY DnB Drum & Bass Earplugs Event Exchange Eyes Fish Floating-point Flood Fog Fracture Frank Harrison Freeware Function Funny Gallery Game Game Development Game Modding Gaming Garden Gardening Gazebo GERB GitHub Glitch Hamish Harding Happy New Year Heapify HeapSort Helga HTML HTML entities Introduction Jackie JavaScript JQuery Jungle Lake Language Linker Listbox ListNBox lnbSetTooltip MariaDB Maths Merry Christmas Mini Mining Miningpoolhub Mist Modding MPH Multiplayer Music MySql NGO OceanGate One Nature ORCA organisation OverHertz Paludarium Pandemic Pascal Paul-Henri Nargeolet Paws Furever Pergola Persistence Pets Photography Pier Plugin Programming progress bar Project PX Library Quicksort r53 Racing Replace RIP Scripting Searching Server Shahzada Dawood Simulation Simulator Smoke Snippet Social media Software Sorting Source Sourcecode SQF Statistics Stockton Rush String Strings Submarine Suleman Dawood Terrain Detail Text Titan Tool Tragedy tutorial UCS4Char UE4 Unreal Engine Victims View Distance ViewBug web Web Development Website Welcome Woodworking Ziron Zynk