Supporting SRFI 43 (Vectors)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Supporting SRFI 43 (Vectors)

Duncan Mak
Hello all,

As part of my project, I needed to use some APIs from SRFI 43 (vectors).

I noticed that Kawa doesn't come with this SRFI, it has its own APIs
for Vector (https://www.gnu.org/software/kawa/Vectors.html) and that
is a subset of the entire SRFI 43 definition.

In particular, I was missing vector-reverse-copy!

What would it take to get SRFI 43 into the Kawa distribution?


--
Duncan.
Reply | Threaded
Open this post in threaded view
|

Re: Supporting SRFI 43 (Vectors)

Per Bothner
On 1/1/19 5:18 PM, Duncan Mak wrote:

> Hello all,
>
> As part of my project, I needed to use some APIs from SRFI 43 (vectors).
>
> I noticed that Kawa doesn't come with this SRFI, it has its own APIs
> for Vector (https://www.gnu.org/software/kawa/Vectors.html) and that
> is a subset of the entire SRFI 43 definition.
>
> In particular, I was missing vector-reverse-copy!
>
> What would it take to get SRFI 43 into the Kawa distribution?

I'll consider adding implementations for the missing procedures.
Initially on a procedure-by-procedure basis.
--
        --Per Bothner
[hidden email]   http://per.bothner.com/
Reply | Threaded
Open this post in threaded view
|

Re: Supporting SRFI 43 (Vectors)

Duncan Mak
Okay, Here are the procedures that are missing:

= Constructors =
vector-unfold
vector-unfold-right
vector-reverse-copy
vector-concatenate

= Predicates =
vector-empty?
vector=

= Iteration =
vector-fold
vector-fold-right
vector-map!
vector-count

= Searching =
vector-index
vector-index-right
vector-skip
vector-skip-right
vector-binary-search
vector-any
vector-every

= Mutations =
vector-swap!
vector-reverse!
vector-reverse-copy!

= Conversion =
reverse-vector->list
reverse-list->vector

On Tue, Jan 1, 2019 at 8:27 PM Per Bothner <[hidden email]> wrote:

>
> On 1/1/19 5:18 PM, Duncan Mak wrote:
> > Hello all,
> >
> > As part of my project, I needed to use some APIs from SRFI 43 (vectors).
> >
> > I noticed that Kawa doesn't come with this SRFI, it has its own APIs
> > for Vector (https://www.gnu.org/software/kawa/Vectors.html) and that
> > is a subset of the entire SRFI 43 definition.
> >
> > In particular, I was missing vector-reverse-copy!
> >
> > What would it take to get SRFI 43 into the Kawa distribution?
>
> I'll consider adding implementations for the missing procedures.
> Initially on a procedure-by-procedure basis.
> --
>         --Per Bothner
> [hidden email]   http://per.bothner.com/



--
Duncan.
Reply | Threaded
Open this post in threaded view
|

Re: Supporting SRFI 43 (Vectors)

Duncan Mak
Turns out there's a newer version of SRFI 43.

https://srfi.schemers.org/srfi-133/srfi-133.html

Of note:

SRFI 43 standardized more vector procedures, all of which are included
in this SRFI. Unfortunately, R7RS-small and SRFI 43 placed
irreconcileable requirements on the procedures invoked by vector-map
and vector-for-each. This SRFI resolves that issue by changing these
SRFI 43 procedures as well as vector-map!, vector-fold,
vector-fold-right, and vector-count to leave out the index argument
that is passed under SRFI 43's definition.

On Tue, Jan 1, 2019 at 10:38 PM Duncan Mak <[hidden email]> wrote:

>
> Okay, Here are the procedures that are missing:
>
> = Constructors =
> vector-unfold
> vector-unfold-right
> vector-reverse-copy
> vector-concatenate
>
> = Predicates =
> vector-empty?
> vector=
>
> = Iteration =
> vector-fold
> vector-fold-right
> vector-map!
> vector-count
>
> = Searching =
> vector-index
> vector-index-right
> vector-skip
> vector-skip-right
> vector-binary-search
> vector-any
> vector-every
>
> = Mutations =
> vector-swap!
> vector-reverse!
> vector-reverse-copy!
>
> = Conversion =
> reverse-vector->list
> reverse-list->vector
>
> On Tue, Jan 1, 2019 at 8:27 PM Per Bothner <[hidden email]> wrote:
> >
> > On 1/1/19 5:18 PM, Duncan Mak wrote:
> > > Hello all,
> > >
> > > As part of my project, I needed to use some APIs from SRFI 43 (vectors).
> > >
> > > I noticed that Kawa doesn't come with this SRFI, it has its own APIs
> > > for Vector (https://www.gnu.org/software/kawa/Vectors.html) and that
> > > is a subset of the entire SRFI 43 definition.
> > >
> > > In particular, I was missing vector-reverse-copy!
> > >
> > > What would it take to get SRFI 43 into the Kawa distribution?
> >
> > I'll consider adding implementations for the missing procedures.
> > Initially on a procedure-by-procedure basis.
> > --
> >         --Per Bothner
> > [hidden email]   http://per.bothner.com/
>
>
>
> --
> Duncan.



--
Duncan.