Testing the Release Candidate

53 views
Skip to first unread message

Meikel Brandmeyer

unread,
Jul 3, 2010, 6:18:32 PM7/3/10
to vimcl...@googlegroups.com
Dear adventurous Clojurians,

as you might have noticed the issues list got shorter lately. I have implemented some improvements (hopefully) in the handling of errors and the interaction of the Vim and the Clojure part. Also the installation was (hopefully) simplified. From the user perspective the actual handling shouldn't have changed much.

Anyone who dares to test, please consider the following stress testing:

* Install just the vim part w/o any specific configuration (besides the usual filetype stuff) => Static things should work.
* Activate the nailgun part and test with all kinds of mistakes, missing client, non-executable client, incorrect classpath => should handle errors gracefully with some (not necessarily good) message
* clojure.test users: c.t introduces *test-out* which sucks. If clojure.test is loaded before the nailgun server is started there might be problems. If anyone encounters problems here, I'd like to know about it.

And besides that: do other crazy stuff.

However note, that you have to use the bundled nailgun server, since I had to modify it slightly.

If everything works, we are on route to 2.2.0. :)

You can find the required files here:

http://kotka.de/snapshots/vimclojure-2.2.0-SNAPSHOT.zip
http://kotka.de/snapshots/vimclojure-2.2.0-SNAPSHOT.jar

Sincerely
Meikel

Mike Mazur

unread,
Jul 4, 2010, 12:35:38 AM7/4/10
to vimcl...@googlegroups.com
Hi Meikel,

On Sun, Jul 4, 2010 at 06:18, Meikel Brandmeyer <m...@kotka.de> wrote:
> You can find the required files here:
>
> http://kotka.de/snapshots/vimclojure-2.2.0-SNAPSHOT.zip
> http://kotka.de/snapshots/vimclojure-2.2.0-SNAPSHOT.jar

I notice the .zip file is missing the 'ng' executable (the nailgun
client). Is this intentional?

The error message I got when launching vim was very instructive though
:) it was immediately obvious what the problem was.

Thanks,
Mike

Meikel Brandmeyer

unread,
Jul 4, 2010, 3:11:47 AM7/4/10
to vimcl...@googlegroups.com
Hi,

Am 04.07.2010 um 06:35 schrieb Mike Mazur:

> I notice the .zip file is missing the 'ng' executable (the nailgun
> client). Is this intentional?

This is intentional. The zip should just go vanilla into .vim as for any other vim plugin. I can't do more for a newbie's ease of installation experience. The client was always an annoyance for that. Since it won't change with every release there will be a separate zip file, which you have to install once only. People already using VimClojure don't have to care. They can use their previous client.

Sincerely
Meikel

Meikel Brandmeyer

unread,
Jul 4, 2010, 11:58:28 AM7/4/10
to vimclojure
Hi,
I found a rather serious bug with the Repl. The snapshots are updated.

Sincerely
Meikel

Lee Hinman

unread,
Jul 4, 2010, 12:08:21 PM7/4/10
to vimcl...@googlegroups.com

Hi Meikel,
I'm seeing this error when opening any .clj file:

Could not determine the Namespace of the file.
Reason:
Couldn't execute Nail!
java.lang.IllegalArgumentException: No matching field found:
getInputStream for class
com.martiansoftware.nailgun.ThreadLocalInputStream

Unabridged error dump here: http://gist.github.com/463546

I'm not really sure what to try to get it to work, do you know what's
causing it to fail?

- Lee

Mike Mazur

unread,
Jul 4, 2010, 12:12:05 PM7/4/10
to vimcl...@googlegroups.com
Hi Meikel,

I'm noticing that the key mappings aren't working. My workflow is as follows:

1. run nailgun server via ${vimclojure-dir}/bin/ng-server from project
dir which contains .clojure file
2. open clojure source file which is on $CLASSPATH
3. try to open REPL with \sr or \sR

I notice a delay when vim is opening, which indicates that the file is
being "imported" by the nailgun server. However, when I use any key
mappings, nothing happens. No error message, no REPL.

Leaving the nailgun server running, then quitting vim & opening the
file again sometimes leads to this error:

; Use \p to close this buffer!

Could not determine the Namespace of the file.

This might have different reasons. Please check, that the ng server
is running with the correct classpath and that the file does not contain
syntax errors. The interactive features will not be enabled, ie. the
keybindings will not be mapped.

