nrepl

https://github.com/nrepl/nrepl || https://nrepl.org
bozhidar 2018-10-29T13:28:29.000400Z

https://metaredux.com/posts/2018/10/29/nrepl-redux.html

🙏 1
eraserhd 2018-10-29T14:17:49.002300Z

Hey, this reminds me. I have a need for an nREPL client that is thin and super light-weight, for CLI use. Well, not exactly for CLI use, but for use by an editor that is heavily bought into the idea of small tools and UNIX. Which means, I think, that the client needs to maintain persistent connection, by forking and forwarding.

eraserhd 2018-10-29T14:18:38.003300Z

I started hacking on a tool a few weeks ago (called rep, because it doesn't l). But never got it useful.

dominicm 2018-10-29T14:20:47.003500Z

@eraserhd python? 😄

eraserhd 2018-10-29T14:22:00.004300Z

Vim loads python dynamically, so it can keep the connection open, I thought. Kakoune won't do that.

dominicm 2018-10-29T14:22:28.004500Z

But a python cli would work?

eraserhd 2018-10-29T14:22:50.005Z

Python startup time is acceptable, IIRC.

dominicm 2018-10-29T14:22:54.005200Z

alternatively, use go, I had success with that too.

eraserhd 2018-10-29T14:23:12.005600Z

I started hacking in Rust, 'cause I like it so much.

dominicm 2018-10-29T14:24:11.006100Z

A bencode decoder can be written quite easily, I encourage you to continue with that path

eraserhd 2018-10-29T14:24:53.006800Z

OK. It's on hold for a couple weeks. I was actually wondering if anybody had done something like this.

dominicm 2018-10-29T14:27:53.007500Z

I thought about it, but I came to the conclusion that such a thing would have to end up editor-specific, and wouldn't be an effective use of my time because of nvim's remote plugins.

dominicm 2018-10-29T14:28:23.008300Z

You end up needing to put things in a form that your editor can richly inspect.

eraserhd 2018-10-29T14:28:55.008700Z

Hmm, that's not my plan. What does it need to richly inspect?

dominicm 2018-10-29T14:29:24.009600Z

@eraserhd e.g. key-values.

eraserhd 2018-10-29T14:29:53.010700Z

So, in terms of the REPL window, it will write, pre-formatted to a fifo. But the client rep command will return EDN or some such structured output.

eraserhd 2018-10-29T14:30:13.011100Z

(Kakoune can follow a fifo.)

dominicm 2018-10-29T14:30:15.011200Z

More obvious example, if you want to have something like quickfix populated by info about a var, you'll want to convert to a vim structure in order to setqflist()

dominicm 2018-10-29T14:30:26.011600Z

If you can parse edn in kak, then you have way more power than me 🙂

eraserhd 2018-10-29T14:31:04.012200Z

I guess I can't, actually. But adding result format options is not too bad.

dominicm 2018-10-29T14:32:08.012800Z

I guess everything probably has json support now, I don't think vim did at the time I was looking at this