unrepl

discussing specification of an edn-based repl and its implementations.
bozhidar 2017-09-11T13:50:20.000259Z

@cgrand It’s a pity with didn’t get to chat at ClojuTRE, but I wasn’t feeling great and I was in a very uncommunicative mood.

bozhidar 2017-09-11T13:51:11.000078Z

Btw, I think there’s some point to distancing unrepl from nrepl a bit, jokes aside.

cgrand 2017-09-11T13:54:02.000060Z

@bozhidar next time, are you going to the Conj?

cgrand 2017-09-11T13:54:40.000394Z

distancing names even for spelling?

bozhidar 2017-09-11T13:55:12.000374Z

Yep. Sends a stronger message that one is not some continuation of the other (or an antipod for that matter).

cgrand 2017-09-11T13:56:07.000009Z

originally I named it richrepl because richer interaction and influence by Rich rant on repls

bozhidar 2017-09-11T13:56:12.000258Z

No, I won’t be coming to the conj this year, but I’ll be at ClojureX. I’m not doing enough Clojure development these days to justify dealing with the jetlag. 🙂

cgrand 2017-09-11T13:57:11.000318Z

ClojureX in unlikely for me

cgrand 2017-09-11T13:57:21.000417Z

:ClojureD maybe?

cgrand 2017-09-11T13:58:56.000682Z

do you have any opinion or advice about unrepl (short of naming)?

bozhidar 2017-09-11T14:01:28.000420Z

> :ClojureD maybe?

bozhidar 2017-09-11T14:01:31.000187Z

Maybe. 🙂

bozhidar 2017-09-11T14:01:57.000499Z

> do you have any opinion or advice about unrepl (short of naming)?

bozhidar 2017-09-11T14:03:50.000586Z

I didn’t play much with it, but I liked the idea overall. Wanted to spend some time researching how it could be used with CIDER, but lately I’ve had a ton of work and very little free time.

bozhidar 2017-09-11T14:05:30.000042Z

Maybe just one - better commit messages. I look from time to time at the code and such commit messages puzzle me a bit 🙂

bozhidar 2017-09-11T14:05:57.000113Z

I’m a big believer in https://chris.beams.io/posts/git-commit/

👌 1
1
dominicm 2017-09-11T16:54:32.000455Z

@bozhidar I have thought about CIDER a little. I suspect it will primarily just be sending eval's because EDN allows a richer communication model, so much of the extra ops are unrequired in unrepl.

dominicm 2017-09-11T16:54:54.000036Z

The only one I think is missing, is streaming of results. But I think this is something that only refactor-nrepl does.

cgrand 2017-09-11T16:59:39.000357Z

@dominicm what do you mean by streaming of results?

dominicm 2017-09-11T17:02:50.000456Z

Actually... A sufficiently lazy sequence might be able to do it. Basically if you have a slow operation you can do: > sleep 1000 > send result 1 > sleep 1000 > send result 2

dominicm 2017-09-11T17:02:51.000065Z

@cgrand ^

cgrand 2017-09-11T17:04:01.000482Z

From user code or tool code?

dominicm 2017-09-11T17:05:29.000156Z

If you're asking "is this something only tooling would need", I think so, yes.

cgrand 2017-09-11T17:06:46.000440Z

For user code there's print and log messages.

cgrand 2017-09-11T17:09:13.000344Z

The difference is that log output browsable values.

cgrand 2017-09-11T17:11:17.000194Z

And a tool could create its own stream of EDN messages (ok ok the extension system is not specified yet)

dominicm 2017-09-11T17:13:41.000088Z

@cgrand yeah, now extension systems are a thing it's fine

dominicm 2017-09-11T17:14:20.000447Z

I think a nice way to design this would be with a 1 print length lazy sequence.

cgrand 2017-09-11T17:45:22.000344Z

Mixing laziness and control flow in Clojure…

dominicm 2017-09-11T17:49:41.000182Z

@cgrand not fully sure I understand how I'm mixing them

cgrand 2017-09-11T18:11:46.000230Z

I'm not sure that I get how you would use lazy sequence for that.

dominicm 2017-09-11T18:53:51.000223Z

@cgrand I'm thinking from the context of the work being optional, you could stop it when necessary. And rely on the laziness property to defer work. So I guess that could be considered tying control and laziness.

cgrand 2017-09-11T19:21:07.000178Z

It is.

dominicm 2017-09-11T19:23:59.000321Z

@cgrand is this considered bad form? I might have to go rewrite some code...

cgrand 2017-09-11T19:38:11.000222Z

If you look at Clojure evolution, the laziness contract has been relaxed multiple times. Strict laziness existed only for a short time (after the demise of nil-punning and before chunked seqs). To me it clearly mean that laziness in Clojure should not be used for flow control.

bozhidar 2017-09-11T20:37:25.000094Z

@dominicm But still you’ll need to bundle a bunch of utility libraries providing the functionality you want to eval and you need some session multiplexing as you don’t want pollute the main user session with eval results for tooling needs (e.g. completion).

dominicm 2017-09-11T20:39:55.000514Z

The latter is done by opening a second connection (or more) for tooling. The former is slightly more complex, but essentially unrepl can query for missing classes, which can be sent to continue evaluation.