Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
SLIME REPL broken
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  12 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Stefan Kamphausen  
View profile  
 More options Nov 15 2009, 9:21 am
From: Stefan Kamphausen <ska2...@googlemail.com>
Date: Sun, 15 Nov 2009 06:21:03 -0800 (PST)
Local: Sun, Nov 15 2009 9:21 am
Subject: SLIME REPL broken
Hi,

a short discussion on the SLIME mailinglist lead to the result that
the arglist of a backend function in swank did change.

Current checkouts of SLIME do not work with Clojure, at least if you
use autodoc.

http://common-lisp.net/pipermail/slime-devel/2009-November/016919.html

I took a quick look at the relevant function (src/main/clojure/swank/
commands/contrib/swank_arglists.clj) in swank-clojure but it would
need some diving into the code for me to help with this.  Maybe
someone more experienced than me can step in?

Kind regards,
Stefan Kamphausen


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cyrus Harmon  
View profile  
 More options Nov 15 2009, 10:59 am
From: Cyrus Harmon <cyrushar...@gmail.com>
Date: Sun, 15 Nov 2009 07:59:56 -0800
Local: Sun, Nov 15 2009 10:59 am
Subject: Re: SLIME REPL broken
Heh: "    ;; Yeah, I'm lazy -- I'll flesh this out later"

Not sure if that's related to the problem, but it's amusing at least.

Cyrus

On Nov 15, 2009, at 6:21 AM, Stefan Kamphausen wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Phil Hagelberg  
View profile  
 More options Nov 16 2009, 2:12 pm
From: Phil Hagelberg <p...@hagelb.org>
Date: Mon, 16 Nov 2009 11:12:11 -0800
Local: Mon, Nov 16 2009 2:12 pm
Subject: Re: SLIME REPL broken

Stefan Kamphausen <ska2...@googlemail.com> writes:
> a short discussion on the SLIME mailinglist lead to the result that
> the arglist of a backend function in swank did change.

> Current checkouts of SLIME do not work with Clojure, at least if you
> use autodoc.

> http://common-lisp.net/pipermail/slime-devel/2009-November/016919.html

> I took a quick look at the relevant function (src/main/clojure/swank/
> commands/contrib/swank_arglists.clj) in swank-clojure but it would
> need some diving into the code for me to help with this.  Maybe
> someone more experienced than me can step in?

Right now the best thing to do is to use slime, swank-clojure, and
clojure-mode from ELPA, as the versions there are known to work well
together.

http://tromey.com/elpa/install.html

Unless there are some really great features added upstream in slime,
fixing swank-clojure to work with their latest changes is a low priority.

-Phil


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stefan Kamphausen  
View profile  
 More options Nov 16 2009, 5:15 pm
From: Stefan Kamphausen <ska2...@googlemail.com>
Date: Mon, 16 Nov 2009 14:15:40 -0800 (PST)
Local: Mon, Nov 16 2009 5:15 pm
Subject: Re: SLIME REPL broken
Hi,

Phil Hagelberg wrote:
> Unless there are some really great features added upstream in slime,
> fixing swank-clojure to work with their latest changes is a low priority.

this is a pity, at least for those of us, who also use Slime to do
some CL hacking.  For that setup it is quite common to always update
to CVS head because that may be the only version working with current
releases of, e.g., SBCL.  Well, currently I don't really do CL stuff,
it's just that I set up another machine doing lots of VC-checkouts...
I could just copy an older version of Slime there.

I'll take a look at it the next few days (er, evenings that is), if I
find the time.  No promises ;-)

Over there at Slime's people are thinking, the Clojure family forked
Slime, maybe that's not the worst idea.  Things would probably get
easier if there were only one backend to support.

Best regards,
Stefan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cyrus Harmon  
View profile  
 More options Nov 16 2009, 11:29 pm
From: Cyrus Harmon <cyrushar...@gmail.com>
Date: Mon, 16 Nov 2009 20:29:08 -0800
Local: Mon, Nov 16 2009 11:29 pm
Subject: Re: SLIME REPL broken

Stefan put in words what I was thinking earlier today. For those of us that use both CL and clojure, keeping swank-clojure up to date wrt the slime HEAD is a good thing, if you ask me. It is, however, a two-way street and I would imagine that the swank-clojure implementors don't want to spend too much time chasing SLIME's tail, as it were. Keeping the clojure backend on the radar of the core SLIME development team is probably a good thing. I think it would be unfortunate if swank-clojure were to require a different SLIME emacs piece than the CL swank (and scheme48, etc...) backends.

cyrus

On Nov 16, 2009, at 2:15 PM, Stefan Kamphausen wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stefan Kamphausen  
View profile  
 More options Nov 17 2009, 7:47 am
From: Stefan Kamphausen <ska2...@googlemail.com>
Date: Tue, 17 Nov 2009 04:47:23 -0800 (PST)
Local: Tues, Nov 17 2009 7:47 am
Subject: Re: SLIME REPL broken
Hi,

Stefan Kamphausen wrote:
> I'll take a look at it the next few days (er, evenings that is), if I
> find the time.  No promises ;-)

