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
fabrao 2020-07-06T19:45:34.240700Z

Hello all, anyone tried to use Chlorine with remote REPL?

seancorfield 2020-07-06T20:07:38.241200Z

@fabrao Yup. I use Chlorine all the time with remote Socket REPLs. What's the question?

fabrao 2020-07-06T20:11:44.241800Z

How do you evaluate functions from source code?

seancorfield 2020-07-06T20:13:36.242500Z

Evaluate top-level form. Which is ctrl-; B in my keymap.

seancorfield 2020-07-06T20:13:47.242800Z

Same as working with a local REPL.

fabrao 2020-07-06T20:15:21.244300Z

I tried to load the source code from other path, but it seems that has some difference

seancorfield 2020-07-06T20:16:09.245100Z

Yeah, because load file operates inside the REPL process and will try to load the requested path (sent from your editor) using the local-to-the-REPL file system.

seancorfield 2020-07-06T20:16:46.245700Z

So if your source code isn't on the remote system or isn't in the exact same location, load file cannot possibly work.

seancorfield 2020-07-06T20:18:11.247400Z

If you're working on Windows with WSL, Chlorine's load file command can detect a REPL started on Linux (as opposed to Windows) and will try to use /mnt/<drive>/path/to/the.clj instead of <drive>:\path\to\the.clj so that it works across a Windows/WSL boundary -- but that won't help if your REPL is running in a container or on another machine.

seancorfield 2020-07-06T20:19:09.248100Z

(unless of course you can mount your Windows filesystem as a networked system on the container/server 🙂 )

fabrao 2020-07-06T23:05:34.248700Z

So, the remote source code must be in the same path as the editor?

seancorfield 2020-07-06T23:10:36.249500Z

For "Load File" yes, since that is not evaluating code from the editor to the REPL. Instead, it is telling the (remote) REPL to load a file from the filesystem.

seancorfield 2020-07-06T23:11:00.249800Z

Which is why I said: > So if your source code isn't on the remote system or isn't in the exact same location, load file cannot possibly work.

seancorfield 2020-07-06T23:11:59.250900Z

But you can eval block, eval top-level block. Even eval selection. So in theory you could do <select all> <evaluate selection> and it should send all of the forms in your source file over to the REPL for evaluation.

seancorfield 2020-07-06T23:37:56.254400Z

Confirmed that <select all> <evaluate selection> will work with the regular Chlorine evaluate selection command -- but won't work with my extended eval-and-send-to-rebl logic because I don't wrap the selection in a (do ...)

seancorfield 2020-07-06T23:38:15.254900Z

@fabrao Does that answer your question and provide a workaround?

fabrao 2020-07-06T23:50:56.255200Z

@seancorfield Yes, I understand now

1