Good point about big maps! This is a default behavior that for printing is usually overridden by extending print-method for specific data types. Since Reveal’s printing exists independently of Clojure’s printing, there is an unfortunate consequence: you need to override Reveal printing yourself. I will think if there is something that Reveal can do about that.
Regarding ClojureScript: Reveal can already talk to remote processes with its remote-prepl, although the exploration capabilities will be limited to inspecting data structures received from the network, which is not the same as objects in the target VM.
It warms my heart to see that people use and enjoy Reveal
A little comment on your snippet: you don’t need to call rx/as inside the defstream blocks since Reveal will mark emitted regions with the value anyway. Also, you shouldn’t use (when ...) as an argument to rx/vertical — it expects functions and not nulls.
You can then build on it even more stuff if necessary. For example, it can show remaining keys annotated with corresponding values, and then you can write a contextual action that allows looking at the value for a selected remaining key. I also think it’s nice that the big-map function actually does not depend on Reveal: it’s just namespaced keywords in the meta, which means you can leave this metadata in production code and it won’t cause any trouble, while in the dev environment it will be picked up by Reveal.
I got a legacy Java app with huge code base.
Sometimes I use Clojure REPL to poke in that code. However I don’t yet how to query objects in memory. Do you think it is possible to do this using your tool?
Just some feedback: I have used Reveal for the past couple of weeks, and already it has helped me solve 2 very difficult bugs that have been plaguing me for the past couple of months (related to unanticipated printing of huge data structures crashing the JVM). Super useful tool.
My favorite part is how easy it is to customize and add application-specific custom functionality. I’ve been steadily working on removing all printing from our application, and replacing it with tap> to Reveal.
I’m not aware of any way to query for objects in the heap, but I used Clojure REPL with Reveal to poke at a java program before, I did it by having a custom main that starts the java app and also saves a reference to the application data container (e.g. Guice injector) in a user ns. Then I used that def to lookup services and over stuff.
@vlaad Thank you for reveal. I ended up here after googling for “clojure reveal guice repl” and looks like you have done exactly that. I was wondering if you can share with me the code snippet for the same.
looking forward to hearing from you.