reveal

Docs: https://vlaaad.github.io/reveal/ Source: https://github.com/vlaaad/reveal
vlaaad 2020-09-16T07:23:03.012400Z

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

2🎉
orestis 2020-09-16T07:53:11.013600Z

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

orestis 2020-09-16T07:53:52.014300Z

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

vlaaad 2020-09-16T07:55:49.014900Z

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

dharrigan 2020-09-16T08:02:00.015300Z

So

dharrigan 2020-09-16T08:02:20.016Z

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

orestis 2020-09-16T08:02:40.016400Z

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

dharrigan 2020-09-16T08:02:45.016600Z

vlaaad 2020-09-16T08:07:03.017Z

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

dharrigan 2020-09-16T08:07:34.017200Z

Absolutely

dharrigan 2020-09-16T08:07:35.017400Z

a moment

vlaaad 2020-09-16T08:07:47.017600Z

Yes! Reveal can talk to any prepl like that

dharrigan 2020-09-16T08:07:50.017800Z

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

vlaaad 2020-09-16T08:08:10.018Z

What’s your nrepl version?

dharrigan 2020-09-16T08:08:13.018200Z

0.8.2

vlaaad 2020-09-16T08:08:58.018400Z

and then you connect to it on port 5600?

dharrigan 2020-09-16T08:09:32.018600Z

yes

dharrigan 2020-09-16T08:09:36.018800Z

I can add a tap manually

dharrigan 2020-09-16T08:09:37.019Z

vlaaad 2020-09-16T08:09:52.019500Z

hmmm

dharrigan 2020-09-16T08:10:13.019700Z

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.

vlaaad 2020-09-16T08:11:22.019900Z

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

vlaaad 2020-09-16T08:11:32.020100Z

I’ll fix it

dharrigan 2020-09-16T08:11:51.020300Z

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

vlaaad 2020-09-16T08:12:26.020500Z

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?

dharrigan 2020-09-16T08:13:04.020700Z

that would be accurate

dharrigan 2020-09-16T08:13:19.020900Z

let me fire up conjure

dharrigan 2020-09-16T08:13:28.021100Z

that definitely talks to the nrepl process

dharrigan 2020-09-16T08:13:53.021300Z

Yes

dharrigan 2020-09-16T08:13:56.021500Z

I see stuff coming out now

vlaaad 2020-09-16T08:14:03.021700Z

👍

dharrigan 2020-09-16T08:14:09.021900Z

vlaaad 2020-09-16T08:14:28.022400Z

yay!

dharrigan 2020-09-16T08:14:58.022600Z

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?

vlaaad 2020-09-16T08:18:43.022800Z

Released 1.0.128 that fixes nrepl tap> support 🙂

vlaaad 2020-09-16T08:19:00.023Z

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

vlaaad 2020-09-16T08:19:57.023200Z

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

dharrigan 2020-09-16T08:20:54.023400Z

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

dharrigan 2020-09-16T08:20:58.023600Z

pretty colours

vlaaad 2020-09-16T08:36:33.023800Z

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

dharrigan 2020-09-16T08:48:05.024Z

kk, thanks. great project btw!

vlaaad 2020-09-16T08:55:49.024200Z

🦜

practicalli-john 2020-09-16T12:46:36.024400Z

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

vlaaad 2020-09-16T13:09:07.024600Z

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

1👍
2020-09-16T19:06:07.026600Z

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

practicalli-john 2020-09-16T19:15:30.027900Z

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

vlaaad 2020-09-16T19:17:08.028Z

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

practicalli-john 2020-09-16T19:24:13.028100Z

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

vlaaad 2020-09-16T19:29:13.028300Z

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

vlaaad 2020-09-16T19:46:54.028500Z

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 #())

vlaaad 2020-09-16T19:49:32.028700Z

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

vlaaad 2020-09-16T19:50:31.028900Z

I would expect it to work without outer repl..

seancorfield 2020-09-16T20:41:32.031300Z

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.