Hime

License: GPL v3 Awesome Kotlin Badge

About

This is the interpreter of Hime language, a dialect of Lisp, run on JVM platform.

Once a feature is finished and tested, and not considered harmful, I’ll copy the codes here and publish releases.

Script API

import javax.script.*;

public class HimeScriptEngineTest {
    public static void main() throws Exception {
        ScriptEngine engine = new ScriptEngineManager().getEngineByName("hime");
        engine.eval("(require \"hime.core\")");
        engine.eval("(def x 10)");
        engine.eval("(println x)");
    }
}

Java invoking Hime

This project provides handy APIs for running Hime codes from Java.

class Main {
  public static void main(String[] args){
    Hime hime = new Hime();
    System.out.println(hime.run("(require \"hime.core\")").toString());
    System.out.println(hime.run("(+ 1 1)").toString());
    System.out.println(hime.run(new File("example.hime")).toString());
  }
}

Official website

https://hime.wumoe.cn/

GitHub

View Github