Skip to content
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

Open
abcdw opened this issue Dec 26, 2023 · 4 comments
Open

Guile over nREPL, guile-ares-rs integration #549

abcdw opened this issue Dec 26, 2023 · 4 comments

Comments

@abcdw
Copy link

abcdw commented Dec 26, 2023

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

@Millak
Copy link

Millak commented Dec 28, 2023 via email

@Olical
Copy link
Owner

Olical commented Dec 30, 2023

This is really cool, thanks for sharing! This should work great when I can refactor the nREPL support into a reusable layer.

@abcdw
Copy link
Author

abcdw commented Dec 30, 2023 via email

@Futurile
Copy link

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:

  1. Install Guix as a package manager on top of any Linux distribution
    Install it and do a guix pull to get the latest package definitions: already had this.

  2. Start a guix shell environment / install guile-ares-rs

$ guix shell 
$ guix package --install guile-next guile-ares-rs

$ guile -c '((@ (nrepl server) run-nrepl-server) #:port 7888)'

This starts a nrepl and I can connect to it with netcat

  1. Start a Clj nrepl
  clj -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.5.3"}}}' -m nrepl.cmdline -c --host 127.0.0.1 --port 7888

We can send really basic stuff:

user=> (+ 1 1)
2

user=> (list 1 2 3 4)
(1 2 3 4)

user=> (reverse '(1 5 9))
(9 5 1)

<ctrl>c doesn't seem to actually work to interrupt it though.

Anything more complicated hits the fact that we're inside a Clojure environment.

I couldn't get Conjure to connect to it with ConjureConnect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants