From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marko Rauhamaa Newsgroups: gmane.lisp.guile.user Subject: Re: Nonblocking get-bytevector-n bug? Date: Mon, 07 Dec 2015 12:28:54 +0200 Message-ID: <87h9jubli1.fsf@elektro.pacujo.net> References: <87h9jvuxb3.fsf@elektro.pacujo.net> <87poyilh8k.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1449484151 6896 80.91.229.3 (7 Dec 2015 10:29:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Dec 2015 10:29:11 +0000 (UTC) Cc: guile-user@gnu.org To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Dec 07 11:29:11 2015 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a5t2Z-0006Ht-A8 for guile-user@m.gmane.org; Mon, 07 Dec 2015 11:29:07 +0100 Original-Received: from localhost ([::1]:53670 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5t2Y-0002bQ-9l for guile-user@m.gmane.org; Mon, 07 Dec 2015 05:29:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5t2P-0002bJ-Qf for guile-user@gnu.org; Mon, 07 Dec 2015 05:28:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a5t2O-0001wa-V0 for guile-user@gnu.org; Mon, 07 Dec 2015 05:28:57 -0500 Original-Received: from [2001:1bc8:1a0:5384:7a2b:cbff:fe9f:e508] (port=57589 helo=pacujo.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5t2O-0001wQ-OT for guile-user@gnu.org; Mon, 07 Dec 2015 05:28:56 -0500 Original-Received: from elektro.pacujo.net (192.168.1.200) by elektro.pacujo.net; Mon, 7 Dec 2015 12:28:54 +0200 Original-Received: by elektro.pacujo.net (sSMTP sendmail emulation); Mon, 07 Dec 2015 12:28:54 +0200 In-Reply-To: <87poyilh8k.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Mon, 07 Dec 2015 10:50:51 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:1bc8:1a0:5384:7a2b:cbff:fe9f:e508 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:12219 Archived-At: ludo@gnu.org (Ludovic Court=C3=A8s): >> If you replace (get-bytevector-some port) with >> (get-bytevector-n port 8192) or (get-bytevector-n! port bv 0 8192), >> no partial data is returned. > > That=E2=80=99s because get-bytevector-n{,!} are specified as blocking if > necessary until N bytes are read or EOF is reached. Ok, the Guile manual description leaves it a ambiguous. Even the R6RS wording could be graciously bent slightly to support the age-old nonblocking semantics. It boils down to what bytes are considered "available." I don't think any nonblocking application would mind those functions returning immediately with what they managed to read. Thanks for the answer. Marko