Strange Loop

September 26-28 2018

Stifel Theatre

St. Louis, MO

Babel: An Untyped, Stack-based HLL

Babel is an open-source (BSD license) interpreted language designed by Clayton Bauman. It is an untyped, stack-based, postfix language with support for arrays, lists and hashes (dictionaries). It is implemented in C. Babel 1.0 will support built-in crypto to ease code certification. This will enable safer remote code execution for cloud-computing - one of the primary use-cases which Babel is intended to enable. Babel is inspired by many languages but some of the most notable influences are Perl, Lisp and Joy.

Babel's unique philosophy is based on the idea that languages - including computer languages - are emergent phenomena. Babel adopts Larry Wall's philosophy of first optimizing for the programmer's brain and secondarily optimizing for the machine. The most important performance rule of computer design is to make the common case fast - Amdahl's Law. No language can magically solve all your problems but it can make them worse. Babel attempts to avoid making things worse than they have to be. Babel looks to tradition to identify what the common case is in order to optimize to that.

Babel lacks classes and objects. In Babel, the machine is the object - that is, the virtual machine. The Babel Virtual Machine (BVM) has a symbol-table, it has code, stack and data, it has I/O, it has resource- limits, etc. It is containerized. It can implement and enforce access rights and code-execution rights. A BVM is just another data-structure so you can arbitrarily nest virtual machines.

Here are some of the things that you can do easily in Babel that would be less easy to do in another major language. With Babel, you can:

Containerize and launch nested Babel programs, making it easy to establish separation of concerns and manage the interfaces between portions of your code project

Save and restore your Babel program to and from disk at any point, making it easy for the user to suspend and resume at will. This is a prerequisite to any fully- virtualized compute environment

Enforce a "white-list" code execution policy using the built-in crypto operators – this can reduce the risks associated with executing remote code

Store your data in an underlying, uniform bstruct structure, making it trivial to save and restore them to and from disk, to make deep copies of them, to delete all memory associated with them, and so on

Visualize your data with Babel's built-in support for generating Graphviz dot files. These can be post-processed with the dot tool to generate graphical snapshots of your data. This speeds up debug and helps the programmer fully absorb the semantic significance of the syntax.

Organize your data in a manner to maximize both flexibility and performance using Babel’s built-in support for both Lisp-style lists and array structures. Modern computer architecture is array-based and can perform array lookups in constant time versus linear time for list-traversal. But for data that is constantly changing size or continually undergoing complex permutations, lists are a clear performance winner by permitting you to perform more of your operations in-place.

Easily nest data and code in arbitrarily deep and complex structures with minimal fuss with the Babel data-structure (bstruct).

Implement academic (non-optimized) algorithms, such as RSA encryption, using Babel’s built-in support for arbitrary-precision arithmetic.

Clayton Bauman

Intel

I am a computer engineer at a major technology company where I have specialized in virtualization architecture. I graduated in 2005 with a BS in computer engineering. I live in the beautiful Pacific Northwest. My two children are in grade-school and they are a constant source of joy and exhaustion. In my spare time, I play the piano, invent computer languages and read to satisfy my eclectic interest in everything from economics to algorithmic information theory.