conjure

:neovim:+:clj: https://github.com/Olical/conjure - If you're enjoying Conjure and want to say thanks: https://github.com/users/Olical/sponsorship :smile: (alt https://conjure.fun/discord)
2021-05-13T10:52:43.113Z

[Olical/conjure] Issue opened by victorb

victorb 2021-05-13T10:54:16.113100Z

Just realized the issue could be on Babashkas side as well if the point is to return exceptions the same way as nrepl/nrepl does it in clj-land, unsure and haven't looked into it further (cc @borkdude)

borkdude 2021-05-13T10:56:26.113300Z

You can try to reproduce this with a minimal nREPL client perhaps

borkdude 2021-05-13T10:56:45.113500Z

like lein repl :connect, so it's easier for me to take a look, if this is on the bb side

borkdude 2021-05-13T11:02:04.113700Z

oh yes, babashka returns the same kind of exception as in clj land

borkdude 2021-05-13T11:02:19.113900Z

the nice stack trace is only done when invoking a script from the command line

victorb 2021-05-13T11:02:20.114100Z

@borkdude thanks! Tried it out and the same in lein repl https://gist.github.com/victorb/55ddf12b5faa90db37bcfb1a6d2adf66 indeed

dharrigan 2021-05-13T13:43:07.116400Z

Installed neovim 5 nightly, and the highlight feature is pretty neat

dharrigan 2021-05-13T13:43:38.116900Z

although, a bit slow for my liking, so will decrease the timeout from 500, in half.

dharrigan 2021-05-13T13:44:22.117100Z

yes, 250ms is better

emilaasa 2021-05-13T14:10:04.117500Z

Yeah I put it at 100 which felt good for me.

Olical 2021-05-13T14:16:45.118100Z

If everyone is lowering that setting maybe we should change the default 🙂

emilaasa 2021-05-13T14:22:10.118400Z

Speed junkies 🙂

dharrigan 2021-05-13T14:22:41.118700Z

500 is imho a little too long

emilaasa 2021-05-13T14:23:49.119600Z

I wonder is there some state I could hook into with regards to which forms has been evaluated?

dharrigan 2021-05-13T14:24:06.120200Z

It's like Data from Star Trek, if I may paraphrase, "500 milliseconds, sir. For a developer, that is nearly an eternity."

emilaasa 2021-05-13T14:24:07.120300Z

I'd like to play around with marking a sexp as edited but not evaluated,

emilaasa 2021-05-13T14:26:17.121400Z

I have quite a few WTF moments when i've changed some code but have not sent it to repl 🙂

Olical 2021-05-13T14:28:52.122200Z

"what's changed but not evaluated" support was something I was considering as a core feature, it'll probably just lean on newer nvim features for cool gutter stuff, so I've been putting it off

Olical 2021-05-13T14:29:05.122600Z

Also I have so many other things to work on that it's far down the list 😅

Olical 2021-05-13T14:29:54.123600Z

There is an event for evals, but I don't think you get the eval table like I do in Conjure. There's actually a table that gets passed around that contains the form content + it's coordinates (file/line/col) and what kinda eval it was

Olical 2021-05-13T14:30:07.123900Z

But that's all internal, maybe I can expose some hooks somehow...

dharrigan 2021-05-13T14:30:37.124300Z

I'm too lazy to do the highlight current form that cursor is in

dharrigan 2021-05-13T14:30:50.124500Z

I recall asking about this yonks ago

Olical 2021-05-13T14:31:49.124900Z

Yeah that one is a little less to do with evals and more a UI plugin I think :thinking_face: and maybe also relies on 0.5 features

Olical 2021-05-13T14:32:02.125600Z

deffo a good feature for an aniseed based plugin 🙂

dharrigan 2021-05-13T14:32:05.125800Z

yup, that's right 🙂

emilaasa 2021-05-13T14:32:30.126700Z

I think the core works good enough - with a few plugins I've not felt limited in using it for work

➕ 1
Olical 2021-05-13T14:32:37.127Z

My current priority is to get Aniseed loading everything faster + magic-kit ready for new users (and some of my team members at work!) to maybe rely on.

dharrigan 2021-05-13T14:33:00.127500Z

