unrepl

discussing specification of an edn-based repl and its implementations.
viesti 2018-02-09T08:51:16.000235Z

whoa

cgrand 2018-02-09T09:13:46.000325Z

Similarities with unrepl are reassuring design-wise

dominicm 2018-02-09T09:29:22.000171Z

I'm surprised this is a thing, given that unrepl exists 🙂

thheller 2018-02-09T10:19:47.000302Z

don't know where Rich is going with this but if nothing else "prepl" is fun to say 😉

bozhidar 2018-02-09T12:22:41.000296Z

I think he really wants something like this to be part of Clojure itself. Originally we wanted nREPL as part of Clojure and that’s why Chas agreed to move the project under clojure-contrib, but we all know how things played out and how bad this was for nREPL in the end of the day. I guess he finally realized that the design of the socket REPL is not exactly very convenient for tooling, but he might be pursuing some other goal as well.

cgrand 2018-02-09T12:30:50.000234Z

>>> Tasseography is a divination or fortune-telling method that interprets patterns in tea leaves, coffee grounds, commit logs, or wine sediments.

cgrand 2018-02-09T12:33:33.000182Z

remote-prepl puzzles me: why not reuse the existing server code? it’s just a different accept.

cgrand 2018-02-09T12:41:18.000316Z

Why not allow tap> to have a tag argument? Forcing the user to structure the tap data in a way amenable to triage/routing/filtering? It hinders upgradability too.

cgrand 2018-02-09T12:42:29.000199Z

:read only on :ret means that the: • the client doesn’t know when the server has started working • you don’t get :read info for exceptions

bhauman 2018-02-09T13:21:30.000232Z

Hmmm, why is there no differentiation between a thrown exception value and a returned exception value?

bhauman 2018-02-09T13:21:38.000272Z

in prepl

cgrand 2018-02-09T13:31:44.000339Z

what do you mean? looking at the code if the return value is an exception you get a :ret msg not a :err msg, no?

bhauman 2018-02-09T13:32:23.000336Z

no

bhauman 2018-02-09T13:32:30.000233Z

you get a :ret

bhauman 2018-02-09T13:32:45.000155Z

err is only for the :err print stream

cgrand 2018-02-09T13:34:43.000533Z

oh you are right, I misinterpreted :err

cgrand 2018-02-09T13:35:32.000504Z

so I agree with you: one can’t tell an exception being thrown from an exception being returned

cgrand 2018-02-09T13:36:37.000048Z

also: why bother converting :ns to string and exceptions to tagged-literals here? shouldn’t it be done in out-fn?

bhauman 2018-02-09T13:39:10.000491Z

he's serializing things as that's the intended use

bhauman 2018-02-09T13:40:03.000355Z

and it gives a canonical return value in all situations

bhauman 2018-02-09T13:41:54.000425Z

I'm still grocking the why of tap> it's so that tooling can send messages back to the client??

cgrand 2018-02-09T13:41:56.000331Z

Yeah but there’s also valf that’s going to transform the value

cgrand 2018-02-09T13:42:21.000535Z

so out-fn does more than dumb serializing

bhauman 2018-02-09T13:43:07.000085Z

yeah but the base value is always ready to transmit

bhauman 2018-02-09T13:45:20.000589Z

I'm guessing (not supporting) that its to allow for varied of the pub sub

bhauman 2018-02-09T13:45:42.000336Z

maybe there is a use case that needs to dispatch on a raw value and not a keyword

bhauman 2018-02-09T13:46:12.000496Z

I can't really conceive of it but ...

cgrand 2018-02-09T13:47:43.000005Z

Worst case, give the possibility to subscribe to all topics?

bhauman 2018-02-09T13:48:47.000072Z

that would be absolutely necessary, but its an unnecessary feature as its trivial to create dispatch

bhauman 2018-02-09T13:49:39.000271Z

ok now I'm getting it, I dig it

cgrand 2018-02-09T13:50:58.000410Z

The problem that I see is that if some code start to use tap> as log is that creating dispatch won’t be easy as you’ll have a lot of variance in the payloads

cgrand 2018-02-09T13:51:12.000590Z

really? please enlighten me

bhauman 2018-02-09T13:52:46.000439Z

sorry I mean I'm getting the tap design and how its useful, I've got no attachment to the dispatch decision

bhauman 2018-02-09T13:53:36.000075Z

but the messages you send to yourself will be correct

