rewrite-clj

https://github.com/clj-commons/rewrite-clj
lread 2019-09-04T20:10:46.029400Z

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

lread 2019-09-04T20:13:26.031800Z

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.

lread 2019-09-04T20:20:43.033700Z

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.

2019-09-04T22:46:55.041800Z

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

lread 2019-09-05T10:00:47.047200Z

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.

lread 2019-09-05T10:05:07.050900Z

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.

lread 2019-09-05T10:06:23.051600Z

Thanks for this discussion BTW, very interesting!

2019-09-05T10:11:50.051800Z

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?

2019-09-05T10:16:58.052400Z

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)

2019-09-05T10:19:21.052600Z

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.

2019-09-05T10:22:34.052800Z

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...

lread 2019-09-05T10:30:28.053800Z

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

lread 2019-09-05T10:32:04.054500Z

There was a time it was not implemented for cljs.

2019-09-05T10:44:03.054700Z

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

2019-09-05T11:43:27.054900Z

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

lread 2019-09-05T12:30:14.056500Z

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