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
Rowan Barnard 2020-05-28T05:52:36.012Z

Hi everyone, just introducing myself, new to Slack, Clojure and Chlorine. Well not totally new to Clojure, I've dabbled in it a bit before and am just getting more into it now. Been learning the last couple of weeks from Russ Olsen's book Getting Clojure. Now trying to get a Chlorine setup going after seeing Sean Corfield's video of it on Youtube.

Rowan Barnard 2020-05-28T05:59:23.016300Z

Had some problems getting Chlorine up and running, likely due to my lack of experience so would appreciate any help with that. I've made some posts about it on Clojureverse as Clojurenoob and on the Chlorine GitHub issues as SarmBoJim, hope it's not too much of a hassle that I posted stuff there that likely may not be a bug, I'm not very experienced with GitHub either.

Rowan Barnard 2020-05-28T06:00:41.017100Z

Anyway at the moment my main issue is that I cannot connect to a socket REPL with Chlorine

Rowan Barnard 2020-05-28T06:02:32.017800Z

I get this when trying to connect on Windows 10:

Rowan Barnard 2020-05-28T06:04:19.019Z

And my project.clj options for Leiningen are as follows:

Rowan Barnard 2020-05-28T06:05:31.020200Z

Any help would be great thanks, I tried opening the port in Windows Firewall but that hasn't worked either.

Rowan Barnard 2020-05-28T11:14:54.024500Z

OK I just figured it out and oh my Lord, am I a dumb dumb, I totally forgot to add with-profile +socket when I was invoking lein repl so that's why it wasn't connecting, kinda figured it out after I ran netstat and saw there was nothing running with port 5555 after invoking lein repl, thanks very much for suffering a fool guys, sorry for wasting your time 😄😅😅

mauricio.szabo 2020-05-28T13:15:09.026900Z

