cursive

Issues at: https://git.io/cursive-issues
aratare 2021-03-12T01:43:09.161700Z

I was trying out WSL2 so I can confirm that it’s already working fine with Cursive. You just need to open the correct project and IntelliJ/Cursive will automatically handle things for you. The experience was pretty good from what I recall.

robert-stuttaford 2021-03-12T05:39:16.163100Z

hey @cfleming probably a question you get all the time, but.... how's inline eval coming along? this is probably the thing that i'm feeling the most pain on, after a week or so, now that i've moved past the nails-on-chalkboard experience of relearning keyboard shortcuts 😁

➕ 3
imre 2021-03-12T09:17:28.163900Z

What editor are you coming from and why did you switch? Also, have you thought about rebinding?

raspasov 2021-03-12T10:03:56.165700Z

I know that’s not the same, but there’s “Send Top Form to REPL”

robert-stuttaford 2021-03-12T10:44:18.166700Z

Emacs, because i'm tired of waiting for it to render large blocks of text, and restarting it after it crashes. probably both fixable, but i don't have the bandwidth to learn elisp nor learn how to navigate elisp-oss-world heh

robert-stuttaford 2021-03-12T10:44:43.166900Z

I use the send-to-repl stuff @raspasov - but it's not the same. i want that lighttable experience!

robert-stuttaford 2021-03-12T10:45:15.167100Z

rebinding: i tried the emacs bindings briefly but when i couldn't cut or paste i noped out of there

robert-stuttaford 2021-03-12T10:45:28.167300Z

i've learned enough to get by now, incl the structural editing stuff

raspasov 2021-03-12T10:57:44.167500Z

@robert-stuttaford understood 🙂 I’ve seen the inline eval in videos and people doing it… for me the REPL is perhaps even better, because it’s more “permanent”; allows you to search for the output, etc. I almost always keep the REPL open. But I realize people have different preferences. Also, I use almost 100% custom key binding for everything; suits the ergonomics of my hands the best, I feel like. Re: IntelliJ pro tip I just found literally 30 min ago: “Always Select Opened File”

raspasov 2021-03-12T10:57:59.167700Z

“Always Select Opened File” is literally amazing 🙂

raspasov 2021-03-12T10:58:18.167900Z

raspasov 2021-03-12T10:58:53.168300Z

It works for any file, both in your projects and in libraries.

robert-stuttaford 2021-03-12T11:52:04.168500Z

I was looking for that yesterday. You're a saint!

robert-stuttaford 2021-03-12T11:53:08.168700Z

on permanence of repl: yeah, in emacs, you can eval-then-paste-output into your buffer, and you can print to the repl. i used all three daily

raspasov 2021-03-12T16:06:23.169400Z

@robert-stuttaford cheers 🙂 I randomly found that it existed yesterday after ~6 years of IntelliJ

raspasov 2021-03-12T17:07:18.171200Z

Another super-awesome thing (which I don’t see many people use in videos, etc) is Tools > REPL > Sync Files in REPL

😀 2
raspasov 2021-03-12T17:07:56.171400Z

Just make a keybinding for it and trigger it any time you make a change… No more eval-ing functions one by one!

raspasov 2021-03-12T17:08:33.171600Z

I keep seeing people eval-ing one-by-one and I feel like it’s a waste of time.

aratare 2021-03-12T17:18:10.172Z

Is that any different from reloading the files?

raspasov 2021-03-12T18:51:32.172400Z

Eval-ing achieves the same effect, but Tools > REPL > Sync Files in REPL … figures out for you which files have changed and just reloads them. You don’t need to keep the “state” of your REPL in your head. As far as I can tell, it just keeps track of changed files and calls (load-file …) https://clojuredocs.org/clojure.core/load-file … on each changed file.

👍 1
cfleming 2021-03-15T06:33:47.178Z

@robert-stuttaford Sorry for the delay, I’ve been off-grid camping over the weekend. So my usual answer to that question is “sometime soon” which unfortunately often turns out to be a lie. However in this case I am actually working on a proof of concept so I can confidently say that it might actually be “soon” :-)

❤️ 1
cfleming 2021-03-15T06:36:40.178200Z

@raspasov @rextruong Right, sync basically works out which files you’ve changed and loads them all in dependency order. Load file also does that, except only starting with the file that you’re loading (i.e. that file and all its dependencies will be loaded if modified). sync will do that for all files, even if the current file doesn’t depend on them.

👍 1
aratare 2021-03-15T06:38:01.178400Z

I see. I have a habit of loading files whenever I make any changes so I haven’t had a chance to use sync yet

robert-stuttaford 2021-03-15T06:55:40.178800Z

@cfleming you tease! 😆 seriously, that sounds fantastic, mate. sending you lots of Lisp energy from the Netherlands. good luck!

robert-stuttaford 2021-03-15T06:58:25.179Z

I habitually use load-file when making changes too, and eval-leftmost-form when doing stuff from inside (comment) blocks (like testing db code)

cfleming 2021-03-15T09:09:19.181700Z

“Send top form to REPL” will work in comment blocks too, it sends the topmost form inside the comment, not the comment itself.

robert-stuttaford 2021-03-15T10:22:14.185100Z

do you mean the one that is bound to cmd-shift-p, @cfleming?

robert-stuttaford 2021-03-15T10:23:06.185300Z

i don't see a 'topmost' item here

robert-stuttaford 2021-03-15T10:23:16.185700Z

when i use cmd-shift-p, it evals the comment form

imre 2021-03-15T12:36:26.187500Z

@robert-stuttaford that behaviour depends on where your caret's at. If you are somewhere inside (def db ... ) then cmdshiftP would eval the def. From your screenshot I'm assuming you are just after the def form.

robert-stuttaford 2021-03-16T13:00:08.000300Z

tx!

cfleming 2021-03-16T20:29:38.000500Z

Right, the name of the command in the menu is customised to show what it will actually do, but one is “Send top form” and the other is “Send form before caret”.

robert-stuttaford 2021-03-12T05:39:25.163300Z

https://github.com/cursive-ide/cursive/issues/391

borkdude 2021-03-12T14:09:38.169100Z

Can someone using Cursive perhaps review this PR? https://github.com/clj-kondo/clj-kondo/pull/1214