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
jamieorc 2020-03-21T20:32:58.157200Z

I’ve got chlorine up and running, but when I use it w/ REBL, having issues: • I get connected to the repl and inline results show up fine • but nothing is output to the Chlorine window (it works when not using REBL, though without an input area) • I can work in the repl and it communicates with REBL properly • So, it’s like half the communication is working I’ve followed Sean Corfield’s examples so far. Any help or ideas welcome!

jamieorc 2020-03-21T20:36:45.158Z

Starting with clj -A:socket:rebl-11 using clojure 1.10.1 jdk 11.0.6-zulu

jamieorc 2020-03-21T20:44:17.158700Z

I restarted Atom and am now seeing output properly in Chlorine’s pane, but no love with REBL

seancorfield 2020-03-21T20:45:27.159700Z

@jamieorc The commands that submit values to the REBL are different from Chlorine's normal eval commands.

seancorfield 2020-03-21T20:46:13.160100Z

It's probably easier if you use my setup: https://github.com/seancorfield/atom-chlorine-setup

seancorfield 2020-03-21T20:46:35.160700Z

That defines additional REBL commands, as well as a full set of key bindings.

seancorfield 2020-03-21T20:49:50.162Z

You'll see that the keymap in my setup binds ctrl-; b to inspect-block instead of eval-block. It's the inspect variants that interface with REBL.

jamieorc 2020-03-21T20:51:51.162900Z

@seancorfield Thanks, I’ll have a look. I had noticed your chlorine setup the other day when I was glancing around, but forgot about that when I set up REBL today.

jamieorc 2020-03-21T20:53:19.163900Z

@seancorfield how do you plop init-coffee into Atom?

seancorfield 2020-03-21T20:53:53.164200Z

Those files in my repo would go in your ~/.atom folder

seancorfield 2020-03-21T20:54:13.164600Z

(well, back up your own ones first 🙂 )

jamieorc 2020-03-21T20:54:37.165Z

🙂

jamieorc 2020-03-21T20:55:18.165500Z

init-script was what I forgot about

seancorfield 2020-03-21T20:59:53.165800Z

REBL working for you now with Chlorine?

jamieorc 2020-03-21T21:08:40.166Z

not quite done

jamieorc 2020-03-21T21:09:33.166600Z

I’m putting in manually b/c my keybindings are totally other from yours and Mauricio’s

jamieorc 2020-03-21T21:24:31.168100Z

@seancorfield Got it! Thanks for your help. Is there any difference between "chlorine:inspect-block" and "sean:inspect-block"` ? AFAICT they do the same thing.

seancorfield 2020-03-21T21:25:17.168800Z

I can't remember if the code is identical. I wanted more REBL functionality so I decided to maintain it entirely outside Chlorine.

seancorfield 2020-03-21T21:27:00.170600Z

One caveat to be aware of, that I haven't addressed yet, is that you can't use the inspect-* commands on Clojure 1.9 or earlier (although you can use them without REBL on the classpath -- they just act like basic eval-* commands.

seancorfield 2020-03-21T21:27:51.171200Z

(I work entirely on the very latest Clojure version so I just don't run into this)

jamieorc 2020-03-21T21:32:24.172100Z

great. Do the inspect commands work like the eval commands when not using REBL?

seancorfield 2020-03-21T21:32:26.172200Z

Just compared the source of Chlorine to my init.coffee and, right now, they are functionality identical.

seancorfield 2020-03-21T21:32:35.172500Z

Yes, if you're on Clojure 1.10

jamieorc 2020-03-21T21:32:37.172800Z

oh, great.

jamieorc 2020-03-21T21:32:50.173300Z

wonderful! Thanks so much for your help.

seancorfield 2020-03-21T21:33:16.173800Z

The wrap in REBL stuff just evaluates the selected code as usual if no REBL is available.

jamieorc 2020-03-21T21:33:48.174500Z

Where did you find the Chlorine code in it’s source? I was looking and hadn’t found it yet

seancorfield 2020-03-21T21:34:15.175Z

I often have my editor connected to a Socket REPL on a remote server (so, no REBL), and I still use the inspect-* commands.

seancorfield 2020-03-21T21:34:55.176Z

@jamieorc The Chlorine repo is linked from the Atom package https://github.com/mauricioszabo/atom-chlorine

seancorfield 2020-03-21T21:35:11.176600Z

But a lot of the underlying stuff is in the repl-tooling repo.

mauricio.szabo 2020-03-21T21:35:11.176700Z

@jamieorc Chlorine is written in ClojureScript, so the code that Atom interprets is a compiled JS version. You can see the code on Github

seancorfield 2020-03-21T21:35:30.177400Z

https://github.com/mauricioszabo/repl-tooling

jamieorc 2020-03-21T21:35:55.178300Z

yeah, I was looking there. Then I searched for “inspect-block” and found it.

mauricio.szabo 2020-03-21T21:36:22.179Z

To be more precise, if you want to see what's the exact code for your version, see the tag that is suffixed -source - that's the original code for that version 🙂

jamieorc 2020-03-21T21:36:23.179100Z

Thanks again for your time.

jamieorc 2020-03-21T21:36:28.179300Z

OK

jamieorc 2020-03-21T21:39:39.179800Z

Oh, hey @mauricio.szabo I didn’t realize you had jumped in. Thanks for your help, too

jamieorc 2020-03-21T21:40:04.180400Z

Both of you guys have done a lot of outstanding work. Cheers

mauricio.szabo 2020-03-21T21:42:28.181100Z

Thanks! Any problems, ideas, etc just message here 🙂