From unknown Sat Jun 14 14:29:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18224: Shared arrays are incompatible with bytevector accessors Resent-From: Panicz Maciej Godek Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 08 Aug 2014 14:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18224 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 18224@debbugs.gnu.org X-Debbugs-Original-To: bug-guile@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.140750930125873 (code B ref -1); Fri, 08 Aug 2014 14:49:01 +0000 Received: (at submit) by debbugs.gnu.org; 8 Aug 2014 14:48:21 +0000 Received: from localhost ([127.0.0.1]:35533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XFlSu-0006jE-Th for submit@debbugs.gnu.org; Fri, 08 Aug 2014 10:48:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44944) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XFlSr-0006iz-TU for submit@debbugs.gnu.org; Fri, 08 Aug 2014 10:48:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XFlSl-0008HB-RA for submit@debbugs.gnu.org; Fri, 08 Aug 2014 10:48:12 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:47515) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFlSl-0008H7-P4 for submit@debbugs.gnu.org; Fri, 08 Aug 2014 10:48:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFlSk-0006Hj-Sg for bug-guile@gnu.org; Fri, 08 Aug 2014 10:48:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XFlSj-0008GV-Es for bug-guile@gnu.org; Fri, 08 Aug 2014 10:48:10 -0400 Received: from mail-vc0-x233.google.com ([2607:f8b0:400c:c03::233]:58802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFlSj-0008GH-As for bug-guile@gnu.org; Fri, 08 Aug 2014 10:48:09 -0400 Received: by mail-vc0-f179.google.com with SMTP id hq11so8474691vcb.38 for ; Fri, 08 Aug 2014 07:48:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=OUJfUq/sMJfSM6OiurV3yDl0TNp0P8CqaeIeMSEFsR8=; b=IBrJw/FlhEr++t/rhKX3rCGFFjmoL7B+9mdReky7xwgPZMO5n3nKJU9tPBKtTsSsdz /K2SSiBfXL1YG57+bKeHH3uXAD4zkcsivBsai4QL1gREYFb5/g1CspnYb/SHTnNCYrR0 GBMvXA5+1ptaJh/b0a+r3lAO7gNPeYQofQdoF63qLxFcbNqjaG4ZHNB4F7j2hpX004Zy sB/kr6SPi51+R1KF0xyM2WmbF+tAQGE+aszjkk2C6e+GM3p57iSC97RfTqWG6iESSW3n 8umufPCv3+8FArCJBxIbjtMyTN+qogf/gz4oYaB/vEXf8apK+3/AcRe2g3FiU2sYT3Hh 5iDg== MIME-Version: 1.0 X-Received: by 10.52.146.176 with SMTP id td16mr512142vdb.81.1407509288380; Fri, 08 Aug 2014 07:48:08 -0700 (PDT) Received: by 10.221.66.79 with HTTP; Fri, 8 Aug 2014 07:48:08 -0700 (PDT) Date: Fri, 8 Aug 2014 16:48:08 +0200 Message-ID: From: Panicz Maciej Godek Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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.0 (----) 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.0 (----) Creating a shared array based on a bytevector results with an object whose print representation is identical with a print-representation of a bytevector: (define bv #vu8(0 1 2 3)) (define bv/shared (make-shared-array bv (lambda(i)(list (+ i 2))) '(0 1))) bv/shared ====> #vu8(2 3) However, accessing these "shared bytevectors" using the bytevector api is impossible: (bytevector-u8-ref bv/shared 0) ====> error: wrong type argument in position 1 (expecting bytevector): #vu8(2 3) Since the print-representation is identical, this behaviour is unexpected. Furthermore, the lack of capability of creating shared bytevectors limits their usefullness. On the other hand, if the shared bytevector remains contiguous, there should be no performance concerns. From unknown Sat Jun 14 14:29:56 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: Panicz Maciej Godek Subject: bug#18224: closed (Re: bug-guile Digest, Vol 137, Issue 2) Message-ID: References: X-Gnu-PR-Message: they-closed 18224 X-Gnu-PR-Package: guile Reply-To: 18224@debbugs.gnu.org Date: Fri, 30 Oct 2015 16:16:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1446221763-5023-1" This is a multi-part message in MIME format... ------------=_1446221763-5023-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #18224: Shared arrays are incompatible with bytevector accessors 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 18224@debbugs.gnu.org. --=20 18224: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D18224 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1446221763-5023-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 18224-done) by debbugs.gnu.org; 30 Oct 2015 16:15:29 +0000 Received: from localhost ([127.0.0.1]:46396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsCKu-0001IG-G9 for submit@debbugs.gnu.org; Fri, 30 Oct 2015 12:15:28 -0400 Received: from zhhdzmsp-smta18.bluewin.ch ([195.186.227.133]:36697) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsCKt-0001I8-3R for 18224-done@debbugs.gnu.org; Fri, 30 Oct 2015 12:15:28 -0400 Received: from [195.186.99.131] ([195.186.99.131:55951] helo=zhbdzmsp-smta13.bluewin.ch) by zhhdzmsp-smta18.bluewin.ch (envelope-from ) (ecelerity 3.5.10.45038 r(Core:3.5.10.0)) with ESMTP id 32/39-18608-D9793365; Fri, 30 Oct 2015 16:15:25 +0000 Received: from 4box.hq.corp.viasat.com (62.2.203.131) by zhbdzmsp-smta13.bluewin.ch (8.5.142) (authenticated as dll@bluewin.ch) id 5616641A01562031 for 18224-done@debbugs.gnu.org; Fri, 30 Oct 2015 16:15:25 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: bug-guile Digest, Vol 137, Issue 2 From: Daniel Llorens In-Reply-To: Date: Fri, 30 Oct 2015 17:15:21 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: 18224-done@debbugs.gnu.org X-Mailer: Apple Mail (2.1878.6) X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: 18224-done 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: -1.7 (-) = http://git.savannah.gnu.org/gitweb/?p=3Dguile.git;a=3Dcommitdiff;h=3Deb3d6= 23da57e6d31a58d95f932345fb761f9b701 on master fixes printing of = scm_tc7_array (shared array) to be #1(...) or #1typetag(...) so they = aren't confused with actual vectors or bytevectors. With respect to the lack of capability to create shared bytevectors, use = the array procedures instead. If you need the arrays to be contiguous, = you can check this at run time. The fundamental distinction between shared arrays on one side and = bytevectors/vectors/bitvectors on the other side is not of contiguity, = rank, element type, etc. but that the latter types are containers, while = the shared arrays are just views. That is why I don't think indirection = fields should be added to the bytevectors, this would complicate the = lookup functions and overlap in functionality with arrays. ------------=_1446221763-5023-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 8 Aug 2014 14:48:21 +0000 Received: from localhost ([127.0.0.1]:35533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XFlSu-0006jE-Th for submit@debbugs.gnu.org; Fri, 08 Aug 2014 10:48:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44944) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XFlSr-0006iz-TU for submit@debbugs.gnu.org; Fri, 08 Aug 2014 10:48:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XFlSl-0008HB-RA for submit@debbugs.gnu.org; Fri, 08 Aug 2014 10:48:12 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:47515) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFlSl-0008H7-P4 for submit@debbugs.gnu.org; Fri, 08 Aug 2014 10:48:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFlSk-0006Hj-Sg for bug-guile@gnu.org; Fri, 08 Aug 2014 10:48:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XFlSj-0008GV-Es for bug-guile@gnu.org; Fri, 08 Aug 2014 10:48:10 -0400 Received: from mail-vc0-x233.google.com ([2607:f8b0:400c:c03::233]:58802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFlSj-0008GH-As for bug-guile@gnu.org; Fri, 08 Aug 2014 10:48:09 -0400 Received: by mail-vc0-f179.google.com with SMTP id hq11so8474691vcb.38 for ; Fri, 08 Aug 2014 07:48:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=OUJfUq/sMJfSM6OiurV3yDl0TNp0P8CqaeIeMSEFsR8=; b=IBrJw/FlhEr++t/rhKX3rCGFFjmoL7B+9mdReky7xwgPZMO5n3nKJU9tPBKtTsSsdz /K2SSiBfXL1YG57+bKeHH3uXAD4zkcsivBsai4QL1gREYFb5/g1CspnYb/SHTnNCYrR0 GBMvXA5+1ptaJh/b0a+r3lAO7gNPeYQofQdoF63qLxFcbNqjaG4ZHNB4F7j2hpX004Zy sB/kr6SPi51+R1KF0xyM2WmbF+tAQGE+aszjkk2C6e+GM3p57iSC97RfTqWG6iESSW3n 8umufPCv3+8FArCJBxIbjtMyTN+qogf/gz4oYaB/vEXf8apK+3/AcRe2g3FiU2sYT3Hh 5iDg== MIME-Version: 1.0 X-Received: by 10.52.146.176 with SMTP id td16mr512142vdb.81.1407509288380; Fri, 08 Aug 2014 07:48:08 -0700 (PDT) Received: by 10.221.66.79 with HTTP; Fri, 8 Aug 2014 07:48:08 -0700 (PDT) Date: Fri, 8 Aug 2014 16:48:08 +0200 Message-ID: Subject: Shared arrays are incompatible with bytevector accessors From: Panicz Maciej Godek To: bug-guile@gnu.org Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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.0 (----) X-Debbugs-Envelope-To: submit 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.0 (----) Creating a shared array based on a bytevector results with an object whose print representation is identical with a print-representation of a bytevector: (define bv #vu8(0 1 2 3)) (define bv/shared (make-shared-array bv (lambda(i)(list (+ i 2))) '(0 1))) bv/shared ====> #vu8(2 3) However, accessing these "shared bytevectors" using the bytevector api is impossible: (bytevector-u8-ref bv/shared 0) ====> error: wrong type argument in position 1 (expecting bytevector): #vu8(2 3) Since the print-representation is identical, this behaviour is unexpected. Furthermore, the lack of capability of creating shared bytevectors limits their usefullness. On the other hand, if the shared bytevector remains contiguous, there should be no performance concerns. ------------=_1446221763-5023-1--