From: byronsalty
Subject: quiet loads
Date: 
Message-ID: <1176691751.567163.296690@o5g2000hsb.googlegroups.com>
Hi - I can't seem to figure out how to make (load) happen more
quietly. I've read hyperspec and tried setting both :verbose
and :print to nil. I've searched this group for historical insight
which at least helped to quiet down asdf.

I'm trying this both through slime and sbcl via the sbcl-run
executable:
CL-USER> (load "lisp-unit.lisp" :verbose nil :print nil)
; in: LAMBDA NIL
;     (LISP-UNIT::EXPAND-ASSERT :EQUAL
;                             LISP-UNIT::FORM
;                             LISP-UNIT::FORM
;                             LISP-UNIT::EXPECTED
;                             LISP-UNIT::EXTRAS
;                             :TEST
;                             #'EQ)
;
; caught STYLE-WARNING:
;   undefined function: EXPAND-ASSERT
...
T
CL-USER>

I really don't care about extra output for slime but when I'm trying
to run a test suite from the command line I'd like the output to be
clean.

I also tried setting:
(setf *load-verbose* nil)
(setf *load-print* nil)
Though it seems these are only used if the values aren't explicitly
used in a load.

I guess I'm missing something obvious?

From: Pascal Bourguignon
Subject: Re: quiet loads
Date: 
Message-ID: <874pnhhr2e.fsf@voyager.informatimago.com>
"byronsalty" <··········@gmail.com> writes:

> Hi - I can't seem to figure out how to make (load) happen more
> quietly. I've read hyperspec and tried setting both :verbose
> and :print to nil. I've searched this group for historical insight
> which at least helped to quiet down asdf.
>
> I'm trying this both through slime and sbcl via the sbcl-run
> executable:
> CL-USER> (load "lisp-unit.lisp" :verbose nil :print nil)
> ; in: LAMBDA NIL
> ;     (LISP-UNIT::EXPAND-ASSERT :EQUAL
> ;                             LISP-UNIT::FORM
> ;                             LISP-UNIT::FORM
> ;                             LISP-UNIT::EXPECTED
> ;                             LISP-UNIT::EXTRAS
> ;                             :TEST
> ;                             #'EQ)
> ;
> ; caught STYLE-WARNING:
> ;   undefined function: EXPAND-ASSERT
> ...
> T
> CL-USER>
>
> I really don't care about extra output for slime but when I'm trying
> to run a test suite from the command line I'd like the output to be
> clean.
>
> I also tried setting:
> (setf *load-verbose* nil)
> (setf *load-print* nil)
> Though it seems these are only used if the values aren't explicitly
> used in a load.
>
> I guess I'm missing something obvious?

Implementation specific, but I have that in my ~/.sbclrc and it
doesn't seem very effective:

#+sbcl (declaim (sb-ext:muffle-conditions (or style-warning compiler-note)))



Less implementation specific, but more effective:

S/CL-USER[3]>   (load "/tmp/e.lisp" :verbose nil :print nil)
WARNING: EXAMPLE also exports the following symbols:
  (EXAMPLE:SOMETHING-MORE)
See also:
  The ANSI Standard, Macro DEFPACKAGE
STYLE-WARNING: redefining SOME-BASE-STUFF in DEFUN
STYLE-WARNING: redefining SOMETHING-MORE in DEFUN

T

S/CL-USER[4]> (let* ((*standard-output* (make-broadcast-stream))
                     (*error-output*    *standard-output*)
                     (*trace-output*    *standard-output*)
                     (*terminal-io*     (make-two-way-stream (make-string-input-stream "") 
                                                             *standard-output*)))
                (load "/tmp/e.lisp" :verbose nil :print nil))

T

S/CL-USER[5]> 

-- 
__Pascal Bourguignon__
From: byronsalty
Subject: Re: quiet loads
Date: 
Message-ID: <1176725240.225054.172280@y5g2000hsa.googlegroups.com>
On Apr 16, 12:38 am, Pascal Bourguignon <····@informatimago.com>
wrote:
> S/CL-USER[4]> (let* ((*standard-output* (make-broadcast-stream))
>                      (*error-output*    *standard-output*)
>                      (*trace-output*    *standard-output*)
>                      (*terminal-io*     (make-two-way-stream (make-string-input-stream "")
>                                                              *standard-output*)))
>                 (load "/tmp/e.lisp" :verbose nil :print nil))
>
> T

This method worked great. Thanks!
From: Pascal Bourguignon
Subject: Re: quiet loads
Date: 
Message-ID: <87mz15fuwz.fsf@voyager.informatimago.com>
"byronsalty" <··········@gmail.com> writes:

> On Apr 16, 12:38 am, Pascal Bourguignon <····@informatimago.com>
> wrote:
>> S/CL-USER[4]> (let* ((*standard-output* (make-broadcast-stream))
>>                      (*error-output*    *standard-output*)
>>                      (*trace-output*    *standard-output*)
>>                      (*terminal-io*     (make-two-way-stream (make-string-input-stream "")
>>                                                              *standard-output*)))
>>                 (load "/tmp/e.lisp" :verbose nil :print nil))
>>
>> T
>
> This method worked great. Thanks!

Beware that it might work too great.  If there are real error
messages, they'll be blackholed all the same.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

"Specifications are for the weak and timid!"
From: Juho Snellman
Subject: Re: quiet loads
Date: 
Message-ID: <slrnf2cmd5.uvo.jsnell@sbz-30.cs.Helsinki.FI>
Pascal Bourguignon <···@informatimago.com> wrote:
> Implementation specific, but I have that in my ~/.sbclrc and it
> doesn't seem very effective:
>
> #+sbcl (declaim (sb-ext:muffle-conditions (or style-warning compiler-note)))

Muffle-conditions and unmuffle-conditions are used for controlling
warnings during compilation. It's desireable for these to be
controllable with a fine granularity (disable this warning in this
lexical scope, etc). What you're complaining about are load time
warnings, where that level of control doesn't make any sense. Hence
there's no special facility needed for that. Just use the normal
CL condition system:

  (handler-case 
       (load "foo.lisp")
    (style-warning () nil))

-- 
Juho Snellman
From: David Lichteblau
Subject: Re: quiet loads
Date: 
Message-ID: <slrnf2elmk.d9r.usenet-2006@babayaga.math.fu-berlin.de>
On 2007-04-18, Juho Snellman <······@iki.fi> wrote:
>   (handler-case 
>        (load "foo.lisp")
>     (style-warning () nil))

You meant HANDLER-BIND, right?

(handler-bind
    ((style-warning #'muffle-warning))
  (load "foo"))


d.
From: Juho Snellman
Subject: Re: quiet loads
Date: 
Message-ID: <slrnf2elqf.k32.jsnell@sbz-30.cs.Helsinki.FI>
David Lichteblau <···········@lichteblau.com> wrote:
> On 2007-04-18, Juho Snellman <······@iki.fi> wrote:
>>   (handler-case 
>>        (load "foo.lisp")
>>     (style-warning () nil))
>
> You meant HANDLER-BIND, right?
>
> (handler-bind
>     ((style-warning #'muffle-warning))
>   (load "foo"))

Oops, right.

-- 
Juho Snellman