cursive

Issues at: https://git.io/cursive-issues
cfleming 2021-06-29T00:49:22.106800Z

Cursive could do this, yes, since it implements a simple protocol over a socket REPL. However there are complications with that, as you might expect - each eval is then in a different thread and needs dynamic bindings propagated etc. Currently with socket REPLs the evaluations are strictly sequential, but once evals are in separate threads that’s no longer the case, and there is potential weirdness around that too. In general the idea with the socket REPL was to try to keep things simple, and I’m not sure whether that counts 🙂

2021-06-29T00:51:58.107Z

Yeah, I prefer the mental model for sure. Unfortunately, a great deal of my work involves starting an infinite loop of some sort, and being unable to run them without restarting a repl really stinks.

cfleming 2021-06-29T00:52:02.107200Z

Cursive’s protocol is similar to pREPL, but it’s structured in both directions, not just on returns.

cfleming 2021-06-29T00:53:10.107400Z

Yeah, I can see that. I guess one potential middle ground would be to use a single background thread for evals which could be cancelled. That would maintain the sequential nature, but would still require bindings to be maintained etc.

2021-06-29T00:54:25.107600Z

Aren’t bindings mostly out-of-the-box via bound-fn*?

2021-06-29T00:54:30.107800Z

Or am I missing smth?

2021-06-29T00:54:42.108Z

otoh, now that you say that, I could just take care to always kick those off in a future.

2021-06-29T00:54:50.108200Z

somehow never occurred to me :derp:

cfleming 2021-06-29T00:55:22.108400Z

Right, you could always do it manually yourself, which is a bit fiddly but possible.

2021-06-29T00:55:36.108600Z

But I also really like that middle ground that you mention, if you ever get around to it. No complicated session mgmt business. Just a dedicated solo thread pool.

2021-06-29T00:57:25.108800Z

In the meantime I’ll try out being vigilant with my infinite loops. If I fail catastrophically, I’ll be sure to let you know 😉

cfleming 2021-06-29T00:58:36.109300Z

But as you can see, there’s really no thread management required at all, which keeps it really nice and simple.

👍 1
cfleming 2021-06-29T00:58:47.109500Z

And no fiddly bindings management.

2021-06-29T01:00:24.110100Z

oh I know nrepl

2021-06-29T01:00:39.110300Z

I would never ask you to go there 😄

2021-06-29T01:01:11.110500Z

I was unlucky enough to have a serious run in with piggieback. The beast is real.

cfleming 2021-06-29T01:01:22.110700Z

Haha, I have to go there pretty regularly. Anyway, the answer is: it’s possible, but I’m not sure it’s desirable. I’d have to try a PoC and see how it ends up.

cfleming 2021-06-29T01:01:33.110900Z

Well, piggieback is a whole extra level of madness.

💯 1
2021-06-29T01:03:10.111200Z

Yeah, well. Consider it un-asked until I get back to you. I don’t think it’s crazy to pre-wrap in a future and self-manage.

2021-06-29T01:03:40.111400Z

I was kind of stuck in the mindset of, “Feature exists here. I want it there.”

cfleming 2021-06-29T01:04:31.111600Z

Hehe, totally fair enough. Let me know if manually wrapping either doesn’t work or is unreasonably painful. You could potentially use REPL commands to make it easier.

👍 1
2021-06-29T02:59:03.113400Z

Hi, I just allowed IntelliJ to update itself and now I have “Cursive Incompatible (since build 211.0 > IC-202.7660.26)“. I’m not being prompted to update Cursive though. Any help?

2021-06-30T23:14:09.127400Z

That did it, thanks!

salam 2021-06-29T05:50:43.114600Z

you may try uninstalling and then reinstalling Cursive.

octahedrion 2021-06-29T07:13:03.116200Z

I have a repl which has been running for weeks and now if I resize it my machine goes into full takeoff and pinwheels for 5 minutes

octahedrion 2021-06-30T09:05:54.125300Z

yes it does work. If I print a lot of data in the REPL, say around 1 minute's worth of scrolling, then it will slow subsequent window resizing to around 1 second lag on my machine. Clearing the output restores responsiveness

imre 2021-06-30T09:13:25.125500Z

👍:skin-tone-3:

imre 2021-06-29T08:34:15.116300Z

have you tried clearing the repl output?

Björn Ebbinghaus 2021-06-29T11:37:49.118Z

Is there any way to make Cursive understand shadow-cljs :default syntax? Or at least mute this specific warning?

➕ 1
cfleming 2021-07-01T05:43:58.130400Z

There isn’t at the moment, sorry, but I’m planning improvements in this area shortly.

octahedrion 2021-06-29T11:47:05.118300Z

I wish I'd remembered before I had to wait

Joni 2021-06-29T12:17:20.120600Z

Are there some known issues in the macroexpansion tooling of cursive? Seems like the opened window contains right stuff, but it can't be interacted with, so I can't scroll to view all of it or select any text or change any options in the window

cfleming 2021-07-01T05:44:20.130600Z

Yeah, sorry, this window basically sucks and I haven’t had time to look at it.

Joni 2021-07-01T05:47:09.130800Z

Okey, it seems like a really powerful tool if I could just see all of the macroexpansion 😄

cfleming 2021-07-01T06:15:38.131Z

It’s definitely very powerful when it works 🙂

imre 2021-06-29T12:27:14.120700Z

did that fix it btw? was jus a wild guess, I remember clearing the output easing the load on my machine a few times

imre 2021-06-29T12:27:36.120900Z

yes, it's not just your machine

👍 1