chlorine-clover

About Chlorine for Atom and Clover for VS Code: https://atom.io/packages/chlorine and https://marketplace.visualstudio.com/items?itemName=mauricioszabo.clover
mauricio.szabo 2019-05-29T16:30:35.015200Z

I've just published Chlorine v0.1.7 (please notice the jump from 0.1.6 - I've just discovered that if I unpublished a package, I can't use the same version again) I've tested this release on a MacOSX that had the bug, and seems that it works fine!

šŸŽ‰ 2
mauricio.szabo 2019-05-29T16:32:25.017100Z

@lilactown the mac I've tested is 10.13, and yours is more recent. I hope it works, if it does, please reply here ok, so I'm sure the problem was fixed? Also, thanks for the report and the patience. I'll probably blog about this issue too, it seems kinda cryptic to not talk about šŸ™‚

lilactown 2019-05-29T16:35:21.018400Z

no worries :D Iā€™m an Emacs user by day but was helping a new coworker get started with Clojure. he promptly went on vacation so no one was blocked! hahahaha

lilactown 2019-05-29T16:40:17.018800Z

I can successfully connect to a socket REPL and evaluate a selected form from a file!

lilactown 2019-05-29T16:40:47.019300Z

quick question for a noob: is there a way for me to execute a form by typing in the REPL itself? I currently can't seem to do that

seancorfield 2019-05-29T16:54:34.020200Z

(another reason I like Chlorine: you can't type into the REPL! Put scratch code in a (comment ...) and eval it from there)

seancorfield 2019-05-29T16:54:43.020500Z

Rich Comment Forms šŸ™‚

seancorfield 2019-05-29T16:55:38.021700Z

Stu pretty much called typed directly into the REPL an antipattern in one of his REPL-Driven Development talks.

lilactown 2019-05-29T16:55:45.021900Z

ah OK. it was a bit surprising that I could type into the REPL but not evaluate

lilactown 2019-05-29T16:56:10.022700Z

I mainly work in an Emacs buffer with comments like you said, but when I'm teaching it can help to level set

seancorfield 2019-05-29T16:56:29.023500Z

I think maybe Atom just doesn't stop you from typing into the Console pane?

lilactown 2019-05-29T16:57:05.024600Z

since most people are used to typing into a terminal window / buffer and evaluating things (JS, shell, etc.), so you can show that you're connected. then move on to showing how to evaluate forms inline

seancorfield 2019-05-29T16:57:45.025300Z

I think teaching people to eval from a file -- either actual source code or (comment ...) forms -- is probably better from the get-go. I.E., undoing their former "bad practice" and showing them just how different the Clojure REPL experience is/can be?

seancorfield 2019-05-29T16:59:21.026700Z

I think it takes a lot for people to stop typing into the REPL if that's how they started out... That said, if I want to just quickly try something outside of any project, I just fire up clj in Terminal or PowerShell and type into it...

mauricio.szabo 2019-05-29T18:11:46.028100Z

I think there may be a way to avoid typing in the Console pane. In fact, there's really no deeper reason why you can't evaluate things by typing on the REPL itself other than "I didn't implement it yet"

mauricio.szabo 2019-05-29T18:12:05.028600Z

Never imagined that this "bug" would be a feature šŸ˜†

mauricio.szabo 2019-05-29T18:13:45.030100Z

Also, great that it worked! As I have no Mac to test the release builds, I could never imagine that the behaviour of Atom would be so... strange distinct šŸ™‚

seancorfield 2019-05-29T19:04:26.031800Z

This will be a tricky merge from master for me so I won't be testing it until next week (my develop branch has a bunch of changes that will conflict). I need to decide whether to just blow away my changes at this point... but first I need to remind myself exactly what those changes are šŸ™‚

seancorfield 2019-05-29T19:05:19.032800Z

I added inspect-selection and eval-and-insert-as-comment. Maybe other commands. I don't use either of those very much tho'...

mauricio.szabo 2019-05-29T20:04:12.034200Z

So just to summarize what I did: I moved activate away from core.cljs, and transformed it on a simple map that maps keys to functions. Then, I just expose it to JS side and add then normally.

mauricio.szabo 2019-05-29T20:04:50.035100Z

Also, I'm testing a better way to add custom commands. Will add a documentation for it too, so maybe these local changes could be simplified šŸ™‚

seancorfield 2019-05-29T20:14:12.037300Z

From my p.o.v. the two hooks I'd like to tie into are 1) the ability to wrap source code prior to evaluation (that's how the inspect variants of eval work) and 2) the ability to provide a custom result handler (print via ink, print to console, alert popup, insert code -- that's how my insert-as-comment variants work).

seancorfield 2019-05-29T20:15:11.038400Z

Of course, I'd want to be able to write those in ClojureScript rather than JS so I don't know how that could be done -- providing JS files to be loaded would be much easier from your p.o.v. šŸ™‚

mauricio.szabo 2019-05-29T21:46:02.039500Z

Yes, currently it needs to be done on JS. For example, this is the hook I have on my init script to pretty-print prismatic schemas on the editor.

mauricio.szabo 2019-05-29T21:46:40.040300Z

I think to be able to write on CLJS we could use the "bootstrap" target that shadow-cljs now supports šŸ™‚

seancorfield 2019-05-29T21:53:06.042Z

That's actually not too bad... I might try just installing 0.1.7 and then putting my inspect selection command in that way, as an experiment. I'd certainly rather run with the "stock" Chlorine so it's easier for me to customize across all my machines...

seancorfield 2019-05-29T21:53:18.042400Z

protoRepl.EditorUtils?

mauricio.szabo 2019-05-29T22:37:51.043800Z

Ahh, I still have proto-repl installed, it seems! Just edited the snippet, it's just a simple helper (I'll also edit my own init script too)

mauricio.szabo 2019-05-29T22:39:04.044800Z

Also, you don't need to instal 0.1.7, I think I've added this feature on 0.1.4 or something and not changed since. At the beginning was just to debug some errors but I found it really useful so I left it there šŸ™‚