« first day (2283 days earlier)      last day (2665 days later) » 
00:00 - 17:0017:00 - 00:00

5:00 PM
@JoeWatkins I've also found pthreads has a number of few issues around it regarding anonymous classes. Shall I submit them as issues, or just show them here?
 
I've only been awake for an hour or something, so something may spring to mind ...
I already know about them ... submit issues and I'll work on them at earliest convenience ...
 
@JoeWatkins Thanks! If anything does spring to mind, just ping me :)
 
cool
 
@JoeWatkins Will do. There's also a weird segfault around static properties with inheritance
 
submit an issue for that too
I hate static properties ...
 
5:01 PM
Ok, I'll do that now.
 
@kelunik I'd expect assert to just do a boolean cast - because it does that for every other type…
 
it might be next weekend before I get a chance to do anything about it ... fixing things in pthreads requires big chunks of time ...
 
@kelunik At least currently it happens at times that the expression is "123" (i.e. the string and not an int), which will compile fine and succeed…
 
@JoeWatkins Yeah, I don't doubt that. I've already spent some hours looking into a few of these problems, but haven't really got too far (particularly around the statics problem).
 
@bwoebi Well, simply only deprecate literal strings?
 
5:06 PM
@kelunik what do you mean with literal string?
 
assert("123");
 
Wes
what's the purpose of ReflectionObject folks?
 
@kelunik I mean, $var = "123"; assert($var);
 
@bwoebi Yes, that should just pass, but assert("123"); should throw a deprecation warning.
 
could be fine
 
5:12 PM
that would break bc with old code that uses assert
 
@JoeWatkins well, worst case is that assertions always succeed
 
to deprecate it I mean ... I'm pretty sure dmitry will resist that ... because he already did
wanted to do that in the first place ...
he made the whole thing worse instead of letting that die ...
 
@bwoebi silently, which is the problem. There needs to be a step between them working correctly, and them always passing, which alerts people to the change in behaviour.
 
yeh
@Danack you might be right, but I'm not sure … there will be a number of false positives
 
I start to think about giving up on meta too. how can people be so goddamn angry about a survey?
 
5:20 PM
@FélixGagnon-Grenier why?
 
Well, I just might start to have been around long enough to realize... people will whine, and whine, and whine.
 
@FélixGagnon-Grenier they will… avoid the whining questions and seek the constructive ones
 
Are these synonyms?
- To take them off from each other you should ...
- To separate them from each other you should ...
 
no, they aren't
 
well shit :-(
 
Wes
5:35 PM
3v4l.org/PGN2a shouldn't this return the constant expression? ie, the evaluable code
 
@Wes I'm a little surprised \Bar\Qux\whatever::class returns the function name… wtf.
I realize that's done at compile time when it doesn't know it's not a class name… but it sure looks weird.
 
@Wes People are strange in Europe ... you know, I have written thousands lines of PHP code and never used namespace so far ..!
 
@Wes But to answer your question, no, you asked for the constant name, but the value for the default is not a named constant.
 
Wes
@Trowski i mean, shouldn't there be a method to retrieve the evaluable expression? :B
@Shafizadeh we are strange because we use namespaces?
 
@Wes kinda ;-)
 
Wes
5:46 PM
if you don't namespace by default i hate you... by default
 
@Wes ConstantName is only for real constants, not constant scalar expressions
 
Wes
> shouldn't there be a method to retrieve the evaluable expression? :B
 
@tpunt squished static one ...
 
@Wes we could use ast exporting nowadays
but back when const scalar exprs in PHP 5.6 were added there was no way to export that properly
 
5:51 PM
@JoeWatkins Damn, now that's efficient!
 
@Shafizadeh how do you autoload?
 
silly mistake in code ... the anon class ones are not so simple ...
 
@JoeWatkins Hmm, not sure about the fix. I could have sworn I also tried the same fix, but it messed up something else. This was last week though, so don't remember exactly...
 
Wes
@bwoebi noice. rfc or just commit it in(tm) ?
no what was it :B
 
@tpunt whatever it was that got messed up was never meant to work :)
 
5:52 PM
function my_autoloader($class) {
require_once($class.".php");
}

spl_autoload_register('my_autoloader');
 
@Wes "just commit it™"
 
Wes
Just commit it™ :B
 
@Wes Are you on Windows, or why the "(tm)"?
 
Wes
i'm on windows
 
@Shafizadeh so... all your classes are in the same flat folder?
 
5:53 PM
@Wes boooooo
 
@Wes ah… well… on macos it's just shift+alt+x
 
@FélixGagnon-Grenier I know what you are trying to say ;-) ...
 
Wes
@bwoebi also on windows, if you remember what's the code for it :B
 
@Shafizadeh nice. can you enlighten me? I wasn't sure myself what I was trying to say
 
@Wes hah
@JoeWatkins I'm amazed that the notion of complex types remained in pthreads since I first introduced it in PR #42 :-)
 
5:55 PM
@FélixGagnon-Grenier Hah ...!!! you are trying to say when you use a autoloader you are actually using the concept of namespace
 
@Shafizadeh not really...
If you were using namespaces, you would use namespaces. if you don't, all your classes are flat in the folder. quite simple
 
Ah .. I see
 
@bwoebi haha, it's still useful distinction ... definition has changed a bit ... like a closure or Threaded object is not considered complex, but because of hacks to make those things work ...
 
@JoeWatkins yeah, I noticed, but still :-)
 
@Shafizadeh but you did not answer. all your classes are located in the same folder?
 
6:00 PM
zend_type has really broken everything ... I like it, but it's going to cost me many hours ...
 
@FélixGagnon-Grenier yes they are ..!
 
@JoeWatkins in pthreads?
 
@Shafizadeh hmmm... do you find that to be manageable?
 
yeah, and apcu, and probably uopz (not sure)
 
@FélixGagnon-Grenier actually my projects aren't that much huge usually .. all files are almost 10 files :-)
 
6:01 PM
@JoeWatkins It cost me like ~5 hours to update typed_ref_properties … And these are using zend_type much more extensively… don't think you'll need that long.
 
it shouldn't take that long ... but even an hour is a pita, I dunno what rate I introduce new bugs in pthreads when working on it, but it's more than 0bph :D
there is always someone worse off anyway ... like derick ...
 
@JoeWatkins well, an infinitesimally small number above zero is also acceptable.
@JoeWatkins dunno… phpdbg was not touched at all for that change
 
orly
 
yep.
 
none of it is in my head any more ... just assumed ... maybe little bit of pain for profiler parts of xdebug, and vld
 
6:05 PM
@JoeWatkins the only pain is that you'll have to use version switches…
while I didn't…
 
yeah, but derick just got rid of all those :D
 
yeah… just to introduce new ones now :-)
 
must be a bit annoyed, but must like it because he didn't mention any of that on internals
 
@bwoebi Speaking of phpdbg, I noticed it's failing in the nightly builds on travis: travis-ci.org/amphp/amp/jobs/192115932#L293
 
@Trowski since when?
 
6:08 PM
@bwoebi ~5 days ago
This was the last amp build where it worked: travis-ci.org/amphp/amp/builds/190154769
 
@Trowski Worked that way the whole time, because it's compile time.
 
@kelunik Realized that right after I said it, but it's still weird.
 
Is there any English word which means "a member of the group"? And sounds like "beaingus"
 
@bwoebi that's what would happen in php 8
 
@NikiC yeah, probably fine … I'm not 100% sure, just abstaining from that particular one
 
6:11 PM
@Wes Yes, it's find of silly. I think that one should be deprecated and replaced.
 
oh I missed that going to voting
 
@Trowski git.php.net/… … I see… should be num_args, not last_var in the if
fixing…
not related to phpdbg itself
(Amp/Aerys is a good test for generator related things :-D)
 
I wonder why our test suite didn't pick that up ?
not sure what sort of coverage we have there ... maybe someone should improve it though ...
 
@JoeWatkins because in our testsuite we usually have very small functions
 
What was the purpose of cfunction in PHP4?
 
6:16 PM
and the issue just happens when there are more cvs as args and more args than in the signature
@brzuchal I believe it's a PHP 3 relict, you'll have to look that up…
 
