From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: bug#10252: bugs in array-map!, array-for-each, others Date: Thu, 22 Dec 2011 17:17:56 -0500 Message-ID: <878vm4p7xn.fsf@pobox.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1324592339 18045 80.91.229.12 (22 Dec 2011 22:18:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 22 Dec 2011 22:18:59 +0000 (UTC) Cc: 10252-done@debbugs.gnu.org To: Daniel Llorens Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Dec 22 23:18:55 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RdqyU-0008Dr-FL for guile-bugs@m.gmane.org; Thu, 22 Dec 2011 23:18:54 +0100 Original-Received: from localhost ([::1]:44745 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdqyU-0004jr-0L for guile-bugs@m.gmane.org; Thu, 22 Dec 2011 17:18:54 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:40377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdqyR-0004jX-Id for bug-guile@gnu.org; Thu, 22 Dec 2011 17:18:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RdqyQ-0002pH-FM for bug-guile@gnu.org; Thu, 22 Dec 2011 17:18:51 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49142) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdqyQ-0002pB-DN for bug-guile@gnu.org; Thu, 22 Dec 2011 17:18:50 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Rdr0X-0004up-Sv for bug-guile@gnu.org; Thu, 22 Dec 2011 17:21:01 -0500 Resent-From: Andy Wingo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-guile@gnu.org Resent-Date: Thu, 22 Dec 2011 22:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 10252 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Mail-Followup-To: 10252@debbugs.gnu.org, wingo@pobox.com Original-Received: via spool by 10252-done@debbugs.gnu.org id=D10252.132459241418834 (code D ref 10252); Thu, 22 Dec 2011 22:21:01 +0000 Original-Received: (at 10252-done) by debbugs.gnu.org; 22 Dec 2011 22:20:14 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rdqzl-0004ti-LR for submit@debbugs.gnu.org; Thu, 22 Dec 2011 17:20:14 -0500 Original-Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62] helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rdqzj-0004ta-AC for 10252-done@debbugs.gnu.org; Thu, 22 Dec 2011 17:20:12 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id C7D2182E8; Thu, 22 Dec 2011 17:17:58 -0500 (EST) 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=PyNd48igBkmJcg18STo3BRJS324=; b=RIItyd rZDfMNDSWEtRNElvBnf6y9f6/UsdqNqJQ8oIl4LZG9/ks5p/GsBDYCrUCd2uQvbc uoMmt6g3DIUxddkeciZO8+f+Nv/56oCqZvy+FdOSzKp0Ic8qbklvXWN56YYUyQWo c8LuQd5mIYiKflpPqOPJLaC9uee3b8VaT/9LQ= 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=XDBP0z0cHKewpCGCCLTukqw9qLDsvCqZ 12lgZfwVXStpeIWRo/0XkDPEUeqyRgLNRidgBsv/mCafDgjLqVkGQwSsw+0/dINX 9hNgGTjpTfAmu5zlJeEpNrCcsaJYZ9E2o1OJgcZjIoz7xjUJvLlteUpFWlO7joma uCzKvVBXcoo= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id C0F9882E7; Thu, 22 Dec 2011 17:17:58 -0500 (EST) Original-Received: from badger (unknown [184.174.165.119]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 74A0A82E6; Thu, 22 Dec 2011 17:17:58 -0500 (EST) In-Reply-To: (Daniel Llorens's message of "Thu, 8 Dec 2011 19:20:21 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-Pobox-Relay-ID: CDD51AB6-2CEA-11E1-B144-65B1DE995924-02397024!a-pb-sasl-sd.pobox.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 22 Dec 2011 17:21:01 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.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-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6013 Archived-At: Hi Daniel! Very interestingly, this bug was totally backwards: they problem wasn't in array-map!, it was in generalized-vector-ref (and -set!). I fixed that bug: > ; generalized-vector-ref / set! is broken. > > (define (array-row a i) > (make-shared-array a (lambda (j) (list i j)) > (cadr (array-dimensions a)))) > (define nn #2u32((0 1) (2 3))) > > (array-ref (array-row nn 1) 0) > (generalized-vector-ref (array-row nn 1) 0) and the array stuff fixed itself. Neat, eh? I added your tests, just to make sure we don't break it in the future. I did not make the array-for-each change, as besides changing public API, it is unclear to me why we would want to allow (array-for-each proc) to work, as we don't allow (for-each proc) to work. Anyway, please submit a new patch or bug if you think it is the sensible thing to do, and we can talk about it more. Again, thanks for the patch! Andy -- http://wingolog.org/