Fork me on GitHub
#reveal
<
2020-09-16
>
vlaaad07:09:03

Reveal 1.0! You heard it here first, folks 😄 https://vlaaad.github.io/reveal/

🎉 6
orestis07:09:11

Reveal looks awesome! Is there any way to plug things together so that I can visualise data that lives on a remote process?

orestis07:09:52

I have control over the remote process so I can install dependencies, but the reveal window needs to be on my local machine

vlaaad07:09:49

Hi @orestis! Reveal can connect to remote processes and pull data from there: https://vlaaad.github.io/reveal/#remote-prepl

dharrigan08:09:20

I'm trying out the nrepl approach, launch my repl, the UI appears, but tis blank

orestis08:09:40

@vlaaad Super — I take it that the CLJS example is just to showcase the prepl, right? It’s just the same as launching a prepl in a remote clojure process?

vlaaad08:09:47

Yes! Reveal can talk to any prepl like that

vlaaad08:09:03

Can you share a bit more? How do you start the nrepl server? How do you connect to it?

dharrigan08:09:50

(defn start-nrepl
  [port]
  (nrepl.server/start-server
   :port port
   :handler (apply nrepl.server/default-handler
                   (-> (map #'cider.nrepl/resolve-or-fail cider.nrepl/cider-middleware)
                       (conj #'vlaaad.reveal.nrepl/middleware)
                       (conj #'refactor-nrepl.middleware/wrap-refactor))))
  (let [port-file (io/file ".nrepl-port")]
    (.deleteOnExit port-file)
    (spit port-file port)
    (println (ansi/green (str "nREPL client can be connected to port " port)))))

vlaaad08:09:10

What’s your nrepl version?

vlaaad08:09:58

and then you connect to it on port 5600?

dharrigan08:09:36

I can add a tap manually

dharrigan08:09:13

but it looks strange and I don't get anything else, as in your docs, like if I show (all-ns) it echos out on my repl, but not reveal.

vlaaad08:09:22

Well, first of all, you found a bug in nrepl’s tap> support, sorry about that 🙂

vlaaad08:09:32

I’ll fix it

dharrigan08:09:51

That's okay. Glad I could, um, help 😉

vlaaad08:09:26

but I have a feeling that the repl you have in the command line is not a nrepl client, but rather a normal repl that exists alongside the nrepl server.. is this right?

dharrigan08:09:04

that would be accurate

dharrigan08:09:19

let me fire up conjure

dharrigan08:09:28

that definitely talks to the nrepl process

dharrigan08:09:56

I see stuff coming out now

dharrigan08:09:58

Would there be a way to hook the repl in too, so I could see the results of any evals in the repl to reveal?

vlaaad08:09:43

Released 1.0.128 that fixes nrepl tap> support 🙂

vlaaad08:09:00

https://vlaaad.github.io/reveal/#user-api — there are various built in socket repls

vlaaad08:09:57

I noticed you have “Rebel readline” — I’m not familiar with that, unfortunately. Does it wrap another repl, or is it itself a repl?

dharrigan08:09:54

it wraps clojure repl I believe, but with fancy stuff, like completion, docs, source etc...

dharrigan08:09:58

pretty colours

vlaaad08:09:33

Since both reveal and rebel wrap something like clojure.main/repl, they probably can be composed, but that would require writing some code

dharrigan08:09:05

kk, thanks. great project btw!

practicalli-johnny12:09:36

@vlaaad I was just about to ask about using Reveal with Rebel Readline... hopefully I will get some time to look at the respective code later in the year. For now I can run Rebel Readline and use Reveal as a tap> source, just using a Clojure CLI alias.

vlaaad13:09:07

I’ll make a note for myself to investigate how reveal can be composed with rebel-readline

👍 3
vlaaad19:09:54

They are composed super easily:

PS C:\Users\Vlaaad> clj -Sdeps "{:deps {com.bhauman/rebel-readline {:mvn/version """"0.1.4""""} vlaaad/reveal {:mvn/version """"1.0.128""""}}}" -m rebel-readline.main
[Rebel readline] Type :repl/help for online help info
user=> (require '[rebel-readline.clojure.main :as rr])
nil
user=> (require '[vlaaad.reveal :as r])
nil
user=> (r/repl :read (rr/create-repl-read) :prompt #())

vlaaad19:09:32

hmm, tried without the outer rebel-readline repl, and it failed, I guess I got lucky

vlaaad19:09:31

I would expect it to work without outer repl..

jeremys19:09:07

@vlaaad Just saw the announcement on reddit, I haven’t tried reveal yet but it looks cool. Thanks!

practicalli-johnny19:09:30

I like the simplicity of the Reveal UI, feels very approachable.

vlaaad19:09:08

Thanks! It's hard to keep it simple :)

practicalli-johnny19:09:13

The new website is really great too, all those lovely screenshots make it really easy to understand reveal. Thanks.

vlaaad19:09:13

Glad you like it, I spent quite some time on it 🙂

seancorfield20:09:32

I'm planning to try Reveal again soon. I'll switch from REBL to Reveal and "force" myself to use Reveal for several days and see what feedback I have for you. I suspect that main my workflow "need" will arise from REBL auto-displaying values in tables whereas that has to be an explicit user action in Reveal. Plus the aforementioned datafy/nav of Vars and namespaces which I use quite a lot in REBL.