From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 1+ZOM5bZr18tDgAA0tVLHw (envelope-from ) for ; Sat, 14 Nov 2020 13:20:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id YAwFL5bZr1+9TwAAB5/wlQ (envelope-from ) for ; Sat, 14 Nov 2020 13:20:22 +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 00102940111 for ; Sat, 14 Nov 2020 13:20:21 +0000 (UTC) Received: from localhost ([::1]:38842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdvTX-0002Mb-JE for larch@yhetil.org; Sat, 14 Nov 2020 08:20:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdvTG-0002MK-Ji for bug-guix@gnu.org; Sat, 14 Nov 2020 08:20:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:38549) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kdvTG-0007uE-AC for bug-guix@gnu.org; Sat, 14 Nov 2020 08:20:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kdvTG-0004QE-5v for bug-guix@gnu.org; Sat, 14 Nov 2020 08:20:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#44612: Read standard input in `guix repl' Resent-From: Pierre Neidhardt Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 14 Nov 2020 13:20: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, 44612@debbugs.gnu.org Received: via spool by 44612-submit@debbugs.gnu.org id=B44612.160535995516915 (code B ref 44612); Sat, 14 Nov 2020 13:20:02 +0000 Received: (at 44612) by debbugs.gnu.org; 14 Nov 2020 13:19:15 +0000 Received: from localhost ([127.0.0.1]:50091 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdvSV-0004Ol-56 for submit@debbugs.gnu.org; Sat, 14 Nov 2020 08:19:15 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:34865) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdvSS-0004OU-IB for 44612@debbugs.gnu.org; Sat, 14 Nov 2020 08:19:14 -0500 X-Originating-IP: 90.92.160.122 Received: from bababa (lfbn-idf2-1-1094-122.w90-92.abo.wanadoo.fr [90.92.160.122]) (Authenticated sender: mail@ambrevar.xyz) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 739DFE0005; Sat, 14 Nov 2020 13:19:05 +0000 (UTC) From: Pierre Neidhardt In-Reply-To: <87lff46v32.fsf@nckx> References: <87h7ptzj8t.fsf@ambrevar.xyz> <87zh3l6lzk.fsf@nckx> <87h7ps8duy.fsf@ambrevar.xyz> <87lff46v32.fsf@nckx> Date: Sat, 14 Nov 2020 14:19:04 +0100 Message-ID: <87sg9cxeif.fsf@ambrevar.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 2.5 (++) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: 2.5 (++) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 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=none; dmarc=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: -0.61 X-TUID: vyBZw7ERHtos --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hey Tobias, Always good to have someone actually test the stuff :) Tobias Geerinckx-Rice writes: > So far this looks like an (SB)CL(-specific) bug, right? Does it=20 > happen anywhere else? I tried Guile[0]. Maybe there was a misunderstanding, it's not about Common Lisp. We can do easier than from Guile, i.e. from a shell: =2D-8<---------------cut here---------------start------------->8--- echo '(display "hello")' | guix repl =2D-8<---------------cut here---------------end--------------->8--- and... it works! O.o OK, my bad then, I mistested somehow. For future reference, it's also works in Common Lisp: =2D-8<---------------cut here---------------start------------->8--- > (with-input-from-string (s "(display \"foo\\n\")") (uiop:run-program '("guix" "repl") :input s :output t :error-out= put nil)) GNU Guile 3.0.4 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. foo =2D-8<---------------cut here---------------end--------------->8--- 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. Any clue how to do that? =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFGBAEBCAAwFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl+v2UgSHG1haWxAYW1i cmV2YXIueHl6AAoJEJvc9Jeku8x/4doIAJOurTKsYV/B3o17og/F/BjBrK5AJiJS a8bLUcP1Q8Y8C0LDWV4ZLDpdVFS8PFNTReo+HukAYqpT3Fv6weUAPoyzIsjgPh9b HWizwxE94g5dbF93VQbk7ep0F9YM5TYqVGbKrKwTJF/i+TtycKgnkKmGI4SDRYnl 1GME1na6hJtawkM7FQYjCs0L6N4IJEEIyPGzqJUcvjknx1Z1rlp4krBVJub0KBi/ wYLIYU6YBtWwbvNauxhYmPCO3yzbahMwSBdWYAVkWw/q6ElOPOrPYgVFAfsZReil hnXIBgJAn0zb3kAX9GHU5ND17LwAjEn1MfN5hnJkKiCfoF7B8mGTAIA= =Hooa -----END PGP SIGNATURE----- --=-=-=--