Re: [PHP-DEV] Re: A set of 18 functions/changes to improve PHP core

2023-01-06 Thread G. P. B.
On Fri, 6 Jan 2023 at 16:19, Christoph M. Becker  wrote:

> On 06.01.2023 at 17:01, Thomas Hruska wrote:
>
> > Pre-implemented as an extension (sort of) w/ a preliminary test suite to
> > validate the implementations:
> >
> > https://github.com/cubiclesoft/php-ext-qolfuncs
> >
> > I probably violated some coding style guidelines and a few things are
> > bound to ruffle some feathers.  Be gentle?  But all input is generally
> > useful.
>
> Thank you!  At least some of that looks interesting to me.  I'll try to
> have a closer look; maybe filing issues on GH is preferable to
> discussing all the details on this ML.
>
> > I attempted to sign in with my existing PECL credentials on wiki.php.net
> > (user:  cubic) but that didn't work.  Attempting to create a Wiki
> > account for my possibly already existing user resulted in two error
> > messages:  An empty message box and another message box saying "The user
> > could not be created."
> >
> > Requesting RFC karma for user 'cubic' (cu...@php.net) if possible.
> Thanks.
>
> That is not possible, since you already have a PHP account.  Note that
> these are completely separate from PECL accounts (although users usually
> have the same nicknames for both accounts).  To log in to the Wiki, you
> need your PHP account password.  In case you have it forgotten, use
> .
>
> > I assume I'll need to create up to 18 separate RFCs unless one RFC is
> > somehow fine?  Not sure how this should be divvied up yet.
>
> Maybe a compromise is in order, and you can split it into a couple of
> RFCs.  Maybe not; I haven't checked closely so far.
>
> --
> Christoph M. Becker
>

I think splitting into "component" RFCs might make more sense as there are
some string, image, 2D matrices, variable and hash things which are logical
delimitations between these function additions.

I've had a cursory read of the README most seem reasonable, I have my
doubts about the matrix functions (see below) and str_realloc() (but that
might just be the naming and how it's meant to be use with str_splice which
is confusing me)

About str_splice(), why not call it str_modify() as the behaviour seems to
be subtly different from its array equivalent array_splice()?

About matrices:
We already have a couple of issues supporting them that we probably should
address those first, namely that multiplication is assumed to be
commutative, something which is not true for matrices (see
https://github.com/php/php-src/pull/9218)
Hoping I get back to argue about the former, it would make it possible to
use objects and the fact extensions can overload operators to make dealing
with matrices easier.
This is IMHO a better approach than using multidimensional arrays, which
those functions also seem to limit to the (albeit very useful) 2*2 case.

Anyhow, best of luck with the RFCs.

Best regards,

George P. Banyard


[PHP-DEV] Re: A set of 18 functions/changes to improve PHP core

2023-01-06 Thread Christoph M. Becker
On 06.01.2023 at 17:01, Thomas Hruska wrote:

> Pre-implemented as an extension (sort of) w/ a preliminary test suite to
> validate the implementations:
>
> https://github.com/cubiclesoft/php-ext-qolfuncs
>
> I probably violated some coding style guidelines and a few things are
> bound to ruffle some feathers.  Be gentle?  But all input is generally
> useful.

Thank you!  At least some of that looks interesting to me.  I'll try to
have a closer look; maybe filing issues on GH is preferable to
discussing all the details on this ML.

> I attempted to sign in with my existing PECL credentials on wiki.php.net
> (user:  cubic) but that didn't work.  Attempting to create a Wiki
> account for my possibly already existing user resulted in two error
> messages:  An empty message box and another message box saying "The user
> could not be created."
>
> Requesting RFC karma for user 'cubic' (cu...@php.net) if possible.  Thanks.

That is not possible, since you already have a PHP account.  Note that
these are completely separate from PECL accounts (although users usually
have the same nicknames for both accounts).  To log in to the Wiki, you
need your PHP account password.  In case you have it forgotten, use
.

> I assume I'll need to create up to 18 separate RFCs unless one RFC is
> somehow fine?  Not sure how this should be divvied up yet.

Maybe a compromise is in order, and you can split it into a couple of
RFCs.  Maybe not; I haven't checked closely so far.

--
Christoph M. Becker

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php