Reason:
Couldn't execute Nail!

{"value" : "tweetsight.core", "stdout" : "", "stderr" : ""}

Naturally, \p doesn't close the window. I usually need to quit vim &
re-open the file multiple times before the error pops up.

If I use the previous pre-release version[1] everything works as expected.

Thanks,
Mike


[1] http://groups.google.com/group/vimclojure/browse_thread/thread/d15b0174d2a1e51

Meikel Brandmeyer

unread,
Jul 4, 2010, 2:09:13 PM7/4/10
to vimcl...@googlegroups.com
Hi,

Am 04.07.2010 um 18:12 schrieb Mike Mazur:

> Reason:
> Couldn't execute Nail!
> {"value" : "tweetsight.core", "stdout" : "", "stderr" : ""}


This is rather strange, because you get the right answer. I'll have to check that.

Sincerely
Meikel

Meikel Brandmeyer

unread,
Jul 4, 2010, 2:41:34 PM7/4/10
to vimcl...@googlegroups.com
Hi,

Am 04.07.2010 um 18:08 schrieb Lee Hinman:

> java.lang.IllegalArgumentException: No matching field found:
> getInputStream for class
> com.martiansoftware.nailgun.ThreadLocalInputStream

Did you use the nailgun server from the jar file? I had to patch it to work around things bypassing *out* and *err*. I tried to monkey patch nailgun, but Java was smarter than I hoped. So I had to intrusively modify nailgun itself.

Sincerely
Meikel

Meikel Brandmeyer

unread,
Jul 4, 2010, 3:52:34 PM7/4/10
to vimclojure
Hi,

On Jul 4, 6:12 pm, Mike Mazur <mma...@gmail.com> wrote:

> I notice a delay when vim is opening, which indicates that the file is
> being "imported" by the nailgun server. However, when I use any key
> mappings, nothing happens. No error message, no REPL.

I can't reproduce this. Do you have any special vim settings?

Sincerely
Meikel

Mike Mazur

unread,
Jul 4, 2010, 9:26:14 PM7/4/10
to vimcl...@googlegroups.com
Hi Meikel,

Not that I can think of. I wiped my ~/.vimrc file and put in just
what's necessary for vimclojure to work:

$ cat ~/.vimrc
call pathogen#runtime_append_all_bundles()
filetype off
filetype plugin indent on
let vimclojure#WantNailgun = 1
let vimclojure#NailgunClient = "/home/mike/.vim/bundle/vimclojure/ng"

Still the problem persists. However if I use the old version of
vimclojure-2.2.0-SNAPSHOT.zip (as I mentioned earlier), everything
works great.

Note I use pathogen, but there's only one bundle with the contents of
vimclojure-2.2.0-SNAPSHOT.zip:

$ ll ~/.vim/bundle
total 4
drwxr-xr-x 9 mike mike 4096 2010-07-05 00:01 vimclojure

I'm using vim as shipped in Ubuntu 10.04:

$ vim --version
VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Apr 16 2010 13:27:36)
Included patches: 1-330

Thanks,
Mike

Mike Mazur

unread,
Jul 4, 2010, 10:25:31 PM7/4/10
to vimcl...@googlegroups.com
Hi Meikel,

On Mon, Jul 5, 2010 at 03:52, Meikel Brandmeyer <m...@kotka.de> wrote:

I started looking into the differences in autoload/vimclojure.vim and
ftplugin/clojure.vim between this release candidate and the previous
one. What seems to be missing are calls to vimclojure#MakePlug in the
new version of ftplugin/clojure.vim. For example, in the older release
candidate, the following two commands are called to set up \sr:

call vimclojure#MakePlug("n", "StartRepl", 'vimclojure#Repl.New("user")')
call vimclojure#MapPlug("n", "sr", "StartRepl")

but in the new release candidate you have only

call vimclojure#MapCommandPlug("n", "sr", "StartRepl")

When looking at the mappings with :map, I only see this entry in the
newest release candidate:

n \sR @<Plug>ClojureStartLocalRepl

where the old release candidate had two entries:

n \sR @<Plug>ClojureStartLocalRepl
n <Plug>ClojureStartLocalRepl * :call
vimclojure#Repl.New(b:vimclojure_namespace)<CR>

