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)
borkdude 2021-05-30T10:03:44.100700Z

@olical I am looking into the conjure babashka nrepl issue now. Would the issue be fixed if we printed:

user=> (nth [] 3)
java.lang.IndexOutOfBoundsExceptionuser REPL:1:1
for that error?

borkdude 2021-05-30T11:31:27.101Z

I have a new binary you can test if you want

Olical 2021-05-31T11:16:44.101500Z

Ohh interesting! Thank you so much! I'd be more than happy to test it yeah.

Olical 2021-05-31T11:17:36.101700Z

I think that'll be enough information, although the full verbose output with context etc that you get at the REPL would be amazing some day, I appreciate that it might not be accessible from the right part of the code though. Honestly just knowing roughly where the error came from and what it is will help a lot.

Olical 2021-05-31T11:24:05.102100Z

I'll probably have to do some patch elf magic since I'm on NixOS 😅

Olical 2021-05-31T11:24:07.102300Z

But thanks!

Olical 2021-05-31T11:24:08.102500Z

Oh static

Olical 2021-05-31T11:24:10.102700Z

might be fine

Olical 2021-05-31T11:24:13.102900Z

Thank you so much

borkdude 2021-05-31T11:24:24.103100Z

yeah, the static should be good in nixos

Olical 2021-05-31T11:25:04.103300Z

This is more for a user of Conjure than myself, I don't use bb toooo much right now, but I want to have first class integration since it's so amazing. The fact that I can just do nvim foo.clj and then eval immediately is pretty fun. Great for demoing Conjure and teaching

borkdude 2021-05-31T11:26:14.103500Z

yeah, sure

Olical 2021-05-31T11:35:57.103800Z

Ah! So I get the exception and line / char now (fantastic!!!)

; eval (file): .../conjure/dev/clojure/src/dev/bb-sandbox.clj
; (err) java.lang.IndexOutOfBoundsExceptionconjure.internal /home/olical/repos/Olical/conjure/dev/clojure/src/dev/bb-sandbox.clj:7:1

Olical 2021-05-31T11:36:13.104Z

However that conjure.internal on the end of the exception name is the namespace I think... let me confirm

Olical 2021-05-31T11:36:47.104200Z

Yes, it is indeed

borkdude 2021-05-31T11:37:29.104400Z

ah slight formatting thing?

Olical 2021-05-31T11:37:30.104600Z

Possibly just needs a new line or space to separate the printed namespace name from the exception? Or a new line?

Olical 2021-05-31T11:37:33.104800Z

I think so

Olical 2021-05-31T11:37:55.105Z

Will debug my end to check that's how the nREPL message is formatted and it's not my doing

Olical 2021-05-31T11:38:58.105500Z

; eval (root-form): (nth test-vector 3)
; debug: send
{:code "(nth test-vector 3)"
 :column 1
 :file "/home/olical/repos/Olical/conjure/dev/clojure/src/dev/bb-sandbox.clj"
 :id "8fd9f968-e959-4135-8763-71ffe83e4584"
 :line 7
 :nrepl.middleware.print/options {:associative 1 :length 500 :level 50}
 :nrepl.middleware.print/print "conjure.internal/pprint"
 :ns "bb-sandbox"
 :op "eval"
 :session "aa17d859-08c2-4530-be0f-0e079ee879b4"}
; debug: receive
{:err "java.lang.IndexOutOfBoundsExceptionbb-sandbox /home/olical/repos/Olical/conjure/dev/clojure/src/dev/bb-sandbox.clj:1:1
"
 :id "8fd9f968-e959-4135-8763-71ffe83e4584"
 :session "aa17d859-08c2-4530-be0f-0e079ee879b4"}
; (err) java.lang.IndexOutOfBoundsExceptionbb-sandbox /home/olical/repos/Olical/conjure/dev/clojure/src/dev/bb-sandbox.clj:1:1
; debug: receive
{:ex "class java.lang.IndexOutOfBoundsException"
 :id "8fd9f968-e959-4135-8763-71ffe83e4584"
 :root-ex "class java.lang.IndexOutOfBoundsException"
 :session "aa17d859-08c2-4530-be0f-0e079ee879b4"
 :status ["eval-error"]}
; debug: receive
{:id "8fd9f968-e959-4135-8763-71ffe83e4584"
 :session "aa17d859-08c2-4530-be0f-0e079ee879b4"
 :status ["done"]}

Olical 2021-05-31T11:39:08.105700Z

Yeah, deffo from the nREPL server, I can change it if you want?

borkdude 2021-05-31T11:39:17.105900Z

please :)

Olical 2021-05-31T11:47:03.106100Z

https://github.com/babashka/babashka.nrepl/pull/41 I hope that looks okay! I think it's correct to always put a space between the loc-str and whatever comes before it.

borkdude 2021-05-31T12:32:25.106400Z

Thanks, merged. New binary is building