Deprecation of Swank Clojure, long live nrepl.el

Showing 1-20 of 20 messages
Deprecation of Swank Clojure, long live nrepl.el Phil Hagelberg 8/21/12 10:40 PM

As I mentioned in an earlier thread, I'm bringing my maintainership of
swank-clojure to an end. I'm putting my efforts into nrepl.el, and there
is also ritz for people who need advanced debugging:

    https://github.com/kingtim/nrepl.el

    https://github.com/pallet/ritz

I've blogged about some of the background behind this decision here:

    http://technomancy.us/163

I've pushed a deprecation notice to the swank-clojure repository now
that the latest release of nrepl.el has become quite usable. I'll be
following up by updating various pieces of documentation around the web;
if you have a blog post or tutorial that mentions swank-clojure, please
add an addendum pointing people to nrepl.el or ritz.

Thanks for being loyal users, and please do give nrepl.el a try.

-Phil
Re: Deprecation of Swank Clojure, long live nrepl.el Warren Lynn 8/22/12 7:56 AM

I just gave a quick try on nrepl. It works right out of the box (at least the basics I tried) with jack-in. Thank you.

Now I have two questions:

1. I did not not "ritz" before this post. Its debugging capabilities is attractive to me (I have not tried it yet). Is there any plan to have those capabilities in nREPL too?
2. Right now I use "slime-completions" function with auto-complete.el so I have automatic completion working. I am very attached to auto-complete as that is a big helper on my coding efficiency. I know there is "nrepl-complete" command, but is there a function that will return all the completions for a prefix so I can use that with auto-complete? I could not find it.

Great to see the tool chain is moving forward. Thank you.


Re: Deprecation of Swank Clojure, long live nrepl.el Tim King 8/22/12 9:46 AM

On Wed, Aug 22, 2012 at 7:56 AM, Warren Lynn <wrn....@gmail.com> wrote:

2. Right now I use "slime-completions" function with auto-complete.el so I have automatic completion working. I am very attached to auto-complete as that is a big helper on my coding efficiency. I know there is "nrepl-complete" command, but is there a function that will return all the completions for a prefix so I can use that with auto-complete? I could not find it.
 
Hi Warren,

You may want to check out  https://github.com/purcell/ac-nrepl.

Cheers,
Tim

Re: Deprecation of Swank Clojure, long live nrepl.el Baishampayan Ghose 8/22/12 9:56 AM
> Thanks for being loyal users, and please do give nrepl.el a try.

I gave nrepl.el a shot today and I was quite impressed to say the least.

There were a couple of minor annoyances though -