@brzuchal because manual doesn't document anything related to PHP 3
IN PHP 4 AFAIK it just was an alias of function
 
ok, thx, was just curious becouse found that in ctags the thing that OpenGrok uses for tagging PHP source files
@JoeWatkins 1998year, nice
thanks @JoeWatkins
 
6:21 PM
@NikiC long live (unset)
 
interesting note on ctags https://github.com/universal-ctags/ctags/blob/master/parsers/php.c#L154
{ "cfunction", KEYWORD_function }, /* nobody knows what the hell this is, but it seems to behave much like "function" so bind it to it */
 
@NikiC this I'm not sure about ...
> (each) Instead, throw a deprecation warning on the first call for any given request.
that would seem to make it harder to find things to change ... can't it just throw warning the first time an opline is executed, rather than per request ?
or is that what that means ... not sure ?
 
@Trowski Thanks for the report, fixed: git.php.net/…
 
> This behavior of assert() makes it easy to introduce subtle remote code execution vulnerabilities. Using assert($value) to check if a value is truthy opens an RCE vulnerability if there is any chance for $value to be a string.
Isn't it better to simply not run them in that case + deprecation warning?
 
@brzuchal Twenty years ago cfunction was the "new" way to write functions … i.e. cfunction foo($bar, $baz) { $stmts; } … before we had function foo $bar, $baz ( $stmts; )
 
6:35 PM
Is it possible to make the result of a function (what it returns) abstract ?
 
@brzuchal And then in PHP 3.0 alpha 3 function got aliased to cfunction and the original way to use function replaced with a new keyword old_function
@brzuchal and that way to write functions was basically the PHP/FI way…
cfunction basically only had unique non-aliased functionality for like 2 alphas of PHP 3.0 and wasn't dropped until PHP 5.0 @brzuchal
 
7:04 PM
@JoeWatkins git grep each (+ word boundaries, however you do that)?
Doing it per opline would be rather ugly from the implementation side
 
@bwoebi @kelunik anyone of you guys interessted in implementing the imap protocol in php userland?
(For money of course)
 
@FélixGagnon-Grenier You're canadian. Isn't it deer or moose to your hearth?
 
@Shafizadeh depends what you mean by "abstract"
 
@bwoebi eeeeek
 
@staabm in Amp?
Also, do you have a quick link to the RFC?
 
7:10 PM
@bwoebi maybe
 
Also, as client or as server?
 
@tereško I don't know, today, my co-worked told me it would be better to make the result of all functions as abstract .. Now I want to know what was his point?
:-(
 
maybe you should ask him tomorrow what did he mean by "abstract"
 
@NikiC yeah, PHP has gone a long way :-)
 
also, @Shafizadeh, was he talking about function or methods?
 
7:12 PM
@tereško well that's kinda humility ...! I don't ask at work at all .. all people ask me, but I don't ;-)
@tereško methods
 
I think you meant "humiliating"
 
yes ..
 
@bwoebi as server. We have some email data in a database and want to publish it via imap
 
asking question at is important, it's one of ways how you gain experience
 
We already have a virtual filesystem which is published with webdav and contacts published with caldav
 
7:15 PM
correct .. but just tell me can we make a relation between "the concept of abstract" and "what a method returns" ?
 
I guess it would also be ok to use php imap_* functions ....
 
ok ... my best guess is that what he actually was trying to say was: "all methods should return objects"
which is just a really bad idea (in php)
 
@staabm not, sure but do php imap functions even work as server?
 
Hmm but it looks like the imap_* are ment for clients
 
@tereško oh oh ..!! yes yes .. that's correct, he meant this .. your guess makes sense based on our project we are working on .. thank you
 
7:16 PM
@bwoebi just realized this myself
 
tools.ietf.org/html/rfc3501 is then probably what you need, right?
 
Wes
prophecy is giving me cancer guys. send medical help
 
@Shafizadeh first of all, in some languages there is a distinction between "procedures" and "function". In those languages (like in Pascal) the procedures "do stuff" and the function "return stuff"
 
