Re: [PHP-DEV] Re: Windows OpCache bug fix

2015-10-01 Thread Dmitry Stogov
On Thu, Oct 1, 2015 at 11:54 AM, Matt Ficken wrote: > >> And what wincache does. It is slower but the request is served. >> >> >> WinCache (file cache) if it can't reattach, creates a new shared mem file > for just that process: see >

Re: [PHP-DEV] Re: Arrow function expressions in PHP

2015-10-01 Thread Levi Morrison
On Wed, Sep 30, 2015 at 11:59 PM, Stephen Coakley wrote: > On 09/26/2015 11:17 AM, Levi Morrison wrote: >> >> (Email in gist format: >> https://gist.github.com/morrisonlevi/fa7984c04ff176b5a87c) >> >> In EcmaScript 2015 (ES6) the expression `(x) => x * 2` means to create

Re: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Rowan Collins
Levi Morrison wrote on 01/10/2015 04:06: I'm going to ask everyone to stop saying that auto-closing is bad unless they also provide a demonstration of why it was bad. Please see my e-mail from last night, or Rasmus's in the original thread. It is "bad" (or, controversial) because it is a

Re: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Nikita Nefedov
On Thu, 01 Oct 2015 13:48:52 +0300, Rowan Collins wrote: Levi Morrison wrote on 01/10/2015 04:06: I'm going to ask everyone to stop saying that auto-closing is bad unless they also provide a demonstration of why it was bad. Please see my e-mail from last night, or

Re: Fwd: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Björn Larsson
Den 2015-10-01 kl. 11:47, skrev Pavel Kouřil: How does hack solve this? Do they have backtracking in their parser? It was discussed earlier & Bob answered it, a T_LAMDA_OP is inserted by a token token-pre-parser before hitting the real parser, see: Subject: Re: [PHP-DEV] [RFC] [Discussion]

[PHP-DEV] PHP 7.0.0RC4 is available

2015-10-01 Thread ab
Hi, The fourth release candidate for 7.0.0 was just released and can be downloaded from: https://downloads.php.net/~ab/ The Windows binaries are available at http://windows.php.net/qa/ This release contains fixes for 22 reported bugs and over 100 commits with various improvements.

Re: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Rowan Collins
Nikita Nefedov wrote on 01/10/2015 12:07: And yet we have super-globals. You can also access variables of one script's global scope from another script's global scope without importing or anything like that. You are right, super-globals are an exception to the rule, because they appear in

Re: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Nikita Nefedov
On Thu, 01 Oct 2015 15:33:51 +0300, Rowan Collins wrote: That's not how Rasmus expressed it [http://marc.info/?l=php-internals=144107616411299=2]: > I made a very deliberate decision In the very first implementation of PHP to avoid scope side-effects like this.

Re: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Ryan Pallas
On Thu, Oct 1, 2015 at 8:58 AM, Nikita Nefedov wrote: > > I don't think there was a dozen of different ideas, I could only find > those about `lambda(arg-list; use-list; expression)` and variations of it > with different keywords and different return-type syntax. > I do

Re: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Rowan Collins
Levi Morrison wrote on 01/10/2015 16:52: This is close:https://github.com/morrisonlevi/Algorithm/blob/master/src/reduce.php When would you store or pass around the intermediate callback (the result of reduce($initial)) without immediately invoking it with a callback? If you just run

Re: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Rowan Collins
Nikita Nefedov wrote on 01/10/2015 15:58: On Thu, 01 Oct 2015 15:33:51 +0300, Rowan Collins wrote: It is a tool for making them shorter, yes, but it is not the only way, and it comes with a cost of changing established behaviour. Again, look at C++'s lambda syntax -

Re: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Anthony Ferrara
Nikita and all, On Thu, Oct 1, 2015 at 10:58 AM, Nikita Nefedov wrote: > On Thu, 01 Oct 2015 15:33:51 +0300, Rowan Collins > wrote: > >> That's not how Rasmus expressed it >> [http://marc.info/?l=php-internals=144107616411299=2]: >> >> > I made a

Re: [PHP-DEV] PHP 7.0.0RC4 is available

2015-10-01 Thread Anthony Ferrara
Congrats!!! Thank you so much for what you are doing! Keep up the awesome work! On Thu, Oct 1, 2015 at 9:02 AM, wrote: > Hi, > > The fourth release candidate for 7.0.0 was just released and can be > downloaded from: > > https://downloads.php.net/~ab/ > > The Windows binaries

Re: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Levi Morrison
>> And one thing that makes auto capture much better choice than explicit >> capture (as it've been said a couple of times already) is partial >> application: >> >> $mul = fn($x) => fn($y) => fn($z) => $x * $y * $z; >> >> Looks simpler than: >> >> $mul = fn($x) => fn($y; $x) => fn($z; $x,

Re: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Bishop Bettini
On Thu, Oct 1, 2015 at 12:28 PM, Anthony Ferrara wrote: > Nikita and all, > > > I don't think there was a dozen of different ideas, I could only find > those > > about `lambda(arg-list; use-list; expression)` and variations of it with > > different keywords and different

Re: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Levi Morrison
On Thu, Oct 1, 2015 at 10:47 AM, Rowan Collins wrote: > Levi Morrison wrote on 01/10/2015 16:52: >> >> This is >> close:https://github.com/morrisonlevi/Algorithm/blob/master/src/reduce.php > > > When would you store or pass around the intermediate callback (the result of

Re: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Levi Morrison
> Or we can figure out some other such symbol. Worse casing no white space, > brain storming: Please, I already asked people to stop making suggestions for shorter syntax for `use()`. Again, if use() is a pain then auto-importing the used variables is a good solution. If it's not a pain why are

Re: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Rowan Collins
Levi Morrison wrote on 01/10/2015 18:40: Or we can figure out some other such symbol. Worse casing no white space, brain storming: Please, I already asked people to stop making suggestions for shorter syntax for `use()`. I tried to move the discussion to whether or not auto-capturing

Re: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Levi Morrison
On Thu, Oct 1, 2015 at 11:57 AM, Rowan Collins wrote: > Levi Morrison wrote on 01/10/2015 18:40: >>> >>> Or we can figure out some other such symbol. Worse casing no white space, >>> brain storming: >> >> Please, I already asked people to stop making suggestions for

Re: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Rowan Collins
Levi Morrison wrote on 01/10/2015 19:09: You are capped to saving about 5-7 characters no matter what you do with this functionality. I see an upper limit to savings of 21 - using "|" to stand in for "some single character delimiting the sections" gives: |$x|$y|$x*$y| // 13 chars vs

[PHP-DEV] PHP 7.0's Unicode version incoherence (mbstring, intl, pcre)

2015-10-01 Thread Tom Worster
I think PHP should be consistent in using a given Unicode version in each release. Improvements in PHP 7.0, especially IntlChar, allows us to do properly various things that required hackery with preg and mbstring in the past. But both approaches will have to coexist for the foreseeable future.

Re: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Rowan Collins
Levi Morrison wrote on 01/10/2015 18:38: Chain works is because the functions passed to it accept iterables as their only parameter and return either an another iterable or a reducing function (in this example sum is the reducer). This is why the functions are returning closures that accept only

Re: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Björn Larsson
Den 2015-10-01 kl. 19:12, skrev Bishop Bettini: On Thu, Oct 1, 2015 at 12:28 PM, Anthony Ferrara wrote: Nikita and all, I don't think there was a dozen of different ideas, I could only find those about `lambda(arg-list; use-list; expression)` and variations of it with

Re: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Björn Larsson
Hi, Given the recent discussion about async/await keyword should one also consider short closures supporting asynchronous functionality in the future? Stumbled upon it when reading about Async Lambdas in Hacklang manual. Regards //Björn Larsson Den 2015-09-26 kl. 18:17, skrev Levi Morrison:

RE: [PHP-DEV] PHP 7.0.0RC4 is available

2015-10-01 Thread ab
Hi Anthony, > -Original Message- > From: Anthony Ferrara [mailto:ircmax...@gmail.com] > Sent: Thursday, October 1, 2015 6:34 PM > To: a...@php.net > Cc: PHP Internals > Subject: Re: [PHP-DEV] PHP 7.0.0RC4 is available > > Congrats!!! > > Thank you so much for

RE: [PHP-DEV] Re: Windows OpCache bug fix

2015-10-01 Thread Anatol Belski
Hi, > -Original Message- > From: Dmitry Stogov [mailto:dmi...@zend.com] > Sent: Thursday, October 1, 2015 12:20 PM > To: Matt Ficken > Cc: Pierre Joye ; Anatoliy Belsky ; > Laruence ; PHP Internals

[PHP-DEV] Re: [RFC] [DISCUSSION]: Closure from callable

2015-10-01 Thread Andrea Faulds
Hi Dan, Dan Ackroyd wrote: I'd like to start a discussion of a proposal to allow closures to be created in user-land without having to use a whole lot of reflection code. https://wiki.php.net/rfc/closurefromcallable Thanks to Joe and Bob for the assistance in the patch. I've wanted

Re: [PHP-DEV] PHP 7.1 - should we add a random_str() function?

2015-10-01 Thread Jordi Boggiano
On 30/09/2015 17:15, Scott Arciszewski wrote: This is probably answerable by a quick yes/no and shouldn't need a ton of bikeshedding, but if that happens anyway I apologize in advance. I think random_bytes() and random_int() are great; they provide a much-needed building block in PHP 7.0.

[PHP-DEV] Re: async/await - is future reserved words in PHP 7.x?

2015-10-01 Thread Stephen Coakley
On 09/29/2015 11:15 AM, Daniel Lowrey wrote: On Sep 28, 2015, at 3:29 AM, S.A.N wrote:> > Are there any future plans for - async/await?> This need to know now, not to use these words to constants, and class names...> > -- > PHP Internals - PHP Runtime Development

Re: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Pavel Kouřil
On Tue, Sep 29, 2015 at 11:55 PM, Levi Morrison wrote: > Reading over the list I don't think people "are torn about" it. There > are some detractors, sure, but there seem to be more detractors about > symbol choice (~) and lack of type declarations. Personally, I feel that

Re: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Björn Larsson
Den 2015-09-28 kl. 23:38, skrev Pavel Kouřil: On Sat, Sep 26, 2015 at 6:17 PM, Levi Morrison wrote: (Email in gist format: https://gist.github.com/morrisonlevi/fa7984c04ff176b5a87c) In EcmaScript 2015 (ES6) the expression `(x) => x * 2` means to create an anonymous function

[PHP-DEV] Re: Arrow function expressions in PHP

2015-10-01 Thread Stephen Coakley
On 09/26/2015 11:17 AM, Levi Morrison wrote: (Email in gist format: https://gist.github.com/morrisonlevi/fa7984c04ff176b5a87c) In EcmaScript 2015 (ES6) the expression `(x) => x * 2` means to create an anonymous function with one parameter `x` that will return `x * 2`. For example: (x) =>

Re: [PHP-DEV] Re: Windows OpCache bug fix

2015-10-01 Thread Pierre Joye
On Oct 1, 2015 3:59 AM, "Dmitry Stogov" wrote: > > Hi Matt, > > Thanks for looking into the problem, but I afraid that the proposed > solution won't solve the problem completely, but may introduce new > problems. At first, we might to reserve N times more memory. Then different >

Re: [PHP-DEV] async/await - is future reserved words in PHP 7.x?

2015-10-01 Thread Stephen Coakley
On 09/29/2015 10:22 AM, Thomas Hruska wrote: On 9/29/2015 6:52 AM, Joe Watkins wrote: We shouldn't reserve words on a whim ... async/await doesn't solve any problems for multithreaded programming, at all ... it solves problems for asynchronous programming, a different concept ... let's not

Re: [PHP-DEV] async/await - is future reserved words in PHP 7.x?

2015-10-01 Thread Stephen Coakley
On 09/29/2015 01:04 PM, S.A.N wrote: Implementing elegant, readable, and stable asynchronous code in userland PHP code is very possible. In fact, I’ve done exactly this with Icicle (https://github.com/icicleio/icicle). Icicle uses generators and promises to implement coroutines. When a

Re: [PHP-DEV] [RFC] [DISCUSSION]: Closure from callable

2015-10-01 Thread Bishop Bettini
On Tue, Sep 29, 2015 at 10:23 AM, Dan Ackroyd wrote: > Hello internals, > > I'd like to start a discussion of a proposal to allow closures to be > created in user-land without having to use a whole lot of reflection > code. > > https://wiki.php.net/rfc/closurefromcallable

Re: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Bishop Bettini
On Thu, Oct 1, 2015 at 1:40 PM, Levi Morrison wrote: > > Or we can figure out some other such symbol. Worse casing no white space, > > brain storming: > > Please, I already asked people to stop making suggestions for shorter > syntax for `use()`. Again, if use() is a pain then

Re: [PHP-DEV] Re: Arrow function expressions in PHP

2015-10-01 Thread Stephen Coakley
On 10/01/2015 06:52 AM, Levi Morrison wrote: On Wed, Sep 30, 2015 at 11:59 PM, Stephen Coakley wrote: On 09/26/2015 11:17 AM, Levi Morrison wrote: (Email in gist format: https://gist.github.com/morrisonlevi/fa7984c04ff176b5a87c) In EcmaScript 2015 (ES6) the

Re: [PHP-DEV] Re: Arrow function expressions in PHP

2015-10-01 Thread Stephen Coakley
On 10/01/2015 06:52 AM, Levi Morrison wrote: > On Wed, Sep 30, 2015 at 11:59 PM, Stephen Coakley wrote: >> On 09/26/2015 11:17 AM, Levi Morrison wrote: >>> >>> (Email in gist format: >>> https://gist.github.com/morrisonlevi/fa7984c04ff176b5a87c) >>> >>> In EcmaScript

Fwd: [PHP-DEV] Arrow function expressions in PHP

2015-10-01 Thread Pavel Kouřil
> > How does hack solve this? Do they have backtracking in their parser? > > It was discussed earlier & Bob answered it, a T_LAMDA_OP is inserted > by a token token-pre-parser before hitting the real parser, see: > > Subject: Re: [PHP-DEV] [RFC] [Discussion] Short Closures > Date: Sun, 6 Sep 2015

Re: [PHP-DEV] Re: Windows OpCache bug fix

2015-10-01 Thread Matt Ficken
> > > And what wincache does. It is slower but the request is served. > > > WinCache (file cache) if it can't reattach, creates a new shared mem file for just that process: see http://svn.php.net/viewvc/pecl/wincache/trunk/wincache_filemap.c?revision=336846=markup Line 1122. Yes, ideally it would