cider

Valentin Mouret 2024-11-11T13:50:36.316649Z

Hello! I am having an issue, and it apparently comes from nREPL. If I have a namespace form within a string, nREPL is confused about the namespace and the code breaks. So: `(do-stuff "some (ns foo)")` Will fail, with an error about do-stuff not being found. Is there a way around this issue? Thanks for your help! More context in https://clojurians.slack.com/archives/C053AK3F9/p1731316840829579 tread.

magra 2024-11-11T15:52:12.248339Z

Hi, my repl just told me that I need libnrepl JVMTI agent. I am on FreeBSD. I tweaked the Makefile and built it with clang. I installed it with lein install. Thank you for perfect documentation!!!! Just one thing: How do I test it?

❤️ 1
oyakushev 2024-11-11T16:50:13.746719Z

1. Execute (while true) in the REPL. 2. Open htop to see that java process uses 100% of the CPU (1 core) 3. Do C-c C-b in Emacs to cancel the execution and check that CPU utilization is gone.

oyakushev 2024-11-11T16:53:47.923099Z

And all of that running JDK 21 or higher, of course

magra 2024-11-11T16:54:29.576379Z

Thanks!!! Great idea! It trys to load the linux.so instead of the freebsd.so 😞

oyakushev 2024-11-11T16:55:45.002829Z

Yeah, I see now that the heuristic it uses is pretty dumb

oyakushev 2024-11-11T16:56:29.600659Z

Since you already install a custom build, just replace res/libnrepl-linux-x64.so with your binary and install again

magra 2024-11-11T16:57:19.417029Z

Jep! That will work here but can not be upstreamed.

oyakushev 2024-11-11T16:58:53.075639Z

I wouldn't mind including FreeBSD target if Github Actions had a runner to build it. Either that, or you could insvestigate how it can be cross-compiled from a linux box.

oyakushev 2024-11-11T16:59:31.212389Z

But we don't want the binaries to be reproducible, basically

oyakushev 2024-11-11T17:08:42.729369Z

Sorry, brain fluke above

magra 2024-11-11T17:19:02.686249Z

As a first step I will try to be able to lein install on FreeBSD. FreeBSD folks have tried to work with CI-providers to provide cross-compilation but there was no interest. I will research a bit.

magra 2024-11-11T19:31:56.895229Z

hmm. looks like things are changing. clang might be able to do it from linux. I confused CI Runs and cross compilation.

magra 2024-11-11T19:57:55.843869Z

This works on my machine. https://github.com/markusalbertgraf/nrepl

oyakushev 2024-11-11T20:03:55.939769Z

If you manage to set up building it on CI, I'll gladly welcome a PR :)