« first day (1383 days earlier)      last day (3565 days later) » 

11:00 PM
It is 1am in both of those countries though...
 
Yeah lol
 
@DaveRandom That's basically the issue with Countable. The interface method should be Countable::count($mode). But an impl. is independent of the $mode. So, why should it specify the unnecessary parameter if it's not going to be used?
 
@bwoebi Because the contract says that it must. The implementation "signed" the contract and must stick to it's side of the bargain.
 
@DaveRandom That's my problem with it.
 
+1 to "The implementation "signed" the contract and must stick to it's side of the bargain." The default parameters are not part of the contract, and shouldn't be part of the interface......but the fact that the parameter exists is.
 
11:05 PM
"Default parameters" -> might mean "optional parameters", which might different in 5.7/PHP.next
 
@bwoebi The crucial point here is that allowing the caller to pass more than the require params is not part of the language. It may be allowed in userland, but zpp doesn't allow it: 3v4l.org/Klt7G
 
@bwoebi teehehe
 
The fact that userland allows it is simply an artifact of the fact that varargs did not exist, that behaviour can (and should) now be deprecated
 
@DaveRandom I know. I dislike that in zpp.
 
11:07 PM
@DaveRandom Fancy writing that RFC? ;)
 
Yeh no.
 
@Danack
 
I might float the idea for PHP [67] but I somehow doubt it will be warmly received
 
@DaveRandom ?
 
Yeah...the whole thing is a difficult thing to even think about, but it does seem that clarifying what is meant to happen for covariance/contravariance of interfaces and methods would be good.
Particularly as names do mean something PHP for both calling functions through reflection (e.g. Auryn would give surprising results when calling a function foo($bar1, $bar2) vs foo($bar2, $bar1)
 
user895378
11:19 PM
Stupid windows. I install some updates and now it refuses to recognize the presence of my second monitor.
 
And also when hopefully named parameters gets accepted, it will also require (to prevent surprises) parameters having the same names in methods of a class that is implementing an interface
Oh "Parameter names during inheritance will not be enforced by our LSP checks. It was decided that this would be too large of a BC break."
@Nikic is ^^ still going to be true for PHP 6 7?
 
@Danack lolwut
 
user895378
Dude, PHPNEXT, please.
 
the rfc was targeting 5.6 - it didn't make it for then, but it does seem sensible that it was too big a change for a point release.
 
@Danack oic. Well yeh, 5-to-7 tools will be able to find and even fix that with very little human intervention
 
user895378
11:27 PM
It would be kind of fitting if the last minor release were 5.7 and then we jumped from 5 to 7
 
Not sure, what is this "5.7" you speak of? Surely 5.6 + 0.1 = 5.8?
 
user895378
I don't even know what I'm doing anymore.
 
user895378
Oh thank heavens: monitor is back. No more tiny laptop screen.
 
If it helps, I can tell you what I'm doing, and that's eating a bacon sandwhich
 
user895378
@DaveRandom FYI I expect to push up the new Acesync repo later tonight and migrate the Artax dev branch to that. Should be able to merge artax dev into master before the weekend and hopefully tag v0.8.0 as well.
 
user895378
11:32 PM
I'm pretty pumped about getting secure TLS functionality in old versions of PHP for free.
 
If it has a standalone-ish TCP connector, does it also have a UDP connector?
(reason being that if it does I will use it in Addr)
 
user895378
@DaveRandom I'm pretty sure I coded it in such a way as to allow UDP as well.
 
user895378
You can't use encryption with UDP, though, because not even 5.6 supports that.
 
user895378
I'll just make it accept an optional scheme in the connection authority, default to tcp in its absence and error if it's specified and not equal to tcp/udp
 
user895378
Though I don't know who really needs encrypted UDP right now anyway.
 
11:41 PM
@rdlowrey Is it specifically for crypto and not generic "connections"?
 
user895378
It's for either/or/both
 
But yes, encrypted UDP makes little to no sense
 
user895378
$sock = Acesync\connectSync($uri);
$encryptedSock = Acesync\cryptoConnectSync($uri);
 
@rdlowrey Yeh it should support UDP (and probably at least unix:// and udg://) as well then
 
user895378
yeah, was adding those now.
 
user895378
11:43 PM
And if you lose the "Sync" postfix from those func names you have the async functions that do the same thing but return a Promise that resolves when the connection is ready to use.
 
user895378
$options = [
    'crypto_method'     => STREAM_CRYPTO_METHOD_TLS_CLIENT,
    'verify_peer'       => true,
    'peer_name'         => 'www.google.com',
    'peer_fingerprint'  => 'a5e6b2d9ec52e6bc2aa5f18f249c01d403538224',
];

if ($sock = Acesync\cryptoConnectSync('www.google.com:443', $options)) {
    fwrite($sock, "GET / HTTP/1.0\r\n\r\n");
    while (!feof($sock)) {
        echo fread($sock, 8192);
    }
}
 
I will wait for that and move Addr to use that lib + promises in that case
 
user895378
So you have access to all the same context options as 5.6 for option keys.
 
Are you using react/promise or home grown?
 
user895378
home grown because it's 2x faster than the react promise
 
11:46 PM
burn :-p
 
user895378
But I will probably make them compatible to be nice since composer makes it so easy to pull in the react lib and have my code implement the relevant interfaces.
 
user895378
The react promise interface is great, but the implementation is functional just for the sake of being functional. It completely ignores that performance can be vastly improved by not making internal implementation details functional in a language like PHP.
 
user895378
Decisions like that matter, especially if you're going to use that as the basic concurrency primitive in your entire application.
 
user895378
And for a server it really matters.
 
@rdlowrey igor wrote it when he was very much into the whole functional thang
He may still be, not sure
 
user895378
11:51 PM
@DaveRandom well, I don't think Igor actually wrote that. It was another dude.
 
user895378
Functional is great. But it's slow in PHP.
 
Oh no it's evenement that's specifically his component
 
user895378
So I prefer to expose functional APIs but largely implement them internally using callbacks and minimal abstraction because perf.
 
user895378
Anyway, gym. I'll get to that stuff later this evening.
 
user895378
Have a nice night!
 
11:53 PM
Yeh I should go to bed
nite
 

« first day (1383 days earlier)      last day (3565 days later) »