cljs-dev

ClojureScript compiler & std lib dev, https://clojurescript.org/community/dev
kommen 2020-04-04T17:05:01.172700Z

@dnolen implementing graaljs support via :target-fn showed the need to allow outputting bootstrap files. would a change like this be acceptable? https://github.com/nextjournal/clojurescript/commit/a75b90c1eb67e5130549fda88e4495c5ee9c23b5

dnolen 2020-04-04T17:18:41.173100Z

@kommen it's ok, it's a little subtle so maybe a comment in that code would be helpful for later readers

thheller 2020-04-04T18:55:54.173700Z

@kommen how do you use the graal stuff? do you use the Java API directly or via ScriptEngine or just a regular command line script?

kommen 2020-04-04T19:07:39.174300Z

https://clojure.atlassian.net/browse/CLJS-3222

kommen 2020-04-04T19:18:27.174600Z

@thheller I just noticed that since that post we also adopted the a shared Engine api which allows graalvm cache jit compiler state between multiple execution Contexts. will update the post soon

thheller 2020-04-04T19:19:46.174800Z

all your CLJS code is basically sync and you just call it from CLJ? or do you have async handling somewhere?

kommen 2020-04-04T19:21:55.175Z

we just do sync stuff with graal and leave the async parts to jvm clojure

kommen 2020-04-04T19:55:47.176700Z

@dnolen just found this still hardcoded for nashorn/graaljs: https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/core.cljs#L11708-L11709

kommen 2020-04-04T19:59:42.177700Z

but not sure how best to separate this out

kommen 2020-04-04T20:09:29.179Z

@mfikes that the 0 arity get-js-index calls through to arity 1 of get-options looks odd. is this intended? https://github.com/clojure/clojurescript/commit/0f6d24669c95966d781f905d168f20bce9105bbe#diff-3f5db04e51ac4262a2042aa4d80010a2R73

mfikes 2020-04-04T20:10:19.179400Z

Good catch @kommen, that code is incorrect.

mfikes 2020-04-04T20:10:39.179700Z

(It should be calling get-js-index)

mfikes 2020-04-04T20:10:51.180Z

I'll write up a JIRA and take care of it.

mfikes 2020-04-04T20:12:52.180200Z

https://clojure.atlassian.net/browse/CLJS-3223

2020-04-04T20:30:44.180300Z

WooHoo awesome, GraalJS support for ClojureScript nice!