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
seancorfield 2019-08-08T00:30:47.075400Z

Unravel does it but I think it's still considered an experimental feature.

seancorfield 2019-08-08T00:31:26.076200Z

(And I think it needs the compliment JAR locally for that)

Ahmed Hassan 2019-08-08T02:43:45.077600Z

Thanks a lot. Last question, how I can add compliment as dependency to dev process in chlorine?

seancorfield 2019-08-08T02:59:27.078100Z

It's just a library. You add it to your project the same way you add any other dependency.

seancorfield 2019-08-08T03:00:42.078800Z

If you're using a variant of my dot-clojure deps.edn file https://github.com/seancorfield/dot-clojure/blob/master/deps.edn#L71-L72 it has an alias for compliment @ahmed1hsn

✔️ 1
Ahmed Hassan 2019-08-08T05:53:10.079400Z

Does compliment works for clojurescript or only clojure?

seancorfield 2019-08-08T05:55:03.079700Z

No idea. I don't do anything with cljs.

👍 1
2019-08-08T06:05:46.080200Z

re: cljs support in compliment -- perhaps this is relevant: https://github.com/alexander-yakushev/compliment/issues/42

Ahmed Hassan 2019-08-08T06:30:04.081500Z

What is difference between inspect-block/`inspect-top-block` and evaluate-block/`evaluate-top-block`?

seancorfield 2019-08-08T15:40:45.088800Z

@ahmed1hsn the inspect functions submit the code / value to REBL, the evaluate functions do not.

👍 1
2019-08-08T06:45:23.081900Z

iiuc, one is for using rebl, while the other doesn't use rebl

2019-08-08T06:46:59.082200Z

the following can show the details: https://github.com/mauricioszabo/atom-chlorine/blob/master/src/chlorine/repl.cljs

Ahmed Hassan 2019-08-08T06:47:29.082700Z

Thanks, I'll have a look.

mauricio.szabo 2019-08-08T11:34:23.083100Z

Compliment does not currently supports ClojureScript

mauricio.szabo 2019-08-08T11:35:11.084500Z

On Chlorine, there's some kind of autocomplete for ClojureScript, where we inspect the goog.global variables and demunge then to ClojureScript equivalent

mauricio.szabo 2019-08-08T11:35:42.085400Z

It works, but sometimes it can't autocomplete some core functions, and also there's no support for macros.

mauricio.szabo 2019-08-08T11:37:02.087600Z

It's on the list to add full autocomplete with clojurescript (there are already some libraries that inspect the itnernal state of cljs compiler to provide it - I just couldn't make it work with Shadow some months ago)

2019-08-08T15:45:39.092100Z

Hey all, please forgive or ignore a newbie. I find the main chlorine page to be written in a way that requires more understanding than I have. Is there an even simpler guide somewhere? (Fwiw running Emacs with Cider I found trivial...)

2019-08-08T15:56:47.093600Z

I wasn’t very clear above - I mean getting going with a repl. The “usage”, section, basically. How to start and connect to a repl. ☺️

seancorfield 2019-08-08T16:27:30.094400Z

@mattias504 A couple of Qs so I can try to guide you: what tooling are you using? Lein/Boot/clj Do you know how to start a Socket REPL in a process?

mauricio.szabo 2019-08-08T16:31:22.096300Z

@mattias504 also, when you're able to connect, please tell me what you found confusing so I can update the Readme (or open a pull request too :))

2019-08-08T17:53:31.098600Z

Oh, hey, thanks! I’ll be happy to help in any way. So, I have Atom installed with Ink and Chlorine. So far only used Lein, but wouldn’t mind other tools if it’s easier. Want to learn them at some point anyway.

mauricio.szabo 2019-08-08T17:56:40.101500Z

Ok, for Chlorine to work you need to start a repl with lein. On the Readme is the exact command that you should run:

JVM_OPTS='-Dclojure.server.myrepl={:port,5555,:accept,clojure.core.server/repl

mauricio.szabo 2019-08-08T17:56:57.102100Z

Are you on Linux, Mac, or Windows?

2019-08-08T18:20:10.102400Z

As for socket Repl process, I don’t think so. I haven’t studied how Cider manages, so I’m assuming it handles some magic behind the scenes. On a Mac.

2019-08-08T18:20:29.103100Z

Sorry about being slow, time to put my kids to bed here... 😅

mauricio.szabo 2019-08-08T18:21:17.104100Z

I think cider starts a repl in background. Chlorine expects you to be running you repl on a terminal

2019-08-08T18:28:03.107500Z

Well, now I know it’s not complicated, at least! Thanks. Getting a “REPLs disconnected” message when I try to connect. Are there JVM dependencies? Right now trying out the OpenJ9 variant of JDK 12...

mauricio.szabo 2019-08-08T18:30:13.110700Z

No, there are no other dependencies. I'm also using the OpenJ9 variant, so it shouldn't be a problem. Os the port correct? Can you check if port 5555 is really open, maybe with telnet or nmap?

2019-08-08T18:36:59.112200Z

Well, Lein outputs the port as 56106, but neither work. That is strange, though, as I used your exact line for the JVM-OPTS.

mauricio.szabo 2019-08-08T18:37:16.112500Z

Try to connect on 5555

mauricio.szabo 2019-08-08T18:37:33.113100Z

Lein is reporting the nrepl port, Chlorine works with a socket repl