Not that I'm close to a solution, but at least I have stacktrace...
After some digging in the clojure-swank code I came across this piece
in swank.clj:

(defn- connection-serve [conn]
  (let [control
        (dothread-swank
          (thread-set-name "Swank Control Thread")
          (try
           (control-loop conn)
           (catch Exception e
             ;; fail silently
             nil)))
....

and I didn't like that comment.  So I changed that to

(defn- connection-serve [conn]
  (let [control
        (dothread-swank
          (thread-set-name "Swank Control Thread")
          (try
           (control-loop conn)
           (catch Exception e
             ;; fail silently
             (.printStackTrace e)
             (.printStackTrace (.getCause e))
             nil)))

Then after typing just "(+" into the SLIME-REPL-Buffer (obviously
without the quotes) I see a stacktrace in the *inferior-lisp*-Buffer:

user=> user=> Connection opened on local port  37693
#<ServerSocket ServerSocket
[addr=0.0.0.0/0.0.0.0,port=0,localport=37693]>
user=> user=> java.lang.InterruptedException
        at java.util.concurrent.locks.AbstractQueuedSynchronizer
$ConditionObject.reportInterruptAfterWait
(AbstractQueuedSynchronizer.java:1899)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer
$ConditionObject.await(AbstractQueuedSynchronizer.java:1934)
        at java.util.concurrent.LinkedBlockingQueue.take
(LinkedBlockingQueue.java:358)
        at swank.util.concurrent.mbox$receive__214.invoke(mbox.clj:28)
        at swank.core$control_loop__249.invoke(core.clj:258)
        at swank.swank$connection_serve__365$fn__397$fn__399.invoke(swank.clj:
29)
        at clojure.lang.AFn.applyToHelper(AFn.java:171)
        at clojure.lang.AFn.applyTo(AFn.java:164)
        at clojure.core$apply__4305.invoke(core.clj:420)
        at swank.swank$connection_serve__365$fn__397.doInvoke(swank.clj:26)
        at clojure.lang.RestFn.invoke(RestFn.java:402)
        at clojure.lang.AFn.run(AFn.java:37)
        at java.lang.Thread.run(Thread.java:619)
Exception in thread "Swank Control Thread" java.lang.RuntimeException:
java.lang.NullPointerException
        at clojure.lang.AFn.run(AFn.java:41)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
        at swank.swank$connection_serve__365$fn__397$fn__399.invoke(swank.clj:
33)
        at clojure.lang.AFn.applyToHelper(AFn.java:171)
        at clojure.lang.AFn.applyTo(AFn.java:164)
        at clojure.core$apply__4305.invoke(core.clj:420)
        at swank.swank$connection_serve__365$fn__397.doInvoke(swank.clj:26)
        at clojure.lang.RestFn.invoke(RestFn.java:402)
        at clojure.lang.AFn.run(AFn.java:37)
        ... 1 more

(I hope, google-group-posting will not mess with the pasted code, I
can see no preview-button on the posting-page)

And sending a SIGQUIT to the java-process shows that at least the
"Swank Control Thread" died (I think some other swank-threads, too).

What's most annoying is that I have not yet found a way to debug this
without restarting the JVM every few minutes.  Still working on
this...

If anyone can give me a pointer where to look next, the help will be
highly appreciated.

Kind regards,
Stefan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stefan Kamphausen  
View profile  
 More options Nov 17 2009, 2:44 pm
From: Stefan Kamphausen <ska2...@googlemail.com>
Date: Tue, 17 Nov 2009 11:44:01 -0800 (PST)
Local: Tues, Nov 17 2009 2:44 pm
Subject: Re: SLIME REPL broken
Hi,

On Nov 17, 1:47 pm, Stefan Kamphausen <ska2...@googlemail.com> wrote:

[...]

> user=> user=> Connection opened on local port  37693
> #<ServerSocket ServerSocket
> [addr=0.0.0.0/0.0.0.0,port=0,localport=37693]>
> user=> user=> java.lang.InterruptedException
> [...]
>        at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.NullPointerException
> [...]
> And sending a SIGQUIT to the java-process shows that at least the
> "Swank Control Thread" died (I think some other swank-threads, too).

By now, I think the NPE is the thread that was killed.  Actually I
have made some progress in gettings things into a working state again,
but that would need some changes on the Slime-side.  So I asked over
there:

http://article.gmane.org/gmane.lisp.slime.devel/9197

Kind regards,
Stefan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Nolen  
View profile  
 More options Nov 17 2009, 2:52 pm
From: David Nolen <dnolen.li...@gmail.com>
Date: Tue, 17 Nov 2009 14:52:49 -0500
Local: Tues, Nov 17 2009 2:52 pm
Subject: Re: SLIME REPL broken

Stefan,

Thanks for pursuing this so adamantly :) For a long time (more than a year)
it was possible to use SLIME tip. It would be great for that to continue.

David

On Tue, Nov 17, 2009 at 2:44 PM, Stefan Kamphausen
<ska2...@googlemail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Constantine Vetoshev  
View profile  
 More options Nov 17 2009, 9:26 pm
From: Constantine Vetoshev <gepar...@gmail.com>
Date: Tue, 17 Nov 2009 18:26:44 -0800 (PST)
Local: Tues, Nov 17 2009 9:26 pm
Subject: Re: SLIME REPL broken
On Nov 17, 2:52 pm, David Nolen <dnolen.li...@gmail.com> wrote:

> Thanks for pursuing this so adamantly :) For a long time (more than a year)
> it was possible to use SLIME tip. It would be great for that to continue.

You can still use SLIME; just avoid the slime-autodoc contrib. Use

(slime-setup '(slime-repl))

to initialize SLIME. At least, this works for me. Make sure you don't
use (slime-setup '(slime-fancy)), because slime-fancy includes slime-
autodoc. You lose the nicer minibuffer function argument display, but
at least the basic environment works.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Phil Hagelberg  
View profile  
 More options Nov 18 2009, 12:40 am
From: Phil Hagelberg <p...@hagelb.org>
Date: Tue, 17 Nov 2009 21:40:31 -0800
Local: Wed, Nov 18 2009 12:40 am
Subject: Re: SLIME REPL broken

Stefan Kamphausen <ska2...@googlemail.com> writes:
>> Unless there are some really great features added upstream in slime,
>> fixing swank-clojure to work with their latest changes is a low priority.

> this is a pity, at least for those of us, who also use Slime to do
> some CL hacking.  For that setup it is quite common to always update
> to CVS head because that may be the only version working with current
> releases of, e.g., SBCL.  Well, currently I don't really do CL stuff,
> it's just that I set up another machine doing lots of VC-checkouts...
> I could just copy an older version of Slime there.

> I'll take a look at it the next few days (er, evenings that is), if I
> find the time.  No promises ;-)

Cool. I don't mean to discourage this work, I just mean that I have
little personal motivation to implement it myself.

> Over there at Slime's people are thinking, the Clojure family forked
> Slime, maybe that's not the worst idea.  Things would probably get
> easier if there were only one backend to support.

Honestly I don't know the server-side bit of swank-clojure that well;
I've mostly been focusing on the elisp side. So I don't know the
protocol that well myself; the server-side stuff was mostly written by
jochu, the original author.

-Phil


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kei Suzuki  
View profile  
 More options Nov 19 2009, 12:29 am
From: Kei Suzuki <ksd...@gmail.com>
Date: Wed, 18 Nov 2009 21:29:04 -0800 (PST)
Local: Thurs, Nov 19 2009 12:29 am
Subject: Re: SLIME REPL broken
You can still use slime-fancy and the arglist display feature by just
disabling autodoc mode like this:

(setq slime-use-autodoc-mode nil)
(slime-setup '(slime-fancy))

On Nov 18, 11:26 am, Constantine Vetoshev <gepar...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Ewald  
View profile  
 More options Nov 21 2009, 6:09 pm
From: Robert Ewald <robew...@gmx.net>
Date: Sun, 22 Nov 2009 00:09:54 +0100
Local: Sat, Nov 21 2009 6:09 pm
Subject: Re: SLIME REPL broken

Hello,

At Sun, 15 Nov 2009 06:21:03 -0800 (PST),

Not that I am experienced, but the problem is that the reader of
clojure doesn't allow double colons (::) and the percent-sign (%) has
a special meaning. For Common Lisp the double colon means a "private"
symbol of a package. I don't remember what the percent-sign means by
convention. So I have created a patch that replaces these illegal
character sequences. But that is of course not the right way to
go. The intention of the symbols needs to be preserved and I am not
quite sure how to do that. That would require some work with the slime
guys. I don't have time for that today so maybe somebody wants to pick
up from here.

Best regards

Robert

PS: Apologies if the patch is not in the format that you expect.

This patch is in the public domain.
diff --git a/src/main/clojure/swank/core/protocol.clj b/src/main/clojure/swank/core/protocol.clj
index 89f0890..8d4a44a 100644
--- a/src/main/clojure/swank/core/protocol.clj
+++ b/src/main/clojure/swank/core/protocol.clj
@@ -4,6 +4,20 @@

 ;; Read forms
 (def #^{:private true}
+     *percent-re* #"%")
+
+(defn- fix-percent
+  "Replace double colons with a /."
+  ([text] (.replaceAll (re-matcher *percent-re* text) "?")))
+
+(def #^{:private true}
+     *double-colon-re* #"::")
+
+(defn- fix-double-colon
+  "Replace double colons with a /."
+  ([text] (.replaceAll (re-matcher *double-colon-re* text) "/")))
+
+(def #^{:private true}
      *namespace-re* #"(^\(:emacs-rex \([a-zA-Z][a-zA-Z0-9]+):")

 (defn- fix-namespace
@@ -50,7 +64,7 @@
   ([#^java.io.Reader reader]
      (let [len  (Integer/parseInt (read-chars reader 6 read-fail-exception) 16)
            msg  (read-chars reader len read-fail-exception)
-           form (read-string (fix-namespace msg))]
+           form (read-string (fix-namespace (fix-double-colon (fix-percent msg))))]
        (if (seq? form)
          (deep-replace {'t true} form)
          form))))


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »