From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id wPqZMjjyr1+9NQAA0tVLHw (envelope-from ) for ; Sat, 14 Nov 2020 15:05:28 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id GIR2Ljjyr18NDgAAbx9fmQ (envelope-from ) for ; Sat, 14 Nov 2020 15:05:28 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4F6879405D1 for ; Sat, 14 Nov 2020 15:05:28 +0000 (UTC) Received: from localhost ([::1]:41668 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdx7F-0005HQ-On for larch@yhetil.org; Sat, 14 Nov 2020 10:05:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47134) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdx6s-0005H0-VM for bug-guix@gnu.org; Sat, 14 Nov 2020 10:05:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39931) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kdx6s-0002el-Ln for bug-guix@gnu.org; Sat, 14 Nov 2020 10:05:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kdx6s-0000yd-EZ for bug-guix@gnu.org; Sat, 14 Nov 2020 10:05:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#44612: Read standard input in `guix repl' Resent-From: Guillaume Le Vaillant Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 14 Nov 2020 15:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44612 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Tobias Geerinckx-Rice X-Debbugs-Original-Cc: bug-guix@gnu.org, Pierre Neidhardt , 44612@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16053662603695 (code B ref -1); Sat, 14 Nov 2020 15:05:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Nov 2020 15:04:20 +0000 Received: from localhost ([127.0.0.1]:51475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdx6C-0000xV-9z for submit@debbugs.gnu.org; Sat, 14 Nov 2020 10:04:20 -0500 Received: from lists.gnu.org ([209.51.188.17]:58650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdx6A-0000xJ-RO for submit@debbugs.gnu.org; Sat, 14 Nov 2020 10:04:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdx6A-0005Dd-Lj for bug-guix@gnu.org; Sat, 14 Nov 2020 10:04:18 -0500 Received: from mout01.posteo.de ([185.67.36.65]:55124) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdx66-0002Pz-T3 for bug-guix@gnu.org; Sat, 14 Nov 2020 10:04:18 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 14081160060 for ; Sat, 14 Nov 2020 16:04:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1605366250; bh=n8S9F565EIltJgwdLwrEViqZ0SBuLMcGvQYffTqUkFI=; h=From:To:Cc:Subject:Date:From; b=AupVHXBblQ01vwDI4LGErxH4tesEfNoKU8A11amRZK8AvzY+iJUSzM2CkGoFBPe9C qiWbewB6cjgEPdRz38sx2K3mueu8szw9hK6aP/qUaadgGrkOxOAdMdaaSV3IlX48Gz QBX80EkaEHVHpEjYociM/03aoEzWVElPxbZum2Ic0xDaLKSY7kgpBRXpMPvIVnxH03 mRwI4lg1FmdtZPiM+Rf31FhyjHvtZV5xUP5DEx9S0nJiYPnHyIsjR6XCEIPJlKdOus fLTW2mbYRvPJYk13sQUvFg6Q84n5WDhrKvT0Pk76SBrixXI6t0nQ6ZZpvG/QthN0r3 r8jGsInnWPvkQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4CYJWr2S4sz9rxN; Sat, 14 Nov 2020 16:04:05 +0100 (CET) References: <87h7ptzj8t.fsf@ambrevar.xyz> <87zh3l6lzk.fsf@nckx> <87h7ps8duy.fsf@ambrevar.xyz> <87lff46v32.fsf@nckx> <87sg9cxeif.fsf@ambrevar.xyz> <878sb459cf.fsf@nckx> User-agent: mu4e 1.4.13; emacs 27.1 From: Guillaume Le Vaillant In-reply-to: <878sb459cf.fsf@nckx> Date: Sat, 14 Nov 2020 16:03:56 +0100 Message-ID: <87v9e8hter.fsf@yamatai> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=185.67.36.65; envelope-from=glv@posteo.net; helo=mout01.posteo.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/14 10:04:10 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.3 (--) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mail@ambrevar.xyz, 44612@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=posteo.net header.s=2017 header.b=AupVHXBb; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -1.51 X-TUID: AbadgHbLm9r6 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Tobias Geerinckx-Rice via Bug reports for GNU Guix skrib= is: > Pierre, > > Pierre Neidhardt =E5=86=99=E9=81=93=EF=BC=9A >> and... it works! O.o > > Don't you hate it when that happens? Ban bug suicide. > > (Does that mean this one can be closed? Or retitled, if we want to debug > Nyxt? :-) > >> For future reference, it's also works in Common Lisp: >> (uiop:run-program '("guix" "repl") :input s :output >> t :error-output nil)) > > Well, I stranded trying to import (or whatever the CL term is) UIOP itsel= f, but > my Common Lisp-fu is hella weak. > >> However this brings me to another issue: the program output is prefixed >> with the REPL welcome message which is printed to stdout. >> >> So ideally when we read from standard input we should not include the >> welcome message. > > That's a question for Guile channels, but I totally agree. It's annoying= and > nowhere near =E2=80=98an interactive mode=E2=80=99 as suggested by the GP= L3. > > This is sensible: > > $ echo echo Hi. | bash > Hi. > $=20 > This is not: > > $ echo '(display "Hi.\n")' | guile > GNU Guile 3.0.2 > Copyright (C) 1995-2020 Free Software Foundation, Inc. > > Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. > This program is free software, and you are welcome to redistribute it > under certain conditions; type `,show c' for details. > > Enter `,help' for help. > Hi. > scheme@(guile-user)> $ > >> Any clue how to do that? > > The following line in my ~/.guile does just that: > > (set! repl-welcome (const #t)) > > ...unfortunately, it doesn't work late: > > $ echo '(use-modules ((system repl common))) \ > (set! repl-welcome (const #t))' | guix repl > [shouty noises] > $ > > It does not appear documented if and how you'd make Guile load a different > (Nyxt-specific) init file name. > > This reminds me: do you want Nyxt to call =E2=80=98guix repl -q=E2=80=99 = to skip loading > ~/.guile to make your UI more predictable & debuggable? Or keep it as an = escape > hatch for cool hacks? > > Kind regards, > > T G-R It looks like you can get rid of the welcome message by using the '-s' option: $ echo '(display "Hi.\n")' | guile -s /dev/stdin Hi. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCX6/x3A8cZ2x2QHBvc3Rl by5uZXQACgkQa+ggit8h/j9jgAD+M+lMQFSN+TES1ViTu9+s6BCWIPtThBSSfR33 TyQvmJwA/AvjXzW3lziOqDpVnicfWWIaHUuuxXVkMfpx9DNxTrOH =HjO3 -----END PGP SIGNATURE----- --=-=-=--