@Wes stop using it, that's the best medication I can offer.
 
it's where the Comand-Query Separation principle comes from
 
7:19 PM
@bwoebi i guess so
 
@tereško yes .. what you said means "using void for methods which don't return something" in Java
 
php is not java
 
yeah :-)
 
@staabm that won't be cheap
 
@Shafizadeh and you also have just methods like isValid(), which return a boolean type
 
7:20 PM
that's correct
 
Wes
@bwoebi can you help me understanding what's the purpose of ReflectionObject? i don't get it :(
why does it exist...
 
Command–query separation (CQS) is a principle of imperative computer programming. It was devised by Bertrand Meyer as part of his pioneering work on the Eiffel programming language. It states that every method should either be a command that performs an action, or a query that returns data to the caller, but not both. In other words, Asking a question should not change the answer. More formally, methods should return a value only if they are referentially transparent and hence possess no side effects. == Connection with design by contract == Command–query separation is particularly well suited...
I meant this
 
lemme take a look at it
it might take a while :-)
 
basically: your getter functions should not alter the state of object
 
@Wes no idea
 
Wes
7:22 PM
!!lxr ReflectionObject
 
@Wes There were no results for that search
 
@bwoebi but could it be a problem you might be interessted in?
 
Wes
god almighty
 
Wes
just the constructor?
 
7:24 PM
@tereško I'm not sure what you mean exactly .. but I usually make some methods which don't return something and just set something to a property of the class ... EX: public function setURL(){} - it doesn't return anything
 
@staabm I'm not opposed per se, but I expect it to take anywhere between 30 and 100 hours [Depending on what functionality the server should have, apart from just understanding the protocol]
 
@Shafizadeh "getter function" are called the ones that start with "get"
 
It has a lot of commands, and quite a few RFCs extending the base RFC … they want all be read, understood and implemented @staabm
 
for example getId()
 
Ah .. I see
 
7:26 PM
@bwoebi ok thx. I am checking options atm. Will get back to you after a bit more research. Thx
 
@Shafizadeh just because you call getId() it should not replace your $this->surname with "wambot"
 
@tereško yes !
 
@staabm yeah, but if you pay at normal freelance rates of 30-50 €/h you'll can estimate it to cost 1000+ € [depending on functionality obviously] … so, your company will have to determine whether it's worth it…
 
> but if you pay at normal freelance rates of 30-50 €/h
That's a lie
 
@PeeHaa Did I underestimate? :-P
 
7:30 PM
yes
 
depends on a country
 
sum those numbers
 
it's about 10-20 €/h in Latvia
 
Yes but you are russian
 
I know… but when I can publish that as open-source, I ask for a bit less … I could think there might be other people wanting that too
 
7:31 PM
@PeeHaa I am not
 
Wes
i don't get what's going on. is it just an alias?
 
Close enough though
 
@tereško Latvia, Russia… isn't that anyway Sowjetunion?
 
heheheh
 
@PeeHaa that's like saying that you are German
 
7:33 PM
What should the http response code be if one of the parameters is a value that causes my script to attempt to read a non-existent file?
 
@tereško Well… but … Latvia was still part of Sowjetunion when you were born, no?
 
@bwoebi yes, Latvia was still occupied, when is was born
 
@tereško ja?
 
@tereško what kind of occupied? war?
 
They took all the snow
bastards
 
7:40 PM
:-)
 
@Shafizadeh annexation in the "World War 2"
 
Wes
i'm fairly convinced that ReflectionObject is just an alias for ReflectionClass
 
One question, do you have any interest to military training?
 
nope
 
7:43 PM
Is Internals still having mailing issues? I just got an email from enzim about the email being rejected with something about SBL.
 
@Shafizadeh the closest country to Latvia, which might get aggressive is Russia, and the have army that is comparable in size to population of my entire country.
 
:-)
such a small country you have :-)
 
according to wikipedia, RU has 845,000 active army personal ... my country's population is under 2 million
 
:-)
 
on the other hand, we dont have any interesting natural resources, that USA , China or Russia might try to liberate from terrorists
 
7:51 PM
@tereško However I guess the information about military aren't precise ..! Sometimes countries announce their military information how to appear enlarge
 
