« first day (3310 days earlier)      last day (1637 days later) » 

12:03 AM
Any idea why there wouldn't be an opened_path if the stream_open succeeded? github.com/php/php-src/blob/master/ext/spl/php_spl.c#L275
I'm trying to extract the portion that includes a file into a standalone function, and not sure why it would ever trigger.
 
 
4 hours later…
4:25 AM
@LeviMorrison then opened path would only be set by stream wrapper function if it resolved the path ... I think
 
4:44 AM
@JoeWatkins Would it ever not resolve the path but still return SUCCESS?
I'm looking at other places that have code like this, and the checks are less robust. I don't know if those other places are wrong, or if this is overly cautious.
But I don't know streams well, so it's hard to understand.
 
5:04 AM
If only someone had left a comment when they wrote this bit.
Also, why are different dtor functions used for the file handle in the if/else? github.com/php/php-src/blob/master/ext/spl/php_spl.c#L280 That seems wonky. I figure it's intentional, but doesn't make sense to me yet.
 
@LeviMorrison for the file wrapper, probably not, but the stream wrapper system is used, and some other wrapper may not set an opened path (it may not be applicable to the wrapper)
the dtor function actually closes the file (because it wasn't added to includes), the destroy function doesn't, just nullifies because the mapped stream etc may still be in use
 
@JoeWatkins What does it mean to "destroy" it? I didn't understand that.
 
today, nothing useful, I think that it might be a relic from 5 where strings weren't refcounted but copied everywhere
just removes from opened_files cg
 
5:20 AM
Could I always just dtor it?
 
no, that will close/unmap/free stuff, it's likely you don't want to do that if it was just included for compilation ...
 
if (zend_hash_add(&EG(included_files), opened_path, &dummy)) {
        zend_destroy_file_handle(&file_handle);
} else {
        zend_file_handle_dtor(&file_handle);
}
That's what the current logic simplifies to, and the file handle is not used after this point. The op_array has already been made.
I could share my screen and we could chat, if you are available.
 
you must not compile the file before adding it to includes table
(require/include[_once] may misbehave)
 
Okay. I sent an invite; if you aren't available for chat that's obviously okay too.
 
5:40 AM
Why does it not dtor the retval if there was an exception? As far as I can tell, there isn't a reason it couldn't still have a value.
Maybe because this was written before try-finally?
 
5:55 AM
I'm a little busy to give my full attention, morning time, getting kids to school and such ...
 
Yeah, no worries :)
 
 
3 hours later…
9:11 AM
morning room
and Happy Friday All.
 
cmb
9:21 AM
\o
 
o/
 
\o
 
yo phomies
no no no, only one yo ...
@Levi ping me later on if you're still wanting input ... I guess your'e asleep now ...
so ... I'm not sure what to do about pthreads, I announced at the beginning of the year I would halt development of it, and basically two contributors don't want to let it go ...
(on behalf of a quite large userbase, apparently in the thousands)
there's a long list of reasons it should die, and I think I've given them all during different exchanges with these particular contributors ... it doesn't seem to matter ...
 
9:40 AM
@JoeWatkins what should be used instead?
mornin
 
parallel, which I'm actively developing, but because they are different concurrency models, people can't see their way to a migration path and I don't have time to educate them, or write the code for them ... writing some sort of shim makes no sense either ...
they see the model parallel has as a limitation, and it isn't, and it's so obvious to me that it's not a limitation that I can't find the words to explain the important differences, so I wrote a really quite nice example ages ago and distributed it, and I know they read it, but they still talk about sharing objects as necessary ...
technically it's incompatible with the JIT and will always be incompatible with the JIT, it makes no sense whatever to write parallalized code that can be executed faster in one thread than in however many you wish to create, and that's the future it's looking at ...
 
I see, sharing objects probably is not a good idea
 
