Fork me on GitHub
#graalvm
<
2019-05-29
>
lilactown04:05:53

Has anyone played with Clojure on graal using polyglot stuff?

lilactown04:05:24

I’m curious if you could use things like datomic from JS or ruby via graal

lispyclouds13:05:54

@lilactown I have played a bit with JS->Java interop. The JS impl on Graal is designed for calling into java objects and methods. In the case of Datomic we can use the Java API instead of the clojure one to get it done with lesser hassle.

lispyclouds13:05:19

the java interop is pretty straightforward

> const Date = Java.type("java.util.Date")
> const d = new Date()
> console.log(d)
Wed May 29 15:07:52 CEST 2019
> d.getMinutes()
7

souenzzo14:05:50

You can use java API from JS. will avoid you to call invoke stuff