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)
victorb 2020-10-13T17:47:05.137600Z

Sometimes it seems like Conjure ignores my already opened log buffer and starts output stuff in the little floating window instead. I can't figure out if I'm doing something wrong or if this is to be expected, I can't reliably reproduce it, only happens sometimes

berkeleytrue 2020-10-13T17:49:40.138200Z

I've run into that when I move around in the buffer

Olical 2020-10-13T17:54:44.138800Z

It will do that if you can't see the bottom of the log buffer, this is so that you know there's new content / entries in the log while you're inspecting something from the past.

Olical 2020-10-13T17:55:18.139600Z

This was something I planned in my own head and have never really taken feedback on / attempted to make configurable. Open to a discussion on it and eventual issues asking for config / changes 🙂

dave 2020-10-13T18:20:20.141800Z

one option that looks kind of nice in my head is that you could display some sort of "look down" indicator instead of showing the bottom of the log buffer my thinking is, i'm already looking at the log buffer, so seeing another, smaller version of it pop up is perhaps a little jarring/confusing. i'd rather just see some indicator that tells me "hey, there's new stuff at the bottom of the buffer, just FYI." then i can press G whenever i'm ready to see the new stuff

berkeleytrue 2020-10-13T18:23:36.142100Z

My expectation was that it would just append to the buffer.

orestis 2020-10-13T18:50:40.142500Z

Agree with @dave

dharrigan 2020-10-13T18:52:02.142700Z

Me three.

2020-10-13T20:37:54.144400Z

Has anyone encountered not being able to evaluate forms that contain reader conditionals while in a cljc file? I have one session open against a jvm-based repl. My repro is

;; attempt to evaluate in a cljc file:
(defn testing [] #?(:cljs :this :clj :that))

;; result in log:
; eval (root-form): (defn testing [] #?(:cljs :this :clj :tha...
; (err) Error printing return value at clojure.lang.Util/runtimeException (Util.java:221).
; (err) Conditional read not allowed

Olical 2020-10-13T20:40:14.144900Z

I can't reproduce this :thinking_face: I've only ever seen this when something in the REPL itself has rebound the thing that allows you to use reader conditionals.

Olical 2020-10-13T20:40:28.145100Z

(I just ran a reader conditional in a .cljc)

Olical 2020-10-13T20:42:42.145300Z

How are you starting the REPL?

; eval (root-form): (defn testing [] #?(:cljs :this :clj :that))
#'dev.sandbox/testing

2020-10-13T20:45:23.145600Z

I use lein repl and connect to that

2020-10-13T20:46:24.145800Z

(as an aside, I was at v4.3.0 so I tried bumping to v4.6.0, but still the same error)

2020-10-13T20:46:35.146Z

does it matter that my repl is "no-env"

2020-10-13T20:46:40.146200Z

; Assumed session: California Spangled (<https://conjure.fun/no-env>)

Olical 2020-10-13T20:47:35.146400Z

Hmm, that means Conjure tried to check if you're Clojure or ClojureScript in your current session through a reader-conditional and got an error or nil.

Olical 2020-10-13T20:47:50.146600Z

That session type works by reader conditionals, so it makes sense that it's broken if reader conditionals are playing up.

Olical 2020-10-13T20:48:02.146800Z

Could you try ,sQ to kill all of your sessions, just in case?

2020-10-13T20:48:56.147100Z

sure. here are the results:

; Closed all sessions (2)
; --------------------------------------------------------------------------------
; Assumed session: Scottish Fold (<https://conjure.fun/no-env>)
; --------------------------------------------------------------------------------
; Sessions (1):
; &gt;1 - Scottish Fold (<https://conjure.fun/no-env>)
; --------------------------------------------------------------------------------
; eval (root-form): (defn testing [] #?(:cljs :this :clj :tha...
; (err) Error printing return value at clojure.lang.Util/runtimeException (Util.java:221).
; (err) Conditional read not allowed

Olical 2020-10-13T20:49:39.147300Z

Oh yeah, I made no env link to a wiki page explaining the situations that it can occur 😅

Olical 2020-10-13T20:50:00.147500Z

Can you use reader conditionals in the lein repl?

Olical 2020-10-13T20:50:21.147700Z

(sorry about remote debugging, there's not really anything in Conjure for this, so I'm just trying to help diagnose where the issue lies)

2020-10-13T20:51:32.147900Z

I appreciate you helping out!

2020-10-13T20:51:40.148100Z

I am able to evaluate that form

Olical 2020-10-13T20:52:02.148300Z

Fun times! So your REPL itself is configured... interestingly.

Olical 2020-10-13T20:52:42.148500Z

Could be your tools.repl or Clojure version being held back by some dep :thinking_face:

2020-10-13T20:52:47.148700Z

well, not quite. this does look like a repl issue because evaluating #?(:cljs :this :clj :that) returns nothing

2020-10-13T20:53:09.148900Z

so there's my problem -- no conjure!

2020-10-13T20:53:16.149100Z

thanks for your time!!

Olical 2020-10-13T20:53:17.149300Z

Yay but also 😭

Olical 2020-10-13T20:53:48.149700Z

No problem! I'm guessing it's a dependency causing it. I'd try lein repl in another project / fresh dir to see if that's okay

Olical 2020-10-13T20:53:59.149900Z

If it is and it only recently broke, it's probably down to a recent dep change

2020-10-13T20:58:23.150300Z

I'll let you know here when I find the culprit!

👍 1
2020-10-13T21:08:00.152700Z

Okay, well this isn't minimal by any stretch, but I fixed it by removing the nrebl set up that I was listing in my lein/profiles.clj user profile:

{:nrebl {:resource-paths ["/Users/onno/opt/REBL-0.9.226/REBL-0.9.226.jar"]
         :dependencies [[rickmoynihan/nrebl.middleware "0.3.1"]
                        [org.clojure/core.async "0.4.500"]
                        [org.openjfx/javafx-fxml "11.0.1"]
                        [org.openjfx/javafx-controls "11.0.1"]
                        [org.openjfx/javafx-graphics "11.0.1"]
                        [org.openjfx/javafx-media "11.0.1"]
                        [org.openjfx/javafx-swing "11.0.1"]
                        [org.openjfx/javafx-base "11.0.1"]
                        [org.openjfx/javafx-web "11.0.1"]
                        [cljfmt "0.6.4"]]
         :repl-options {:nrepl-middleware [nrebl.middleware/wrap-nrebl]}
         :injections [(require 'nrebl.middleware)
                      (require '[cognitect.rebl :as rebl])]}
I could narrow it down further -- but I'll try that tomorrow

Olical 2020-10-13T21:09:11.153Z

Good spot! There may even be an issue on that project about this, I presume it's holding a common dependency back to a point of breakage, or it's not providing a flag to the REPL as it starts up as it should.

2020-10-13T21:13:39.153200Z

yeah, my REBL setup is likely very outdated too (not to mention jury-rigged)

2020-10-13T21:14:13.153400Z

Thanks again for your time; and sorry to waste it when I hadn't tried things out at my repl first. My bad!

Olical 2020-10-13T21:17:46.153700Z

Not a problem! I like to triage and work out if it's something that I did and might be happening in lots of places without my knowledge quickly. Helping you out through rubber ducking is a huge bonus 🙂

🤘 1
rafaeldelboni 2020-10-13T23:24:23.154600Z

Hey @olical greetings from Brasil! :) Thanks a lot

😍 1
Olical 2020-10-14T10:37:19.158300Z

So glad they made it!