even if I ignore that, and somehow magically fix it (I can't see a way to do that), pthreads damages the cause of parallelism in the core ... it's taken god knows how many years to get other core devs to seriously consider adding any parallel user api, and that api is the one parallel has ... while pthreads exists it's harmful, whether it works properly or not ...
also, the quality of the code has dropped considerably, it's not easy to write a thing like pthreads and since I let go of the reigns some years ago, some really questionable code has been added, but I allowed it because it was added by these contributors that are basically representative of the only user base, so if they wanna fix something and it works for them, why not ... nobody else was really using it ...
what I want is to archive the repo and mark the extension unmaintained, and halt it's development, but they seem pretty keen for that not to happen ... so even if I do archive the thing and mark it unmaintained they'll just fork it and it will continue to exist ... a pile of shit by any other name will smell just as crappy, and does exactly the same damage ...
also, they had 8 months notice ...
I can't think of a thing I can't write or rewrite in 8 months ...
 
10:10 AM
I understand, walked through parallel in manual, not all understand yet but was wondering if parallel uses event loop this is another implementation of event loop and PHP does have few implementations of event loop. The question is why PHP can't have just one event loop impl?
the user base probably would switch as soon as PHP would bring something built in I think
are there any chances for that, or it is just not gonna happen soon?
I've used loop only once, for a rmq consumer which handles max 5 messages (simultaniously) by querying massive resultset from mysql writing huge CSV file and updating job progress in redis. I had to create another Dockerfile to add needed extensions so it may work
and to do that I had to make a research on ready to pick up solutions and install pecl extensions cause there is nothing built in PHP which could handle that kind of task out of the box
 
@JoeWatkins You can't prevent people from continue using code you once released and since there's no fixing it, it'll die eventually. Until then some people are apparently happy to continue using it as-is. Just archive your repo and forget about it :)
 
@Sjon can confirm that, 2yrs ago I made a troll package to find Visual Debt in PHP Code was inspired by some Larevil guy's screencast on Laracast and I just found out there were some installs of it even this year, probably most of them were courius abouthow it work otherwise I have no idea why they've installed it packagist.org/packages/phpvisualdebt/phpvisualdebt/stats
I don't wanna compare my project to pthreads only saying that something what is broken sometimes just doesn't deserve to be maintaned anymore
 
10:38 AM
after thinking it over it was dumb what I said, don';t listen to me I'm a weirdo
 
10:52 AM
morns
 
cmb
11:05 AM
@JoeWatkins, I don't quite understand the problem. :) AIUI, it doesn't even build with PHP 7.4 now, and it can't possibly work with JIT. If that is so, it certainly will fade out eventually, and if someone wants to put effort into it in the meantime – that's their decision.
If you want to push parallel forward, why don't you suggest to bundle it with PHP 8?
 
11:40 AM
@cmb Could you please check where the failure of github.com/php/php-src/pull/4838 on windows (ci.appveyor.com/project/php/php-src/builds/28689447/job/…) comes from? I'm assuming it's a segfault, but I wasn't able to reproduce it in any configuration on windows
 
cmb
@NikiC, will have a look right away.
 
12:01 PM
is there a good reason why the configure line in phpinfo every arg has ' around it? annoying for copy paste execute ;)
 
cmb
@beberlei, hmm, can't you copy&paste with these apostrophes?
 
i can copy paste, but its not executable
 
cmb
in bash???
 
hm it is... ok i thought it wasnt
here i am always repalcing all the apostrophes for years ^^
hiding under rock
 
cmb
np
btw, `cat config.nice` :)
 
cmb
12:32 PM
@NikiC, I can reproduce with --enable-snapshot-build, but not otherwise. Backtrace: gist.github.com/cmb69/02adc18da06ed4461334fb939a64be0a This might be reproducible on Linux, if file_cache_only is enabled.
btw, it seems that 7.4 on Windows never uses SHM, but always falls back to file cache (or no caching at all). Likely the same on master. I'm debugging.
 
Morngins
 
cmb
o/
 
@cmb now you are just making me look bad :P
 
./config.nice also does the trick :P
 
its clever they added $@ to the end, so you can just append more stuff you want to add
reminds me that i wanted to add a new generated file on test failures $test_gdb.sh
 
12:44 PM
yeah, and IIRC it also gets rewritten with the new params
 
1:12 PM
@cmb that might explain the performance regressions you reported?
@cmb Thanks, I indeed didn't do any file cache testing...
 
1:38 PM
!!rfcs
:(
 
@salathe Working on it
 
Wes
\o
 
o/
 
2:01 PM
@NikiC ok i think i fixed everything on the dom arginfo now, i didn't compile that branch with --enable-debug so didn't see the zpp / arginfo missmatch errors. sorry again for the sloppy work :) its green now (azure failed for unrelated resaon - disconnect to Mac build machine): github.com/php/php-src/pull/4721
 
@NikiC Everything look good now after removing the headers? github.com/php/php-src/pull/4892
@JoeWatkins The comment right at the very top is out-of-date, but I think everything else is good. I'm doing build comparison output locally right now: github.com/php/php-src/compare/master...morrisonlevi:levi/…
 
2:18 PM
@LeviMorrison lg
 
2:29 PM
Okay, rebased and fixed some few things on my zend_include_file, Joe. Anyone know of a solid place to move this to so I can make it public?
 
2:40 PM
It appears I've lost karma or something:
remote: Welcome levim.
remote: You have insufficient Karma!
remote: I'm sorry, I cannot allow you to write to
remote:     php-src.git/main/php_version.h
remote: Have a nice day.
To git.php.net/push/php-src.git
 ! [remote rejected]       PHP-7.3 -> PHP-7.3 (pre-receive hook declined)
 ! [remote rejected]       PHP-7.4 -> PHP-7.4 (pre-receive hook declined)
 ! [remote rejected]       master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.php.net/push/php-src.git'
(I did not change php_version.h, btw)
 
cmb
git rebase ?
 
COMP11449:morrisonlevi levi.morrison$ git branch
* PHP-7.3
  PHP-7.4
  master
COMP11449:morrisonlevi levi.morrison$ git pull --rebase upstream HEAD
From git.php.net/repository/php-src
 * branch                  HEAD       -> FETCH_HEAD
