Skip to content

Instantly share code, notes, and snippets.

@quoll
Created March 20, 2014 17:32
Show Gist options
  • Save quoll/9669333 to your computer and use it in GitHub Desktop.
Save quoll/9669333 to your computer and use it in GitHub Desktop.
It's turtles all the way down!
(ns turtles
(import [javax.script ScriptEngineManager]))
(defn -main [& args]
(let [e (.getEngineByName (ScriptEngineManager.) "nashorn")]
(.eval e
"var Clojure = Java.type('clojure.java.api.Clojure');
var hello = Clojure.var('turtles', 'hello');
hello.invoke();"
)))
(defn hello []
(println "Hello, World!"))
@quoll
Copy link
Author

quoll commented Mar 20, 2014

Requires at least Clojure 1.6 and JDK 8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment