Fork me on GitHub
#chlorine-clover
<
2020-05-28
>
Rowan Barnard05:05:36

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 Barnard05:05:23

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 Barnard06:05:41

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

Rowan Barnard06:05:32

I get this when trying to connect on Windows 10:

Rowan Barnard06:05:19

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

Rowan Barnard06:05:31

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

Rowan Barnard11:05:54

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.szabo13:05:09

@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 ๐Ÿ™‚

seancorfield15:05:32

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.szabo15:05:06

@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 ๐Ÿ™‚

seancorfield15:05:05

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

seancorfield15:05:55

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.szabo15:05:55

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.szabo15:05:02

(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.szabo15:05:25

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

seancorfield15:05:39

Yeah, there's a lot I don't like about nREPL ๐Ÿ˜

mauricio.szabo15:05:03

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.szabo15:05:21

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

mauricio.szabo17:05:05

@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 ๐Ÿ˜ž

seancorfield17:05:30

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

Rowan Barnard23:05:51

OK thanks guys, I'll let you know if I encounter any further issues ๐Ÿ˜

seancorfield23:05:13

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.

seancorfield23:05:30

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

Rowan Barnard23:05:24

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

Rowan Barnard23:05:18

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

Rowan Barnard23:05:35

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 ๐Ÿ˜„

seancorfield23:05:33

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 ๐Ÿ˜ž

seancorfield23:05:55

Def. ping me if you need help with REBL (esp. on Windows! ๐Ÿ™‚ )

Rowan Barnard23:05:20

Ha yeah coronavirus, can't wait till can travel again ๐Ÿ˜„

Rowan Barnard23:05:34

Yeah will ping if I need help

Rowan Barnard23:05:10

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

seancorfield23:05:51

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

Rowan Barnard23:05:14

Ah OK cool, confirmation it works ๐Ÿ˜„

seancorfield23:05:38

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

Rowan Barnard23:05:25

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

seancorfield23:05:05

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.

seancorfield23:05:44

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

seancorfield23:05:02

(I haven't used Leiningen for years)

Rowan Barnard23:05:21

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

Rowan Barnard23:05:35

I'll have a look later today

Rowan Barnard23:05:21

Again thanks for the help and have a great day Sean ๐Ÿ˜‰

Rowan Barnard22:06:54

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 Barnard22:06:25

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 ๐Ÿ˜‰

seancorfield22:06:28

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 Barnard22:06:20

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 ๐Ÿ˜

seancorfield22:06:21

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 Barnard22:06:53

Ah OK cool thanks ๐Ÿ™‚