Discuss GraalVM related topics. Use clojure 1.10.2 or newer for all new projects. Contribute to and GraalVM slack:
borkdude 2021-02-02T11:12:24.109600Z

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

borkdude 2021-02-02T11:12:46.110200Z

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

flowthing 2021-02-02T11:13:39.111Z

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

flowthing 2021-02-02T11:14:02.111300Z

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

flowthing 2021-02-02T11:14:54.111800Z

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

borkdude 2021-02-02T11:15:44.112Z

no, you can't

borkdude 2021-02-02T11:15:50.112200Z

this is the entire point of sci basically

flowthing 2021-02-02T11:16:35.113Z

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

borkdude 2021-02-02T11:17:28.113900Z

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

flowthing 2021-02-02T11:18:28.114800Z

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

borkdude 2021-02-02T11:18:45.115400Z

I think they just added it as a dev dependency

flowthing 2021-02-02T11:19:14.116Z

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.

borkdude 2021-02-02T11:20:45.116300Z

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

borkdude 2021-02-02T11:20:51.116500Z

also to keep the image size down

ericdallo 2021-02-02T12:23:15.116800Z

that's right, we use it for developer, like make changes on clojure-lsp and check if they worked, but AFAIK even if it compiles correctly, it wouldn't work evaluating things after the image was already compiled

flowthing 2021-02-02T13:11:42.117300Z

Right, I agree — it wouldn't.