Fork me on GitHub
#cursive
<
2020-12-19
>
vmarcinko17:12:50

BTW, anyone knows how can I generate implementation of protocol functions for given record...It seems by this documentation this should be possible: https://cursive-ide.com/userguide/editing.html#implement-and-override-methods

vmarcinko17:12:57

Or I misunderstood something?

vmarcinko17:12:26

I expected something to point to my record and pick something like implement Methods and specify desired protocol, and stubs for protocol functions should appear udner record or such ?

vmarcinko17:12:12

OK, I managed to make it, it just has a bug it seems that duplicates the name of protocol... So what I did, I entered the name of desired protocol within the record parens, and then have chosen "Implement Methods", and the result was this:

(defprotocol MailSender
  (send-email [this from to text]))

(defrecord DefaultMailSender [smpt-host smpt-port]
  MailSender
  MailSender
  (send_email [this from to text]))

cfleming06:12:29

So actually this (shamefully) doesn’t support protocols at the moment, it only supports implementing Java interfaces. But since protocols also create an interface, I suspect Cursive is getting confused there. I’ll try to fix this soon.

vmarcinko17:12:51

so you see, duplciated protocol name...The first one I entered to be able to place caret on it and choose "Implement Methods"

genekim18:12:25

Do any of y’all change the IntelliJ memory settings? After numerous suspends/resumes on my MacBook Pro, I start getting more and more “spinning wheels of death”, where I think the JVM is doing stop-the-world GC cleanups. It becomes increasingly less tolerable, and then I have to reboot (usually hard reboot, because various apps refuse to stop running). Are there things you do that prevent this inevitable decline of the usability of IntelliJ/Cursive over time? Thank you! (Part of me was researching how to have IntelliJ use one of the newer GCs like Shenandoah, but luckily, managed to contain my worst impulses, and likely avoided the fate of bricking my dev setup. 🙂

cfleming06:12:29

I just set the max memory to 2G and don’t worry about the rest, although that’s unlikely to be optimal. I actually suspect I have a memory leak in the parinfer stuff if you happen to be using that, but I haven’t had time to track it down yet.

6
genekim17:12:28

Totally can’t imagine life without parinfer! 🙂 No worries — life is great. I’ll just quit and restart IntelliJ more often. Totally not a big deal. Happy holidays to you and yours, all!