[cmucl-help] Re: CTRL+C
GP lisper
fph at clouddancer.com
Wed Oct 28 20:51:27 CET 2009
Date: Wed, 28 Oct 2009 09:23:32 -0400
From: "Patrick M. Rutkowski" <rutski89 at gmail.com>
On Wed, Oct 28, 2009 at 7:44 AM, Alex Goncharov
<alex-goncharov at comcast.net> wrote:
> ,--- You/Patrick (Wed, 28 Oct 2009 05:30:37 -0400) ----*
> |
> | Take the following program:
> | cmucl -eval '(defun foo () (progn (format t "Hello World~%") (foo))) (foo)'
> |
> | What would be the most straight forward way to get CTRL+C to quit back
> | to the shell, as opposed to dumping me into a debugger?
>
> Why would you want it?
>
> The non-easiness of leaving Lisp is intentional -- there is often too
> much state to lose, and Ctrl-C or -D may be typed by accident.
>
> Use '(quit)', on a CMUCL prompt or in your program.
>
> E.g.
>
> lisp -eval '(progn (format t "Hello World~%") (quit))'
>
> -- Alex -- alex-goncharov at comcast.net --
>
Because 99.9% of the time when I hit CTRL+C during development it's
because I've seen my program doing something wrong, and already know
how to fix it. Having to type CTRL-C-LPAREN-Q-U-I-T-RPAREN-ENTER every
time is really annoying.
Perhaps learning a better technique would help.
Because in UNIX terminal culture CTRL+C means "quit the program, right
now". CMUCL shouldn't take license to make exceptions to what shell
users expect.
Wow, after 18 years of *nix, I never knew that.
I thought that all would have been obvious, unless you're not familiar
with with UNIX.
What is obvious is that you don't understand the suggestion, nor do
you realize that macros/readtables/etc can easily give you a single char
quit. CMUCL has never run on anything but *nix, and millions before
you have dealt with it.
Bye.
More information about the cmucl-help
mailing list