unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Panicz Maciej Godek <godek.maciek@gmail.com>
To: 18225@debbugs.gnu.org
Subject: bug#18225: Lack of type-converting shared arrays (feature request)
Date: Fri, 8 Aug 2014 17:48:23 +0200	[thread overview]
Message-ID: <CAMFYt2bBcMSg7VWLy4hrjAC1KypAo8kmeFMvUB_8wJsG5-aMrA@mail.gmail.com> (raw)

While it is possible to shuffle with array indices arbitrarily, the
ability to convert array types is very limited. For example, it would
be nice to be able convert a uniform vector of unsigned bytes to a
uniform vector of some other size:

(define bytes #u8(0 0 255 255))

(define words
  (make-typed-shared-array 'u16 (native-endianness) bytes
    (lambda(i)(list (* i 2))) '(0 1))
words
====> #u16(0 65535)

In addition to SRFI-4 types, the conversion should be compatible with
R6RS bytevectors





                 reply	other threads:[~2014-08-08 15:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CAMFYt2bBcMSg7VWLy4hrjAC1KypAo8kmeFMvUB_8wJsG5-aMrA@mail.gmail.com \
    --to=godek.maciek@gmail.com \
    --cc=18225@debbugs.gnu.org \
    /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).