When I start vim after adding the following line to my ftplugin/clojure.vim:

call vimclojure#MakePlug("n", "StartRepl", 'vimclojure#Repl.New', '"user"')

Then the shortcut \sr does launch a REPL. However, when I type
something like (doc find) and hit enter, all I see is
<Plug>ClojureReplEnterHook -- which hints that there's no plug for
ClojureReplEnterHook?

I'm curious how this works for you without any plugs defined?

Thanks,
Mike

Lee Hinman

unread,
Jul 5, 2010, 3:11:20 AM7/5/10
to vimcl...@googlegroups.com

Yep, I used the bin/ng-server script that was contained in the .zip file.

- Lee

Mike Mazur

unread,
Jul 5, 2010, 4:27:15 AM7/5/10
to vimcl...@googlegroups.com
Hi Lee,

On Mon, Jul 5, 2010 at 15:11, Lee Hinman <l...@writequit.org> wrote:
> On Sun, Jul 4, 2010 at 12:41 PM, Meikel Brandmeyer <m...@kotka.de> wrote:
>> Hi,
>>
>> Am 04.07.2010 um 18:08 schrieb Lee Hinman:
>>
>>> java.lang.IllegalArgumentException: No matching field found:
>>> getInputStream for class
>>> com.martiansoftware.nailgun.ThreadLocalInputStream
>>
>> Did you use the nailgun server from the jar file? I had to patch it to work around things bypassing *out* and *err*.  I tried to monkey patch nailgun, but Java was smarter than I hoped. So I had to intrusively modify nailgun itself.
>>

> Yep, I used the bin/ng-server script that was contained in the .zip file.

I'm pretty sure Meikel is referring to the nailgun server inside
vimclojure-2.2.0-SNAPSHOT.jar. Make sure you are running this nailgun
server, not one you got elsewhere.

Mike

Meikel Brandmeyer

unread,
Jul 5, 2010, 5:04:04 AM7/5/10
to vimclojure
Hi,

On Jul 5, 4:25 am, Mike Mazur <mma...@gmail.com> wrote:

> I'm curious how this works for you without any plugs defined?

Dang! I'm so stupid. *bangheadagainstwallbangbangbang*

Of course it works for me because the plugs are in place. Why? Because
I also use pathogen and have a link to my dev working directory there.
And there plugin/clojure.vim sets up the necessary stuff. However in
the task creating the zip file plugin/clojure.vim is not included.
Hence it is missing from the snapshot. The previous snapshot had the
<Plug>s contained in ftplugin/clojure.vim. Therefor it works with the
previous snapshot.

I will fix things and update the snapshot when I'm back at home this
evening. In case you are impatient to try the new, shiny and glorious
version, you can get the plugin/clojure.vim from the hg repo. (Don't
try to build the archives, though. The build is currently the beta
test for my gradle plugin for Gradle 0.9, and hence is broken with
Gradle 0.8)

Shows again: Don't live by assumptions! Replicate the deployment
environment as close as possible.

Sincerely
Meikel

Meikel Brandmeyer

unread,
Jul 5, 2010, 5:04:33 AM7/5/10
to vimclojure
Hi,

On Jul 5, 9:11 am, Lee Hinman <l...@writequit.org> wrote:

> Yep, I used the bin/ng-server script that was contained in the .zip file.

Did you also use the correct jar file?

Sincerely
Meikel

Mike Mazur

unread,
Jul 5, 2010, 6:15:44 AM7/5/10
to vimcl...@googlegroups.com
Hi Meikel,

On Mon, Jul 5, 2010 at 17:04, Meikel Brandmeyer <m...@kotka.de> wrote:
> Hi,
>
> On Jul 5, 4:25 am, Mike Mazur <mma...@gmail.com> wrote:
>
>> I'm curious how this works for you without any plugs defined?
>
> Dang! I'm so stupid. *bangheadagainstwallbangbangbang*
>
> Of course it works for me because the plugs are in place. Why? Because
> I also use pathogen and have a link to my dev working directory there.

> [...]

No worries, it happens :) That's what your beta testers are for!

> I will fix things and update the snapshot when I'm back at home this
> evening. In case you are impatient to try the new, shiny and glorious
> version, you can get the plugin/clojure.vim from the hg repo.

