unrepl

discussing specification of an edn-based repl and its implementations.
ghadi 2018-01-30T16:21:04.000443Z

in SPIRAL, how can I control client-side printing?

volrath 2018-01-30T16:31:16.000800Z

@ghadi do you mean add pretty printing to the repl returned data structures?

ghadi 2018-01-30T16:31:26.000340Z

yeah

ghadi 2018-01-30T16:31:51.000696Z

and stuff like printing a UUID as #uuid "..." not #object []

volrath 2018-01-30T16:32:48.000744Z

pretty printing is something we've discussed to implement as part of parseclj (https://github.com/clojure-emacs/parseclj) but it's not yet there

volrath 2018-01-30T16:33:54.000102Z

the second thing also needs to be implemented, but in spiral's code... I only implemented it for functions and images so far

volrath 2018-01-30T16:34:02.000018Z

PRs are welcome šŸ™‚

cgrand 2018-01-30T17:18:59.000086Z

@volrath what about connecting to a repl behind ssh, could SPIRAL/emacs take care of setting up the ssh part?

volrath 2018-01-30T17:20:13.000037Z

I haven't worked on something similar to that, but I think it could

cgrand 2018-01-30T17:25:00.000491Z

So ssh:cgrand@server:2222 could be used to connect to a repl?

volrath 2018-01-30T17:28:05.000028Z

how would you connect to a socket repl through ssh in any other client or from your terminal?

volrath 2018-01-30T17:28:50.000423Z

right now, spiral only connects to host ports, but not through ssh, I'm trying to figure that part out

gcast 2018-01-30T17:42:28.000092Z

@volrath I do this all the time. ssh -fNTL local-port:localhost:remote-repl-port user@remote

gcast 2018-01-30T17:42:47.000376Z

thats how I connect using SPIRAL

volrath 2018-01-30T17:46:23.000040Z

right, so it's just a port forwarding, that's what I was thinking

volrath 2018-01-30T17:47:23.000513Z

I could make emacs exec that prior connecting

volrath 2018-01-30T17:48:32.000966Z

although I would do it as a separate command from spiral-connect, cause besides behaving differently, it needs extra connection data (username and remote repl port)

gcast 2018-01-30T17:50:35.000434Z

so there is one difficulty with the command line approach I currently use

cgrand 2018-01-30T17:51:13.000549Z

what does spiral-connect takes?

gcast 2018-01-30T17:51:22.000347Z

there are cases where for some reason the port-forwarding collides and I have to kill all ssh tunnels to start new ones. Basically, I have no way to label my ssh tunnels to kill specific ones

cgrand 2018-01-30T17:52:40.000149Z

the client should allocate the lcoal port or use a socket

volrath 2018-01-30T17:57:03.000403Z

host and port, spiral-connect uses elisp's make-network-process internally, which creates network connections

cgrand 2018-01-30T17:58:25.000861Z

could spiral-connect also takes a single arg? (a uri)

volrath 2018-01-30T17:58:36.000470Z

spiral-connect's api receives the host:port as a string, I could augment that to something like user@host:remote-port:local-port

volrath 2018-01-30T17:59:01.000012Z

but seemps a bit complicated, I'd rather have a command specific for this case

cgrand 2018-01-30T18:00:55.000394Z

I donā€™t know from the user point of you, knowing that he just have to enter the connection string seems simple (but not easy for the implementer) ā€¢ port, assumes localhost ā€¢`host:port`

cgrand 2018-01-30T18:01:35.000222Z

ā€¢ ssh:user@server:remote-port local port as an impl detail

cgrand 2018-01-30T18:02:08.000308Z

ā€¢ nrepl:server:port

cgrand 2018-01-30T18:02:36.000781Z

and the list may grow with cljs

volrath 2018-01-30T18:04:11.000777Z

yep, my thought is that I rather skip the protocol prefix (`ssh:`, nrepl:, ...) and create different commands for them

cgrand 2018-01-30T18:06:03.000832Z

It makes communication harder imo: you canā€™t just slack the connection string to your coworker you have to specify the protocol and then she has to find the right connect command for her env.

cgrand 2018-01-30T18:06:23.000518Z

Or printing the connection string in a log etc.

gcast 2018-01-30T18:09:01.000882Z

I personally would prefer one command, prefix the protocol but I don't know the implementation hurdle required

cgrand 2018-01-30T18:09:56.000532Z

well if you have N commands I guess writing the one command to dispatch them all according to the protocol is doable

volrath 2018-01-30T18:10:39.000200Z

re. slack, true, but I don't feel that's such a big deal, considering that knowing where your team's repl run is something that people just know. re. logging, not really, spiral can log whatever data it has on the connection, including the connection protocol (or other things like the project directory to which that repl belongs to, if any)

volrath 2018-01-30T18:10:47.000838Z

implementation is definitely not a problem

volrath 2018-01-30T18:10:56.000492Z

is just a matter of UI

cgrand 2018-01-30T18:11:19.000515Z

> considering that knowing where your teamā€™s repl run is something that people just know as a consultant I disagree

volrath 2018-01-30T18:11:22.000156Z

but I'll be open to implement it as well, as a secondary thing

volrath 2018-01-30T18:11:32.000553Z

or accept it as a PR

cgrand 2018-01-30T18:12:41.000314Z

and also the ability to assist a colleague on a random project/container/server

volrath 2018-01-30T18:12:51.000916Z

haha I believe you.. but maybe that problem has a root some place else

volrath 2018-01-30T18:13:06.000384Z

what do you mean by that last comment?

cgrand 2018-01-30T18:13:19.000107Z

I donā€™t know I like the bazar too much

volrath 2018-01-30T18:14:46.000138Z

I don't understand šŸ˜³

cgrand 2018-01-30T18:17:55.000547Z

I assumed by ā€œa root some place elseā€ you hinted at shared and documented practices etc. I was just answering that I like to imagine approaches to dev that donā€™t require too much coordination or agreement.

volrath 2018-01-30T18:18:34.000442Z

ah, got it, I thought you were referring to the last comment: "and also the ability to assist a colleague on a random project/container/server"

volrath 2018-01-30T18:20:41.000458Z

but anyway, I do understand your point.. maybe after any of these connections methods/protocols are implemented, we could expand spiral-connect, most likely if there's more than 2 (say local, nrepl, and ssh)