Fork me on GitHub
#conjure
<
2021-05-13
>
GitHub10:05:43

[Olical/conjure] Issue opened by victorb

victorb10:05:16

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 @U04V15CAJ)

borkdude10:05:26

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

borkdude10:05:45

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

borkdude11:05:04

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

borkdude11:05:19

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

dharrigan13:05:07

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

dharrigan13:05:38

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

dharrigan13:05:22

yes, 250ms is better

emilaasa14:05:04

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

Olical14:05:45

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

emilaasa14:05:10

Speed junkies 🙂

dharrigan14:05:41

500 is imho a little too long

emilaasa14:05:49

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

dharrigan14:05:06

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

emilaasa14:05:07

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

emilaasa14:05:17

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

Olical14:05:52

"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

Olical14:05:05

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

Olical14:05:54

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

Olical14:05:07

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

dharrigan14:05:37

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

dharrigan14:05:50

I recall asking about this yonks ago

Olical14:05:49

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

Olical14:05:02

deffo a good feature for an aniseed based plugin 🙂

dharrigan14:05:05

yup, that's right 🙂

emilaasa14:05:30

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

3
Olical14:05:37

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.

emilaasa14:05:17

What would Aniseed loading things faster do?

emilaasa14:05:49

Does it affect performance when editing or something else?

Olical14:05:02

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

Olical14:05:13

I have multiple userbases with different concerns 😅

emilaasa14:05:18

Ah cool - haven't gotten that deep yet 😛

Olical14:05:52

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.

Olical14:05:10

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

Olical14:05:20

And then conjure benefits from that

Olical14:05:28

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.

dave18:05:26

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 😅)

Olical12:05:18

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?

dave22:05:02

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.

dave22:05:43

This could also be super handy for developing bb scripts!

emilaasa14:05:43

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 😛

metal 6
emilaasa14:05:00

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

Olical14:05:15

That'd be fantastic

Olical14:05:52

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

emilaasa14:05:04

It is hard to do for your own projects

harryvederci18:05:04

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.

harryvederci18:05:50

; 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.

harryvederci18:05:43

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

harryvederci18:05:19

(This is in Clojure, by the way.)

dharrigan18:05:51

Works for me on my installation

dharrigan18:05:07

using neovim 5 nightly and latest on dev conjure branch

❤️ 3
dharrigan18:05:18

on arch linux

dave18:05:12

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

dharrigan18:05:13

oh, I was inspired by others here 🙂

harryvederci19:05:00

@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)

dharrigan19:05:29

for me the repl == editor 🙂

dave19:05:40

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. 🙂

dharrigan19:05:53

That's not 100ms

dave19:05:02

Oh, no kidding!

dave19:05:54

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.

harryvederci19:05:55

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

dharrigan19:05:35

So, I opened up a log

dharrigan19:05:39

then underneath this

dharrigan19:05:44

; Sponsored by @lucaslollobrigida ❤

dharrigan19:05:52

I inserted (+ 1 1 1)

dharrigan19:05:57

I'm still able to eval on the first column

harryvederci19:05:13

Hmmm.. Ok then it could just be me

harryvederci19:05:21

thanks for checking

👍 3
dharrigan19:05:23

I'll do a gif

harryvederci19:05:33

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.

Olical12:05:39

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?

harryvederci06:05:23

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.

Olical07:05:08

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?

emilaasa21:05:31

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

uwo21:05:10

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.

Olical12:05:30

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])
; 
Is that what you mean? Or more?

uwo13:05:11

Ahh, I see. if I do it on a var class I've imported and used without qualification it doesn't work:

; --------------------------------------------------------------------------------
; doc (word): DateTimeFormatter
; (err) Syntax error compiling var at (time.clj:5:30).
; (err) Expecting var, but DateTimeFormatter is mapped to class java.time.format.DateTimeFormatter
; --------------------------------------------------------------------------------
; doc (word): java.time.format/DateTimeFormatter
; No results, checking CIDER's info op
; java.time.format.DateTimeFormatter
; 

Olical15:05:16

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!

uwo13:05:11

Ahh, I see. if I do it on a var class I've imported and used without qualification it doesn't work:

; --------------------------------------------------------------------------------
; doc (word): DateTimeFormatter
; (err) Syntax error compiling var at (time.clj:5:30).
; (err) Expecting var, but DateTimeFormatter is mapped to class java.time.format.DateTimeFormatter
; --------------------------------------------------------------------------------
; doc (word): java.time.format/DateTimeFormatter
; No results, checking CIDER's info op
; java.time.format.DateTimeFormatter
;