I grabbed the plugins/clojure.vim file from bitbucket and all seems to
be working fine. I'll keep hacking away at it & report back if
anything breaks.

Thanks,
Mike

Lee Hinman

unread,
Jul 5, 2010, 10:55:29 AM7/5/10
to vimcl...@googlegroups.com

Yep, replaced my old vimclojure jar with the new 2.2.0 snapshot.

- Lee

Meikel Brandmeyer

unread,
Jul 5, 2010, 12:24:39 PM7/5/10
to vimcl...@googlegroups.com
Hi,

Am 05.07.2010 um 16:55 schrieb Lee Hinman:

> Yep, replaced my old vimclojure jar with the new 2.2.0 snapshot.

Hmm... Ominous. Are you sure there is no other version of nailgun somewhere on the classpath?

Sincerely
Meikel

Meikel Brandmeyer

unread,
Jul 5, 2010, 6:03:23 PM7/5/10
to vimcl...@googlegroups.com
Hi,

Am 05.07.2010 um 11:04 schrieb Meikel Brandmeyer:

> I will fix things and update the snapshot when I'm back at home this
> evening.

Here we go. Another round of snapshots in sync with 5cb39ed5bb0d:

Meikel Brandmeyer

unread,
Jul 5, 2010, 6:06:43 PM7/5/10
to vimcl...@googlegroups.com
Hi again,

btw: if someone can help with the Windows crap... any help is appreciated.

http://bitbucket.org/kotarak/vimclojure/issue/53/windows-quoting-take-38201

Sincerely
Meikel

Lee Hinman

unread,
Jul 5, 2010, 11:03:30 PM7/5/10
to vimcl...@googlegroups.com

Looks like that was it, after A/Bing my jar directories, looks like
jruby's jar contains a nailgun server, removing it fixed the problem.
Thanks for the help troubleshooting.

Is there any possibility of maybe changing your particular nailgun's
classpath to be different than the original nailgun server, that way
the ng-server script could use your custom nailgun without interfering
with any other nailgun? I was doing some Clojure/JRuby interop work
and it'd be nice not to have to worry about collisions.

Anyway, I'll get to testing the new release now, thanks for all the
hard work on VimClojure :)

- Lee

Meikel Brandmeyer

unread,
Jul 6, 2010, 1:47:36 AM7/6/10
to vimclojure
Hi,

On Jul 6, 5:03 am, Lee Hinman <l...@writequit.org> wrote:

> Looks like that was it, after A/Bing my jar directories, looks like
> jruby's jar contains a nailgun server, removing it fixed the problem.
> Thanks for the help troubleshooting.

np :)

> Is there any possibility of maybe changing your particular nailgun's
> classpath to be different than the original nailgun server, that way
> the ng-server script could use your custom nailgun without interfering
> with any other nailgun? I was doing some Clojure/JRuby interop work
> and it'd be nice not to have to worry about collisions.

Yes. That's probably the best solution. I didn't want to deviate too
far from the stock nailgun. I like this "plug into an existing
solution" approach. But, oh well...

http://bitbucket.org/kotarak/vimclojure/issue/56/move-custom-nailgun-to-different-package

> Anyway, I'll get to testing the new release now, thanks for all the
> hard work on VimClojure :)

Thank you. :)

Sincerely
Meikel

Mike Mazur

unread,
Jul 8, 2010, 3:03:00 AM7/8/10
to vimcl...@googlegroups.com
Hi Meikel,

On Tue, Jul 6, 2010 at 06:03, Meikel Brandmeyer <m...@kotka.de> wrote:
> Here we go. Another round of snapshots in sync with 5cb39ed5bb0d:
>
> http://kotka.de/snapshots/vimclojure-2.2.0-SNAPSHOT.zip
> http://kotka.de/snapshots/vimclojure-2.2.0-SNAPSHOT.jar

I'm giving this version a spin and I'm getting quite frequent errors
when sending stuff out to nailgun. These errors seem random; when the
same form is evaluated, sometimes it results in an error, other times
everything is fine.

The error is only in Vim though. The code is evaluated correctly and
returns the expected results.

Let's consider an example from some Twitter API experiments I'm doing
using clojure-twitter[1]. I have a function (run-twitter-function)
which takes two arguments, a map with credentials and the name of the
clojure-twitter function to execute.

