Fork me on GitHub
#calva
<
2019-06-03
>
pez05:06:00

@guillaume.carbonneau it's in the dev branch. 😎 Also, I posted a link just a few messages ago.

metehan07:06:08

as i know "calva" the vscode extension and "cider" is the library i should have include in my project to communicate with calva, isn't it ?

pez08:06:34

Yeah, that's sort of correct. 😃 It just confused me a bit. Anyway, have you checked the wiki? https://github.com/BetterThanTomorrow/calva/wiki

Wes Hall12:06:26

Hey folks, probably the minorest of nitpicky minor things, but have noticed that it takes two clicks to set the input focus on the repl buffer after jack-in. First seems to focus the buffer, second grabs the keyboard focus.

Wes Hall12:06:30

Also... hello. My (so far 5 year) quest to find my ideal Clojure toolset has lead me here 🙂. Looks like fantastic work. All hail @pez apparently 🙂.

❀ 4
pez12:06:23

Thanks, I appreciate that you appreciate!

pez12:06:39

Indeed, there is a problem with the input focus. I have it tracked in this issue: https://github.com/BetterThanTomorrow/calva/issues/161

guillaume12:06:52

@pez oh thx I didn’t realized it was checked in the source

pez12:06:01

There is also a strange exception thrown when the window gets focus. Not sure if I have filed an issue about that yet, but it might very well be relevant for that issue.

pez12:06:55

@guillaume.carbonneau, haha, no, it is a bit more crazy than I would want it, but I haven't set up a CI pipeline yet.

guillaume12:06:15

some nitpicks about the README


pez12:06:15

Please share stories from your 5 year quest, @wesley.hall. I am curious about how Calva fits there and what you miss and stuff.

pez12:06:25

The dev README?

guillaume12:06:43

it feels like the reason for setting up the “hard way” is never explained

guillaume12:06:04

as a newcomer, why should I setup the “hard way” at all..

pez12:06:31

Maybe it shouldn't be framed like that, easy way and hard way...

pez12:06:35

How about rather, this is how you jack in, if, for whatever reasons, your project can't use jack-in, see How to connect w/o jack-in.

guillaume12:06:52

yes but again, what are the reasons?

pez12:06:32

It could be that the project start is happening in some other context. But I'm not sure the README should delve into those reasons.

pez12:06:11

I think that people working with projects that can't use jack-in probably know why, in their case.

guillaume12:06:29

My feeling is there should be only one way of setting up and the other instructions are for “If you’re having issues
 please check this FAQ”.. then it’s Issue A) 
 Issue B) 


pez13:06:16

I've updated the text some now, @guillaume.carbonneau. Is it an improvement? I've also updated the text about where Calva is heading.

Wes Hall13:06:53

@pez This probably isn't going to be short... sorry 🙂 15 years of Java prior to starting with Clojure, mostly in intellij, which I absolutely loved back in 2003 and got slightly cooler on with each release as the guys at jetbrains fell overthemselves to support everything. I mostly prefer an editor to an "IDE". In Clojure I really started out by playing with lighttable, which I really liked conceptually albeit a bit rough around the edges. Migrated over to emacs as I began to take it more seriously since that seemed to be what all the cool kids were doing. I'd say i've probably spent most of my time working with Clojure in emacs, with cursive perhaps a fairly close second. I don't mind working in emacs honestly, I do miss a bit of a UX. As I said recently on another channel in VS code I can figure out how to use the git integration pretty much at a glance, whereas I still need a magit cheatsheet on my desk to do anything but the basic day-to-day stuff. I'm also fairly "into" code architecture and so structural views are quite important to me. Neotree half scratches this itch, but not in the way that idea used to in Java. Cursive would be an obvious choice for me as a long time intellij user, but I think the problem there is that the platform it is built on has really been put together with static typing in mind. All too often cursive warns me about stuff that is perfectly fine. It's funny really, I realise it is trying and sometimes failing to do stuff that other systems don't even attempt, but even so. I find the warnings annoying. I think the summary of this ridiculously long message is that what I am really looking for is something that keeps cognitive load to an absolutely minimum and lets me focus on my code. Give me a view of my entire project, a repl to work with, and doesn't draw my attention to warnings that are actually not problems etc. I hadn't even considered VSCode until recently. As a guy with a Java history those anti-MS feelings run rather deep 😉 but I really do love the simple editor UX. I haven't really pushed it + calva on a larger project yet, but I am very much looking forward to doing so. I think atom is probably the only serious competitor for my attention (with an outside chance of just returning to emacs), but so far VSCode + Calva is suiting me very well indeed. I very very much appreciate your efforts. Not least in managing to get to the end of this ridiculous essay...

pez14:06:44

I love essays! Thanks a lot for sharing!

pez14:06:31

I too had to fight my anti-MS sentiments to even try VSCode, but I find I like it a lot and how it makes lots of things easy. I too am more into editors than IDEs, but VS Code strikes a nice middle ground.

Wes Hall14:06:45

