Re: [PHP-DEV] [RFC] [Discussion] Clone with

2023-04-18 Thread Bob Magic
> [1] In fact if the right hand side of with may be an expression that
> evaluates to an array, folks wouldn't need to learn new syntax at all:
>
> $newProperties = [ "foo" => "bar" ];
> clone $object with $newProperties;
>
> and
>
> clone $object with [ "foo" => "bar" ];

in my opinion this is sick, as in awesome. the {} version makes no sense to
me unless the language gains $var = {} ; to skip $var = (object)[];


Re: [PHP-DEV] Array spread append

2023-04-07 Thread Bob Magic
 > I think it would be more intuitive to implement an array "appending"
> functionality with "concatenating" syntax.  The `.=` syntax already
exists,
> but is forbidden from use on non-strings.  If you want to implement this
> preexisting syntax as an array concatenation operator, then it is a blank
> slate -- you can decree whatever behaviors you wish for it without
blurring
> what the combined operator does with strings.

on github there is a comment about adding an array_concat() instead like
js's Array.concat() that would try to avoid the pitfalls of +=, array_push,
and current behaviour of .=

flipping through the mdn for it, its results seem alright.


Re: [PHP-DEV] Problems with the mailing list [was: Re: [PHP-DEV] Request for karma to vote on RFCs]

2021-07-20 Thread Bob Magic
i can't prove that i was shadowbanned but after a huge fight with someone
on this mailing list, i stopped getting all responses from it, even just
general help commands, for about 6 years. mysteriously it just started
working again last year with nothing done on my part, and here i am, right
where it left off. it could have just been as broken for me as it was you.

On Tue, Jul 20, 2021 at 2:44 AM Lynn  wrote:

>
>
> On Tue, Jul 20, 2021 at 9:33 AM Peter Bowyer 
> wrote:
>
>> I have now been contacted by 2 people who tried multiple times to join
>> this
>> mailing list and cannot.
>>
>> It took me 5 weeks for my signup to work. During that time I emailed the
>> different @php.net mailboxes related to infrastructure and/or the web and
>> received no response. Eventually I managed to sign up - once I created
>> this
>> brand-new Gmail account. The signup form is unreliable.
>>
>> There are people wanting to take part in discussions who can't.
>>
>>
> It took me a very long time to get signed up to the mailing list as well,
> so I poked around on twitter back then to see if anyone could help me. I've
> tried several times over the timespan of at least a year and I never
> received a follow up after using the form. I'm not sure what changed, it
> just worked eventually. I'm also still receiving a bunch of messages from
> the mailing list in my spam folder (gmail), and there's not much I can do
> about it. I would love to see a system replacing the mailing list, one
> where we can reliably use things like markdown to properly quote and have
> code blocks and have at least semi-decent threaded discussions.
>


Re: [PHP-DEV] Request for karma to vote on RFCs

2021-07-19 Thread Bob Magic
> Currently there are people with voting permissions that do vote, yet do
not
interact with RFCs or the mailing list.

it does not help that depending on how you get the mailing list (like me,
in digest form) its almost impossible to actually chime in. just to reply
to this i have done about 13 clicks in the gmail interface, and im still
sure this will show up outside of the timeline of the actual thread and may
be read by at most 2 people who happened to find it on externals.io.

plus that one time your client accidentally top-posts instead of bottom
posts and starts yet another flamewar about that instead of talking about
what you actually wanted to talk about.

my favourite way to comment on things is to comment on the github pull
requests usually tagged in the RFC's because you don't have to be a member
of the club to chime in there. it has been an issue in the past where
someone has been too sensitive and deleted comments though immediately
after "open for discussion" dot dot dot

i'd say we need something more modern and transparent than this old mailing
list, but i completely lack a suggestion that isn't somehow worse than what
we got now in terms of massively multiplayer discussion.


Re: [PHP-DEV] [RFC] clamp

2021-06-24 Thread Bob Magic
why stop with clamp? add wrap too. imagine being against clamp but ok with
floor and ceiling. lets make our math lib even better.


Re: [PHP-DEV] Discussion: Object-scoped RNG

2021-05-12 Thread Bob Magic
 > - Do you think that PHP needs an object-scoped random number
> > implementation? And why?

if this means each object can maintain its own seed i dont know why php or
many other languages dont have this truely. been doing game dev recently
and i needed an rng system that does not involve messing with the system
level seed. like if i mt_srand 42 just so my procedural code does the same
thing to generate the same level each time, so is the rest of the app not
even involved with procedural generation and that is badong.

-b