@flyingpython Hi, sorry for the wait (it's morning only now 😄). Don't worry about posting here, or opening an issue and also posting here. Glad to know it did work, any trouble don't hesitate to send a message. It'll also help a lot if you send any problems you're having with Chlorine, maybe I can add more tools or simplify things to help 🙂

seancorfield 2020-05-28T15:07:32.028700Z

Hey @flyingpython Great to see you here -- and really glad you've figured out the problem! Sorry I'd gone to bed early before you arrived last night (Pacific time). I guess there's still the puzzle about why the nREPL connection was misbehaving, but at least the Socket REPL connection is working now.

mauricio.szabo 2020-05-28T15:20:06.031600Z

@seancorfield I know why - I've posted on the issue. It's simply because the "default implementation" of hadling exceptions is to print then to STDERR, then send back a simplified #error object (even stacktraces are omitted). I remember seeing the problem when I tested on the past, but brushed away because it's not the current focus of Chlorine. Will re-visit the problem later 🙂

seancorfield 2020-05-28T15:26:05.032200Z

Oh cool! I haven't checked my email or GitHub yet this morning -- just made a coffee and got to my desk 🙂

seancorfield 2020-05-28T15:26:55.033200Z

And in this case its just because the Orchard auto-complete stuff isn't on the classpath? Could Chlorine be "nicer" about that, or is that the fault of nREPL?

mauricio.szabo 2020-05-28T15:29:55.034800Z

Yes, Chlorine can be nicer (like, capturing the exception on require for example and not trying to require for envioronments that it does not support like ClojureCLR). That's probably what I'll implement in the future 😄

mauricio.szabo 2020-05-28T15:31:02.036100Z

(but to be honest I don't like the fact that nREPL will print exceptions by default... seems like the wrong thing to do - if I want to beautify exceptions, for example, I can't because it was already printed 😞)

mauricio.szabo 2020-05-28T15:31:25.036600Z

This messes up source-map support that I recently added for ClojureScript, for example...

seancorfield 2020-05-28T15:31:39.037Z

Yeah, there's a lot I don't like about nREPL 😐

mauricio.szabo 2020-05-28T15:35:03.039500Z

I believe that as a protocol, it's quite good to be honest; really simple, stream-based, very similar to what was proposed to prepl, a lot better than UNREPL for example. The problems are some design decisions, the "middleware"-based approach for everything. These are quite confusing and I don't see much value on then

mauricio.szabo 2020-05-28T15:36:21.040300Z

(and the decision to use bencode transport by default, that complicates a little bit when reading strings)

mauricio.szabo 2020-05-28T17:18:05.042900Z

@seancorfield By the way... I think I'll probably revert the decision to use let that automatically resolve promises. It's not playing nice with other functions, unfortunately. I'll probably change it to plet or p/let; in the beginning, it seemed like a good idea but when the codes become more complex, the Promise start to leak to other functions, to threading macros, and so on 😞

seancorfield 2020-05-28T17:26:30.044Z

No problem. I don't mind being on the bleeding edge 🙃 and it did seem a bit "magical"...

Rowan Barnard 2020-05-28T23:01:51.045100Z

OK thanks guys, I'll let you know if I encounter any further issues 😁

Rowan Barnard 2020-06-03T22:42:54.138300Z

I've got REBL, your deps.edn and atom-chlorine-setup files all working now Sean, didn't have any issues, except for not realizing I needed to escape the backslashes in my path to REBL in the deps file, but the error message that clj gave me was enough to figure it out. Scoop seems really cool, should be handy for keeping all my stuff updated. Thank you very much for your videos, and hosting your deps and setup files, now my dev environment seems pretty pro! Just gotta figure out how to use it now ha ha 😂

Rowan Barnard 2020-06-03T22:48:25.138500Z

Your deps.edn is full of goodies, I am just using clj -A:comp:test:rebl-11-win:socket for now though as I saw you use in the video I am guessing this is the baseline for a standard rebl and chlorine socket REPL based workflow. I've got plenty of questions about things but will try to google them first and figure them out myself before I get back to you. Again, thank you very much and I wish you a great day 😉

seancorfield 2020-06-03T22:56:28.139100Z

That's excellent! And don't worry about PM'ing me with questions about any of it -- if I'm busy, I'll just be slow to respond 🙂

Rowan Barnard 2020-06-03T22:58:20.139300Z

OK thanks Sean, I need to get all the questions sorted out in my own mind first though as well, learning new stuff just leads to a whole heap of new questions swirling round in one's head 😁

seancorfield 2020-06-03T22:58:21.139500Z

FYI, I no longer both with :comp since Chlorine can do its own auto-complete now and it's one less dependency in my running project. But I tend to add :deps instead so that I can dynamically add new dependencies without starting the REPL 🙂 I don't do that very often but it can be useful.

Rowan Barnard 2020-06-03T22:58:53.139700Z

Ah OK cool thanks 🙂

seancorfield 2020-05-28T23:03:13.045200Z

Feel free to DM me if you have any Qs about what's in my videos, or REBL in general if you're using that.

seancorfield 2020-05-28T23:03:30.045400Z

Also "good morning" and "cool snake" -- where are you based?

Rowan Barnard 2020-05-28T23:04:24.045600Z

Ok thanks, I'll be looking at getting REBL working with it next probably

Rowan Barnard 2020-05-28T23:05:18.045800Z

Good morning to you too, am based in New Zealand, the snake was from when I lived in Cambodia about 5 years ago

Rowan Barnard 2020-05-28T23:06:35.046Z

I'd been fascinated by snakes since I was a kid but there aren't any in NZ so I was so happy to get to touch one that day, that is my happy picture I guess 😄

seancorfield 2020-05-28T23:13:33.046200Z

Cool. I love snakes but my partner is absolutely terrified of them 😞 We were supposed to be visiting NZ in August but, coronavirus, so that's not happening 😞

seancorfield 2020-05-28T23:13:55.046400Z

Def. ping me if you need help with REBL (esp. on Windows! 🙂 )

Rowan Barnard 2020-05-28T23:15:20.046600Z

Ha yeah coronavirus, can't wait till can travel again 😄

Rowan Barnard 2020-05-28T23:15:34.046800Z

Yeah will ping if I need help

Rowan Barnard 2020-05-28T23:16:10.047Z

I'd read on Google somewhere that REBL wasn't working on Windows but I think it may've been an old post

seancorfield 2020-05-28T23:18:51.047200Z

Oh, I use Atom + Chlorine + REBL all the time on Windows, via Powershell (but I don't use Leiningen).

Rowan Barnard 2020-05-28T23:19:14.047400Z

Ah OK cool, confirmation it works 😄

seancorfield 2020-05-28T23:19:38.047600Z

Although that won't matter if you're using my atom-chlorine-setup files -- since those don't care about Leiningen etc.

Rowan Barnard 2020-05-28T23:20:25.047800Z

OK - I would need to learn CLJ though? That is what you are using to build in place of Leiningen?

seancorfield 2020-05-28T23:21:05.048Z

I use the Clojure CLI / deps.edn on Windows via the Scoop installer -- and my "dot clojure" repo has aliases to start a Socket REPL Server and to start REBL on Windows.

seancorfield 2020-05-28T23:21:44.048200Z

I just can't remember how to tell Leiningen about a third-party JAR that lives on your local filesystem (which is what REBL is).

seancorfield 2020-05-28T23:22:02.048400Z

(I haven't used Leiningen for years)

Rowan Barnard 2020-05-28T23:22:21.048600Z

OK I will need to look into those things or look into leiningen more

Rowan Barnard 2020-05-28T23:22:35.048800Z

I'll have a look later today

Rowan Barnard 2020-05-28T23:24:21.049Z

Again thanks for the help and have a great day Sean 😉