It definitely has a 2003 era intellij feel to me. I don't mean that as, "way behind", but in that I am not tripping over integrations with "applications servers" etc. So far I perceive it as more of an editor, which is great. As I say, I am very very new to it. Even the basic features. I'm definitely going to try to find some time to invest in learning these though. At some point I will see if I can actually roll my sleves up and contribute to calva, but I probably have some more basic legwork to do first.

pez14:06:51

It's super easy to hack on Calva, don't wait with it. 😃

Wes Hall14:06:58

Already started to browse the code 🙂. I'll do my best to make it sooner rather than later.

pez14:06:05

I said something about this the other day in this channel. When Calva 2 is out I will need to tackle some of the technical debt that has piled up on my watch. Since you are the architecture type, I'd appreciate just going over the code and reason about it together with you, some day. I'd like to set Calva up on a more solid ground or it will fall over on top of me.

Wes Hall14:06:22

Would be very happy to take a look. I'll work a little on getting more familiar with it between now and release and perhaps we can have a look through post release as you say.

pez14:06:19

Awesome!

guillaume21:06:04

@pez yes nice work for the doc!

metal 4
dabrazhe21:06:25

@pez Here are results of my test on the Mac (I've given up on windows for now). I've made a basic project based on a leiningen template. Upon Jack-in:

> Executing task: /usr/local/bin/lein update-in :dependencies conj "[nrepl \"0.6.0\"]" -- update-in :plugins conj "[cider/cider-nrepl \"0.21.1\"]" -- update-in "[:repl-options :nrepl-middleware]" conj "[\"cider.nrepl/cider-middleware\"]" -- with-profile uberjar repl :headless <

Compiling calva-dest.core
Error loading complete.core: Could not locate complete/core__init.class, complete/core.clj or complete/core.cljc on classpath.
nREPL server started on port 50747 on host 127.0.0.1 - 

dabrazhe21:06:28

nothing is happening until I "Connect to a running repl". The port is not suggested either, had to enter it manually. Then the calva repl starts.

dabrazhe21:06:39

Evaluating returns results in-line only, no feedback in the window

pez21:06:05

@dennisa That jack-in output looks right (the complete.core message is not related to jack-in).

dabrazhe21:06:47

I've noticed that repl session keeps disconnecting rather too often as well

pez21:06:12

But I don’t know why the port isn’t picked up. Is there an .nrepl-port file created?

dabrazhe21:06:43

Yes, the file is there with the port nr

pez21:06:10

Evaluating forms should result in inline display and the results printed in the “Calva says” output channel.

dabrazhe21:06:22

And I've found eval results: they are in Output window )

dabrazhe21:06:21

I am used to have them all in one pane, though

dabrazhe21:06:35

Repl prompt and the eval results

pez21:06:44

To evaluate stuff in the repl window, add alt as a modifier to the second chord. So, ctrl+alt+c alt+e for the current form, and ctrl+alt+c alt+space for current top-level form.

pez21:06:35

What goes wrong on windows?

pez21:06:29

I think the “nothing is happening” until you “Connect to a running repl” and the “no port suggested” are symptoms of the same problem. Calva waits for the .nrepl-port file to be created before proceding, and it seems it can’t see it. I wonder why


dabrazhe21:06:44

my Windows env is a mess. I believe i have to fix it first and then try it again. If it works for other people...

pez21:06:42

Good that you found a workaround for getting the connection working. We should include that in the docs, until we find out what the problem is.

dabrazhe21:06:30

calva is asking me to select the uberjar (ie profile). perhaps it's related ?

pez21:06:41

When does it ask you to do that?

pez21:06:37

There is certainly nothing in Calva that would ask for that. But it might be part of the output from something else and Calva hands it on.

pez21:06:23

Ah, now I see what you mean.

dabrazhe21:06:24

just before starting the repl

pez21:06:35

Do you have other profiles to select from?

pez21:06:00

OK. So you probably shouldn’t select the uberjar there. Calva doesn’t know what profiles you want to run so it offers you all the profiles it finds in your project file.

dabrazhe21:06:42

you are right, it seems. I've just tried another proj. almost no issues there.

pez21:06:53

almost? 😃

pez21:06:00

It only makes sense to select any development profiles you have for Calva usage.

dabrazhe21:06:02

)) It failed to start when I introduce a compile error. but now I've removed uberjar, it starts now

pez21:06:13

Cool. Thanks for testing and reporting. I need to make some things a bit clearer, for sure.

dabrazhe21:06:57

Yes, the profile was the perp. mystery solved. Thank you for great work!

pez21:06:36

It seems I will be able to push the release button soon! 😃

dabrazhe21:06:22

do you want more bugs? : )

dabrazhe22:06:11

When I terminate the jack-in terminal (headless repl window) it quits, closes the window upon a key. And then won't let jack-in again.

pez22:06:39

Does it give you any reason not to let you jack-in again?

dabrazhe22:06:19

nope. I guess the task has failed for some reason. I can reproduce this sometimes, but not every time though

pez22:06:42

I’d love to have that reported as an issue on github.

dabrazhe22:06:12

sure

❀ 4
pez22:06:02

I do have struggles with some sloppy state management so am not too surprised you have this intermittent problem. It will certainly be something to fix properly.