Introducing Jancy

What?! Yet another programming language? Like, there isn't enough of them already?

Well, yes and no. New languages keep emerging, because there are and always will be domains uncovered by existing tools — and Jancy covers a few of important ones.

The main motivation in our case was IO Ninja. We were looking for a scripting language with C-like structures and safe pointer arithmetic — something like a safe dialect of C suitable for employment as a scripting engine in a C/C++ application. Surprisingly enough, we couldn't find such a thing! So we created it.

Main design goals

Statically typed C-family scripting language

scripting language Target domains — IO and UI programming

and programming Seamless embedding into a host C/C++ application

into a host C/C++ application High level of ABI and source compatibility with C

with C Automatic memory management via accurate GC

LLVM as a back-end

Open-source

Jancy is an open-source project hosted on GitHub under the MIT license — one of the most permissive licenses in existence. Visit Jancy GitHub page for more details.

Killer Features

Source and ABI-compatibility with C Jancy scripts are JIT-compiled and can be called directly from the host C/C++ application. Jancy supports all of the major calling conventions and is compatible with C/C++ compilers with respect to struct/union layouts with arbitrary packing factors. Safe Pointers Jancy provides all the colors and flavors of pointers such as safe pointers and safe pointer arithmetic, unsafe thin pointers for interoperability with existing C/C++ libraries, weak pointers which do not retain objects, function pointers with partial application, scheduled function pointers and even property pointers! Reactive Programming Ever used Microsoft Excel before? Then you know the concept of writing a "formula" which will be automatically re-evaluated when the referenced cells change. With Jancy you can do the same in your code — and with full control of where and when to use this reactive paradigm. This is perfect for UI programming! Regex Switches Jancy provides a convenient way of tokenizing input streams — that is, splitting a stream of characters into a token sequence. Specify regular expressions to define recognized lexemes and then simply write actions to execute when these lexemes are matched in the input stream! Dynamic Structs If you ever wrote a parser for a binary protocol, then you know how often the length of a field is dynamically calculated from the values of others. Jancy allows declaring structs with non-const sized array fields. Use these dynamic structs for packet parsing/generating — the same way you do with regular C-structs! Dual Error Handling Both error code checks and exceptions have their preferred domains of applications. Jancy allows you to create APIs which support both! Define a function once, and then choose whether it's more convenient to error-check or use exception semantics at each particular call-site!

Other Notable Features