Live data from Hacker News

Cursive Clojure: A Clojure IntelliJ plugin

cursiveclojure.com

51–60 of 61 posts

Re: Cursive Clojure: A Clojure IntelliJ plugin

#51
post #50

Earlier quoted context omitted.

Although you've probably thought about this more than I have, it seems like there's a fundamental tension here. On the one hand there are Java IDEs and code-generation in the sense of (re)writing physical source code files. On the other hand, there are lisp macros in the sense of "an API for the compiler". Fully embracing the latter can obviate much of the need for the former (at least there's a long lisp tradition o…

If I could weigh in, I don't see why one has anything to do with the other. Many people enjoy using IDEs regardless of what language they're using. Historically, the case has been that statically typed languages benefitted more from an IDE, because there is less ambiguity in symbol resolution (functions or methods are known, typed entities, rather than a string). BTW, Clojure is similar to statically typed languages…

I probably didn't explain it well. My impression is that refactoring with an IDE is mainly an artifact of Java, not Clojure.

Also: Lisp macros are a unique kettle of fish. They support Don't Repeat Yourself in ways that plain functions cannot. Whereas an IDE is often used to generate repetitive code in files -- i.e. Automated Repeat Yourself.

Re: Cursive Clojure: A Clojure IntelliJ plugin

#52
post #50

Earlier quoted context omitted.

If I could weigh in, I don't see why one has anything to do with the other. Many people enjoy using IDEs regardless of what language they're using. Historically, the case has been that statically typed languages benefitted more from an IDE, because there is less ambiguity in symbol resolution (functions or methods are known, typed entities, rather than a string). BTW, Clojure is similar to statically typed languages…

I probably didn't explain it well. My impression is that refactoring with an IDE is mainly an artifact of Java, not Clojure. Also: Lisp macros are a unique kettle of fish. They support Don't Repeat Yourself in ways that plain functions cannot. Whereas an IDE is often used to generate repetitive code in files -- i.e. Automated Repeat Yourself.

> My impression is that refactoring with an IDE is mainly an artifact of Java, not Clojure.

I don't think this should be so. If an IDE could help refactor Clojure - why not?

> Whereas an IDE is often used to generate repetitive code in files -- i.e. Automated Repeat Yourself.

Yes, IDEs do that, too, but IDEs had existed long before this feature came about. There's probably no need for code generation in Clojure, but an IDE could still help with debugging, building, navigating the code, refactoring, and maybe even new things like Light Table tries to do.

I agree that IDE functionality matches the programming language. But IDE features are not a pre-specified set. I'm sure there are many ways IDEs could help Clojure (or any other language).

Re: Cursive Clojure: A Clojure IntelliJ plugin

#53
post #26
post #14

Earlier quoted context omitted.

There are many (important IMO) feature requests for LaClojure in the Issue tracker. Any plans to implement at least some of those?

A lot of these are fixed in Cursive - anything in particular you're after?

#CLJ-183, #CLJ-188, #CLJ-186, #CLJ-178, #CLJ-165, #CLJ-129, #CLJ-77 to mention just a few.

Re: Cursive Clojure: A Clojure IntelliJ plugin

#54
post #52

Earlier quoted context omitted.

I probably didn't explain it well. My impression is that refactoring with an IDE is mainly an artifact of Java, not Clojure. Also: Lisp macros are a unique kettle of fish. They support Don't Repeat Yourself in ways that plain functions cannot. Whereas an IDE is often used to generate repetitive code in files -- i.e. Automated Repeat Yourself.

> My impression is that refactoring with an IDE is mainly an artifact of Java, not Clojure. I don't think this should be so. If an IDE could help refactor Clojure - why not? > Whereas an IDE is often used to generate repetitive code in files -- i.e. Automated Repeat Yourself. Yes, IDEs do that, too, but IDEs had existed long before this feature came about. There's probably no need for code generation in Clojure, but…

Absolutely - it's a common misconception that IDEs only generate code for blub programmers. Most IDE functionality, particularly things like refactorings, are not at all language specific and are just as useful in Clojure as in Java. They're a lot harder to implement and it's pretty much impossible to give a guarantee of correctness as you would get in Java or another statically typed language, but it's still very helpful.

The real problem in Clojure is the fact that the syntax is so flexible, which massively complicates symbol resolution and other things. You can't even reliably tell whether the form you're in has a do-body or not!

Re: Cursive Clojure: A Clojure IntelliJ plugin

#55
post #49
post #2

Developer here - I'm happy to answer any questions folk might have!

Just having a look at Cursive now, nice work! How do I enable and use the symbolic debugger? TIA

You should be able to run any script in Debug mode (Run->Debug instead of Run->Run) and you can also debug your REPL session, although this is very clunky right now. I'll get some documentation up and provide a link here.

Re: Cursive Clojure: A Clojure IntelliJ plugin

#56
post #28

Earlier quoted context omitted.

What license will this be released under?

This will be commercial, similar to PyCharm, RubyMine and the other JetBrains IDEs. I'm considering a slightly restricted free edition that can't be used for commercial work, but I haven't worked out the details yet. It almost certainly won't be fully open source, but I'm considering having a small closed source core and then the majority of the Clojure implementation being open source and extensible. This will need…

Yeah, I would definitely appreciate a free edition to try out. It would have to be pretty impressive to switch me away from emacs (and vim), and I'd have to try it first to know.

Re: Cursive Clojure: A Clojure IntelliJ plugin

#57
post #54
post #52

Earlier quoted context omitted.

> My impression is that refactoring with an IDE is mainly an artifact of Java, not Clojure. I don't think this should be so. If an IDE could help refactor Clojure - why not? > Whereas an IDE is often used to generate repetitive code in files -- i.e. Automated Repeat Yourself. Yes, IDEs do that, too, but IDEs had existed long before this feature came about. There's probably no need for code generation in Clojure, but…

Absolutely - it's a common misconception that IDEs only generate code for blub programmers. Most IDE functionality, particularly things like refactorings, are not at all language specific and are just as useful in Clojure as in Java. They're a lot harder to implement and it's pretty much impossible to give a guarantee of correctness as you would get in Java or another statically typed language, but it's still very he…

It's pretty clear that a Clojure (or any other lisp) IDE would have to expand macros. This could potentially have side-effects, but there's really no (good) way around it. Besides, Clojure programmers are used to "passive" tools evaluating forms. Even documentation generators like marginalia and codox actually load a namespace rather than just examine the file, which could have side effects, too.

Re: Cursive Clojure: A Clojure IntelliJ plugin

#58
post #53
post #26

Earlier quoted context omitted.

A lot of these are fixed in Cursive - anything in particular you're after?

#CLJ-183, #CLJ-188, #CLJ-186, #CLJ-178, #CLJ-165, #CLJ-129, #CLJ-77 to mention just a few.

CLJ-183, CLJ-186, and CLJ-77 are fixed. I'll check CLJ-165. CLJ-129 is coming very soon. ClojureScript support is definitely on the list but will take a while - we do recognise .cljs files, at least.

Re: Cursive Clojure: A Clojure IntelliJ plugin

#60
post #59

Will Cursive be providing a strict paredit mode?

Yes, that's already about 80% there. There are some of the paredit commands missing but it's very usable right now. The most obvious omissions are open-round-and-newline, wrap-round and kill-word. Most other commands are there, and it's strict in the sense of preserving braces with backspace/delete.
Post reply on HN