@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.
Btw, I think there’s some point to distancing unrepl
from nrepl
a bit, jokes aside.
@bozhidar next time, are you going to the Conj?
distancing names even for spelling?
Yep. Sends a stronger message that one is not some continuation of the other (or an antipod for that matter).
originally I named it richrepl because richer interaction and influence by Rich rant on repls
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. 🙂
ClojureX in unlikely for me
:ClojureD maybe?
do you have any opinion or advice about unrepl (short of naming)?
> :ClojureD maybe?
Maybe. 🙂
> do you have any opinion or advice about unrepl (short of naming)?
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.
Maybe just one - better commit messages. I look from time to time at the code and such commit messages puzzle me a bit 🙂
https://github.com/Unrepl/unrepl/commit/95765abe206a9cba865e0376786a7f8f8418ef86
I’m a big believer in https://chris.beams.io/posts/git-commit/
@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.
The only one I think is missing, is streaming of results. But I think this is something that only refactor-nrepl does.
@dominicm what do you mean by streaming of results?
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
@cgrand ^
From user code or tool code?
If you're asking "is this something only tooling would need", I think so, yes.
For user code there's print and log messages.
The difference is that log output browsable values.
And a tool could create its own stream of EDN messages (ok ok the extension system is not specified yet)
@cgrand yeah, now extension systems are a thing it's fine
I think a nice way to design this would be with a 1 print length lazy sequence.
Mixing laziness and control flow in Clojure…
@cgrand not fully sure I understand how I'm mixing them
I'm not sure that I get how you would use lazy sequence for that.
@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.
It is.
@cgrand is this considered bad form? I might have to go rewrite some code...
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.
@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).
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.