Re: what's the standard way to make results in the REPL "invisible"
- From: "josephoswald+gg@xxxxxxxxx" <josephoswald@xxxxxxxxx>
- Date: Thu, 17 Jan 2008 07:48:59 -0800 (PST)
On Jan 16, 4:43 pm, Tamas <tkp...@xxxxxxxxx> wrote:
Hi,
I have the following problem: suppose there is a function I am calling
for its side effects, yet it returns a value, which is huge (think of
an array with 1e6 elements, etc). Lisp handles the value perfectly,
but if this occurs in the REPL, the result will be printed, which
slows Emacs down.
What would be the standard way of preventing that? Currently I am
using something like
(defmacro invisible (&body body)
`(progn
,@body
(values)))
(invisible
(calculation-with-large-results ...))
but I wonder if there is a standard way.
Another, related question: is there a generic method for displaying a
conscise representation of an object? Something like describe, but if
the object is really huge, it would display only part of it (eg first
10 elements of a vector, etc).
Thanks,
Tamas
If you want to inspect the result later, a quick shortcut is something
like
(defparameter *result* (function-returning-big-object))
DEFPARAMETER returns the symbol naming the variable.
.
- References:
- Prev by Date: Re: webapps, why so hard
- Next by Date: Re: SBCL, SLIME and C-c (abort)
- Previous by thread: Re: what's the standard way to make results in the REPL "invisible"
- Next by thread: Re: what's the standard way to make results in the REPL "invisible"
- Index(es):
Relevant Pages
|