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?
> 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 received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@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+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
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.
> 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.
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.
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:
> 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 received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@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+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
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:
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.
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:
> 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:
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@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+unsubscribe@googlegroups.com<clojure%2Bunsubscribe@googlegroups.com >
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
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.
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.
> 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.
> 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?
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 @@