Re: Is there a way to stop a long running expression in the REPL
Vim Fireplace https://github.com/tpope/vim-fireplace supports Ctrl-c without killing its REPL host. Highly recommended if you are a Vim user. e On Sat, Feb 21, 2015 at 7:32 AM, Shawn Rasheed unsh...@gmail.com wrote: If it's the clojure repl this might work: https://clojuredocs.org/clojure.repl/set-break-handler! On Sat, Feb 21, 2015 at 5:28 PM, Lucas Bradstreet lucasbradstr...@gmail.com wrote: Which repl are you using? In lein repl, this does not happen to me, it just terminates the expression. On 21 February 2015 at 19:45, Cecil Westerhof cldwester...@gmail.com wrote: Sometimes I execute something that takes to long. With Ctrl-C I can cancel it, but this also cancels the REPL itself. Is there a way to terminate the running command without terminating the running REPL? -- Cecil Westerhof -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- ---sr -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Is there a way to stop a long running expression in the REPL
In case anybody is developing tools for this kind of thing, one of the things I most miss from Common Lisp is the ability to interrupt a running expression AND see the values of locals at the point of interruption. Fantastically useful for debugging. As far as I know there's no environment that lets you do this for Clojure. Seeing locals at the context of an exception (for each stack frame) is also fantastically useful and at the top of my wish list for the ecosystem... and while I've heard tell that there's a way to do this (Ritz?) if you run within emacs, I've never actually seen this in action and would love it if there was a more broadly accessible way to do this. -Lee On Feb 21, 2015, at 8:59 AM, Fluid Dynamics a2093...@trbvm.com wrote: It depends on what REPL/IDE you are using. In Counterclockwise there's an icon on the REPL pane's upper right with a red box near a gear, third from the left, which interrupts the currently running expression. Some other REPL environments provide similar functionality, as other people have noted in this thread, while others unfortunately don't provide a way short of restarting the REPL (and losing anything you've def'd or defn'd at the REPL in the process -- it's a good idea to keep a scratch file in Notepad or somewhere and paste things there that don't belong in your source code but which are convenient to run from time to time in the REPL, such as ad hoc tests or convenience functions and defs for during development). -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Is there a way to stop a long running expression in the REPL
It depends on what REPL/IDE you are using. In Counterclockwise there's an icon on the REPL pane's upper right with a red box near a gear, third from the left, which interrupts the currently running expression. Some other REPL environments provide similar functionality, as other people have noted in this thread, while others unfortunately don't provide a way short of restarting the REPL (and losing anything you've def'd or defn'd at the REPL in the process -- it's a good idea to keep a scratch file in Notepad or somewhere and paste things there that don't belong in your source code but which are convenient to run from time to time in the REPL, such as ad hoc tests or convenience functions and defs for during development). -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Is there a way to stop a long running expression in the REPL
Which repl are you using? In lein repl, this does not happen to me, it just terminates the expression. On 21 February 2015 at 19:45, Cecil Westerhof cldwester...@gmail.com wrote: Sometimes I execute something that takes to long. With Ctrl-C I can cancel it, but this also cancels the REPL itself. Is there a way to terminate the running command without terminating the running REPL? -- Cecil Westerhof -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Is there a way to stop a long running expression in the REPL
2015-02-21 13:28 GMT+01:00 Lucas Bradstreet lucasbradstr...@gmail.com: Which repl are you using? In lein repl, this does not happen to me, it just terminates the expression. I am using: rlwrap java -cp ${CP} clojure.main --init ${CLOJURE_INIT} --repl But maybe it is time to switch. ;-) On 21 February 2015 at 19:45, Cecil Westerhof cldwester...@gmail.com wrote: Sometimes I execute something that takes to long. With Ctrl-C I can cancel it, but this also cancels the REPL itself. Is there a way to terminate the running command without terminating the running REPL? -- Cecil Westerhof -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Is there a way to stop a long running expression in the REPL
If it's the clojure repl this might work: https://clojuredocs.org/clojure.repl/set-break-handler! On Sat, Feb 21, 2015 at 5:28 PM, Lucas Bradstreet lucasbradstr...@gmail.com wrote: Which repl are you using? In lein repl, this does not happen to me, it just terminates the expression. On 21 February 2015 at 19:45, Cecil Westerhof cldwester...@gmail.com wrote: Sometimes I execute something that takes to long. With Ctrl-C I can cancel it, but this also cancels the REPL itself. Is there a way to terminate the running command without terminating the running REPL? -- Cecil Westerhof -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- ---sr -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Is there a way to stop a long running expression in the REPL
Using Lein 2's REPL, Ctrl-C doesn't cancel the REPL itself. On Sat, Feb 21, 2015 at 4:45 PM, Cecil Westerhof cldwester...@gmail.com wrote: Sometimes I execute something that takes to long. With Ctrl-C I can cancel it, but this also cancels the REPL itself. Is there a way to terminate the running command without terminating the running REPL? -- Cecil Westerhof -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- ---sr -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.