GNU bug report logs - #18225
Lack of type-converting shared arrays (feature request)

Previous Next

Package: guile;

Reported by: Panicz Maciej Godek <godek.maciek <at> gmail.com>

Date: Fri, 8 Aug 2014 15:49:01 UTC

Severity: wishlist

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Panicz Maciej Godek <godek.maciek <at> gmail.com>
To: bug-guile <at> gnu.org
Subject: Lack of type-converting shared arrays (feature request)
Date: Fri, 8 Aug 2014 17:48:23 +0200
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




This bug report was last modified 11 years and 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.