Email list hosting service & mailing list manager


Re: Developing on separate git fork and left-over SRFI 122 issues, particularly immutable specialized arrays. Bradley Lucier 30 Apr 2020 00:55 UTC

On 4/28/20 3:59 PM, Bradley Lucier wrote:
> For the moment I'm developing on
>
> https://github.com/gambiteer/srfi-179

Latest git commit message follows.  I'll now ask Arthur to issue a new
draft.

Brad

Implement immutable specialized arrays

Shared specialized arrays inherit their safety/mutability from
the source array.

Homogeneous storage classes must be defined using homogeneous vectors,
or defined as #f.

Specific changes:

generic-arrays.scm:

1.  Define macro-absent-obj for non-Gambit systems (unfortunately,
     not as a macro).

2.  Define specialized-array-default-mutable?, with initial default #t.

3.  Change specialized-array? to allow immutable specialized arrays.

4.  Allow array->specialized-array and list->specialized-array to
     return immutable arrays.

5.  Shared specialized arrays are now safe/mutable iff the source arrays are
     safe/mutable.  Refactor specialized-array-share, pull out
     %%specialized-array-share.

6.  Refactor make-specialized-array, pull out %%make-specialized-array.
     The result of make-specialized-array must be mutable.

7.  Translated, extracted, permuted, rotated, reversed, sampled
     specialized arrays inherit safety and mutability from the source
     array.  The subarrays of curried and tiled specialized arrays
     inherit safety and mutability from the source array.

8.  Use more internal "%%" routines to eliminate redundant
     argument checks.

9.  Describe what f8-storage-class and f16-storage-class would do, but
     define them to be #f (i.e., the sample implementation does not
     manipulate homogeneous vectors of such types).

test-arrays.scm:

1.  Error tests of the extra arguments to array->specialized-array and
     list->specialized-array.

2.  Make error messages match those in generic-arrays.scm.

srfi-179.scm

1.  Document specialized-array-default-mutable?
     Use it in array->specialized array and
     list->specialized-array.

2.  Document the copier field of a storage class.

3.  Document f8-storage-class and f16-storage-class.

4.  Implementations must define all the standard storage classes,
     but they may define some to be #f (so programmers can inquire
     which are implemented).

5.  make-specialized-array always returns a mutable specialized array.

6.  New draft.

7.  Update list of changes to SRFI 122.

srfi-179.html:

1.  Regenerate from srfi-179.scm.

compare-code-and-srfi.scm:

1.  Internal procedures now begin with %, not #.