One of the functions is a straightforward query to discover how many
API requests I have remaining. Executing it at the REPL inside Vim
looks something like this:

tweetsight.core=> (run-twitter-function *twitter-credentials*
twitter/rate-limit-status)
{:remaining_hits 0, :reset_time "Thu Jul 08 05:58:26 +0000 2010",
:hourly_limit 350, :reset_time_in_seconds 1278568706}
tweetsight.core=> [ ]

This time execution was successful. A new prompt was printed below the
return value and the cursor is indicated by [ ]. At this point I can
hit C-up and execute the previous function again. The third time I
execute this code, I get the following error popping up at the bottom
of the Vim window:

Error detected while processing function 90..vimclojure#ExecuteNailWithInput:
line 19:
E605: Exception not caught: Couldn't execute Nail!^@{"value" :


"tweetsight.core", "stdout" : "", "stderr" : ""}

Error detected while processing function 90:
line 30:
E171: Missing :endif
Press ENTER or type command to continue

After pressing ENTER, my cursor is in the REPL window in Vim, but I am
no longer in INSERT mode:

tweetsight.core=> (run-twitter-function *twitter-credentials*
twitter/rate-limit-status[)]
{:remaining_hits 0, :reset_time "Thu Jul 08 05:58:26 +0000 2010",
:hourly_limit 350, :reset_time_in_seconds 1278568706}

Again the cursor is indicated with [ ], this time it's sitting at the
end of the code I executed, the same place it was when I pressed enter
to send this code off. The correct result is printed below. In order
to proceed, I will delete the result (with dd), then enter insert mode
and just execute the function again, or remove it and execute a
different function.

I'm curious about the error message that is printed. It has some line
numbers (19, 30), where are these line numbers from? I looked inside
autoload/vimclojure.vim which defines vimclojure#ExecuteNailWithInput,
but lines 19 and 30 are in highlighting functions, so I'm not sure.

This happens quite frequently, on any code. Hopefully the description
above is sufficiently detailed to give you some insights into what's
happening. If you need more details, please ask :)

Thanks!
Mike


[1] http://github.com/mikem/clojure-twitter/ a fork of
http://github.com/mattrepl/clojure-twitter/

Meikel Brandmeyer

unread,
Jul 8, 2010, 8:03:32 AM7/8/10
to vimclojure
Hi,

On Jul 8, 9:03 am, Mike Mazur <mma...@gmail.com> wrote:

> Error detected while processing function 90..vimclojure#ExecuteNailWithInput:
> line   19:
> E605: Exception not caught: Couldn't execute Nail!^@{"value" :
> "tweetsight.core", "stdout" : "", "stderr" : ""}
> Error detected while processing function 90:
> line   30:
> E171: Missing :endif
> Press ENTER or type command to continue

This looks like the check of the namespace which is done after the
repl command. The exception now bubbles up, because it is not caught
anymore in the ExecuteNailWithInput function. This is to allow the
"show errors in buffers" thing. However, I don't understand why there
is an error. The output looks perfectly normal.

Can you replace lines 413-415:

if v:shell_error
throw "Couldn't execute Nail!\n" . output
endif

with:

if v:shell_error
throw "Couldn't execute Nail! (" . v:shell_error . ")\n" . output
endif

This should add the exit code of the nailgun client. Maybe this helps
to understand what the problem is.

> I'm curious about the error message that is printed. It has some line
> numbers (19, 30), where are these line numbers from? I looked inside
> autoload/vimclojure.vim which defines vimclojure#ExecuteNailWithInput,
> but lines 19 and 30 are in highlighting functions, so I'm not sure.

The line numbers are rather funny. They count from the start of the
function. So 19 is the above throw. Line 30 in function 90 is line
827, where the namespace check is done. It's called function 90,
because this function is stored as an anonymous function in a
dictionary - poor-vimmer's OOP. Don't ask me, why it says something
about a missing endif.

And then people complain about clojure's error messages, pff... piece
of cake.

> This happens quite frequently, on any code. Hopefully the description
> above is sufficiently detailed to give you some insights into what's
> happening. If you need more details, please ask :)

