Fork me on GitHub
#nrepl
<
2018-10-29
>
eraserhd14:10:49

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.

eraserhd14:10:38

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

eraserhd14:10:00

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

dominicm14:10:28

But a python cli would work?

eraserhd14:10:50

Python startup time is acceptable, IIRC.

dominicm14:10:54

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

eraserhd14:10:12

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

dominicm14:10:11

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

eraserhd14:10:53

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

dominicm14:10:53

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.

dominicm14:10:23

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

eraserhd14:10:55

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

dominicm14:10:24

@eraserhd e.g. key-values.

eraserhd14:10:53

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.

eraserhd14:10:13

(Kakoune can follow a fifo.)

dominicm14:10:15

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()

dominicm14:10:26

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

eraserhd14:10:04

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

dominicm14:10:08

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