Subject: Re: Critique my code: using Lisp to parse lots of "ps -elf" files in AIX
From: (Rob Warnock)
Date: Sun, 08 May 2005 21:52:39 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
Larry Clapp  <> wrote:
| wrote:
| > 2) why do you need to limit the number of files processed by n, even
| > if the number of files is greater?
| Running from the REPL for quick debugging it goes faster if I can say
| "do the first 10" or 100 or 1000 instead of "do them all".

In that case I would suggest adding a keyword argument (say) :LIMIT
that would limit the number, which by default would be unlimited.
So (DO-STUFF) would do them all, and (DO-STUFF :LIMIT 10) would do
only the first 10. Or if it's too inconvenient to pass that down the
call chain, make it a global (special) variable, say, MY-APP:*FILES-LIMIT*,
initially bound to NIL (meaning unlimited) but which you can bind
or SETF to a small number when working in the REPL. [See the standard
CL variables *PRINT-LEVEL* & *PRINT-LENGTH* for other examples of this.]


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607