Current branch PHP-7.3 is up to date.
COMP11449:morrisonlevi levi.morrison$ git checkout PHP-7.4
Switched to branch 'PHP-7.4'
Your branch is up to date with 'origin/PHP-7.4'.
COMP11449:morrisonlevi levi.morrison$ git pull --rebase upstream HEAD
From git.php.net/repository/php-src
No, it's all good.
Guess someone else can close out github.com/php/php-src/pull/4892 :)
Unless I screwed up something way prior to this.
Guess I'll start over
 
IIRC php_version.h can only be changed by RMs
 
3:05 PM
@LeviMorrison Usually indicates a botched merge
E.g. merged in the wrong direction
 
Everything looked clean on review, so I just nuked the 3 branches of interest and started over. Looks like I did botch something earlier.
No idea what, but E_PEBKAC
 
E_IT_HAPPENS
 
Although when i started over I forgot to add the closes GH-#### message to the commit. Oh well.
 
Anyone know how $_SERVER[SCRIPT_NAME]? is populated?
 
3:21 PM
@Gordon in the sapi - see github.com/php/php-src/blob/…
 
is DIR always realpath? And is it use realpath cache?
 
@DmitryMiksIr why are you asking? what are you trying to do?
 
What file should I stick zend_include_file in? Maybe zend_execute.{c,h}?
 
Good afternoon all
 
@ircmaxell for example, is any reason in realpath( _ _ DIR _ _ ) call, or just _ _ DIR _ _ enough if there is a symlink
 
3:33 PM
@Sjon thanks. and when would this be empty?
 
@DmitryMiksIr no, not what I'm asking. Why does realpath matter to you in the first place?
 
@ircmaxell because currently we have symlink deploy
 
@DmitryMiksIr While the answer to your original question is "yes", if you are using symlink deploy you must resolve the symlink at the webserver level
Otherwise one request may see partially deployed files if the symlink switched during one request
 
we are - $realpath_root in nginx, but still some race condition happens and I looking why.. probably some php code use symlink too
 
@Gordon it seems as if only the filter extension should be able to remove it
 
4:04 PM
We've just had an alert popup for a bot spamming "GET /index.php/PHP%0Ais_the_shittiest_lang.php?QQQQQQ..." to one of our services.
Had a nice chuckle at that.
 
No surprise that one is being spammed out.
Script kiddies ahoy
 
> JIT will able to eliminate type checks only if it exactly knows the
called function at caller site. Unfortunately, this is quite rare case,
because the functions may be declared in different files, OOP, type
variance, etc.
^^ That's AOT, not JIT............... o_O
> In my experience, static optimizations are not able to eliminate most
type checks in PHP
Which is why it's a JIT compiler, not an AOT compiler...
 
Wes
evenings 2
 
o/
 
4:21 PM
\o
 
I wonder how many benefits there could be from getting rid of that "declared differently" thing
 
@ircmaxell dmitry is working on it ;)
 
Friday
 
5:10 PM
@ircmaxell Not entirely. Just because it was known at call time doesn't mean it could be known entirely through static analysis. But yes, I get the idea :)
 
5:40 PM
Do we store a fully qualified method name somewhere all the time? I'm noticing that I spend a fair bit of time in my tracer just making {$class}::{$method} strings.
 
Wes
@kelunik reverted back to async again. managed to find a sweet spot where everything works
i still need to try the file trick
stream to stream
 
5:55 PM
@Wes \o/
 
6:12 PM
!!rfcs
 
Wes
6:23 PM
i'm not sure at this point if it's better or not but it works :P
do i need to close the file handle or something?
looks like this at the moment
$mediaPath = $files->mediaPath($mediaIndex);
$request = new Request($mediaURL);
$request->setTransferTimeout(120 * 1000);
$request->setBodySizeLimit(100 * 1024 * 1024);
$response = yield $this->_httpClient->request($request);
/** @var Response $response */
yield pipe($response->getBody(), yield open($mediaPath, "w"));
i am actually going to benchmark it, because why not :D
 
@Wes It's auto-closed on GC. github.com/amphp/file/blob/…
 
6:57 PM
@NikiC nice :D
 
How common is appearing 18446744073709551615 in a MysqlWrapper/ORM layer? I thought i was a rare case of that hack but propel uses it too.
Dbal and doctrine are using this hack too. So this wont go away that fast? :D
 
7:17 PM
@Wes For a single request, Amp is likely to be slower than something simple like file_get_contents.
 
cmb
@user3655829, that is 2**64-1, but I don't quite understand for what it's used.
 
Its a crazy hack that mysql will respect the sorting when you group rows
 
Wes
@kelunik do you think phpstorm could infer the return type of a generator from ->send?
 
But the standard doesnt define this. So i always wondered when it will stop working and clusterfucks all the things
 
cmb
7:49 PM
nice :) (brings probably quite some performance improvement ;)
 
 
1 hour later…
8:55 PM
Zend lex_scan BUS error – #78796
 
 
2 hours later…
10:55 PM
mysqlnd cannot read large OK/ERR packets – #78797
 
ako
11:28 PM
HI
Anybody here?
 
11:50 PM
Grammar improvement – #78798
 

« first day (3310 days earlier)      last day (1637 days later) »