Fork me on GitHub
#vim
<
2016-11-28
>
juhoteperi18:11:22

@jebberjeb Do you have any ideas on how Socket REPL client could distinguish stdout and return values?

jebberjeb18:11:57

@juhoteperi I've thought about it a bit -- no, not really.

juhoteperi18:11:13

Perhaps the calls should be wrapped inside some special values, like generated ids, so they could be detected

juhoteperi18:11:29

Doesn't fell very pretty.. but I don't see what other solutions there are

jebberjeb18:11:39

You could use a custom repl function to do it, but that would mean including that code in your project somehow.

juhoteperi18:11:47

I don't like that

juhoteperi18:11:05

It should be possible to connect to any random project or already running app without changing the app

jebberjeb18:11:12

I've been using it for a few weeks now, and I'm able to do most of my workflow without request / response. But I've always liked a more spartan setup -- that's sort of the point of it. Still, would like to have it.

juhoteperi18:11:59

Will be interesting to see how it is possible to implement autocomplete etc. with this

juhoteperi18:11:39

I fear it will require injecting some code into the running app

jebberjeb18:11:59

I suppose that could be done by the plugin though, if need be.

jebberjeb18:11:15

Would love to avoid that though.

juhoteperi18:11:29

Yeah it is not very good idea when connecting to a production app

juhoteperi18:11:50

Hmm, I remember seeing some application to record gifs from Vim

juhoteperi18:11:54

Or maybe terminal in general

jebberjeb18:11:39

I could use that

juhoteperi18:11:18

I'll try to find some Vim plugin with a good gif and see how it is created

juhoteperi18:11:30

I don't think that will display the key presses in Vim

juhoteperi19:11:28

:Connect command clashes with Fireplace

juhoteperi19:11:17

Fireplace only created the commands when opening Clojure buffers, so I can use SocketRepl :Connect before opening any Clojure buffers

juhoteperi19:11:37

In a way, the separate buffer is even better than Fireplace as it allows easy syntax highlighting

jebberjeb20:11:13

@juhoteperi that's true about :Connect, taking a look at your PR, thank you.

juhoteperi20:11:52

Trying to set better statusline for the log buffer also but that seems to be harder (airline is overwriting it for me)

juhoteperi20:11:33

I wonder if it is possible to use same bindings as fireplace, based on which has been connected to repl

juhoteperi20:11:00

I'm so used to cpp and cpr that I don't want to change

jebberjeb20:11:16

Maybe that would be best

jebberjeb20:11:28

I'm pretty used to them also

jebberjeb20:11:52

Probably a way to detect whether a mapping exists, no? But then, maybe plugin load order would matter.

juhoteperi20:11:16

Fireplace creates the bindings when opening buffer with Clojure filetype

juhoteperi20:11:26

We could do the same

juhoteperi20:11:57

And maybe so something to overwrite Fireplace when connecting

jebberjeb20:11:11

So here's my thinking there. Part of the reason I didn't do that was so in any buffer, I could just eval some stuff. Whether or not vim understands that its clojure, or if it's just some snippet embedded in markdown. I'm not sure if that's useful though.

juhoteperi20:11:22

Aah, it is nice to be able to run Thead/sleep etc. blocking stuff without blocking Vim ui

juhoteperi20:11:57

Hmm, there is some merit in that

jebberjeb20:11:03

in practice, I'm not sure how much I actually do that 🙂

jebberjeb20:11:13

it just seemed simpler / less confining

juhoteperi20:11:08

Perhaps it is best to leave the bindings to user and provide example on how to configure the bindings so that this can be used with Fireplace

jebberjeb20:11:22

but I'm open to whatever at this point -- it's an experiment for sure

jebberjeb20:11:35

Yeah, that's a good idea

jebberjeb20:11:40

help people coming from Fireplace

juhoteperi20:11:13

I'm still somewhat skeptical about implementing the client in Clojure, as it requires 5MB jar in the repo and start up takes a few seconds

juhoteperi20:11:20

But in the long run it can be very useful

jebberjeb20:11:26

yeah, I'm torn there as well

jebberjeb20:11:32

startup time is the number one problem now imo

jebberjeb20:11:35

maybe cljs + node

jebberjeb20:11:56

but it is neat to have Clojure to author the plugin

juhoteperi20:11:02

Afaik node plugins still require additional install steps

juhoteperi20:11:14

Python is the most user friendly and best supported probably

juhoteperi20:11:33

But the startup is not too bad now

juhoteperi20:11:48

And it is anyone only done one per session

jebberjeb20:11:50

Yeah, not so bad, you pay once basically.

juhoteperi20:11:05

Starting up socket repl server + and the client is now like 5sec

juhoteperi20:11:12

It is much less than starting nrepl server 😄

juhoteperi20:11:29

Though I'm testing with a empty project so no application dependencies

jebberjeb20:11:26

I'm working on a project with quite a few dependencies and a decent amout of code, and dropping nRepl has been nice. Socket repl startup is fast.

jebberjeb20:11:45

I miss jump to source most.

jebberjeb20:11:57

That's really the only thing I miss, personally.

jebberjeb20:11:26

Feel free to create issues or update TODO for any of these ideas @juhoteperi. vim-outliner is the plugin I use for the TODO.

juhoteperi20:11:37

Once we find a way to get result for certain evaluation, it will be easy to implement jump to source etc.

juhoteperi21:11:12

Ah, Slack doesn't play gifs

juhoteperi21:11:23

ttyrec + ttygif works, but it seems to be quite hard to record good quality example & tune the window size and font size for best quality

jebberjeb21:11:53

I tried to download it, but I guess slack converts to png?

jebberjeb21:11:03

that looks great