Fork me on GitHub
#cursive
<
2015-08-06
>
cfleming12:08:29

@cmdrdats: WRT your tweet - yeah, you can do this

cfleming12:08:39

(this was going to be longer than 140 chars)

cmdrdats12:08:56

awesome - how?

cmdrdats13:08:11

I was trying cmd-alt-Y (sync project)

cmdrdats13:08:16

but that doesn't seem to do anything

cfleming13:08:27

You can do it using the Refresh action in the leiningen toolwindow. But there’s a bug in the current version which doesn’t save the files to disk first.

cfleming13:08:00

You can either File->Save All, or switch to another app and back (IntelliJ saves on lost focus)

cmdrdats13:08:02

oh! I never saw the leiningen tool windows before

cmdrdats13:08:11

awesome, thanks! simple_smile

cfleming13:08:24

The bug is fixed in the next build.

cmdrdats13:08:30

you can add arbitrary other projects to the window there?

cmdrdats13:08:48

without using checkouts

cfleming13:08:51

Generally that’s only a good idea if they’re part of the same conceptual project.

cmdrdats13:08:11

ye, I'd use it for working on a main project and some deps

cfleming13:08:23

But yeah, you can do that. See https://cursiveclojure.com/userguide/leiningen.html for some info

cmdrdats13:08:08

fantastic, thanks simple_smile

cfleming13:08:17

actually, the doc you probably want there is missing from that page, see https://github.com/cursiveclojure/cursive/issues/989

cmdrdats13:08:19

i kept having to ln -s in checkouts, quit intellij and come back

cfleming13:08:45

Hehe, no, it should all be picked up and just work.

cfleming13:08:18

Navigation etc will all work across the projects

cmdrdats13:08:41

love your work with cursive btw - do you have some kind of timeline you're working toward, re: making it a commercial product?

cfleming13:08:25

Thanks! Yeah, I’ll be charging for it soon. I’m at the stage of waiting on banks for payment systems, and waiting on lawyers for licence agreements.

cfleming13:08:34

So: within a couple of months sort of soon.

cmdrdats13:08:00

It's a mammoth thing you've pulled off, I can't imagine it's sustainable unless you start getting paid for it proper soon

cfleming13:08:48

Yeah, it’s been a ton of work. But money isn’t the main limiting factor at the moment, except in that if I had tons of it I could hire more people simple_smile

cmdrdats13:08:58

hehe - that would be neat

cfleming13:08:07

The main limitation is just time to work on it, and that’s mostly limited by my daughter 😉

cmdrdats13:08:22

hehe, well - that's the good kind of limitation 😄

cmdrdats13:08:44

kids grow up too fast to skimp on spending time with them

cfleming13:08:24

Exactly. If I were young and single Cursive would be at version 7 by now, rather than still in beta

cmdrdats13:08:55

haha - or maybe it would have failed, because you wouldn't have been as deliberate about the bits you added

cfleming13:08:56

Hehe, that’s entirely possible too!

cmdrdats13:08:59

(I have many burning wrecks in my past...)

cmdrdats13:08:36

what bit are you focussing on at the moment?

cfleming13:08:30

Mostly on getting things ready for selling Cursive, so payments etc and brushing up the website etc.

cfleming13:08:38

Lots of boring time consuming bits.

cmdrdats13:08:59

ye, that stuff always wastes way too much time 😕

cfleming13:08:01

I’m also planning to add a test runner soon and expand the test support (Midje, cljs.test etc)

cfleming13:08:32

And right now I’m investigating re-vamping the lein support, which is pretty painful for all concerned.

cmdrdats13:08:12

wanting to get boot in there? or is that a bit of a non-goal?

cfleming13:08:37

It’s definitely a goal but a tricky one. I’m actually interested in using boot to build Cursive itself.

cmdrdats13:08:52

wow, that sounds like a project and a half

cmdrdats13:08:59

is cursive written in clojure?

cfleming13:08:18

Unfortunately boot requires Java 7 but I have to support Java 6. So I need to run it out of process which is tricky to make fast.

cfleming13:08:55

Mostly, yeah - there’s a bunch that has to be written in Java for startup time issues, but all the interesting bits are Clojure

cfleming13:08:22

I’m planning to migrate the bits that are required to be Java to Kotlin to make that a bit more palatable

