Fork me on GitHub
#cider
<
2018-12-02
>
bozhidar10:12:48

I’m not sure what REBLs API is, but I recall that in his demo Stu was using it from inferior-lisp (yeah, yeah - I can’t imagine someone is still using this). 🙂

bozhidar10:12:45

Likely basic integration would be trivial, but the real point is whether that’s the right approach. Frankly, I think it’d be much better if we just extended the inspector to support the new nav and datafy protocols.

bozhidar10:12:00

A native Emacs UI will be much better than firing some Swing app IMO.

👋 5
bozhidar10:12:26

That being said - I’ve got no plans to work on this, so if it ever happens it will have to be contributed by someone else.

manuel11:12:36

FWIW, I want to stick as much as possible with Emacs when it comes to Clojure development. As much as I appreciate the effort put behind REBL, I really don't want another tool for Clojure interaction.

bozhidar11:12:59

Well, there has also been the Swing inspector as well, but I’ve noticed that almost no one uses it. 🙂 I appreciate the idea of creating something tool-agnostic, but obviously it will never match what you can do with native integration.

dominicm12:12:43

Tool agnostic can potentially be better than what Emacs can do, because there are very expressive systems out there

dominicm12:12:55

Nrepl can and should support this workflow.

bozhidar12:12:35

@dominicm I meant UI-wise. Emacs users simply don’t like to spin some external apps if they can have a native UI. As for nREPL - I totally agree. Probably using nav will be the solution to our “how to handle big results” conversations. Haven’t had time to think about how exactly to integrate datafy and nav with nREPL, though.

dominicm12:12:15

Don't they? Even if it's convenient to launch, and offers a superior UI? Interesting.

ackerleytng12:12:40

it'll be cool to use cider-inspect's user interface with datafy and nav

orestis13:12:00

I’d gladly drop CIDER inspector for a GUI app, but I’m a recent convert to Emacs land 🙂

Chris14:12:59

@dominicm I’m not sure REBL offers a significantly superior UI to what could be achieved in GUI Emacs. Maybe the web browsing stuff wouldn’t be achievable but the rest would.

Chris14:12:53

To me the only big advantage of an external application is that it might have a dedicated maintainer. (Not sure if Cognitect are committed to REBL or it’s a proof of concept?)

Chris14:12:25

@dominicm actually I take that back. I’m not much into ClojureScript but I guess exploring React components visually could be super useful

chris_johnson18:12:48

FWIW my reluctance to “shell out” to another tool when using Emacs for Clojure work stems from the fact that I don’t have, as Stu briefly alluded to in the REBL talk, “you know, three big monitors, like we all have”

chris_johnson18:12:51

so when I’m in a fullscreen Emacs session with my buffer and a REPL and maybe an ansi-term tailing logs or watching some kind of output, looking at “another tool” means swiping over to another desktop and back. Maybe REBL is the reason I finally buy some big external monitors and figure out how to drive them from my laptop? 😅

dpsutton18:12:14

save your money and alt tab 🙂

lilactown19:12:05

I would appreciate having both tbh

lilactown19:12:47

I work in many contexts - laptop in a coffee shop, laptop + monitor at home, triple monitors at work

lilactown19:12:49

having a nice GUI with expressive visualizations would be quite useful. but the current REBL capabilities could be implemented in pure Emacs and would be quite useful as well

lilactown19:12:27

of course the dream would be: implement the core of a REBL-like program in some external program and have it output data to an adapter to be rendered in whatever context, allowing it to be downgraded. but that’s probably way too much work.

bozhidar21:12:00

I highly doubt that the core of REBL is complex, so this is likely pretty doable.

richiardiandrea21:12:21

I like the ideas behind REBL but I think Emacs should embed them, and while contributions flow, we can use that instead at the cost of some (minimal) context switch. At the end of the day Emacs is our Os right?

richiardiandrea21:12:09

The experience does not seem hard to replicate either within emacs or in webkit - probably easier said than done 😃

richiardiandrea21:12:18

I actually played with nav at the conj and there is surely the whole of the implementation for core protocols missing at the moment - if I understood things correctly

