From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Add SRFI-25 implementation Date: Fri, 13 Nov 2015 12:01:55 -0500 Message-ID: <87y4e1u930.fsf@netris.org> References: <1438034381-18809-1-git-send-email-a.rottmann@gmx.at> <87y4ekgzz6.fsf@gnu.org> <87ziysdxbk.fsf@gnu.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 1447434250 9405 80.91.229.3 (13 Nov 2015 17:04:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Nov 2015 17:04:10 +0000 (UTC) Cc: Andy Wingo , Andreas Rottmann , guile-devel To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Nov 13 18:04:03 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 1ZxHla-0004wK-9A for guile-devel@m.gmane.org; Fri, 13 Nov 2015 18:04:02 +0100 Original-Received: from localhost ([::1]:54229 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxHlZ-00028Z-VB for guile-devel@m.gmane.org; Fri, 13 Nov 2015 12:04:01 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53328) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxHjv-0007Et-Sc for guile-devel@gnu.org; Fri, 13 Nov 2015 12:02:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZxHjr-0003Ji-O1 for guile-devel@gnu.org; Fri, 13 Nov 2015 12:02:19 -0500 Original-Received: from world.peace.net ([50.252.239.5]:55160) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxHjr-0003Jc-KM; Fri, 13 Nov 2015 12:02:15 -0500 Original-Received: from [10.1.10.78] (helo=jojen) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1ZxHja-0001k4-HA; Fri, 13 Nov 2015 12:01:58 -0500 In-Reply-To: <87ziysdxbk.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Thu, 05 Nov 2015 21:07:43 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 50.252.239.5 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:18017 Archived-At: 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, partly >>> 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)) Thanks, Mark