cmdrdats13:08:25

awesome simple_smile would it be easy to expose a clojure repl into the actual intellij process?

cmdrdats13:08:00

would love to poke around with intellij plugins, but I'm not particularly interested in mucking around in more java, if I can help it

cfleming13:08:25

Yeah, I have that planned - in fact, there already is one which I use, but it’s not much use without the Cursive APIs which are not public yet.

cfleming13:08:08

There’s already an IntelliJ plugin to allow the IDE to be tweaked using Groovy. I’m planning to use the ideas and perhaps some of the code but using Clojure.

cfleming13:08:00

The extension API will mostly at first be about allowing resolution support for libs to be added.

cfleming13:08:17

So people can add support for libs that they write or use.

cfleming13:08:32

But IDE tweakability is on the list too.

cmdrdats13:08:40

haha, so people can tweak their own frankcursive

cmdrdats13:08:48

frankencursive*

cfleming13:08:27

cursivemacs

cmdrdats13:08:09

cursivespacemacs

potetm14:08:39

I just joined the channel, so this convo may have already happened. Is anyone else having a problem resolving symbols inside of an extend-type form?

potetm14:08:09

i.e.

(extend-type A
  IDoThings
  (-do-things [{:keys [a b c] :as this}]
    ;; cannot resolve a, b, c, or this here
  ))

cfleming14:08:12

@potetm: I think that should work, although it’s possible that Cursive isn’t checking for destructuring there.

cfleming14:08:20

Hmm, no, it looks like it should be.

potetm14:08:22

@cfleming: That appears to be the case. If there is no destructuring, it appears to work.

cfleming14:08:35

Is this in CLJS or CLJ?

potetm14:08:52

However, if one of the arguments are destructured, it doesn’t work.

potetm14:08:39

Oh wait, just noticed one more step to repro.

potetm14:08:17

I have two protocols I’m implementing in the same extend-type. I’m in the second when it doesn’t work.

potetm14:08:59

The first appears to work correctly.

cfleming14:08:52

There’s something about that form it doesn’t like - I can reproduce it with just that one.

cfleming14:08:21

So this works for me:

(extend-type String
  Runnable
  (run [{:keys [a b c] :as this}]
    ;; cannot resolve a, b, c, or this here
    a b c
    ))

cfleming14:08:50

I think the problem is perhaps that the method is incorrect for the protocol? Is that possible?

potetm14:08:42

Lemmie triple check that real quick. I usually rely on cursive to tell me if I got it right 😉

cfleming14:08:04

Haha, I wouldn’t rely on that in this case, there’s no validation for that at the moment 😉

potetm14:08:16

haha that’s funny. Good to know

cfleming14:08:32

Except that resolution will frequently break if the method is invalid.

potetm14:08:03

Right. That must be what I noticed. I thought I noticed something that would tip me off.

potetm14:08:08

The tool is just too good now.

potetm14:08:09

Okay, there’s a full test case. I believe I got my p’s and q’s in order.

cfleming14:08:01

Looks good, thanks - I’ll take a look at that now.

cfleming14:08:07

Well, looks bad, rather.

cfleming14:08:47

Actually, I just tried that and it works for me.

cfleming14:08:33

@potetm: What doesn’t work for me is the completion, but the resolution once I type the symbol in does work.

potetm14:08:52

Ah yes. Correct.

potetm14:08:09

Word, meanings, important…. right.

potetm14:08:27

Right completion doesn’t work in those cases.

cfleming14:08:45

Ok, great, thanks for the test case - I’ll fix that.

potetm14:08:59

Thanks man!

cfleming14:08:23

And in fact, it’s still broken without the destructuring.

potetm15:08:08

Yeah, there are times when it appears to work for me. But I’ve not figured out the rhyme or reason.

potetm15:08:21

Maybe it’s when the protocol is in another namespace?

cfleming15:08:30

No, because in that test case they’re in the same one.

potetm15:08:42

Yeah, this is weird. I definitely have a block of code where it works. (The protocol in that example is from another namespace.) But it’s production code. I can’t get a test case working.

potetm15:08:52

Aaaaand the prod code doesn’t work anymore either.

potetm15:08:03

Alright, I have nothing to add. All done here.

cfleming15:08:44

@potetm: Hehe, don’t worry, I’ll be able to track it down from that repro case.