Reveal 1.0! You heard it here first, folks 😄 https://vlaaad.github.io/reveal/
Reveal looks awesome! Is there any way to plug things together so that I can visualise data that lives on a remote process?
I have control over the remote process so I can install dependencies, but the reveal window needs to be on my local machine
Hi @orestis! Reveal can connect to remote processes and pull data from there: https://vlaaad.github.io/reveal/#remote-prepl
So
I'm trying out the nrepl approach, launch my repl, the UI appears, but tis blank
@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?
Can you share a bit more? How do you start the nrepl server? How do you connect to it?
Absolutely
a moment
Yes! Reveal can talk to any prepl like that
(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)))))
What’s your nrepl version?
0.8.2
and then you connect to it on port 5600?
yes
I can add a tap manually
hmmm
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.
Well, first of all, you found a bug in nrepl’s tap>
support, sorry about that 🙂
I’ll fix it
That's okay. Glad I could, um, help 😉
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?
that would be accurate
let me fire up conjure
that definitely talks to the nrepl process
Yes
I see stuff coming out now
👍
yay!
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?
Released 1.0.128 that fixes nrepl tap> support 🙂
https://vlaaad.github.io/reveal/#user-api — there are various built in socket repls
I noticed you have “Rebel readline” — I’m not familiar with that, unfortunately. Does it wrap another repl, or is it itself a repl?
it wraps clojure repl I believe, but with fancy stuff, like completion, docs, source etc...
pretty colours
Since both reveal and rebel wrap something like clojure.main/repl, they probably can be composed, but that would require writing some code
kk, thanks. great project btw!
🦜
@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.
I’ll make a note for myself to investigate how reveal can be composed with rebel-readline
@vlaaad Just saw the announcement on reddit, I haven’t tried reveal yet but it looks cool. Thanks!
I like the simplicity of the Reveal UI, feels very approachable.
Thanks! It's hard to keep it simple :)
The new website is really great too, all those lovely screenshots make it really easy to understand reveal. Thanks.
Glad you like it, I spent quite some time on it 🙂
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 #())
hmm, tried without the outer rebel-readline repl, and it failed, I guess I got lucky
I would expect it to work without outer repl..
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.