mauricio.szabo 2019-08-08T18:39:21.114400Z

Or try to run: JVM_OPTS='-Dclojure.server.myrepl={:port,4444,:accept,clojure.core.server/repl}' lein repl And connect to port 4444

seancorfield 2019-08-08T18:59:26.115Z

lein starts nREPL (on the 50K+ port. You need to start a Socket REPL for Chlorine.

mauricio.szabo 2019-08-08T19:00:24.116700Z

I think I'll add this information on the Readme. People seem confused with this sometimes...

2019-08-08T19:00:32.117100Z

😄

seancorfield 2019-08-08T19:00:33.117300Z

In my ~/.lein/profiles.clj file, I have

:socket {:jvm-opts ["-Dclojure.server.lein={:port 55555 :accept clojure.core.server/repl}"]}
and then I use lein with-profile +socket repl to start a Socket REPL on port 55555.

seancorfield 2019-08-08T19:01:21.118800Z

The JVM options (as shown by Mauricio above) works on Mac/Linux -- but not on Windows.

seancorfield 2019-08-08T19:01:48.119700Z

(but I use clj instead of lein for almost all projects these days)

2019-08-08T19:02:14.120500Z

Thanks for the patience and the help. A few minutes before I get to my computer, but I’ll manage. But I agree, for the onboarding a short primer on the different REPL-related terms might be handy.

2019-08-08T19:02:48.121200Z

Clj as in just using Clojure?

seancorfield 2019-08-08T19:03:02.121600Z

@mauricio.szabo Are you using clj or lein or something else?

seancorfield 2019-08-08T19:03:18.122Z

clj as in the CLI / deps.edn tooling that Cognitect released.

seancorfield 2019-08-08T19:03:54.122600Z

See https://clojure.org/guides/getting_started

2019-08-08T19:05:04.124400Z

Cool. I mix them up, but a recent podcast went through the different tools. Was a nice overview and made me decide to look into them soon.

seancorfield 2019-08-08T19:08:07.126900Z

At work, we started on Leiningen back in 2011 because that's all there was. We switched completely to Boot in 2015, then switched completely to clj / deps.edn a while back (maybe last year? I'd have to consult our git history...).

2019-08-08T19:08:18.127200Z

@seancorfield hmm, that lein/profiles.clj, is that for Lein or deps.edn or both?

seancorfield 2019-08-08T19:08:34.127600Z

~/.lein/profiles.clj is for Leiningen.

2019-08-08T19:08:46.127900Z

Makes sense 😋

seancorfield 2019-08-08T19:09:11.129Z

For my clj projects, I use https://github.com/seancorfield/dot-clojure as my ~/.clojure/deps.edn file.

2019-08-08T19:09:51.130300Z

Oh, btw, weren’t you interviewed in a podcast recently? Hope I’m getting it right, that was all very informative a fun listen!

2019-08-08T19:10:22.131100Z

Thanks, I’ll do some experimenting in a while.

seancorfield 2019-08-08T19:10:26.131200Z

Yeah, I was on defn...

seancorfield 2019-08-08T19:10:54.132Z

I'm going to be on Jacek Schae's podcast at some point ("Season 2" is being recorded, and it's all about tooling).

seancorfield 2019-08-08T19:11:28.132600Z

I'll also need to carve out more time to do some more screencasts of clj / deps.edn and Atom/Chlorine and REBL...

2019-08-08T19:11:58.133Z

😅

seancorfield 2019-08-08T19:12:00.133100Z

https://www.youtube.com/channel/UC8GD-smsEvNyRd3EZ8oeSrA?view_as=subscriber (three "episodes" so far)

seancorfield 2019-08-08T19:12:47.134900Z

I'm planning to do one using tools.deps add-lib branch so I can show how to interactively build a small web app starting from an empty deps.edn file and dynamically adding all the libraries I need via the REPL...

2019-08-08T19:13:08.135600Z

Oh, very cool. I could have watched the Chlorine one and not bothered everyone. Thanks for the link!

2019-08-08T19:14:22.137400Z

And that last bit sounds suspiciously like what I’m doing while learning Clojure. I’ll be there on release day 🙂

seancorfield 2019-08-08T19:15:15.138200Z

I think add-lib is one of those real gems for interactive development but because it's on a branch, rather than master, it's not getting anywhere near as much exposure as it deserves.

seancorfield 2019-08-08T19:16:24.139100Z

Combined with tools.gitlibs, you can even use it to dynamically add the "master" version of any GitHub repo as a dependency in your project!

2019-08-08T19:19:43.142500Z

Wow. Have to admit, after a life in the regular compile/run/try-to-test world, just a few fumbling tries with Clj in a repl feels freer and more expressive and just a lot more fun. Crazy.

seancorfield 2019-08-08T19:21:49.143Z

I like to think of it like this: Leiningen is "easy", clj is "simple". 🙂

😄 1
2019-08-08T21:14:31.146100Z

For closure - between my phone and computer and copying strings and typing, I had managed to mess up both a ‘ and a }. Life as a programmer... all is well, see you all later in Atom REPL land 😁

🎉 2
mauricio.szabo 2019-08-08T23:06:08.147100Z

@seancorfield I use lein most of the time, shadow-cljs when I need ClojureScript but not clojure

mauricio.szabo 2019-08-08T23:08:37.147700Z

Also, I'll appear too on Jacek's podcast, probably by the end of september.

1