I maintain a fork of SRFI 122
https://github.com/gambiteer/srfi-122/
where I've added a few things that were not in the finalized SRFI, specifically the routines
interval-cartesian-product array-outer-product array-assign!
I continue to think about arrays and how to use them. I'd like to get various implementations and applications of SRFI-122 available (beyond what I use it for) and when it looks like I don't have anything more to add I might propose an updated SRFI with the new routines.
In that vein, if anyone would like assistance to modify SRFI-122 to run in their favorite scheme, or to use SRFI-122 in support of their application, I'd be glad to help.
Brad
Afficher les réponses par date
Just a heads-up that I intend to propose SRFI 122 to become the standard multidimensional array package of R7RS-large (the alternatives being SRFI 25 and nothing). It'll be voted on as-is, but an upwardly compatible SRFI could replace 122 at a later stage of voting.
On Sat, Oct 27, 2018 at 4:29 PM Bradley Lucier lucier@math.purdue.edu wrote:
I maintain a fork of SRFI 122
https://github.com/gambiteer/srfi-122/
where I've added a few things that were not in the finalized SRFI, specifically the routines
interval-cartesian-product array-outer-product array-assign!
I continue to think about arrays and how to use them. I'd like to get various implementations and applications of SRFI-122 available (beyond what I use it for) and when it looks like I don't have anything more to add I might propose an updated SRFI with the new routines.
In that vein, if anyone would like assistance to modify SRFI-122 to run in their favorite scheme, or to use SRFI-122 in support of their application, I'd be glad to help.
Brad
On 10/27/18 5:15 PM, John Cowan wrote:
Just a heads-up that I intend to propose SRFI 122 to become the standard multidimensional array package of R7RS-large (the alternatives being SRFI 25 and nothing). It'll be voted on as-is, but an upwardly compatible SRFI could replace 122 at a later stage of voting.
For what it is worth, Kawa's arrays are an extension of SRFI 25 and SRFI 4 (uniform vectors), including some additions from Racket's math.array package.
https://www.gnu.org/software/kawa/Arrays.html
Kawa treats regular vectors, uniform vectors, strings, and bytevectors as rank-1 arrays. Thus they can be inputs to array-transform and share-array.
By all means write it up as a SRFI, then, and I'll add it to the ballot, even though we'll be voting before it can be finalized. There is precedent for this, as long as there is a spec to work from. Arthur is letting specs be posted without implementation these days, though not finalized without implementation.
On Sun, Oct 28, 2018 at 11:48 AM Per Bothner per@bothner.com wrote:
On 10/27/18 5:15 PM, John Cowan wrote:
Just a heads-up that I intend to propose SRFI 122 to become the standard
multidimensional array package of R7RS-large (the alternatives being SRFI 25 and nothing). It'll be voted on as-is, but an upwardly compatible SRFI could replace 122 at a later stage of voting.
For what it is worth, Kawa's arrays are an extension of SRFI 25 and SRFI 4 (uniform vectors), including some additions from Racket's math.array package.
https://www.gnu.org/software/kawa/Arrays.html
Kawa treats regular vectors, uniform vectors, strings, and bytevectors as rank-1 arrays. Thus they can be inputs to array-transform and share-array. -- --Per Bothner per@bothner.com http://per.bothner.com/
On 10/27/18 4:29 PM, Bradley Lucier wrote:
I maintain a fork of SRFI 122
https://github.com/gambiteer/srfi-122/
where I've added a few things that were not in the finalized SRFI, specifically the routines
interval-cartesian-product array-outer-product array-assign!
I've added another update that implements and documents
array-tile
The implementation also has a bug fix for array-every and array-any (that hits only for two-, three-, and four-dimensional arrays whose last array dimension has sidelength one, so it was missed in previous testing, sorry). The new code is in
(macro-make-predicates)
I plan to send a fix for this one implementation problem for addition to SRFI-122.
Brad
On 11/16/18 2:25 PM, Bradley Lucier wrote:
On 10/27/18 4:29 PM, Bradley Lucier wrote:
I maintain a fork of SRFI 122
https://github.com/gambiteer/srfi-122/
where I've added a few things that were not in the finalized SRFI, specifically the routines
interval-cartesian-product array-outer-product array-assign!
I've added another update that implements and documents
array-tile
Another update, mainly for documentation:
Add a bulleted list of motivations.
Introduced the notational convention: If A is an array, then use A_ to denote the getter of the array and A! to denote the setter of A.
For example, the Haar transform loop now reads
(define (1D-Haar-loop a) (let ((a_ (array-getter a)) (a! (array-setter a)) (n (interval-upper-bound (array-domain a) 0))) (do ((i 0 (fx+ i 2))) ((fx= i n)) (let* ((a_i (a_ i)) (a_i+1 (a_ (fx+ i 1))) (scaled-sum (fl/ (fl+ a_i a_i+1) (flsqrt 2.0))) (scaled-difference (fl/ (fl- a_i a_i+1) (flsqrt 2.0)))) (a! scaled-sum i) (a! scaled-difference (fx+ i 1))))))
The LU-decomposition example retrieves the i'th diagonal element of the matrix A with
(A_ i i)
The trailing underscore mimics the TeX notation for subscripts, and while underscores are used a lot in variable names in C, etc., they're not yet generally used in Scheme (at least as far as I know); I like it.
After cleaning up the implementation a bit, I'll be ready to submit a new SRFI for comments.
Brad
On 11/27/18 3:25 PM, Bradley Lucier wrote:
On 11/16/18 2:25 PM, Bradley Lucier wrote:
On 10/27/18 4:29 PM, Bradley Lucier wrote:
I maintain a fork of SRFI 122
https://github.com/gambiteer/srfi-122/
where I've added a few things that were not in the finalized SRFI, specifically the routines
interval-cartesian-product array-outer-product array-assign!
I've added another update that implements and documents
array-tile
Another update, mainly for documentation:
And there's another update, which uses more R7RS procedures in the implementation and testing rather than relying on locally-defined versions.
I intend to submit this version as a new SRFI after the Christmas/New Year holiday. The functions I've added seem essential to me now, it's just that they didn't come up in the way I usually program.
I haven't added an example that uses array-tile, but I've tried to use the other routines in necessary ways.
If anyone has comments, even before the resubmission, I'd welcome them.
Brad