Matte Scripting Language
NOTE: Matte is still under heavy development, and features are still in flux.
Introduction
Matte is a small, simple, embeddable language geared for maintainable development.
Written in C itself, it features a C-like syntax with a set of key differences
designed to approach problems in a more maintainable way.
The language can either be used by compiling a set of dependency-free, C sources
and linking C functions to Matte functions, or it can be used with a standalone
interpreter. The interpreter extends the language with common OS features, such
as I/O.
In the most broad sense, think of Matte like an alternative to Lua, as embeddability is
one of its primary goals, but with some additional syntactic features.
Main Language Features:
- Small and easily embeddable with no external dependencies required
- Built-in debugger, available even when embedded
- Both C / C++ compatible code
- Dynamic, garbage collected value system
- Optional gradual typing
- Closures with lexical scoping
- Simple error catching
- Simple module management
- Built-in modules for classes, JSON, and more
- Optional OS feature extension modules for asynchronous computation, socket I/O, and more
- Dump to/from portable VM bytecode
- Easily extensible
Online Demo
The language with examples can be run in-browser.
Alternatively, if you're looking for a REPL-based example, this one can also be run in-browser.
Documentation
Download
Links
Matte source repository (GitHub)
Licensing
The Matte language and tools referenced here are released under
the MIT license.
Unless otherwise specified, the Matte sources are copyright Johnathan Corkery
Additional Support + Special Thanks
- Adrian Hernik - for helping me make fewer bad decisions and keeping me (mostly) sane
- Braden Ehlert - for all their patience and help with improving the language and performance
Inspirations
- Duktape is a great embeddable JS engine with an embedding interface similar to Lua's
- Fabrice Bellard's projects are quite inspiring. (and the "old-school" visual design of his sites are the direct inspiration for this one...)
Johnathan Corkery - https://github.com/jcorks