Shen-JVM is a compiler of Shen programming language to Java bytecode written in Java 6.
Shen is a portable functional programming language developed by Mark Tarver that offers
- Pattern matching
- Lambda calculus consistency
- Macros for defining domain specific languages
- Optional lazy evaluation
- Optional static type checking based on Sequent calculus
- An integrated fully functional Prolog
- An inbuilt compiler-compiler, Shen-YACC
The Android version of Shen-JVM is available on Google Play, which is a full featured Shen REPL with a customized keyboard.
Other ports of Shen by the Shen-JVM author includes
- Shen-C
- iOS version of Shen-C, which is a full featured Shen REPL with a customized keyboard for both iPhone and iPad available on the App Store
Download the JAR file (shen-jvm-x.x.x.jar) from releases
dependencies {
compile 'compile 'com.shenjvm:shen-jvm:x.x.x'
}
repositories {
jcenter()
}
<dependency>
<groupId>com.shenjvm</groupId>
<artifactId>shen-jvm</artifactId>
<version>x.x.x</version>
<type>pom</type>
</dependency>
<repository>
<id>jcenter</id>
<name>jcenter-bintray</name>
<url>https://jcenter.bintray.com</url>
</repository>
Shen-JVM uses Gradle as a build tool.
- Install Gradle
- Setup Gradle wrapper
gradle wrapper
- Build Shen-JVM
./gradlew uberJar
or
gradlew uberJar
- Clean previous builds and build Shen-JVM
./gradlew clean uberJar
or
gradlew clean uberJar
The JAR file will be generated as PROJECT_HOME/build/libs/shen-jvm-x.x.x.jar
java -jar shen-jvm-x.x.x.jar
or if rlwrap is installed
rlwrap java -jar shen-jvm-x.x.x.jar
When running the Shen test suite, it is recommended to increase the heap size and thread stack size using the Java options such as below. Especially the thread stack size is important and otherwise a stack overflow might occur.
java -Xms200m -Xmx2g -Xss4m -jar shen-jvm-x.x.x.jar
or
rlwrap java -Xms200m -Xmx2g -Xss4m -jar shen-jvm-x.x.x.jar
java -jar ./build/libs/shen-jvm-x.x.x.jar
or with rlwrap and Java options
rlwrap java -Xms200m -Xmx2g -Xss4m -jar ./build/libs/shen-jvm-x.x.x.jar
(cd "shen/test")
(load "README.shen")
(load "tests.shen")
or the one-liner
(cd "shen/test")(load "README.shen")(load "tests.shen")
Pass an exit status
(exit 1)
- Official website of Shen
- The Shen OS Kernel Manual
- The Official Shen Standard
- Shen Community Wiki
- The Book of Shen: third edition
Copyright (c) 2010-2015, Mark Tarver
Shen is released under the BSD License.
Copyright (c) 2019, Tatsuya Tsuda Shen-JVM is released under the MIT License.