dgrnbrg / vim-redl

A better Vim integration story for Clojure
106 stars 8 forks source link

vim-redl hangs when trying to eval/print infinite seqs, even when *print-length* is set to some small number #18

Closed oskarkv closed 11 years ago

oskarkv commented 11 years ago

In a redl buffer: (set! *print-length* 7) (range 20) => (0 1 2 3 4 5 6 ...) (range) ; hangs vim

dgrnbrg commented 11 years ago

This could be related to my use of reply's hacks: https://github.com/dgrnbrg/redl/blob/master/src/redl/core.clj#L55

This could be solved by solving issue #6 as well, I think.

dgrnbrg commented 11 years ago

This is fixed in the head of vim-redl. Now, the repl will notice that the computation takes too long, and it'll offer for you to keep waiting, try .interrupting the thread, .stop the thread, or print out the stack trace of the thread. This should dramatically improve the use of redl for interactive tasks.

oskarkv commented 11 years ago

I have not tried it, but couldn't it work like it does in lein repl or fireplace's :Eval? I.e. just print *print-length* elements and not hang. That would be much better.

dgrnbrg commented 11 years ago

This may be a question of disabling pretty-printing. In the latest version, you can do (reset! redl.core/pretty-print false). Please let me know if that works.

On Mon, Oct 7, 2013 at 5:27 AM, oskarkv notifications@github.com wrote:

I have not tried it, but couldn't it work like it does in lein repl or fireplace's :Eval? I.e. just print print-length elements and not hang. That would be much better.

— Reply to this email directly or view it on GitHubhttps://github.com/dgrnbrg/vim-redl/issues/18#issuecomment-25794989 .