Clojurians
#cljs-dev
<
2018-07-17
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

mfikes01:07:11

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

rumaysaalvina204:07:50

so can we use mL libraries from python now from graaljs?

mfikes11:07:08

@rumaysaalvina2 http://www.graalvm.org lists Python; I personally don't know more beyond that

dnolen11:07:44

@mfikes does it start faster than Nashorn? I’m assuming this requires running Graal as your Java command?

mfikes11:07:13

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.

kommen12:07:02

@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

rumaysaalvina212:07:39

that means not out of box for python

kommen12:07:29

would be interesting to try the libraries you’re interested in. I got a js bug fixed in a couple of days

mfikes12:07:48

@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)

dnolen12:07:51

it’s definitely interesting, and from a maintenance perspective not that much of a burden

mfikes12:07:19

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

mfikes12:07:00

(Most of those diffs are just renaming diffs; the meat is how the engine is started.)

mfikes12:07:23

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

mfikes13:07:25

@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

mfikes14:07:10

@rumaysaalvina2 If you'd like to try some Python, I've made my repo available with instructions https://gist.github.com/mfikes/e0dcb57f2d87afc905829f86111fb610

rumaysaalvina214:07:01

sure i do, thank a lot

rumaysaalvina214:07:06

nice instruction, let me install the environment first