richiardiandrea21:12:58

@bozhidar so in a cljs conversion frenzy I am bashing on orchard and adding reader conditional whenever it makes sense. Haven't been refactoring any code but the goal as I was telling you at the conj is to have a very business logic-y orchard and a dumber middleware layer (no calls to two libs and if-this-then-that). Starting from info for now. If at any point you start not liking this please stop me ok 😃 it will take a bit of time but I think is worth it - wow this message had numerous grammar mistakes

❤️ 1
bozhidar22:12:06

@richiardiandrea Yeah, definitely this is worth it.

bozhidar22:12:48

Looking forward to seeing some of the results!

rickmoynihan22:12:50

FWIW I’m all for the cider-inspector growing some REBL/datafy/nav capabilities; that would be fantastic!! But I think there are still lots of use cases for which a separate sidecar UI makes sense. An obvious thing tools like REBL could easily offer that emacs would struggle a little with are the charting functions and more graphical things. Also REBL and/or an opensource equivalent may grow in capabilities too and evolve faster than one in elisp; simply because it could be a tool used by all clojure IDE’s/editors.

💯 1
bozhidar22:12:01

> An obvious thing tools like REBL could easily offer that emacs would struggle a little with are the charting functions and more graphical things.

bozhidar22:12:48

But you can say the same for REBL - most people simply use charting tools directly to visualize data. 🙂

bozhidar22:12:21

That’s why this charting functionality doesn’t make that much sense to me - yeah, it’s somewhat useful, but it’s not like it’s not available today as well.

lilactown22:12:13

I think the power is in ease. Lack of context switching, not having to manage a lot of dependencies, etc.

rickmoynihan23:12:43

@bozhidar currently yes… but if something like REBL gained traction, or if REBL became extensible in renderers then I think these expectations might change. REBL has a nice, though not unique, idea in it about using specs to dispatch and find available renderers… and Stu mentions things like REBL remembering context and picking the last renderer you used in a given context etc. Having tooling built into the RE(P|B)L/ workflow directly seems to me to be a useful place for these kinds of capabilities to exist…. in particular being able to extend the tool with domain/app specific renderers etc. Obviously REBL is currently crippled by not being opensource or end user extensible which might make my point somewhat moot.

rickmoynihan23:12:15

Ok so I’ve been trying to knock together a basic nREBL middleware that will intercept evals and send the results to REBL… but it seems that you can only intercept requests in nrepl not responses, is that so?

rickmoynihan23:12:38

I can’t intercept the requests because the :code is a string… which I can’t just read and eval because of side effects

rickmoynihan23:12:55

so unless I can intercept the return value I guess I’d need to implement a new message type that would let the client send a specific evaluation directly for viewing in REBL.

lilactown23:12:41

Hmm. Is there something stopping us from just using tap to send data to REBL?

lilactown23:12:59

Not saying an nrepl middleware isn't worthwhile. I'm still trying to figure out what kind of workflow I want

rickmoynihan23:12:22

Yes you can use tap> to send stuff to REBL it was one of the first things I tried last week with REBL… However rebl/inspect is a macro not a function you need to do this: (add-tap #(rebl/inspect %)) which corrupts the display of the expr form a bit in REBL

rickmoynihan23:12:32

but it certainly does work

rickmoynihan23:12:01

not that the expr form is that useful actually

rickmoynihan23:12:33

I was hoping that rebl could listen and capture the complete repl history though; but it seems like it might not be feasible unless we can intercept the results of eval somehow

danielneal10:12:28

did you get any further with this by any chance?

danielneal10:12:31

I'd like to try the same

rickmoynihan10:12:32

A little… In a meeting just now though.

rickmoynihan23:12:24

Adding it as a special op seems to work though… I just need to figure out how to get emacs to send the op… should be pretty easy once I find the right function… I’m guessing it’ll be in nrepl-client.el

rickmoynihan23:12:10

ok looks like it’s nrepl-send-request

rickmoynihan23:12:36

I’d actually quite like to integrate REBL with scope-capture and emacs; so I think perhaps a middleware might be the best way to do that