* M-. on a JVM inter-op call throws an exception. This should be
handled gracefully.
* When using M-x nrepl, I can't specify a host, so it always picks localhost
* M-x repl should show me the default host/port automatically (does
nREPL have a default port at all?)
* There is no way to disconnect (or at least I couldn't find one)
* Backspace with paredit is broken

I am quite liking the way nREPL & nrepl.el are progressing, I think I
will be able to switch quite soon.

Kudos to Tim, Phil, Chas and everyone involved!

Regards,
BG

--
Baishampayan Ghose
b.ghose at gmail.com
Re: Deprecation of Swank Clojure, long live nrepl.el Chas Emerick 8/22/12 11:26 AM
On Aug 22, 2012, at 12:56 PM, Baishampayan Ghose wrote:

> * M-x repl should show me the default host/port automatically (does
> nREPL have a default port at all?)

No, nREPL does not yet have a default port, but it's a known TODO item:

http://dev.clojure.org/jira/browse/NREPL-3

I suppose I should put the application into IANA sooner rather than later...

- Chas
Re: Deprecation of Swank Clojure, long live nrepl.el Baishampayan Ghose 8/22/12 11:30 AM
On Wed, Aug 22, 2012 at 11:56 PM, Chas Emerick <ch...@cemerick.com> wrote:
>> * M-x repl should show me the default host/port automatically (does
>> nREPL have a default port at all?)
>
> No, nREPL does not yet have a default port, but it's a known TODO item:
>
> http://dev.clojure.org/jira/browse/NREPL-3
>
> I suppose I should put the application into IANA sooner rather than later...

Pick 7888 right-away and standardize later...
Re: Deprecation of Swank Clojure, long live nrepl.el Chas Emerick 8/22/12 12:09 PM
On Aug 22, 2012, at 2:30 PM, Baishampayan Ghose wrote:

>>> * M-x repl should show me the default host/port automatically (does
>>> nREPL have a default port at all?)
>>
>> No, nREPL does not yet have a default port, but it's a known TODO item:
>>
>> http://dev.clojure.org/jira/browse/NREPL-3
>>
>> I suppose I should put the application into IANA sooner rather than later...
>
> Pick 7888 right-away and standardize later...

Maybe this is a case where I should ask for forgiveness later, but I was trying to stay on the good side of the last bullet here:

http://www.iana.org/form/ports-services

Anyone with experience with IANA, standardization of ports, etc., please feel free to contact me off list with any pointers on smoothing the way in this area.

- Chas
Re: Deprecation of Swank Clojure, long live nrepl.el Tassilo Horn 8/22/12 12:19 PM
Baishampayan Ghose <b.g...@gmail.com> writes:

> * Backspace with paredit is broken

That's fixed in a pull request of mine which also implements a major
overhaul of the completion mechanism.

Bye,
Tassilo
Re: Deprecation of Swank Clojure, long live nrepl.el Warren Lynn 8/22/12 2:52 PM


Hi Warren,

You may want to check out  https://github.com/purcell/ac-nrepl.

Cheers,
Tim


Thank you. I tried it out. It basically works but has glitches:

1. If I type "(clojure.repl/", right after the forward slash, I got a exception "java.lang.ClassNotFoundException: clojure.repl" (followed by a long stack trace). This is close to a deal breaker for me.

2. The pop-up documentation does not work right. Lines are missing (but those lines will show up again if I resize my Emacs window to force a redraw). I am on Windows so that could be a factor, but my auto-complete pop-up documentation for my Elisp code has no problem.



Re: Deprecation of Swank Clojure, long live nrepl.el Leonardo Borges 8/22/12 7:03 PM
I must be missing something here. I followed the steps on the
leiningen upgrade wiki page and everything seemed fine.

However, even thought my project has an explicit dependency on Clojure
1.4.0, lein repl is starting a session with Clojure 1.2.1

Can't really see where I've gone wrong. Does this ring a bell to anyone?

Cheers,
Leonardo Borges
www.leonardoborges.com
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
Re: Deprecation of Swank Clojure, long live nrepl.el Leonardo Borges 8/22/12 8:06 PM
Moreover, not only it starts an old version of Clojure, but it
randomly picks a clojure version each time I start the repl (?!) from
within the same project directory

$ lein repl
nREPL server started on port 7888
REPL-y 0.1.0-beta10
Clojure 1.3.0


$ lein repl
nREPL server started on port 7888
REPL-y 0.1.0-beta10
Clojure 1.2.1

$ lein repl
nREPL server started on port 7888
REPL-y 0.1.0-beta10
Clojure 1.3.0

Absolutely no clue. I even removed all Clojure versions from ~/.m2
just in case that was messing up something but no help.

And I do have Clojure 1.4.0 listed in my project.clj:

(defproject blah/blah "1.0.0-SNAPSHOT"
 :dependencies [[org.clojure/clojure "1.4.0"]
...

Cheers,
Leonardo Borges
www.leonardoborges.com
Re: Deprecation of Swank Clojure, long live nrepl.el Leonardo Borges 8/22/12 9:53 PM
Nevermind. I used lein deps :tree to analyze my current dependency
tree an realized korma depended on Clojure 1.3.0 - why lein was
loading 1.2.1 sometimes is still beyond me.

I upgraded Korma and lein repl now respects my preference for clojure 1.4.0

All is well in the world. Sorry for the noise.

Cheers,
Leonardo Borges
www.leonardoborges.com


On Thu, Aug 23, 2012 at 1:06 PM, Leonardo Borges
Re: Deprecation of Swank Clojure, long live nrepl.el Warren Lynn 8/23/12 7:59 AM

Does anyone know how to let lein2 to use the latest nrepl server (beta9 for now). It seems right now (preview8) it is using beta8. I am eager to find out if beta9 fixed the ac-nrepl exception on namespace completion (according to ac-nrepl issue tracking, that is caused by the server). Thank you.
Re: Deprecation of Swank Clojure, long live nrepl.el Chas Emerick 8/23/12 8:19 AM
Just adding [org.clojure/tools.nrepl "0.2.0-beta9"] to your project dependencies should do it.

Can you point me to this ac-nrepl issue that may be server-related?

- Chas

On Aug 23, 2012, at 10:59 AM, Warren Lynn wrote:


Does anyone know how to let lein2 to use the latest nrepl server (beta9 for now). It seems right now (preview8) it is using beta8. I am eager to find out if beta9 fixed the ac-nrepl exception on namespace completion (according to ac-nrepl issue tracking, that is caused by the server). Thank you.

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Deprecation of Swank Clojure, long live nrepl.el Tim King 8/23/12 8:38 AM


On Thu, Aug 23, 2012 at 8:19 AM, Chas Emerick <ch...@cemerick.com> wrote:
Just adding [org.clojure/tools.nrepl "0.2.0-beta9"] to your project dependencies should do it.

Can you point me to this ac-nrepl issue that may be server-related?

- Chas

I don't think it is nREPL server related.  It has to do with with clojure.complete and lein repl. 


-Tim
Re: Deprecation of Swank Clojure, long live nrepl.el Warren Lynn 8/23/12 12:34 PM

I don't think it is nREPL server related.  It has to do with with clojure.complete and lein repl. 

Thanks. I did not understand it correctly. I will wait for lein to be updated.


 
Re: Deprecation of Swank Clojure, long live nrepl.el Warren Lynn 8/27/12 11:23 AM

With lein2 preview 10, the ac-nrepl namespace completion issue is still there.  I am talking about this one:
https://github.com/purcell/ac-nrepl/issues/1

But if I do this in a regular "lein repl" shell:
(complete.core/completions "clojure.set/")
everything works fine. I can see all the completions.

But if I do the same in an Emacs nrepl buffer, I got the exception as described in the ac-nrepl issue. So it does seems nrepl related. Can someone explain why? Thank you.

I am using lein2 preview 10, and nrepl.el 0.1.4 preview


Re: Deprecation of Swank Clojure, long live nrepl.el Tim King 8/27/12 11:56 AM


But if I do the same in an Emacs nrepl buffer, I got the exception as described in the ac-nrepl issue. So it does seems nrepl related. Can someone explain why? Thank you.

I am using lein2 preview 10, and nrepl.el 0.1.4 preview

Hi Warren,
I added an explanation to the issue you referenced above.

Cheers,
Tim

Re: Deprecation of Swank Clojure, long live nrepl.el Warren Lynn 8/28/12 8:48 AM


With Tim's pointer, I worked around the completion exception on namespace by redefining the resolve-class. However, there is still another problem:

If my cursor stops at the end of a namespace without any slash, like this "(clojure.set", I got an exception again. This time, the exception is thrown because
(doc clojure.set)
will throw an exception (auto complete is trying to pull out its documentation in a pop up window).

(doc clojure.set) won't even work in a regular "lein repl" shell. If we don't yet have the concept namespace doc string in Clojure, I thought it should return nil instead of throwing an exception. Is that a known issue/bug? If yes, will it be fixed in the next release of Clojure? Any workaround (except for totally disable the auto-complete popup documentation)? Thank you.


Re: Deprecation of Swank Clojure, long live nrepl.el Andy Fingerhut 8/28/12 7:14 PM
The issue with an exception when trying to find the doc of a namespace is a known issue, and should be fixed in Clojure 1.5 when it is released:

http://dev.clojure.org/jira/browse/CLJ-902

You could try out clojure-1.5.0-alpha4 to see if it fixes the problem for you, if that happens to be convenient for you to try.

Andy