:thumbsup: :partywombat:

emilaasa 2021-05-13T14:33:17.127900Z

What would Aniseed loading things faster do?

emilaasa 2021-05-13T14:33:49.128600Z

Does it affect performance when editing or something else?

Olical 2021-05-13T14:35:02.129Z

Mostly for people using Aniseed for all of their configuration, so affects start up time of nvim

Olical 2021-05-13T14:35:13.129500Z

I have multiple userbases with different concerns 😅

emilaasa 2021-05-13T14:35:18.129600Z

Ah cool - haven't gotten that deep yet 😛

Olical 2021-05-13T14:35:52.130700Z

Improving Aniseed's efficiency may help with Conjure's startup time too, although that's already damn snappy considering the size. Conjure lazy loads everything on demand anyway.

Olical 2021-05-13T14:36:10.131200Z

Like I added the concept of "autoload" to the lua modules to replace require that requires on use, just like the viml concept

Olical 2021-05-13T14:36:20.131500Z

And then conjure benefits from that

Olical 2021-05-13T14:37:28.132800Z

Just spending a little while focussing on accessibility/on ramp, perf and bugs in Conjure+Aniseed. The next feature I'm considering is automatic babashka jack in for Clojure files.

Olical 2021-05-15T12:07:18.162500Z

I'd try to do the normal flow first and if there isn't a .nrepl-port etc Conjure will log out that it's starting a bb repl (if you have it installed) and would automatically connect to it. As soon as you connect to something else it'll probably shut it down? Maybe if you disconnect from a Clojure REPL it'll immediately fill in the gap with a bb one :thinking_face: so it basically always tries to ensure you have something ready to handle evals?

dave 2021-05-15T22:34:02.165300Z

That's a cool idea. It would be pretty neat to just edit a scratch .clj file in /tmp or something, and be able to do quick experiments with the Clojure standard library without having to start a REPL first.

dave 2021-05-15T22:34:43.165500Z

This could also be super handy for developing bb scripts!

emilaasa 2021-05-13T14:38:43.133900Z

I'm considering writing up a workflow article and/or screencast, would be interesting to have feedback on it - maybe I'm missing something cool that I should be using 😛

🤘 2
emilaasa 2021-05-13T14:39:00.134400Z

In the best of worlds it could be a good newcomer thing as well

Olical 2021-05-13T14:39:15.134600Z

That'd be fantastic

Olical 2021-05-13T14:39:35.135100Z

Would happily link from the wiki https://github.com/Olical/conjure/wiki#guides-posts-recipes-and-tricks and twoot it

Olical 2021-05-13T14:39:52.135400Z

I've done some, but 3rd party are far better imo

emilaasa 2021-05-13T14:40:04.135700Z

It is hard to do for your own projects

harryvederci 2021-05-13T18:11:04.143100Z

I found a little bug when evaluating forms in the REPL:

; Sponsored by @campbellr ❤
(+ 1 1 1)
If you put the cursor on the very first column and run <localleader>ee, it won't be evaluated. I'm guessing the cause is in the "at" sign and/or the heart icon.

harryvederci 2021-05-13T18:13:50.144500Z

; bla bla @something
; some innocent comment line
(+ 1 1 1) ;; evaluating on the opening parenthesis is ignored
Also happens here. So it's probably caused by the at sign in the comment.

harryvederci 2021-05-13T18:14:43.145400Z

Can someone reproduce and confirm this is not just an issue on my machine?

harryvederci 2021-05-13T18:24:19.146Z

(This is in Clojure, by the way.)

dharrigan 2021-05-13T18:52:51.146600Z

Works for me on my installation

dharrigan 2021-05-13T18:53:07.147Z

using neovim 5 nightly and latest on dev conjure branch

❤️ 1
dharrigan 2021-05-13T18:53:18.147200Z

on arch linux

dave 2021-05-13T18:54:26.147300Z

Color me intrigued! Is the idea that if there's an .nrepl-port file, Conjure auto-connects to the nREPL server, otherwise it falls back to starting a Babashka environment? Or is the idea that Babashka has its own server, and the Babashka jack-in only works if you have a Babashka nREPL running (is that a thing? I still haven't used Babashka yet 😅)

