Re: about the repl

2010-12-22 Thread Tom Faulhaber
I have submitted a patch for pprint's tendency to mess up when exceeding *print-length*. I assume that Stuart will apply it to the 1.3 (master) branch RSN, unless he sees a problem with it. Sorry for the inconvenience. Tom On Dec 21, 12:30 am, Tom Faulhaber wrote: > Hmm, looks like I broke some

Re: about the repl

2010-12-21 Thread Tom Faulhaber
Hmm, looks like I broke some logic when I hand unrolled the original cl-format based dispatch to get better performance for lists, vectors, and maps. (Really I shouldn't have to do this, but I need to make cl-format itself generate code rather than threaded functions which are slow and tend to blow

Re: about the repl

2010-12-18 Thread Robert McIntyre
That's really cool and has been added to my standard system stuff :) --Robert McIntyre On Sat, Dec 18, 2010 at 6:46 PM, Alex Osborne wrote: > Stuart Sierra writes: > >> If your REPL implementation runs each command in a new Thread (as most >> of them do, I think) it can just stop the thread.  T

Re: about the repl

2010-12-18 Thread Alex Osborne
Stuart Sierra writes: > If your REPL implementation runs each command in a new Thread (as most > of them do, I think) it can just stop the thread. That won't work in > every situation (for example, a thread blocked waiting for I/O) but it > will get you out of an infinite sequence. For just a

Re: about the repl

2010-12-18 Thread Ken Wesson
On Sat, Dec 18, 2010 at 4:18 PM, Stuart Halloway wrote: >> The latter is easy to fix: provide a version of println that wraps an >> implicit (take n ...) around seq arguments (including when it calls >> itself on seqs nested within other structures). (*print-length* >> doesn't seem to work, just c

Re: about the repl

2010-12-18 Thread Stuart Halloway
> The latter is easy to fix: provide a version of println that wraps an > implicit (take n ...) around seq arguments (including when it calls > itself on seqs nested within other structures). (*print-length* > doesn't seem to work, just causes an infinite seq to print the first n > items and then a

Re: about the repl

2010-12-18 Thread Robert McIntyre
The rlwrap method is very cool, but I can't seem to get ctrl-C to work (it still quits to the terminal) any advice? --Robert McIntyre On Sat, Dec 18, 2010 at 3:01 PM, Mike Meyer wrote: > On Fri, 17 Dec 2010 22:45:01 -0800 (PST) > tor wrote: >> Is there a way to activate word completion in the

Re: about the repl

2010-12-18 Thread Mike Meyer
On Fri, 17 Dec 2010 22:45:01 -0800 (PST) tor wrote: > Is there a way to activate word completion in the repl? I find myself > hitting tab all the time... Since nobody else mentioned it (or even offered a solution other than "Try my environment"), you can use rlwrap (should be available in your s

Re: about the repl

2010-12-18 Thread Lee Spector
On Dec 18, 2010, at 12:14 PM, Ken Wesson wrote: > > The two commonest causes of repl hangs are > > * Buggy (loop ... recur) that does not terminate > * Repl tries to print an infinite lazy seq Not sure what the OP's interest is but FWIW the cases in which I most often want to break (and look a

Re: about the repl

2010-12-18 Thread Ken Wesson
On Sat, Dec 18, 2010 at 11:43 AM, Stuart Sierra wrote: > You don't necessarily need to kill the whole JVM.  If your REPL > implementation runs each command in a new Thread (as most of them do, I > think) it can just stop the thread.  That won't work in every situation (for > example, a thread bloc

Re: about the repl

2010-12-18 Thread Lee Spector
On Dec 18, 2010, at 11:25 AM, Aaron Cohen wrote: > There already exists clojure.contrib.repl-utils/add-break-thread! > which attempts to address this. > (http://clojure.github.com/clojure-contrib/repl-utils-api.html#clojure.contrib.repl-utils/add-break-thread!). > I'm not sure there's any way to r

Re: about the repl

2010-12-18 Thread Stuart Sierra
You don't necessarily need to kill the whole JVM. If your REPL implementation runs each command in a new Thread(as most of them do, I think) it can just stop

Re: about the repl

2010-12-18 Thread Aaron Cohen
On Sat, Dec 18, 2010 at 10:34 AM, Lee Spector wrote: > > On Dec 18, 2010, at 8:23 AM, .Bill Smith wrote: > >> While this not what tor explicitly asked about, it is worth mentioning that >> the only way to kill an infinite loop in a Clojure repl is to kill the JVM. > > Is this architecturally nece

Re: about the repl

2010-12-18 Thread Lee Spector
On Dec 18, 2010, at 8:23 AM, .Bill Smith wrote: > While this not what tor explicitly asked about, it is worth mentioning that > the only way to kill an infinite loop in a Clojure repl is to kill the JVM. Is this architecturally necessary, or might someone be able to provide a more flexible i

Re: about the repl

2010-12-18 Thread .Bill Smith
While this not what tor explicitly asked about, it is worth mentioning that the only way to kill an infinite loop in a Clojure repl is to kill the JVM. I too recommend experimenting with other environments (I use Emacs) -- just don't expect them to deal better with infinite loops than the REPL

Re: about the repl

2010-12-18 Thread Meikel Brandmeyer
Hi, Am 18.12.2010 um 09:00 schrieb Robert McIntyre: > Also if you don't like emacs you might try the eclipse > counterclockwise plugin --- it has a nice repl too. I think all of the major environments have decent repls. Emacs/swank, Eclipse/ccw, Netbeans/enclojure, Vim/VimClojure. What you are

Re: about the repl

2010-12-18 Thread Robert McIntyre
Well even if you don't like emacs it still serves as a decent repl :) Also if you don't like emacs you might try the eclipse counterclockwise plugin --- it has a nice repl too. good luck, --Robert McIntyre On Sat, Dec 18, 2010 at 2:56 AM, tor wrote: > Thanks for the quick reply! I tried to get

Re: about the repl

2010-12-17 Thread tor
Thanks for the quick reply! I tried to get used to emacs a few years ago with little success. But I'm going to give it another try. -- 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 th

Re: about the repl

2010-12-17 Thread Robert McIntyre
You can execute (set! *print-length* 20) to avoid traps with printing infinite data structures. I'd also highly recommend the emacs/swank combo for your repl. It's got tab completion and a lot more. try http://riddell.us/ClojureSwankLeiningenWithEmacsOnLinux.html to learn how to get started with