From: Andy Wingo <wingo@pobox.com>
To: Daniel Llorens <daniel.llorens@bluewin.ch>
Cc: 10252-done@debbugs.gnu.org
Subject: bug#10252: bugs in array-map!, array-for-each, others
Date: Thu, 22 Dec 2011 17:17:56 -0500 [thread overview]
Message-ID: <878vm4p7xn.fsf@pobox.com> (raw)
In-Reply-To: <E7715DA4-2E0D-4692-87DD-0D742878FC4B@bluewin.ch> (Daniel Llorens's message of "Thu, 8 Dec 2011 19:20:21 +0100")
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/
prev parent reply other threads:[~2011-12-22 22:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-08 18:20 bug#10252: bugs in array-map!, array-for-each, others Daniel Llorens
2011-12-22 22:17 ` Andy Wingo [this message]
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=878vm4p7xn.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=10252-done@debbugs.gnu.org \
--cc=daniel.llorens@bluewin.ch \
/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).