It's rather puzzling. I'll see if I can find out something. (At least
this didn't happen to me up to now...)

Sincerely
Meikel

MarkSwanson

unread,
Jul 10, 2010, 12:10:00 PM7/10/10
to vimclojure
I've done this and I get:
Couldn't execute Nail! (227)

I get this a lot. I just retry reloading my clojure file over and over
until it works.
227 is a weird error. 227-128 is signal 99. ??
Google found this about sig 99:
Some program which was launched with -exec or similar was killed with
a fatal
signal. This is just an advisory message.


I removed ng, changed the Makefile CFLAGS to CFLAGS=-Wall -pedantic
and recompiled.
I still get 227 a lot.
I upgraded from Ubuntu 9.04 to 9.10. Still same issue.
Currently using VIM 7.2.245.

Meikel Brandmeyer

unread,
Jul 10, 2010, 2:12:07 PM7/10/10
to vimcl...@googlegroups.com
Hi,

Am 10.07.2010 um 18:10 schrieb MarkSwanson:

> I've done this and I get:
> Couldn't execute Nail! (227)
>
> I get this a lot. I just retry reloading my clojure file over and over
> until it works.
> 227 is a weird error. 227-128 is signal 99. ??

Hmm.. Could you try something rather eccentric? Please use something different as "client". Eg. /bin/echo. Does the same problem occur?

Sincerely
Meikel


MarkSwanson

unread,
Jul 10, 2010, 5:56:32 PM7/10/10
to vimclojure
In my .vimrc I did this:

let vimclojure#NailgunClient = "/bin/echo"
"let vimclojure#NailgunClient = "/home/mswanson/.vim/ng"

The same problem occurs. (Could not determine namespace). However, now
it prints out a reason.

When I did: `vim utils.clj` the error was:

Could not determine the Namespace of the file.
...
Reason:
Vim(let):E121: Undefined variable: vimclojure

I then changed "/bin/echo" to: "/bin/true" and received this:

Could not determine the Namespace of the file.
...
Reason:
Vim(let):E15: Invalid expression:

I wonder if the problem is unread bytes.
When I first start the nailgun server and vim a Clojure file it always
works.
If I exit and re-edit the Clojure file often it will fail with error
227. It's random - as if the previous socket request didn't read all
of the response data and a few more reads must be done before the
client/server get in sync again.

I'm happy to keep trying things.

Cheers.

MarkSwanson

unread,
Jul 10, 2010, 7:08:51 PM7/10/10
to vimclojure
I have created a workaround that (so far) works perfectly for me.
You might laugh at the patch, but I assure you it works (for me):

--- a/src/main/java/vimclojure/Nail.java Mon Jul 05 23:54:36
2010 +0200
+++ b/src/main/java/vimclojure/Nail.java Sat Jul 10 18:18:52
2010 -0400
@@ -45,6 +45,7 @@
public static void nailMain(NGContext ctx) throws Exception {
final String nail = ctx.getArgs()[0];
int slash = nail.indexOf("/");
+ Thread.sleep(100);

String namespace;
String function;


1. patch Nail.java
2. (From the vimclojure dir:)
javac -g -cp ${LIBRARIES}/clojure/clojure-1.2.0.jar:src/main/java src/
main/java/vimclojure/Nail.java
3. hot-swap the newly compiled class into the VM.
4. test, test, test... works perfectly every time.

I've patched your vimclojure jar file and will be using this patch
every day from now on.
This silly patch is an immense improvement for me.
My fast machine must be triggering a race condition that doesn't
happen on your box.

Btw, I walked the sleep() all the way up to the top of the while()
inside of run() in NGSession and the 'fix' kept on working.
Hmm. I walked the sleep successfully up to NGServer.java:: 378-380.
Maybe run(socket) isn't cleaning up.

Anyway, please accept the patch. I suspect the other person on this
list will confirm it solves the 'Could not determine Namespace...'
issue too.

Cheers.


MarkSwanson

unread,
Jul 10, 2010, 7:50:20 PM7/10/10
to vimclojure
For easy testing I've put the modified jar here:

http://www.ScheduleWorld.com/sw2/vimclojure-2.2.0-SNAPSHOT.jar

Mike - since you were having the same problem it would be interesting
to see if this fix works for you too.

Cheers.

p2

unread,
Jul 10, 2010, 11:09:49 PM7/10/10
to vimclojure
Mark,

I too was seeing these issues and I replaced Meikel's 2.2.0-snapshot
jar with your patched version and things have worked smoothly since.

$ vim --version
VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Apr 16 2010 12:36:35)
Included patches: 1-330

I am also using 1.2.0-master-SNAPSHOT and clojure-contrib-1.2.0-
SNAPSHOT

MarkSwanson

unread,
Jul 11, 2010, 7:38:43 PM7/11/10
to vimclojure
Meikel: wrt your latest vimclojure: thank you for automatically
showing the last line in the temporary buffer when showing results. I
really appreciate that.

Cheers.

MarkSwanson

unread,
Jul 11, 2010, 8:06:24 PM7/11/10
to vimclojure

I lowered the sleep to 10ms and it wouldn't work.
I used 50ms and it seems to work fine. 100ms adds up and was slowing
me down in the REPL.

I changed the location of the sleep closer to where the problem is:

+++ b/src/main/java/com/martiansoftware/nailgun/NGServer.java Sun
Jul 11 20:05:26 2010 -0400
@@ -377,6 +377,7 @@
while (!shutdown) {
sessionOnDeck = sessionPool.take();
Socket socket = serversocket.accept();
+ Thread.sleep(50);
sessionOnDeck.run(socket);
}

I replaced the jar.
http://www.ScheduleWorld.com/sw2/vimclojure-2.2.0-SNAPSHOT.jar

Cheers.

Meikel Brandmeyer

unread,
Jul 12, 2010, 1:59:57 AM7/12/10
to vimclojure
Hi,
Thank you for investigating this. I'm still a little worried, because
I don't understand the problem. I could add this as a temporary fix if
we find some reasonable time value. I'll have to try that on my crappy
work laptop at the company. This give a lower bound. :]

