Fork me on GitHub
#cursive
<
2021-09-22
>
genekim01:09:36

Super low priority question: I am so proud of myself that for years, I have resisted mucking with IntelliJ advanced VM settings, and trying out Shenandoah GC, despite seeing spinning ball of death many many times on macOS, which I assume are GC pauses. Has anyone actually tried this out and had success with it? (I feel like this is what only maniacs due, because they think they can tune IntelliJ better than the vendor...) https://news.ycombinator.com/item?id=25581487

cfleming03:09:29

So, I’m mostly in the same group as you (don’t fiddle, because it’s likely that papa knows best), so I’m not sure on this. One thing to bear in mind is that they use their own JDK which is currently 11, and I wouldn’t recommend using a different one since it contains a lot of bug fixes relevant to JetBrains products. I think Shenandoah is only stable on JDK 17, right? I’m pretty out of touch, though.

genekim04:09:29

Thanks for convincing me not to open the hood. Danger and distraction lurk. 🙂 (Ah, you’re right. You have to switch the JVM IntelliJ uses… Which means even more danger, I’m assuming. I have plenty of danger in my life without this. 🙂 (Reminds me of people who buy fuel additives to increase fuel efficiency — an argument I found persuasive: if it actually worked (and in a way that didn’t cause long term issues), the auto manufacturers would use it, as they have every economic motivation to do so.)

Jakub Holý (HolyJak)16:09:52

I have never experienced such pauses from GC (lucky?). What is however a huge problem for me is IntelliJ's beloved indexing. Every I.I. release I hope it will get better and every release I am disappointed. (Admittedly, it got better since I upgraded my Mac - but still prefer VS Code for any things I only work on shortly.)

kendall.buchanan22:09:58

@U6VPZS1EK I don’t know if this is relevant to what you’re asking, but on the M1 I get a huge performance increase from using https://plugins.jetbrains.com/plugin/10044-atom-material-icons. Sounds crazy, but the rationale is here: https://youtrack.jetbrains.com/issue/JBR-3237

cfleming00:09:01

Thanks @U0HJA5ZQT, interestingly that link also mentions that JB are updating the JBR to Java 17 as we speak, so hopefully Shenandoah will become a thing at some point soon-ish.

tony.kay03:09:58

I almost always increase my heap settings. Having a larger pool reduces certain GC times. Theoretically the larger the memory pool, the better GC works (infinite memory means no GC:slightly_smiling_face:). Of course if you make it too large you'll starve the rest of your computer for ram and slow other things down or cause swapping. I don't however, bother messing with the actual GC options. Most general purpose users on a single user app are going to be hard pressed to do anything noticable.

indy10:09:06

Would be nice if Cursive also showed the differences for clojure.test/are :)

6
cfleming09:09:51

I looked at this back in the day. I seem to recall that for some reason it’s impossible to get the required information back from clojure.test, but it’s probably worth looking at it again in case I missed something.

indy10:09:33

Yeah skimmed the source and looks like it. are is just a do of is '.

(clojure.test/are [x y] (= x y)
                        1 1
                        2 2
                        2 3
                        4 1)

FAIL in () (te.clj:754)
expected: (= 2 3)
  actual: (not (= 2 3))

FAIL in () (te.clj:754)
expected: (= 4 1)
  actual: (not (= 4 1))
Figuring out the indices of the args that failed might be difficult I think. Sad, because I don't use are in cases I should be using it since I can't see the diffs in Cursive. Would be nice if clojure.test itself added some metadata to find out the indices of the args that failed, it would really help when there a lot of args to are.

Jakub Holý (HolyJak)16:09:53

Hi @cfleming! I love Cursive, thanks for the great work! I wonder, is there any solution for letting Cursive understand when vars are copied from one ns it another one, as is done here https://github.com/expez/superstring/blob/a24e30367b0bca2144ffd25fe78abe3cd0f42bb1/src/superstring/core.clj#L35 ? I guess it is the same case as https://github.com/cursive-ide/cursive/issues/711, i.e. not going to be supported? I would not mind having to provide some info manually - for a lib I used often it is still much better than missing autocompletion and the pesky XXXX cannot be resoled. I can imagine having some .edn in my home dir / project dir with a map mapping symbol from the lib to the original (in the case of superstring, e.g. {superstring.core/trim clojure.string/trim, ...} .

Jakub Holý (HolyJak)08:09:20

I guess https://cursive-ide.com/userguide/macros.html#stub-generation would solve my problem. Would it be possible to enable it for custom namespaces???

cfleming09:09:47

Hi Jakub! Sorry about the slow response. There are actually a couple of forms like this which are supported, I’ll check to see if any of them look like that and could be configured with Resolve As… If not, I’d have to add some code for that. And yes, enabling stub support for custom namespaces is something I’ve considered. It would only work for namespaces from libraries, which should work for this case.

👍 1
Colin P. Hill19:09:07

What does “Stub generation required” mean? I’ve got a project that keeps prompting me to generate stubs, and every time it finishes it just prompts me again

tanzoniteblack20:09:49

as to why it continually is asking, if you check the events log, is it actually succeeding? I’ve seen that behavior happen when there’s multiple log4j reporters on the classpath and it causes some oddities

cfleming02:09:44

Right, if it’s not working for some reason, please find your log file (Help | Show log in Finder/Explorer) and email it to me at <mailto:[email protected]|[email protected]>