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
jlmr 2020-01-03T16:13:21.008300Z

Hi fellow Atom/Chlorine users! Does anyone know of a way to replicate the functionality described here: https://lambdaisland.com/blog/2019-12-20-advent-of-parens-20-life-hacks-emacs-ginger-tea in Atom?

2020-01-03T16:59:14.009900Z

it might help people understand better if you provided your own description of the desired functionality.

2020-01-03T17:00:01.010600Z

e.g. emacs has registers, but does chlorine?

2020-01-03T17:02:28.013700Z

it's not immediately obvious to me what analogous functionality would be in chlorine :)

jlmr 2020-01-03T20:28:33.018800Z

@sogaiu might be that the functionality should not be in chlorine, but in some other Atom plugin, or in Atom itself. I guess I just hoped to find Atom users in this channel 🙂. But to answer your question: I’m not sure if Atom has registers, but I haven’t found any so far. My use case is very similar to the one described in the blog I mentioned above. I’m iterating on some code and to test if it works the way I want to I have run some code which resides in another file. Jumping back and forth between two files is somewhat annoying, it would be great if I could dynamically asign some clojure code to “a register” or something similar in Atom, which could then be eval’d by Chlorine when I press some shortcut. Does this make it clearer?

seancorfield 2020-01-03T20:49:23.020100Z

@jlmr What I do in such situations is add a (comment ,,,) form in the source file I'm iterating on and inside that I require the other code and add forms to run it. That way I can stay in one file and just eval blocks of code as needed.

seancorfield 2020-01-03T20:50:09.021Z

That's called a "Rich Comment Form" by some -- because Rich Hickey uses comment forms like that, and Stu Halloway has talked about it in podcasts and/or at conferences.

seancorfield 2020-01-03T20:50:38.021700Z

(I started doing it ages ago and was very pleased to hear Stu talk about it and give it a name! 🙂 )

seancorfield 2020-01-03T20:52:33.023500Z

You can do the same to run tests in other files from within a (comment ,,,) in a source file; you can do all your setup/teardown for the environment that way too (we rely heavily on Component and have numerous comments in source files that have the necessary requires, component builds, and calls to component/start, in order to make this a smooth process).

2020-01-03T22:00:23.023700Z

yes, much clearer, thanks 🙂

2020-01-03T22:03:47.023900Z

i don't know if there is something like registers in atom or any of its extensions. may be seancorfield's idea is a possible alternative approach?

2020-01-03T22:04:46.024100Z

on a side note, there is a #atom as well -- though i don't know if you'll have more luck there.