Fork me on GitHub
#rewrite-clj
<
2019-09-04
>
lread20:09:46

@sogaiu, I took a little time to run REBL against my rewrite-cljc work. It took me longer than it should have to realize that REBL uses rewrite-clj indirectly through cljfmt. After excluding rewrite-clj appropriately, I got things running.

lread20:09:26

The wiki link you shared helped me to connect to REBL via emacs, but it does not seem like I have full integration there, so I’m toying around in REBL running solo. Not ideal, but it does give me a feeling of how the tool works.

lread20:09:43

Which leads me to my next task. Learn how REBL works! simple_smile Until I do, I won’t get a full understanding what turning off make-printable! gives us in REBL. I am flitting about on other projects but will come back to this.

sogaiu22:09:55

@lee thanks for the update! you mentioned "full integration" and "running solo" -- would you mind elaborating on what you mean there? regarding turning off make-printable! -- ah, i wasn't succeeding in viewing via punk, but it appears rebl has some tricks up its sleeves -- possibly because it has direct access to the values it is working with. very interesting. thanks for your comments on this. punk's design is such that it doesn't get direct access to the values where its ui lives -- roughly, it only get representations of them over the network. so to restate the issue i'm seeing, i think it is that, what is gained from being able to turn off make-printable! is one gets a programmatically manipulable representation that can be transferred to another clojure-ish process which can still manipulate it usefully (one example of which is a portion of punk). would you say it is an appropriate understanding that make-printable! generates a result that is for human consumption, and not particularly friendly for programmatic consumption?

lread10:09:47

Thanks @sogaiu, I watched Sean’s video on using REBL with Atom and was expecting a similar experience in emacs but did not get there yet. I will take another pass at the video and then emacs before muddying our conversation with vagueries. simple_smile By running solo, I mean just launching REBL alone without attempting editor integration.

lread10:09:07

Yes, that is my understanding of make-printable! too. I expect it was added to make nodes print in a format easier to read by developers while debugging/exploring.

lread10:09:23

Thanks for this discussion BTW, very interesting!

sogaiu10:09:50

ahhh, i understand better now, thanks for clarifying. so i think what you are saying is that it would be nice for (some?) evaluation actions triggered from the editor to yield results in rebl, right? in atom's chlorine this is done via some commands that seancorfield wrote: https://github.com/mauricioszabo/atom-chlorine/blob/master/src/chlorine/repl.cljs#L253-L275 (inspect-top-block! and inspect-block!). now that i know what to look for... i don't know how well the following works, but there is: https://github.com/RickMoynihan/nrebl.middleware -- billed as: "The start of an nREPL middleware that will spy on an nREPL connection and capture the results of evaluation for browsing in REBL." may be you had come across that already?

sogaiu10:09:58

what i didn't realize with rebl until you commented about what turning off make-printable! would gain anyone, is that rebl appears to use the printable representation of something to display in the rebl (so make-printable! can make things nice here depending on your perspective)

sogaiu10:09:21

that approach is unfortunately not yet available to punk -- punk only currently deals with what can be "read" via what comes in over the network. right now, there is no extra info being sent regarding how something should look -- only edn-ish representational info having to do with the value. if "read-string" can't handle it, punk's ui can't work with it.

sogaiu10:09:34

i thought that months ago i had seen non-make-printable!-ish representation of rewrite-clj's nodes in my repl, but i don't recall how i got them. i don't suppose you have any ideas how that might be achieved...

lread10:09:28

Nothing coming to mind on non-make-printable!-ish at the moment, sorry.

lread10:09:04

There was a time it was not implemented for cljs.

sogaiu10:09:03

thanks! i've almost entirely only used rewrite-clj. ah, btw, it may be that the atom chlorine plugin will be using rewrite-cljs 🙂

sogaiu11:09:27

he he -- sorry for asking you about make-printable! repeatedly. getting old i guess 🙂

lread12:09:14

nah, it is totally fine, and an interesting thing to discuss, I always learn something from our chats!