From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Optimize 'get-bytevector-some'; it may now read less than possible Date: Mon, 01 Apr 2013 21:17:01 +0200 Message-ID: <87mwticb82.fsf@pobox.com> References: <87fvzb3uii.fsf@tines.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1364843827 28611 80.91.229.3 (1 Apr 2013 19:17:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Apr 2013 19:17:07 +0000 (UTC) Cc: guile-devel@gnu.org To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Apr 01 21:17:34 2013 Return-path: Envelope-to: guile-devel@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 1UMkEY-0004Zt-Ll for guile-devel@m.gmane.org; Mon, 01 Apr 2013 21:17:34 +0200 Original-Received: from localhost ([::1]:35294 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMkEA-0001Pc-0c for guile-devel@m.gmane.org; Mon, 01 Apr 2013 15:17:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMkE6-0001PM-E7 for guile-devel@gnu.org; Mon, 01 Apr 2013 15:17:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UMkE5-0005tH-4s for guile-devel@gnu.org; Mon, 01 Apr 2013 15:17:06 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:34374 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMkE5-0005tA-0D for guile-devel@gnu.org; Mon, 01 Apr 2013 15:17:05 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id A827BB501; Mon, 1 Apr 2013 15:17:04 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=32aJJwJr6g5v6L6N+6lblCD4kxE=; b=TR0n3Z 7906L8jIGAXIDyYsTx6L+P3qRwn5x5lTPAOHpUYq1LNrAZsupYkUgpqT8juIU9nA MqZtIA3cQoem4M/hEdwPvhzcGgaxOSFWene7P0wTWE8lRJ265blNUpFnVNQ+TcBo dR6uOHX1Rht2lJAYBkWI+c2E8mU4fWXsiCIKI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=a4b/kiTAisZUtTJROCfegZB2mDPrCtUV BTWPj5O9+lsNLMdBrJhRrjzcPBUSzC2QOHGtkrKcHrTHn6kRNq91fDIfiS8pHGZQ Fzqxtvwu1weVs9IIheXnKfxMqnV08z55wyAG8ln4HSwWOvy47efdJdnt3wnPwV2l 5NJyfB2jH1o= Original-Received: from a-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id A18D8B500; Mon, 1 Apr 2013 15:17:04 -0400 (EDT) Original-Received: from badger (unknown [88.160.190.192]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 284ECB4FF; Mon, 1 Apr 2013 15:17:04 -0400 (EDT) In-Reply-To: <87fvzb3uii.fsf@tines.lan> (Mark H. Weaver's message of "Sun, 31 Mar 2013 21:32:53 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) X-Pobox-Relay-ID: BCBA0496-9B00-11E2-8991-D36F0E5B5709-02397024!a-pb-sasl-quonix.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 208.72.237.25 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:16098 Archived-At: On Mon 01 Apr 2013 03:32, Mark H Weaver writes: > This patch changes it to simply fill the read buffer (if empty) and then > copy the contents of the read/putback buffers into a bytevector that is > never resized. LGTM; but the docs are a little confusing: -- Scheme Procedure: get-bytevector-some port -- C Function: scm_get_bytevector_some (port) Read from PORT, blocking as necessary, until data are available or and end-of-file is reached. Return either a new bytevector containing the data read or the end-of-file object. The wording is from the R6RS but it seems to imply that we get all data until the read would block or EOF is reached. That's not the case, and it shouldn't be the case. Andy -- http://wingolog.org/