From unknown Sun Aug 17 10:25:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18866: bytevector-copy creates srfi-4 vector with greater length Resent-From: tantalum Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 28 Oct 2014 07:15:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18866 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 18866@debbugs.gnu.org X-Debbugs-Original-To: bug-guile@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.141448050014961 (code B ref -1); Tue, 28 Oct 2014 07:15:07 +0000 Received: (at submit) by debbugs.gnu.org; 28 Oct 2014 07:15:00 +0000 Received: from localhost ([127.0.0.1]:37140 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xj0za-0003t5-K9 for submit@debbugs.gnu.org; Tue, 28 Oct 2014 03:14:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40411) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xip2k-0001Dx-6P for submit@debbugs.gnu.org; Mon, 27 Oct 2014 14:29:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xip2Z-00065T-G6 for submit@debbugs.gnu.org; Mon, 27 Oct 2014 14:29:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:58498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xip2Z-00065P-Dk for submit@debbugs.gnu.org; Mon, 27 Oct 2014 14:29:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xip2U-00049r-K9 for bug-guile@gnu.org; Mon, 27 Oct 2014 14:29:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xip2P-00063N-RT for bug-guile@gnu.org; Mon, 27 Oct 2014 14:29:10 -0400 Received: from mx02.posteo.de ([89.146.194.165]:38019) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xip2P-00062p-M6 for bug-guile@gnu.org; Mon, 27 Oct 2014 14:29:05 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by mx02.posteo.de (Postfix) with ESMTP id B7F0E25ACC2C for ; Mon, 27 Oct 2014 19:29:03 +0100 (CET) X-Virus-Scanned: amavisd-new at posteo.de Received: from posteo.de ([10.125.125.178]) (using TLS) by localhost (amavis1.posteo.de [10.125.125.165]) (amavisd-new, port 10026) with ESMTPS id 8mnRzmCeXFlp for ; Mon, 27 Oct 2014 19:28:52 +0100 (CET) Received: from mail.posteo.de (localhost [127.0.0.1]) by mail.posteo.de (Postfix) with ESMTPSA id 995D12C0104 for ; Mon, 27 Oct 2014 19:28:50 +0100 (CET) Message-ID: <544E8EE1.1000409@posteo.eu> Date: Mon, 27 Oct 2014 19:28:49 +0100 From: tantalum User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.3 (----) X-Mailman-Approved-At: Tue, 28 Oct 2014 03:14:47 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.3 (----) with guile version 2.1.0.89-c5ea7 on an x86_64 GNU/Linux system and the following code (use-modules (srfi srfi-4) (rnrs bytevectors)) (define a (make-f32vector 2 0)) (define b (bytevector-copy a)) (write (list a b)) "b" turns out to be an f32vector with length 8, 4 times the length of "a". i expected the result to have the same length as the argument see also http://lists.gnu.org/archive/html/guile-devel/2014-10/msg00064.html From unknown Sun Aug 17 10:25:20 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: tantalum Subject: bug#18866: closed (Re: bug#18866: bytevector-copy creates srfi-4 vector with greater length) Message-ID: References: <87zjbxgdje.fsf@yeeloong.lan> <544E8EE1.1000409@posteo.eu> X-Gnu-PR-Message: they-closed 18866 X-Gnu-PR-Package: guile Reply-To: 18866@debbugs.gnu.org Date: Wed, 12 Nov 2014 06:06:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1415772362-32039-1" This is a multi-part message in MIME format... ------------=_1415772362-32039-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #18866: bytevector-copy creates srfi-4 vector with greater length which was filed against the guile package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 18866@debbugs.gnu.org. --=20 18866: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D18866 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1415772362-32039-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 18866-done) by debbugs.gnu.org; 12 Nov 2014 06:05:59 +0000 Received: from localhost ([127.0.0.1]:58064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XoR43-0008KV-2O for submit@debbugs.gnu.org; Wed, 12 Nov 2014 01:05:59 -0500 Received: from world.peace.net ([96.39.62.75]:46134) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XoR40-0008KN-Mj for 18866-done@debbugs.gnu.org; Wed, 12 Nov 2014 01:05:57 -0500 Received: from c-24-62-95-23.hsd1.ma.comcast.net ([24.62.95.23] helo=yeeloong.lan) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1XoR3u-0004NS-CC; Wed, 12 Nov 2014 01:05:50 -0500 From: Mark H Weaver To: tantalum Subject: Re: bug#18866: bytevector-copy creates srfi-4 vector with greater length References: <544E8EE1.1000409@posteo.eu> Date: Wed, 12 Nov 2014 01:04:37 -0500 In-Reply-To: <544E8EE1.1000409@posteo.eu> (tantalum's message of "Mon, 27 Oct 2014 19:28:49 +0100") Message-ID: <87zjbxgdje.fsf@yeeloong.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18866-done Cc: 18866-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) tantalum writes: > with guile version 2.1.0.89-c5ea7 on an x86_64 GNU/Linux system > and the following code > (use-modules (srfi srfi-4) (rnrs bytevectors)) > (define a (make-f32vector 2 0)) > (define b (bytevector-copy a)) > (write (list a b)) > > "b" turns out to be an f32vector with length 8, 4 times the length of "a". > i expected the result to have the same length as the argument > > see also http://lists.gnu.org/archive/html/guile-devel/2014-10/msg00064.html I fixed this in 10679f4c59fcffb0657219e28e38d15df8ad09a0 by changing 'bytevector-copy' to always produce a standard bytevector with unsigned 8-bit elements, as if 'bytevector-copy' was implemented using the standard procedures 'make-bytevector', 'bytevector-length', etc. This is on the stable-2.0 branch and will be in Guile 2.0.12. I'm open to the idea of adding another procedure that copies arbitrary SRFI-4 vectors, but I think it should have a different name. If you'd like to persue this, let's create another ticket for it. I'm closing this bug now. Thanks, Mark ------------=_1415772362-32039-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 28 Oct 2014 07:15:00 +0000 Received: from localhost ([127.0.0.1]:37140 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xj0za-0003t5-K9 for submit@debbugs.gnu.org; Tue, 28 Oct 2014 03:14:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40411) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xip2k-0001Dx-6P for submit@debbugs.gnu.org; Mon, 27 Oct 2014 14:29:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xip2Z-00065T-G6 for submit@debbugs.gnu.org; Mon, 27 Oct 2014 14:29:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:58498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xip2Z-00065P-Dk for submit@debbugs.gnu.org; Mon, 27 Oct 2014 14:29:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xip2U-00049r-K9 for bug-guile@gnu.org; Mon, 27 Oct 2014 14:29:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xip2P-00063N-RT for bug-guile@gnu.org; Mon, 27 Oct 2014 14:29:10 -0400 Received: from mx02.posteo.de ([89.146.194.165]:38019) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xip2P-00062p-M6 for bug-guile@gnu.org; Mon, 27 Oct 2014 14:29:05 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by mx02.posteo.de (Postfix) with ESMTP id B7F0E25ACC2C for ; Mon, 27 Oct 2014 19:29:03 +0100 (CET) X-Virus-Scanned: amavisd-new at posteo.de Received: from posteo.de ([10.125.125.178]) (using TLS) by localhost (amavis1.posteo.de [10.125.125.165]) (amavisd-new, port 10026) with ESMTPS id 8mnRzmCeXFlp for ; Mon, 27 Oct 2014 19:28:52 +0100 (CET) Received: from mail.posteo.de (localhost [127.0.0.1]) by mail.posteo.de (Postfix) with ESMTPSA id 995D12C0104 for ; Mon, 27 Oct 2014 19:28:50 +0100 (CET) Message-ID: <544E8EE1.1000409@posteo.eu> Date: Mon, 27 Oct 2014 19:28:49 +0100 From: tantalum User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: bug-guile@gnu.org Subject: bytevector-copy creates srfi-4 vector with greater length Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 28 Oct 2014 03:14:47 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.3 (----) with guile version 2.1.0.89-c5ea7 on an x86_64 GNU/Linux system and the following code (use-modules (srfi srfi-4) (rnrs bytevectors)) (define a (make-f32vector 2 0)) (define b (bytevector-copy a)) (write (list a b)) "b" turns out to be an f32vector with length 8, 4 times the length of "a". i expected the result to have the same length as the argument see also http://lists.gnu.org/archive/html/guile-devel/2014-10/msg00064.html ------------=_1415772362-32039-1--