Fork me on GitHub

I have a project where all the namespaces are loaded on REPL start and it’s getting quite long, to the point of REPL client in IntelliJ giving up saying it didn’t receive a nREPL ack. Is there a way to make that timer longer?


Yes, Preferences | Languages &amp; Frameworks | Clojure | REPL options | REPL startup timeout

Roman Liutikov09:05:42

@cfleming Is Cursive able to warn on duplicate values in set literal?


Yes, it’s possible, at least for statically visible cases (i.e. not #{1 2 (+ 1 1) 3}), the same for map keys.


The error when executing the code is pretty immediate and obvious so I’ve never got around to it, but it should be a warning, yes.

Roman Liutikov10:05:29

I'll create a feature request issue for that on GitHub

Roman Liutikov09:05:59

for example #{1 2 4 4}


The other one that would be nice, and in that same realm, is duplicate map keys.

{::a 1
 ::a 2}
These are caught almost instantly when you actually read load the file in the repl. Still nice to have that static feedback for the times when you don't have a repl open.


@cfleming I updated to the latest Cursive release. I think there's a memory leak. IntelliJ will soar up to 8gb of memory after 30 mins or so.


I started the IDE, updated Cursive, wrote 1 line of code and have been reading since then. Went back to IntelliJ and the IDE shows a "Low Memory" message and is using 8.9gb of memory, as per system monitor. IntelliJ's memory bar shows less but guessing it's missing something.


I just updated too, right after I read your post, and I’m not seeing any unusually memory consumption. MacOS Mojave, IntelliJ IDEA 2020.1. FWIW.


I’m on 2020.1 on PopOS. Downgrading Cursive to the last stable release fixes it.


Wonder what if that analyze memory usage link would help


It might =)… I have a few memory issues where the ram consumption grows slowly and Colin was interested in the dumps, so might be worth holding onto them until he says otherwise?


@U083D6HK9 Yes, please click that link and send the result to me - it’ll produce a text report.


Updating and trying again. It's climbing up. Just need to wait 🙂


Guess I could've started the ide with less memory...


It's also using a ton of cpu. With the latest Cursive it's idling around 15%

Patryk Wilson19:05:15

Hi, I'm trying to do simple addition at the REPL using (+ 40 3) and I keep on getting a syntax error that's pointing me to a file called form-init18086366295139673654.clj in my Local/Temp directory. Kind of confused on what I should do here to fix this

Alex Miller (Clojure team)19:05:15

I think you're seeing some stuff that wraps expressions before evaluating them

Alex Miller (Clojure team)19:05:25

can't say I know how to fix it though


i can recreate that somewhat if i try to evaluate a form in a bad ns

Clojure 1.10.1
user=> (in-ns 'namespace)
#object[clojure.lang.Namespace 0x6aa3a905 "namespace"]
namespace=> (+ 1 1)
Syntax error compiling at (REPL:1:1).
Unable to resolve symbol: + in this context


i don't have cursive on this computer but that is one way to get syntax errors on otherwise correct forms


command shift-N sets the repl namespace and perhaps this was done before loading/requiring?

Patryk Wilson20:05:53

I was changing the namespace to where the addition was located for some reason. I have another question. When I have a namespace that contains my code, do I have to highlight it to send the code the the REPL or is there an easier way to run my code without having to do this everytime

Alex Miller (Clojure team)20:05:42

no, there are key bindings to send the expression prior to the cursor or the top level expression you're in

Patryk Wilson20:05:13

Ok thank you that helps a lot more

Alex Miller (Clojure team)20:05:41

"Send form before caret to REPL" or "Send top form to REPL"


Carrying on the "wouldn't it be nice" theme from earlier today: I'd like in-editor feedback when sending anything to the repl results in a compilation error. I often keep the repl output window hidden only opening it after send forms there as I test from comment blocks in the editor. My workflow is write code, then load files in REPL, then evaluate a comment block, then open REPL to review result. If the "load files in REPL" results in a compilation error AND the evaluate comment block is large enough to cause the compilation error to scroll off the top, I am left puzzling why my output doesn't change.


I used to do that, but have slowly switched to editing/running smaller forms with the namespace I’m working in being currently loaded in the repl =)… It’s really useful to take a form that’s in the editor, stick it in a comment block and tinker with it. I try not to have a form larger than a few lines at a time… I do agree that in editor feedback would be interesting though.


Yes, in recent versions (2019.3+) IntelliJ has much better functionality for in-editor results and feedback which I’m planning to integrate.

😮 20
🎇 12
❤️ 12

I thought it would be asking too much to have REPL evaluation results displayed inline in the editor 🙂


Hopefully not before too long 🙂

parens 4
metal 4
❤️ 8
Adrian Smith19:05:07

I'm un-reasonably excited about this feature 😄