-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guile over nREPL, guile-ares-rs integration #549
Comments
I know of vim-slime, which I've heard is like SLIME for emacs, but I've
never used emacs or actually used vim-slime.
https://github.com/jpalardy/vim-slime
|
This is really cool, thanks for sharing! This should work great when I can refactor the nREPL support into a reusable layer. |
On 2023-12-30 04:35, Oliver Caldwell wrote:
This is really cool, thanks for sharing! This should work great when I
can refactor the nREPL support into a reusable layer.
Nice! Don't hesitate to contact me if you have any questions, need
support or changes on ares-rs side.
Wish you great holidays! :)
…--
Best regards,
Andrew Tropin
|
Tried the basic parts of this today and the nREPL side works - would be great to have it in Conjure ;-) This is what worked for me:
This starts a nrepl and I can connect to it with netcat
We can send really basic stuff:
Anything more complicated hits the fact that we're inside a Clojure environment. I couldn't get Conjure to connect to it with ConjureConnect. |
Started work on this, I can't get guix installed on arch so far though, the AUR builds the package ~3 of them have failing tests and won't install. I guess I'll need to find another way to install it or maybe use a docker container that already has guix installed like https://github.com/metacall/guix? |
Hi Oliver! You actually don't need guix, if you can install guile 3.0.10 (this version or newer is required). After that just add fibers and guile-ares-rs to load path like that: If you want to use guix in container, you can use debian:testing image and do We are preparing the last bits for 1.0 release, so I think we will do it next week or just after guile is updated in Guix repo: Let me know if you have any questions or need a hand. |
So guix has been removed from debian testing (not sure why) so I tried to use stable but that requires a daemon which requires extra dependencies and I still can't get to work. I've tried https://github.com/metacall/guix but can't get that to work, I think it requires some very specific buildx based commands in a chain? I couldn't get the insecure flags to work for me for some reason. I've tried cloning both of the dependencies and I have guile guile -L ./deps/fibers -L ./deps/guile-ares-rs -c '((@ (ares server) run-nrepl-server))' I get:
So I think maybe I'm either missing an argument or I need to run some build commands in the fibers and guile-ares-rs directories? Just sharing this here to show exactly what I've tried and what I've failed at 😅 I like the idea of using docker most because that'll be easily reproducible but it seems like running guix under docker is a bit tricky because it needs to fork some processes (I think?). Edit: Trying out installing guix from the AUR again, just in case it was a temporary issue. |
The AUR package failed sadly:
I tried the manual install script from guix that sidesteps the arch package management but that also failed sadly
I tried to import those keys by running those commands but got
So I think I'm just going to have to park this concept for now until I can find some better way to run the software, sorry 😢 maybe it's just me and others can easily get this working in a very portable way. Edit: I think various GNU servers are down right now maybe? So some unlucky timing! |
Your first attempt looks almost correct.
should be |
Oh thanks! I didn't spot that, I should've had a look at where the actual guile source was in the repo. This got us further but not all the way, here's my latest output:
|
I have tried with the latest commit in both dependencies and with the latest tag (0.9.5 for guile-ares-rs, v1.3.1 for fibers), the all result in the same error. I'm using Maybe I'm missing a system dependency or library? |
Finally got it to work, I had to go into the fibers repo, compile it, installed it globally (which maybe isn't required, that didn't actually fix the issue even though it really should?) and then used the ./deps/fibers/env guile -L ./deps/guile-ares-rs/src/guile -c '((@ (ares server) run-nrepl-server))' So now I have a Guile nREPL but it's not scripted yet, I had to build manually. I'll try to automate that in Conjure's dev tooling directory to make it a little easier to reproduce. |
Annoyingly the guix installer is working today 😆 so I'll see if I can use that finally, that'll make it easier to reproduce I think. I guess some GNU project servers have been down every time I tried to use them. |
Haha, I just reproduced an issues you mentioned, did exactly that and wanted to share with you :) |
Yep, gnu infra is a bit wonky the last few weeks. I glad that you succeed to run server, you probably would like to pull the latest ares-rs version, it has a lot of updates and it's better to develop against it. I think we almost finished breaking APIs before 1.0, but I can potentially change a couple more things next week. You probably also want to add |
So if guix works (still doing my first guix pull) would you say that it's the best way to run things with the latest versions or should I rely on the git repo to stay in the loop? And thanks for the tip on the logging, that'll be helpful! |
You should rely on latest git checkout, it has a lot of changes since 0.9.5. Plus it's easier to hack things in-place for server side part, when you have git repo at your disposal. If you have a working guix, you can spawn an nREPL with |
Hi @Olical!
On fediverse, you mentioned that stdio Guile REPL is far from perfect and that it would be cool to make a Guile nREPL integration for Conjure. A few weeks ago we released guile-ares-rs (RPC server based on nREPL protocol), it implements all the basic functionality (evaluation, interruption, completion) and seems to be a very reliable.
There is an emacs-arei client, which can be used as a source for inspiration.
I don't use vim for almost a decade already and thus it would be not very rational to write a client/integration on my own, however, I would be glad to share the knowledge and implement missing functionality on the server side to help someone to implement the client.
Cc people using guile and vim I know: @ekaitz-zarraga, @Millak
The text was updated successfully, but these errors were encountered: