Fork me on GitHub
#graalvm
<
2021-02-02
>
borkdude11:02:24

@flowthing the issue with nREPL is the completions namespace which spawns futures at the top level. if you change that to delays, it works.

borkdude11:02:46

I have a native version of REPL-y in a private repo. I can invite you if you want. I'm not ready to publish this code, since it's hacky

flowthing11:02:39

Yes, I did manage to compile a native image from the nREPL repo, but is that useful?

flowthing11:02:02

The future -> delay change I think we should make in any case.

flowthing11:02:54

Or maybe I've misunderstood something and you actually can use clojure.core/eval with a native image?

borkdude11:02:44

no, you can't

borkdude11:02:50

this is the entire point of sci basically

flowthing11:02:35

Right, that's what I thought. I'm just trying to understand why it's useful to compile nREPL into a native image, then. 🙂

borkdude11:02:28

I think a native nREPL client (like REPL-y) could be useful. A server probably not so much, unless it's hooked to an evaluator which can run inside a native image, like sci. This is why babashka has an nREPL server

flowthing11:02:28

Right, I can see that a client might be useful. Is an nREPL client what clojure-lsp needs?

borkdude11:02:45

I think they just added it as a dev dependency

flowthing11:02:14

I think the largest effort in making nREPL compile into a native image is to add checks to ensure that nobody breaks native image compatibility in the future.

borkdude11:02:45

which is basically why I rolled my own version of an nREPL server

3
borkdude11:02:51

also to keep the image size down