Welcome to Metis!
print("Hello World!")
Metis is a language that aims to be easy to sandbox, and easy to use while having many features from other languages. Its main inspiration is Lua, as well as some features from Python and Rust.
Check out the language overview to learn more about Metis, or take a look at the examples to see what Metis can do. If you want to embed Metis in your project, check out the API documentation.
Usage
The latest Metis release can be downloaded from Github. The release is JAR file that can be run with java -jar metis.jar
. This requires at least Java 17 to be installed.
Here are all the command line arguments that Metis supports:
-i , --stdin | Read the code from STDIN |
-f <file> , --file <file> | Read the code from a file |
-c <code> , --code <code> | Read the code from the arguments |
-d , --debug | Enable debug mode |
-p , --print-chunk | Print a disassembly of the code to be run |
-s , --syntax-highlight | Convert the code into syntax-highlighted HTML |
Building
Metis is written in Kotlin, and uses Gradle as its build system. To build Metis, you need to have Gradle installed. To build Metis, run the following command in the root directory:
./gradlew shadowJar
This will create a JAR file in metis-app/build/libs
that can be run with java -jar metis.jar
.
Changelog
0.4.0
- Removed the
__len__
metamethod (and thelen
function) and replaced it with thesize
function
0.3.0
- Fixed upvalues having the wrong value when the function is passed as an argument
- Added functions to
list
andstring
- Changed the comment character from
//
to#
- Implemented the
**
(power) and//
(floor division) operators - Changed
__inclrange__
to__inclRange__
for consistency - Implemented the compound assignment operators
0.2.0
- Fixed a bug where reporting errors would break because the lexer kept a global position, instead of a local one
- Added
collection.first
,collection.last
, andcollection.isEmpty
- Added many methods to
string
- Improved metamethod performance by up to 20% for some programs
- The API now allows you to provide your own function to wrap streams
0.1.1
- Actually added
random
to the standard library
0.1.0
- Initial release
Credits
Metis is made by Seggan.
This documentation in written in Papyri, made by Andrew Kay. The theme used for this documentation is the default Papyri theme.