Anyway I'd like to understand the race condition. *Sigh* Have to give
jswat another run tonight.

Sincerely
Meikel

Meikel Brandmeyer

unread,
Jul 12, 2010, 4:36:32 AM7/12/10
to vimclojure
Hi,
I hope the heuristics work for that. It does it only for code buffers.
So documentation should stay at the top. It normally isn't read
backwards. ;)

I haven't tested much with macroexpansion, though.

Sincerely
Meikel

Mike Mazur

unread,
Jul 13, 2010, 3:08:16 AM7/13/10
to vimcl...@googlegroups.com
Hi,

I just grabbed the latest version with your changes and will give it a
spin. Will report after using it for a while.

Thanks!
Mike

Mike Mazur

unread,
Jul 13, 2010, 6:21:25 AM7/13/10
to vimcl...@googlegroups.com
Hi,

I encountered the following error when executing ",close":

Error detected while processing function

90..87..vimclojure#ExecuteNail..vimclojure#ExecuteNailWithInput:
line 19:
E605: Exception not caught: Couldn't execute Nail! (227)^@{"value" :
0, "stdout" : "", "stderr" : ""}
Error detected while processing function 90..87:
line 2:
E171: Missing :endif


Error detected while processing function 90:

line 9:


E171: Missing :endif
Press ENTER or type command to continue

And another one when trying to call count on an unbound var:

tweetsight.core=> (count ts)
#<CompilerException java.lang.IllegalStateException: Var
tweetsight.core/ts is unbound. (REPL:5)>

Error detected while processing function 90..vimclojure#ExecuteNailWithInput:
line 19:

E605: Exception not caught: Couldn't execute Nail! (227)^@{"value" :


"tweetsight.core", "stdout" : "", "stderr" : ""}
Error detected while processing function 90:
line 30:
E171: Missing :endif
Press ENTER or type command to continue

Only those two failures happened to me today, I think that brings the
frequency down from before.

Thanks,
Mike

MarkSwanson

unread,
Jul 15, 2010, 12:02:19 AM7/15/10
to vimclojure
I've also had this error a couple of times.
The frequency of errors has gone down for me from 30/hr to 2/day.

uns...@gmail.com

unread,
Jul 28, 2010, 8:44:33 AM7/28/10
to vimclojure
I also get:
Vim(let):E15: Invalid expression:

Try this:
(.setDefaultCloseOperation (javax.swing.JFrame.) 3)

- get the above error

Then try this:
(.setDefaultCloseOperation (javax.swing.JFrame.) 2)

- no errors

I'm using your patched Nail.java. Does sleep have to be increased
beyond 100?

Thanks,

Paul
Reply all
Reply to author
Forward
0 new messages