dave 2021-05-13T18:56:12.148Z

@dharrigan wins the "bleeding edge software power user" prize 😂

dharrigan 2021-05-13T18:57:13.148300Z

oh, I was inspired by others here 🙂

dharrigan 2021-05-13T18:57:22.148400Z

dharrigan 2021-05-13T18:59:08.148700Z

harryvederci 2021-05-13T19:08:00.150Z

@dharrigan Looks like you're editing in a file, the issue is when you edit in the repl window itself (i.e. after doing <localleader>lv to open it in a vertical split)

dharrigan 2021-05-13T19:08:29.150400Z

for me the repl == editor 🙂

dave 2021-05-13T19:08:40.150700Z

I'm glad you posted those gifs -- it gives me an opportunity to see what an eval highlight period of 100 ms looks like. Too fast for my tastes. 🙂

dharrigan 2021-05-13T19:08:53.150900Z

That's not 100ms

dharrigan 2021-05-13T19:08:55.151100Z

it's 250ms

dave 2021-05-13T19:09:02.151500Z

Oh, no kidding!

dave 2021-05-13T19:09:54.152700Z

I'm just using the default, which I guess is 500ms from reading above. Seems fine to me, FWIW. I wouldn't complain if @olical felt like changing the default, though. I'm happy to change the value in my config.

harryvederci 2021-05-13T19:09:55.152800Z

> for me the repl == editor Same here, 99% of the time. In the other 1%, I find a bug 😛

dharrigan 2021-05-13T19:10:50.153200Z

🙂

dharrigan 2021-05-13T19:11:35.153700Z

So, I opened up a log

dharrigan 2021-05-13T19:11:39.153900Z

then underneath this

dharrigan 2021-05-13T19:11:44.154100Z

; Sponsored by @lucaslollobrigida ❤

dharrigan 2021-05-13T19:11:52.154400Z

I inserted (+ 1 1 1)

dharrigan 2021-05-13T19:11:57.154600Z

I'm still able to eval on the first column

dharrigan 2021-05-13T19:12:06.154800Z

in the log

harryvederci 2021-05-13T19:12:13.155Z

Hmmm.. Ok then it could just be me

harryvederci 2021-05-13T19:12:21.155300Z

thanks for checking

👍 1
dharrigan 2021-05-13T19:12:23.155400Z

I'll do a gif

dharrigan 2021-05-13T19:13:32.155500Z

harryvederci 2021-05-13T19:17:33.156800Z

Yeah that's exactly what doesn't work for me. I'm on Neovim 0.5.X as well, but on the Conjure master branch.

Olical 2021-05-15T12:05:39.162300Z

Hmm working for me too... feels like an off by one error so I wonder what could cause that within one specific configuration. I'm guessing there's some option you have on that others don't that's causing my paren match finding code to freak out :thinking_face: you could always try using the experimental tree-sitter based selection code (option is in :h conjure somewhere) if you continue to have issues?

harryvederci 2021-05-17T06:35:23.165700Z

I've got that treesetter flag enabled (already had). This is not an issue for me at all, btw. I just thought I'd share it when I spotted it, in case it's one of those bugs that seem innocent but actually have some bigger impact elsewhere.

Olical 2021-05-17T07:46:08.165900Z

Oh! Then it's probably a tree sitter bug! As in related to my use of it or a bug in the Clojure tree sitter module. Narrows it down?

emilaasa 2021-05-13T21:08:31.157500Z

Works for me on both develop and master, dunno what it could be.

2021-05-13T21:14:10.158600Z

In fireplace, the doc binding (K) would fallthru to javadoc for java classes. Is that already a feature in Conjure? I couldn't find it.

Olical 2021-05-15T12:08:30.162700Z

There's this when I K on Thread/sleep

; --------------------------------------------------------------------------------
; doc (word): Thread/sleep
; No results, checking CIDER's info op
; java.lang.Thread/sleep
; ([long] [long int])
; <https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Thread.html#sleep(long)>
Is that what you mean? Or more?

Olical 2021-05-20T15:48:16.006400Z

Hmm interesting! Would you be able to open an issue for me so it's not lost to the information shredder that is Slack Free Plan? Thank you!