Fork me on GitHub

Is there a way to get reveal integrated with rebel-readline ?


I experimented a bit with it and got it working as a normal repl, I'll try to find some snippets...


I think I got it with this: :main-opts ["-e" "(require,'rebel-readline.core),(require,'rebel-readline.clojure.line-reader),(require,'rebel-readline.clojure.service.local),(require,'rebel-readline.clojure.main),(require,'vlaaad.reveal)(rebel-readline.core/with-line-reader,(rebel-readline.clojure.line-reader/create,(rebel-readline.clojure.service.local/create)),(vlaaad.reveal/repl,:prompt,(fn,[]),:read,(rebel-readline.clojure.main/create-repl-read)))"]


Seems to work at least


Awesome, I’ll save the snippet and add it to the readme when I have time


But I think we can do better, and start the Reveal repl using the rebel line reader


Ok, here's how, add this alias

:repl {:extra-deps {com.bhauman/rebel-readline {:mvn/version "RELEASE"}
                               org.clojure/clojure {:mvn/version "RELEASE"}
                               vlaaad/reveal {:mvn/version "RELEASE"}}
                  :main-opts  ["-e" "(require,'rebel-readline.core),(require,'rebel-readline.clojure.line-reader),(require,'rebel-readline.clojure.service.local),(require,'rebel-readline.clojure.main),(require,'vlaaad.reveal)(rebel-readline.core/with-line-reader,(rebel-readline.clojure.line-reader/create,(rebel-readline.clojure.service.local/create)),(vlaaad.reveal/repl,:prompt,(fn,[]),:read,(rebel-readline.clojure.main/create-repl-read)))"]}
Trick is what I do in :main-opts "-e" code


This is nice, I'll test and add to the practicalli/clojure-deps-edn project. Thank you, this has been on my todo list for a while.. and now I can create some more videos with this setup too.


It be nice if Ctrl+l would clear the output


is that i or L? 😂


anyway, the output clearing is coming!

❤️ 3

l for lima is the same as in a shell terminal (and the same for Cider buffer in Spacemacs)


Yeah, I was thinking about Ctrl+L as a default


That would work, capital letter as its 'changing' the state...


What would the non state changing lower l variant do? If it did anything, I'm just curious?


I also noticed, when you sort some column, and then switch the sort back to no sort, it doesn't restore the original order


that’s JavaFX behavior, not much I can do about it except rewriting the table component altogether…


Ah ok, well I can live without.


But before I continue, let me say: Reveal is great! Really awesome work! I'm going to make it an integral part of my workflow, and I'm sure it'll be super handy

😊 3

For anyone using my dot-clojure repo, I just pushed an update that adds a :dev alias that mimics what we have at work for starting REBL or Reveal or Rebel Readline or a plain REPL (depending on what's on your classpath) as well as a Socket REPL (saved to .socket-repl-port so you get the same port number next time you start it in that directory); if it starts Reveal, it also adds in the auto-table-view stuff that I use at work. If adds a dev.clj file in ~/.clojure which is loaded via -e using (System/getProperty "user.home")


@didibus That's some interesting stuff... Maybe I'll update my dev.clj file to start things like that if you have both Reveal and Rebel Readline on the classpath... I'll create a ticket since I don't have time right now 🙂


FYI: Apparently its better to do it like this:

:main-opts  ["-e" "(require,'rebel-readline.core),(require,'rebel-readline.clojure.line-reader),(require,'rebel-readline.clojure.service.local),(require,'rebel-readline.clojure.main),(require,'vlaaad.reveal)(rebel-readline.core/with-line-reader,(rebel-readline.clojure.line-reader/create,(rebel-readline.clojure.service.local/create)),(vlaaad.reveal/repl,:prompt,(fn,[]),:read,(rebel-readline.clojure.main/create-repl-read)))"]
I've updated the prior snippet as well. But this way allows someone to still use in, where the other way didn't, since it took it over to hook up rebel readline.


Updated the issue to include that. It may be a few days before I get a chance to try that out. I don't use Rebel Readline myself.


Its really nice. Actually, this combo of Rebel + Reveal, it turns the command line repl almost into a full blown IDE lol


You get multi-line, color highlight, auto-format, inline doc, auto-complete, in-line parameter lists, with Reveal to inspect results, its pretty God like in my opinion 😛


Now I wonder if I can also add this: (which I haven't tried yet) and get a full blown debugger in my command line repl lol


heh, I had thoughts of trying to integrate flow-storm into reveal so you don't have to run it separately


I think it might be pretty cool, but right now I'm busy with various UI improvements, and then there will be remote control...


Remote Control?


So you don't have to leave your emacs to navigate around Reveal :)

bananadance 6

Oh awesome lol


I was thinking, I don't know exactly what you plan for remote control. But I was going to change my Emacs so there is a shortcut that switches focus to the Reveal Window. And then I was thinking it be nice if in Reveal, if I pressed Esc when no pop-up is up, if it changed focus back to the app that had it before it acquired focus (or some other shortcut)


So then I could easily go back and forth


> or some other shortcut Like alt+tab? :)


Nah, cause Alt+Tab switches to whatever


Its what I do now, but if I say was in the browser, then go back to Emacs, and Alt+Tab, it goes to the browser


So really what I plan to do is have winmove that when I winmove right and there is no more right in emacs, it switches focus to Reveal. And then it be nice if in Reveal, I could similarly assign a shortcut to switch back to Emacs


So I'd probably have it S+right<most> goes to Reveal, and then S+left from Reveal goes back to Emacs


Or maybe I'd find a switch shortcut more convenient, anyways haha. Remote Control sounds nice, in the meantime, having a shortcut in Reveal that I can configure where I can say: Here's the window name I want it to switch focus too, and here's the keyboard shortcut I want for it. Would probably satisfy me.


But, to be honest, I'm not sure how trivial it is to ask the OS to switch window focus. I'm thinking each OS has its own mechanism for it, don't know if Java has a nice wrapper API that works with them all. So your idea of Remote Control might be better