# HG changeset patch # User Steve Losh # Date 1474033989 0 # Node ID 1475bc2740d2118f1fcc171270a94fdbeef5d5a8 # Parent 4ce0e524240d64be3f3f3c27ef46866198390b21 Shut up diff -r 4ce0e524240d -r 1475bc2740d2 losh.lisp --- a/losh.lisp Thu Sep 15 13:59:19 2016 +0000 +++ b/losh.lisp Fri Sep 16 13:53:09 2016 +0000 @@ -1196,6 +1196,12 @@ (format stream (format nil "~~~D,'0B" size) (ldb (byte size 0) n)) (values)) +(defmacro shut-up (&body body) + "Run `body` with stdout and stderr redirected to the void." + `(let ((*standard-output* (make-broadcast-stream)) + (*error-output* (make-broadcast-stream))) + ,@body)) + (defmacro dis (arglist &body body) "Disassemble the code generated for a `lambda` with `arglist` and `body`. diff -r 4ce0e524240d -r 1475bc2740d2 package.lisp --- a/package.lisp Thu Sep 15 13:59:19 2016 +0000 +++ b/package.lisp Fri Sep 16 13:53:09 2016 +0000 @@ -19,8 +19,6 @@ `(:export ,@(external-symbols parent-package))))) - - (defpackage #:losh.math (:documentation "Utilities related to math and numbers.") (:export @@ -150,6 +148,7 @@ (:export #:pr #:bits + #:shut-up #:dis)) (defpackage #:losh.weightlists