bhauman 2018-02-09T13:54:47.000483Z

and these messages only have handling that is guaranteed by the client

bhauman 2018-02-09T13:54:58.000016Z

so its a crappy log fn

cgrand 2018-02-09T13:58:18.000153Z

we reached an agreement!

bhauman 2018-02-09T13:59:52.000085Z

I appreciate the back and forth on this it's super helpful

bhauman 2018-02-09T14:02:25.000712Z

I really see tap> use as (tap> {:id 25 :type :tool/completion :complete (tool/complete "asso"))

bhauman 2018-02-09T14:02:42.000485Z

or something like that

bhauman 2018-02-09T14:03:30.000342Z

i think you were already there, it took me a minute

bhauman 2018-02-09T14:05:03.000140Z

and you'd need a session id as well

bhauman 2018-02-09T14:05:14.000292Z

sorry thinking out loud

cgrand 2018-02-09T14:05:55.000114Z

don’t! It’s super useful to me too

bhauman 2018-02-09T14:06:16.000336Z

and finally I get your point, session level dispatch would be nice at least

bhauman 2018-02-09T14:08:25.000556Z

everybody gets all the messages!, I'm going to run my chat server and my repl through tap!

1
bhauman 2018-02-09T14:15:52.000553Z

and ultimately I think this is why there is no dispatch, b/c depending on your use you are going to need another level of dispatch granularity

bhauman 2018-02-09T14:16:21.000408Z

one repl dispatch on a message type

bhauman 2018-02-09T14:17:05.000320Z

repls in parallel dispatch on a session

bhauman 2018-02-09T14:17:22.000208Z

and I guess you could have shared sessions etc

bhauman 2018-02-09T14:20:55.000001Z

an interesting thing is that clojurescript needs two different types of tap> for tooling

bhauman 2018-02-09T14:21:16.000465Z

one that runs in clojurescript land and one that runs in clojure land

bhauman 2018-02-09T14:22:07.000228Z

hmmm so we make a macro called meta-tap>

bhauman 2018-02-09T14:28:26.000466Z

or not, I have to put some thought into how you would bootstrap the cljs-repl using these new tools

richiardiandrea 2018-02-09T16:47:15.000601Z

I have to say I am a bit disappointed, and there no way to see it differently. Unrepl is there, for everybody to contribute to, I wish we did not have so many different clones of the same thing...we'll see how it pans out.

cgrand 2018-02-09T16:50:56.000080Z

@richiardiandrea well it validates the core design of unrepl

cgrand 2018-02-09T16:51:18.000718Z

and plain repls are still upgradable

👍 1
cgrand 2018-02-09T16:51:54.000901Z

and life may get easier because of changes made for prepl (but won’t ship until 1.10)

richiardiandrea 2018-02-09T16:53:58.000817Z

Lol I keep rewriting this sentence over and over...I am just thinking that I would have taken some additional step to make this part (tooling) a bit more open to contributions...

richiardiandrea 2018-02-09T16:54:24.000051Z

But yeah, we know how Clojure works 😃

cgrand 2018-02-09T16:54:54.000222Z

Currently I’m seeing unrepl as a toolkit for creating custom (private) protocols for tools. It provides a foundation, some design decisions have been made etc. But unrepl is not “consumer tech”: got a tool? got a plain repl? it works!

cgrand 2018-02-09T16:55:00.000620Z

huh?

richiardiandrea 2018-02-09T16:55:22.000239Z

Yep that is definitely nicer

richiardiandrea 2018-02-09T16:56:10.000563Z

Don't worry I will switch off my rant mode 😄

cgrand 2018-02-09T16:58:41.000289Z

rant-a-car?

richiardiandrea 2018-02-09T16:59:28.000366Z

Fixed 😉 tnx

cgrand 2018-02-09T17:00:19.000054Z

no, really I’m not sure I get what you are saying; complaining about the “throw features over the wal” approach?

richiardiandrea 2018-02-09T17:04:29.000263Z

I mean, we have a project here with a relatively good support from the community...I am just afraid it will get shadowed. Instead it could have been additive, I hope it will be additive as you were saying and the two will thrive along together.

cgrand 2018-02-09T17:05:02.000296Z

I hope

bhauman 2018-02-09T23:37:23.000092Z

https://github.com/bhauman/rebel-readline

bhauman 2018-02-09T23:38:16.000252Z

I'd really love your feedback