unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: ludo@gnu.org (Ludovic Courtès)
Cc: Andy Wingo <wingo@igalia.com>,
	Andreas Rottmann <a.rottmann@gmx.at>,
	guile-devel <guile-devel@gnu.org>
Subject: Re: [PATCH] Add SRFI-25 implementation
Date: Fri, 13 Nov 2015 12:01:55 -0500	[thread overview]
Message-ID: <87y4e1u930.fsf@netris.org> (raw)
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")

ludo@gnu.org (Ludovic Courtès) writes:

> ludo@gnu.org (Ludovic Courtès) skribis:
>
>> Andreas Rottmann <a.rottmann@gmx.at> 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 ‘stable-2.0’ (or I’ll 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



  reply	other threads:[~2015-11-13 17:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-27 21:59 [PATCH] Add SRFI-25 implementation Andreas Rottmann
2015-10-30 15:03 ` Ludovic Courtès
2015-11-05 20:07   ` Ludovic Courtès
2015-11-13 17:01     ` Mark H Weaver [this message]
2015-11-13 21:12       ` Ludovic Courtès
2015-11-14 15:33         ` Andreas Rottmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y4e1u930.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=a.rottmann@gmx.at \
    --cc=guile-devel@gnu.org \
    --cc=ludo@gnu.org \
    --cc=wingo@igalia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).