From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: User-Friendlyness of Guix and non-scaryness, printing messages Date: Sun, 28 May 2017 22:35:17 +0200 Message-ID: <20170528223517.612a87df@scratchpost.org> References: <87bbe3e5.AEAAKL2r-KIAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZGcQo@mailjet.com> <87y3tw4kw3.fsf@gnu.org> <87r2zfx0xt.fsf@gnu.org> <427678e8.AEUAKjfDcSgAAAAAAAAAAAPB0agAAAACwQwAAAAAAAW9WABZKceD@mailjet.com> <20170528204437.6dfd35c4@scratchpost.org> <20170528210146.530b3f17@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53234) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dF4uK-0000xX-HO for guix-devel@gnu.org; Sun, 28 May 2017 16:35:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dF4uH-0007FP-Du for guix-devel@gnu.org; Sun, 28 May 2017 16:35:24 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:45548) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dF4uH-0007EL-77 for guix-devel@gnu.org; Sun, 28 May 2017 16:35:21 -0400 Received: from localhost (77.118.168.222.wireless.dyn.drei.com [77.118.168.222]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 5C8A01CA0710 for ; Sun, 28 May 2017 22:35:19 +0200 (CEST) In-Reply-To: <20170528210146.530b3f17@scratchpost.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org And the spinner implementation: (define p (let ((index 0) (spinner-chars "|\\-/")) (define (spin) (set! index (+ index 1)) (if (>= index (string-length spinner-chars)) (set! index 0)) (display (array-ref spinner-chars index)) (display "\b")) (make-soft-port (vector (lambda (c) (if (char=? c #\newline) (spin) (write c))) ; putc (lambda (s) (if (string-contains s "\n") (spin))) ; puts (lambda () #t) ; flush (lambda () #f) ; getc (lambda () #t)) ; close "w"))) (define (f) (display "\n" p) (f)) (f)