This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-17
Channels
- # beginners (42)
- # cider (1)
- # cljs-dev (20)
- # clojure (73)
- # clojure-italy (8)
- # clojure-nl (53)
- # clojure-spec (11)
- # clojure-uk (88)
- # clojurescript (170)
- # clojutre (6)
- # core-async (26)
- # css (2)
- # cursive (13)
- # data-science (10)
- # datomic (15)
- # editors (3)
- # figwheel (28)
- # figwheel-main (67)
- # fulcro (57)
- # graphql (2)
- # immutant (2)
- # jobs (1)
- # jvm (4)
- # lein-figwheel (3)
- # leiningen (1)
- # off-topic (5)
- # pedestal (28)
- # re-frame (86)
- # reagent (18)
- # reitit (8)
- # ring (3)
- # ring-swagger (2)
- # shadow-cljs (78)
- # spacemacs (10)
- # specter (12)
- # tools-deps (32)
- # vim (3)
Perhaps we could have a graaljs
REPL environment in the future.
Here is an example which is, honestly pretty much like the nashorn
REPL env, but with tweaks to instead set up to use the Graal.js JavaScript engine, and to also allow access to Truffle languages.
https://twitter.com/mfikes/status/1019035683640496128
https://github.com/mfikes/clojurescript/commit/ff8a8ba4612449833d170133bd0ce467c30101b7
@rumaysaalvina2 http://www.graalvm.org lists Python; I personally don't know more beyond that
@mfikes does it start faster than Nashorn? I’m assuming this requires running Graal as your Java command?
I tried the above using GraalVM rc1, and rc3 fails, rc4 just came out. If it succeeds, I'll be able to do a better time comparison. If not, I'll try to file a ticket. The Java command is still java
; in fact I'm using stock clj
.
@rumaysaalvina2 I just talked to the graalvm project lead, he says most stuff in python should work, but they are not 100% percent done with the python truffle implementation and he’d guess about a year away from it
would be interesting to try the libraries you’re interested in. I got a js bug fixed in a couple of days
@dnolen Unfortunately rc4 fails (https://gist.github.com/mfikes/a2e98f760aeb9c6e4f98a8545b052432)
Things to hammock on:
1) Whether this would ultimately make sense as a shipping REPL environment
2) If so, whether it and Nashorn share most of their common code, factored out into a shared ns perhaps
3) If so, whether :target :graaljs
is of any use (only identified this one because we have :target :nashorn
today)
it’s definitely interesting, and from a maintenance perspective not that much of a burden
Yeah, from a maintenance perspective the amount of new code is minimal and perhaps with some DRY refactoring it could be exactly a handful of lines: https://gist.github.com/mfikes/d823034ca93281223ffff23c972bc156
OK, I'm going to see if they already have a ticket for the failure and otherwise see if I can get them a minimal repro
@dnolen I managed to work around the Graal.js rc4 issue, and did some timings: Graal.js starts up a bit more quickly. Averaged across 10 runs, I got a speedup of 1.15
@rumaysaalvina2 If you'd like to try some Python, I've made my repo available with instructions https://gist.github.com/mfikes/e0dcb57f2d87afc905829f86111fb610