Fork me on GitHub
#chlorine
<
2020-03-21
>
jamieorc20:03:58

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!

jamieorc20:03:45

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

jamieorc20:03:17

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

seancorfield20:03:27

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

seancorfield20:03:35

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

seancorfield20:03:50

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.

jamieorc20:03:51

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

jamieorc20:03:19

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

seancorfield20:03:53

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

seancorfield20:03:13

(well, back up your own ones first 🙂 )

jamieorc20:03:18

init-script was what I forgot about

seancorfield20:03:53

REBL working for you now with Chlorine?

jamieorc21:03:40

not quite done

jamieorc21:03:33

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

jamieorc21:03:31

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

seancorfield21:03:17

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

seancorfield21:03:00

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.

seancorfield21:03:51

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

jamieorc21:03:24

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

seancorfield21:03:26

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

seancorfield21:03:35

Yes, if you're on Clojure 1.10

jamieorc21:03:50

wonderful! Thanks so much for your help.

seancorfield21:03:16

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

jamieorc21:03:48

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

seancorfield21:03:15

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

seancorfield21:03:55

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

seancorfield21:03:11

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

mauricio.szabo21:03:11

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

jamieorc21:03:55

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

mauricio.szabo21:03:22

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 🙂

jamieorc21:03:23

Thanks again for your time.

jamieorc21:03:39

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

jamieorc21:03:04

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

mauricio.szabo21:03:28

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