When I screw up a lazy-cons (which happens quite a lot to me), my repl goes nuts and appears to corrupt the box it lives in. If I leave it running my monitor blanks out periodically... like some system register got reset. I can't break the cycle with ctrl-c. Here is a screenshot of the corruption starting: http://groups.google.com/group/clojure/web/lazy-death.PNG
I realise that this isn't a clojure problem (its doing what I told it to), more an environment issue. Currently Im using winXP cmd box to start the repl. Below is an example of how to reproduce: (defn lazy-death [x & more] (lazy-cons x (lazy-death more))) user=> (lazy-death [1 2 3]) ; fills the box with nil, then colors go wonky, then monitor may reset periodically ; I made a silly omission, can fix it easily: (defn lazy-death [x & more] (when x (lazy-cons x (lazy-death more)))) user=> (lazy-death [1 2 3]) ([1 2 3]) I guess maybe its just the windows cmd box floods the monitor somehow with the nils? Anyhow... is there any way to save me from myself in this scenario? I find when I'm working on a lazy-cons I spend most of my time opening cmd boxes to replace the ones I've killed off :) What does work is invoking as a script... ie: edit foo.clj clj foo.clj ; here I can press ctrl-c and break from the loop, fix it and try again My prefered work flow is copy+pasting to a repl snipets from my main source. Regards, Tim. --~--~---------~--~----~------------~-------~--~----~ 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 To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---