From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Add SRFI-25 implementation Date: Fri, 13 Nov 2015 22:12:16 +0100 Message-ID: <871tbt38pb.fsf@gnu.org> References: <1438034381-18809-1-git-send-email-a.rottmann@gmx.at> <87y4ekgzz6.fsf@gnu.org> <87ziysdxbk.fsf@gnu.org> <87y4e1u930.fsf@netris.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 1447449177 28458 80.91.229.3 (13 Nov 2015 21:12:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Nov 2015 21:12:57 +0000 (UTC) Cc: Andy Wingo , Andreas Rottmann , guile-devel To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Nov 13 22:12:47 2015 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 1ZxLe3-0003hd-3H for guile-devel@m.gmane.org; Fri, 13 Nov 2015 22:12:31 +0100 Original-Received: from localhost ([::1]:55241 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxLe2-0000TD-Nm for guile-devel@m.gmane.org; Fri, 13 Nov 2015 16:12:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxLdx-0000Pc-I3 for guile-devel@gnu.org; Fri, 13 Nov 2015 16:12:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZxLdt-0002yK-E5 for guile-devel@gnu.org; Fri, 13 Nov 2015 16:12:25 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33861) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxLdt-0002yB-Aw; Fri, 13 Nov 2015 16:12:21 -0500 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]:57838 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1ZxLdr-0003To-F2; Fri, 13 Nov 2015 16:12:20 -0500 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 23 Brumaire an 224 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x3D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <87y4e1u930.fsf@netris.org> (Mark H. Weaver's message of "Fri, 13 Nov 2015 12:01:55 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:18020 Archived-At: Mark H Weaver skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> ludo@gnu.org (Ludovic Court=C3=A8s) skribis: >> >>> Andreas Rottmann skribis: >>> >>>> Adds an implementation of SRFI 25 on top of Guile's native arrays. The >>>> implementation does not introduce a disjoint type; Guile arrays and >>>> SRFI-25 arrays can be used interchangably, though with different, part= ly >>>> conflicting APIs. >>>> >>>> * NEWS: Add preliminary, incomplete section on 2.0.12, noting the >>>> addition of SRFI-25. >>>> * doc/ref/srfi-modules.texi (SRFI-25): New node. >>>> * module/srfi/srfi-25.scm: New file. >>>> * test-suite/tests/srfi-25.test: New file. >>>> * module/Makefile.am: >>>> * test-suite/Makefile.am: Add new files. >>>> --- >>>> NEWS | 15 +- >>>> doc/ref/srfi-modules.texi | 240 +++++++++++++++++++++- >>>> module/Makefile.am | 1 + >>>> module/srfi/srfi-25.scm | 159 +++++++++++++++ >>>> test-suite/Makefile.am | 3 +- >>>> test-suite/tests/srfi-25.test | 461 +++++++++++++++++++++++++++++++++= +++++++++ >>>> 6 files changed, 876 insertions(+), 3 deletions(-) >>>> create mode 100644 module/srfi/srfi-25.scm >>>> create mode 100644 test-suite/tests/srfi-25.test >>> >>> If there are no objections, you can push this patch within a day or two >>> to =E2=80=98stable-2.0=E2=80=99 (or I=E2=80=99ll do it if you happen to= be unavailable.) >> >> Done in aaea5b2 with minor modifications in srfi-modules.texi to make it >> more consistent with the rest of the manual. > > This commit broke the build, because it forgot to add srfi-25.scm. > > For now, I reverted the commit instead of fixing it, because there are a > few other problems with srfi-25.scm which I had told Andreas about over > IRC but never posted about. Sorry about that. I guess maybe that's why > Andreas didn't respond more quickly to your earlier email. > > In a couple of places, it has code like this: > > + (cond ((array? i) > + (apply array-ref array (array->index-list i))) > + ((vector? i) > + (apply array-ref array (vector->list i))) > > Since every vector is also considered an array, the second clause of the > 'cond' is dead code. > > Also, it would be good to avoid consing in common cases in 'array-ref' > and 'array-set!', by adding special cases for 1 and 2 dimensional array > accesses, at least when the indices are given as direct arguments. > > Finally, the following line should be put somewhere in the module: > > (cond-expand-provide (current-module) '(srfi-25)) Too much asynchrony here. ;-) I hope Andreas or you can look into it. Ludo=E2=80=99.