Fork me on GitHub
#graalvm
<
2019-08-30
>
borkdude06:08:26

I tried to make a socket REPL work with GraalVM last night and I bumped into the locking issue again. It does work without a problem on 1.9.0. I wonder what changed between 1.9.0 and 1.10.1 that makes this error appear, while the Android locking issue on JIRA is much older than that?

sb07:08:18

On x86 or aarch64? With adoptopenjdk-11-hotspot compiled graalvm? I check it too.

borkdude07:08:52

binary, both Mac and Linux

sb07:08:01

Ok in this case x86.

sb07:08:08

I check it

borkdude06:08:23

(Socket REPL with your own :eval fn that is)

borkdude07:08:57

Could very well be. If I remove the locking reference in server.clj I still get the same error

David Pham13:08:33

What are the chances of getting Clojure to work on GraalVM?

lispyclouds13:08:25

@neo2551 most of it already works. Is there some code that you couldnt get to work?

David Pham15:08:08

Can you do repl development on GraalVM?

zane15:08:22

If you're asking whether you can use the Clojure REPL with GraalVM the answer is: Yes! Absolutely.

zane15:08:58

It's a full-featured Java runtime. It behaves more or less like any other, at least in my experience. Works with CIDER, nREPL, etc.

David Pham15:08:40

Ok! I thought the limitations of GraalVM would not allow Clojure to load namespaces dynamically

zane15:08:41

Only when you're building self-contained binaries.

David Pham15:08:08

Workflow using GraalVM and some experience sharing Would be a great subject for a talk

zane15:08:20

Until you start trying to build self-contained binaries it's literally no different from using Oracle or OpenJDK, at least as far as I know.

David Pham15:08:58

So, the only difference is when you create uberjar?

David Pham15:08:29

So you could use GraalVM Instead of JVM and it would work?

David Pham15:08:45

With better speed?

David Pham15:08:52

And better memory?

zane15:08:01

The differences arise when you need to create a native image.

David Pham15:08:17

But do you need to?

zane15:08:33

No. You ought to be able to use it as a stand-in replacement for Oracle Java (or OpenJDK). In fact, some people are arguing that people ought to do that. https://hackernoon.com/why-the-java-community-should-embrace-graalvm-abd3ea9121b5

zane15:08:42

There's a lot of hype around the native image stuff, but I'm personally just as excited about the polyglot features.

David Pham16:08:03

We could just use scikit learn out of the box

David Pham16:08:16

And I can finally ditch R xD

zane16:08:19

Or, like, all of R.

David Pham16:08:40

I am thinking of exploring Apache Arrow

David Pham16:08:45

For cljs or clj

zane16:08:01

Oracle's claims about the performance of hitherto non-JVM languages are bananas. https://youtu.be/8AYESZIaacg?t=960

zane16:08:08

Like, look at FastR.

David Pham16:08:30

I need a DF (timeseries) data structure and it is pain without it

David Pham16:08:40

Guess I will try to sneak GraalVM into work :)

zane16:08:22

> sneak Should be pretty painless. You could recommend trying it out to see if there are performance gains. 😉

zane16:08:13

I've been noodling on a library to make GraalVM cross-language interop easier from the Clojure side.

zane16:08:51

So far the experience has been completely magical.

David Pham16:08:52

Haha, I am solo CLJS developer in a data science team, guess it would be easy for me to make the technical point lol

David Pham16:08:17

Okay okay, you got me hooked I will try it. I hope the experience is painless, is there any intro on how to swap the JVM with GraalVM?

zane16:08:18

It's just a matter of setting your JAVA_HOME, just like with any other Java.

zane16:08:06

I personally use jEnv because I find that it plays well with my toolchain (Emacs, CIDER).

zane16:08:26

user>
(put-binding! "incall" (proxy-fn #(map inc %)))
nil
user>
(r-eval "incall(1:10) + 1")
[3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0]

🤯 12
David Pham16:08:17

Looks cool :)

David Pham16:08:36

Which libraries are you interested in for R?

zane16:08:56

I'm new to R actually, so I don't have a specific library in mind.

zane16:08:26

At work I've been exploring making a Clojure library we develop available to R programmers.

zane16:08:33

@neo2551 Not to throw a wet blanket on your enthusiasm, but I should say that GraalVM does not make dependency hell any easier. All the pain of working with scikit learn, scipy, and friends will be just as bad in Graal-land.

zane16:08:02

I haven't yet been able to get Stan to work with GraalVM yet, for example.

David Pham16:08:15

Why is there dependency hell?

zane16:08:30

Oh, I've just found that getting the right versions of libraries to play well together can be a pain when native code is involved.

David Pham16:08:21

I always wanted to avoid learning Java, but at some point I will have to I guess.

David Pham16:08:52

Python support is experimental haha

David Pham16:08:59

Guess R will be the library then.

David Pham16:08:43

We could have a CLJ with CLJS interop XD

zane16:08:41

Oh yeah.

zane16:08:01

Not unlike Nashorn. RIP.

David Pham16:08:37

So what is stopping the community to move to graalVm?

zane16:08:35

You'd have to ask the community. 🙂

zane16:08:55

Huh. I'm seeing claims that Oracle JDK 11+ might support some GraalVM features? 😮

zane16:08:03

@neo2551 You may want to join #data-science if you're not already in there.

David Pham16:08:08

Yeah I joined :) I just need time to play a bit with some of their tools.

David Pham16:08:08

I feel I am perpetuating the Lisp curse with clojure, I feel I want try things on my own more than to reuse what the community already created.

zane17:08:47

Which tools are you thinking of?

zane17:08:51

I can relate.

Daniel Slutsky19:08:49

@zane @neo2551 , regarding R on GraalVM, I have had some basic experiments recently, thanks to a discussion with @slack.jcpsantiago . See some examples here -- maybe this helps: https://github.com/scicloj/fastr-examples/ https://github.com/scicloj/fastr-examples/blob/master/examples/examples.clj

4
zane20:08:13

@U066L8B18 I don't suppose you've had any luck getting FastR to work with Stan?

Daniel Slutsky21:08:14

No. 😞 Trying to install it, I get some errors.

zane22:08:17

Likewise.

zane22:08:20

I'm trying to work through them.

David Pham19:08:59

Seems really interesting!

parrot 4