emm .. the size of Latvian army currently is 5310
 
@tereško Hah .. I can attack to your country o by myself ;-)
 
Wes
 
it even has colors
 
I'm going to sleep .. but before it, I like to hear a nice trick in PHP7 ! I'm listening ..
 
Anonymous
8:03 PM
Morn
 
@JayIsTooCommon Yo ..!
 
@JonahSloan 418
 
how does that ping to myself work?
 
@NikiC fair enough
 
@PeeHaa hehe. but deer so not === moose!!!
 
8:14 PM
@crypticツ yeah we are all getting that ... I guess someone is looking at it ... but sunday ...
 
Wes
@JoeWatkins could it be that i'm breaking it? :B it happens immediately after i send a mail...
 
ReflectionObject extends ReflectionClass and adds ReflectionObject::export and overrides ctor
they share common ctor internally ... it's an instance reflector, not exactly the same as class reflector
 
Wes
yeah but interface is the same, also i can construct both objects and classes with both classes, and i get apparently the same result
 
yeah same result, the object reflector will work differently for things like getProperties (where there is a difference between type and instance)
it's the same interface because RO extends RC ... it probably shouldn't, but that's why they have the same interface ...
 
Wes
it is strange because for most things reflection class offers the $object argument. this then looks strange:
$o = new ReflectionObject($obj);
$o->invoke($obj, ...);
though i get it now
3v4l.org/CHnS5 nope, i don't get it
 
Wes
i probably checked the only thing that isn't properly reflected :B thanks
 
8:53 PM
@brzuchal I think you will find some general agreement that native modules would be a good thing but there are a lot of details for such a thing to succeed.
It's a case where people like the idea but "the devil is in the details".
 
it's also where we store our bikes
 
I think maybe at this stage in PHP's life it wouldn't really succeed or be valuable.
Or rather would be valuable but we are already partly there with interfaces and composer, etc.
So is the large amount of effort worth getting that extra few % of value?
Especially if it breaks backwards compatibility at all.
OMG... I just got a notice from ezmlm about bounced messages... It's a LOOOOOONG list...
I wonder if I need to change a setting in Gmail or something.
 
@LeviMorrison It's ezmlm being retarded
 
9:09 PM
@NikiC Thanks for the deprecation RFC. Having you specifically propose them and having them done in bulk really ups the chances of them being successful.
 
9:22 PM
@LeviMorrison I got one last night, really long list, I wonder if it's just catching up to the previous downtime
 
9:46 PM
thehill.com/blogs/blog-briefing-room/news/… ... and shit like this is why I am paying more and more attention to the center-right outlets.
 
@bwoebi thanks for this great historical portion of information :) it is awesome history of PHP!
 
@brzuchal yeah, I've looked the historical source in svn up :-)
 
Yeah. I bet it was exciting ;)
@LeviMorrison I've got night right now. I'll try to focus my mind and writrme down my thoughts in an email.
 
10:10 PM
@brzuchal First time I did, it was, yes :-)
 
 
1 hour later…
11:22 PM
When I have let's say an array with 100 items, and I want to create for every 3 items in a foreach loop a new array for those is that possible?
So: [1,2,3,4,5,6] would become [[1,2,3] , [4,5,6]] Maybe % modulo can help me here?
 
11:34 PM
@PeeHaa afair, you was the one who asked to publish php-v8 to pecl, so I finally did that - pecl.php.net/package/v8. Sorry for taking it so long, life is too busy last time.
Does anybody know how to make pecl builds pass on windows and make windows DLL available in PECL when ext has 3rd party build deps? e.g. php-amqp pecl.php.net/package/amqp has dll avaliable while I see no special settings in package.xml.
 
!!docs array_chunk
 
thx!!
 
[ array_chunk() ] Split an array into chunks
 
awesome, exactly what I need :D
 
11:52 PM
any hints on pecl windows builds question above (chat.stackoverflow.com/transcript/message/35117519#35117519) ?
 
00:00 - 17:0017:00 - 00:00

« first day (2283 days earlier)      last day (2665 days later) »