r/Clojure • u/vlaaad • Sep 16 '20
Reveal 1.0: Read Eval Visualize Loop for Clojure
https://vlaaad.github.io/reveal/6
1
u/daver Sep 16 '20
This looks cool.
Is there a way to clear the list of objects that Reveal is holding onto? Obviously, by holding on to an object reference, you're keeping the GC from doing its thing. For objects where you have another ref in your program, that's fine, but if you grab the ref of a really huge object graph, and do that a few times, it might be the case that you could run out of memory, no?
It would also be interested to integrate something similar either into CIDER itself or provide some sort of access to Reveal from CIDER so that the CIDER REPL would act similarly. I suppose you could simply add Reveal to the list of dependencies and get it up and running and then use it from CIDER's REPL as well.
2
u/vlaaad Sep 16 '20
Thanks!
Currently, there is no way to clear the output, although I'm planning to add the ability to do this. I've been using Reveal for more than a year now, and OOM in practice was an issue only when I tried to do something obviously memory-eating like printing
(range). I agree this might be an issue — that's why I'm going to add an ability to clear the screen, but for me printing OOM-triggering data structures is just not a thing I do during development.Cider is nrepl-only, right? Reveal has nrepl middleware, so supposedly it can be integrated into cider-based workflow just with adding the middleware to the list of middlewares.
2
u/daver Sep 17 '20
Cool. I saw the section in the post about nrepl integration after I posted. Sorry about that. I was so awed by the main functionality, I missed it. 😀
1
u/sirius_li Sep 16 '20
Were you inspired by RStudio? Just curious because that's the vibe I'm getting. RStudio is still one of my favorite IDEs so it's very much a compliment :)
1
u/vlaaad Sep 16 '20
Thanks! I didn't know about RStudio. What do you think is similar, besides charts? What do you think is missing in Reveal that exists in RStudio? :)
2
u/sirius_li Sep 17 '20
I'm new to Clojure and new to Reveal so I can't provide an educated answer. From what I've seen so far Reveal is very close. I would make sure it's easy for other clj libraries to display to Reveal's visual window because most of RStudio's power came from other libraries (ggplot2 being the big one).
2
3
u/royalaid Sep 16 '20
Hey vlaad, thanks for all the work on reveal. Been using it for a while now on some smaller side projects and been very happy with it. The docs are very welcome as I remember when first playing around with it and having absolutely no idea how to do specific things.
I am curious if it's possible to integrate reveal with shadow. I know there have been discussions between you and Thomas but I don't know if they turned into anything material or if I'm just not seeing directions somewhere.