Menter Guide |
Download/Build |
Yan Wittmann |
Menter is a programming language that is built in Java, meaning that it can be run on any platform that supports Java. It has a strong emphasis on simplicity and ease of use.
Here's a small program that creates an array, maps them to new values and filters them:
numbers = range(1, 4)
-> [1, 2, 3, 4]
filterFunction = x -> x > 4
-> (x) -> { x > 4 }
numbers.map(x -> x * 2).filter(filterFunction)
-> [6, 8]
Run this command in the root directory of the project using Mavens mvn
command:
mvn package -Pcmd-jar
You can then find the built jar in the target
directory. Or simply download the latest release from the
GitHub releases page.
If you want to use it as a library, build it using the following command:
mvn install
and use it using the following dependency:
<dependency>
<groupId>de.yanwittmann</groupId>
<artifactId>menter-lang</artifactId>
<version>1.0.0</version>
</dependency>
The main reason this language exists is to provide a simple, but powerful expression evaluator for the LaunchAnything Bar project. It is designed to be easy to use and to be able to be embedded into other projects.
Another reason is, that I have always been interested in compilers/interpreters and wanted to finally try and dip my toes into the topic by creating a simple programming language. Seeing as I mainly am a Java developer, I decided to write it in Java. This was also supported by the fact that the Launch Anything project is also written in Java.
But to speak in buzzwords, Menter is a: functional, single threaded, dynamically typed, interpreted, object oriented, garbage collected, statically scoped, expression based, programming language, that can be extended and adjusted for your needs with Java code.