Cube is a dynamically typed, object oriented, programming language written in C. The language is based on the Lox programming language, from the book Crafting Interpreters by Bob Nystrom.
Cube has a large set of features, making it a complete programming language. The current features includes:
- Primitive variables
- Lists and dicts
- Loops and conditions
- Named and anonymous functions
- Classes
- Imports
- Native files support
- Closure context
- Asynchronous execution
- Types extensions
- Plug-in system
- Bytecode VM
Cube supports running in an interactive mode and from code files. On calling it without a file argument the interactive mode will start and any code can be typed directly in the console. If the file argument is present then this code is loaded and executed.
Cube files can be compiled into a bytecode form by passing the '-c' argument. To make the code debuggable the argument '-d' must be passed. Any other argument after any set of there are passed as arguments to the cube program being executed.
As you expect from any programming language in the world, you can say hello!
print('Hello, world!');
In cube you can also do any complex thing you can think of:
for(var i in 'A'..'Z') println('Letter: ', i);
From here you are already a Cube Programmer. You can start venturing in the Cube world by learning the language. If you ever run into bugs, or have any ideas or questions, you can:
Send a pull request.
Email me at alexander.ti.ufv@gmail.com.
- Fix GC