Fork me on GitHub
Oliver George05:05:55

Bit of a thought bubble but how about using spec's generative features to do "type checking" like behaviour in the IDE:

Oliver George22:05:32

@cfleming can’t sell you on this one? :-)


@U055DUUFS Yep, was just walking to the office 🙂


It’s an interesting idea. So you’re thinking something like being able to right click in the editor and say “test this function” or something similar?

Oliver George00:05:26

I think cursive users would love red squiggles to appear as they are working on code. Clearly that's a big step though. Something that let you check a namespace and identify these bugs would be good so something like "Test Fn" or "Test Ns" sounds like a good step forward.


Right, red squiggles would require something like, which is a neat idea but still alpha state I believe.

Oliver George00:05:30

I'm not sure why the approach I describe couldn't be applied. Its a "brute force" approach but a simple technique which would (might?) be efficient with a cache. Key thing is the code driving it needs to understand bindings (thus it's an IDE thing).

Oliver George00:05:02

All from an idealistic user perspective. You're the expert.

Oliver George00:05:29

Anyway, just wanted to share.


Well, it still requires type propagation, which is similar to spectrum or what Cursive does for Java interop


i.e. in your example, Cursive would have to understand that a should have type string?, and since it’s used as an arg to bar then the IDE would check that particular use by generating from string? and validating it against coll? - is that what you have in mind?


I’m not sure whether that could feasibly be run in the background, since there are likely to be a lot of these. Caching the results might be tricky too. I’ll think about it, since it would be much easier than using something like spectrum.

Oliver George11:05:38

I think you're on the same page. There's definitely a price to pay (performance, caching practicalities) but the rewards could be quite interesting. Thanks for listening & taking the time to think about it.

Oliver George05:05:04

(Still requires a JVM to build "facts" so not perfect)


@cfleming it happens on all my files in the project


@cfleming Cursive says "defn" cannot be resolved. How do I fix this?


@cfleming how do I get updates to the cursive plugin or do they happen automatically?


@cfleming I reinstalled Intellij using the latest version and installed Cursive and now it all works.


Is there any way I can fold the brackets


we can fold HTML element tags


and functions


would be good to fold code based on brackets too