reveal

Docs: https://vlaaad.github.io/reveal/ Source: https://github.com/vlaaad/reveal
2020-12-02T06:37:46.252700Z

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

vlaaad 2020-12-02T08:22:07.258Z

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

2020-12-02T06:42:07.253400Z

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

2020-12-02T07:08:14.254500Z

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

practicalli-john 2020-12-02T13:16:00.258900Z

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.

vlaaad 2020-12-02T07:09:08.254600Z

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

2020-12-02T07:31:01.254800Z

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)))"]

2020-12-02T07:31:10.255Z

Seems to work at least

2020-12-02T07:42:38.255400Z

It be nice if Ctrl+l would clear the output

vlaaad 2020-12-02T08:09:13.257300Z

is that i or L? 😂

vlaaad 2020-12-02T08:09:23.257500Z

anyway, the output clearing is coming!

1❤️
practicalli-john 2020-12-02T13:10:53.258400Z

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

vlaaad 2020-12-02T13:15:48.258700Z

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

practicalli-john 2020-12-02T13:17:22.259200Z

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

2020-12-02T20:47:01.265600Z

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

2020-12-02T07:44:25.256400Z

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

vlaaad 2020-12-02T08:10:10.257700Z

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

2020-12-02T20:46:15.265400Z

Ah ok, well I can live without.

2020-12-02T07:45:12.257100Z

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

1😊
vlaaad 2020-12-02T08:09:13.257300Z

is that i or L? 😂

vlaaad 2020-12-02T08:09:23.257500Z

anyway, the output clearing is coming!

1❤️
vlaaad 2020-12-02T08:10:10.257700Z

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

vlaaad 2020-12-02T08:22:07.258Z

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

practicalli-john 2020-12-02T13:10:53.258400Z

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

vlaaad 2020-12-02T13:15:48.258700Z

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

practicalli-john 2020-12-02T13:16:00.258900Z

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.

practicalli-john 2020-12-02T13:17:22.259200Z

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

seancorfield 2020-12-02T20:30:31.259500Z

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

3
seancorfield 2020-12-02T20:32:53.260900Z

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

2020-12-02T20:34:25.261800Z

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.

seancorfield 2020-12-02T20:35:54.262600Z

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.

2020-12-02T20:36:48.263300Z

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

2020-12-02T20:37:58.264500Z

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 😛

2020-12-02T20:39:57.265Z

Now I wonder if I can also add this: https://github.com/jpmonettas/flow-storm-debugger (which I haven't tried yet) and get a full blown debugger in my command line repl lol

2020-12-02T20:46:15.265400Z

Ah ok, well I can live without.

2020-12-02T20:47:01.265600Z

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

vlaaad 2020-12-02T21:37:14.266700Z

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

vlaaad 2020-12-02T21:39:15.268100Z

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

2020-12-03T18:23:39.280900Z

Oh awesome lol

2020-12-03T23:22:13.285200Z

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)

2020-12-03T23:22:43.285400Z

So then I could easily go back and forth

vlaaad 2020-12-04T09:27:12.287800Z

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

2020-12-04T19:21:28.290200Z

Nah, cause Alt+Tab switches to whatever

2020-12-04T19:22:02.290400Z

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

2020-12-04T19:24:14.290600Z

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

2020-12-04T19:24:44.290800Z

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

2020-12-04T19:29:03.291800Z

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.

2020-12-04T19:30:43.292300Z

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