[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
clisp top level
- To: philpot@ptolemy-ethernet.arc.nasa.gov
- Subject: clisp top level
- From: donc@ISI.EDU (Don Cohen)
- Date: Thu, 16 Jun 94 16:55:48 -0700
- Cc: clisp-list@ma2s2.mathematik.uni-karlsruhe.de
- Posted-date: Thu, 16 Jun 94 16:55:48 -0700
- Sender: donc@ISI.EDU
My experience is that it's a lot easier to write your own top level than it
is to change the one clisp provides. The only thing I'd call a "trick" is
that you want to put the read-eval-print inside an unwind-protect that goes
back to the top of the loop (so that aborts from errors won't leave it) -
UNLESS the last thing eval'ed was supposed to exit lisp - otherwise it's
hard to get out! The top level I have also does things like keep a history,
allowing you to review or redo events or refer to the values returned, and
also an error catcher that asks whether you want to abort (before it messes
up the screen). It's also a lot easier to use other streams with your own
top level - I had lots of trouble trying to change *standard-input* and
*standard-output* with the standard top level.