From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.bugs Subject: bug#30066: 'get-bytevector-some' returns only 1 byte from unbuffered ports Date: Fri, 16 Feb 2018 14:19:50 +0100 Message-ID: <87sha1nkax.fsf@gnu.org> References: <87zi5lrc3x.fsf@gnu.org> <87tvvtr9ge.fsf@gnu.org> <87fu7dptdn.fsf@igalia.com> <87o9m08nx2.fsf@gnu.org> <87fu7cf9wk.fsf@netris.org> <87po6gnm6y.fsf@gnu.org> <87a7xkxdph.fsf@netris.org> <87373bpi20.fsf@igalia.com> <87o9lzs7rn.fsf@gnu.org> <87mv1jnz7n.fsf@igalia.com> <87zi5hmqep.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1518789554 32629 195.159.176.226 (16 Feb 2018 13:59:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 16 Feb 2018 13:59:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Cc: 30066@debbugs.gnu.org To: Andy Wingo Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Fri Feb 16 14:59:10 2018 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emgXa-00082r-Ju for guile-bugs@m.gmane.org; Fri, 16 Feb 2018 14:59:06 +0100 Original-Received: from localhost ([::1]:51203 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emgZc-0007A6-Fz for guile-bugs@m.gmane.org; Fri, 16 Feb 2018 09:01:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52551) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emfvs-00044L-0n for bug-guile@gnu.org; Fri, 16 Feb 2018 08:20:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1emfvm-000103-3V for bug-guile@gnu.org; Fri, 16 Feb 2018 08:20:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37892) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1emfvl-0000zt-V1 for bug-guile@gnu.org; Fri, 16 Feb 2018 08:20:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1emfvl-0000mZ-Pu for bug-guile@gnu.org; Fri, 16 Feb 2018 08:20:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 16 Feb 2018 13:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30066 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 30066-submit@debbugs.gnu.org id=B30066.15187871952978 (code B ref 30066); Fri, 16 Feb 2018 13:20:01 +0000 Original-Received: (at 30066) by debbugs.gnu.org; 16 Feb 2018 13:19:55 +0000 Original-Received: from localhost ([127.0.0.1]:45786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emfvf-0000ly-IG for submit@debbugs.gnu.org; Fri, 16 Feb 2018 08:19:55 -0500 Original-Received: from hera.aquilenet.fr ([185.233.100.1]:34488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emfvd-0000lq-Iv for 30066@debbugs.gnu.org; Fri, 16 Feb 2018 08:19:54 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 10BF1115E9; Fri, 16 Feb 2018 14:19:53 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Original-Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tTXtc7xcc0wY; Fri, 16 Feb 2018 14:19:51 +0100 (CET) Original-Received: from ribbon (unknown [193.50.110.160]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 520C7FB09; Fri, 16 Feb 2018 14:19:51 +0100 (CET) In-Reply-To: <87zi5hmqep.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sat, 13 Jan 2018 21:53:34 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:9010 Archived-At: ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > Andy Wingo skribis: > >> On Fri 12 Jan 2018 11:15, ludo@gnu.org (Ludovic Court=C3=A8s) writes: >> >>> Andy Wingo skribis: >>> >>>> On Thu 11 Jan 2018 22:55, Mark H Weaver writes: >>> >>> [...] >>> >>>>>>> Out of curiosity, is there a reason why you're using an unbuffered = port >>>>>>> in your use case? >>>>>> >>>>>> It=E2=80=99s to implement redirect =C3=A0 la socat: >>>>>> >>>>>> https://git.savannah.gnu.org/cgit/guix.git/commit/?id=3D17af5d51de= 7c40756a4a39d336f81681de2ba447 >>>>> >>>>> Why is an unbuffered port being used here? Can we change it to a >>>>> buffered port? >>>> >>>> This was also a question I had! If you make it a buffered port at 4096 >>>> bytes (for example), then get-bytevector-some works exactly like you >>>> want it to, no? >>> >>> It might work, but that=E2=80=99s more by chance no? >> >> No, it is reliable. get-bytevector-some on a buffered port must either >> return all the buffered bytes or perform exactly one read (up to the >> buffer size) and either return those bytes or EOF. As far as I >> understand, that is exactly what you want. > > Indeed, that works well, thanks! So, after all, problem solved? I=E2=80=99m closing this as not-a-bug. Ludo=E2=80=99.