« first day (1569 days earlier)      last day (3382 days later) » 

9:00 PM
GenericADOException f... you microsoft for being this informative. ))
 
@rdlowrey I think @rdlowrey is stuck in a loop waiting for the lock to be released :P
 
@PeeHaa It means if it's not possible to acquire the lock it should return immediately.
I think.
aka (op & LOCK_NB) ? LOCKFILE_FAIL_IMMEDIATELY
 
user895378
@PeeHaa Okay, so LOCK_NB seems to work fine for me in windows, but it doesn't appropriately set the $wouldblock reference parameter (which is set to 0 when it should be 1).
 
oh noice. I don't care about that actually :)
 
dun dun DUNNN!
 
9:03 PM
I wish I understood the Zend Engine
 
user895378
Here be dragons ...
 
user895378
Abandon all hope ye who enter here ...
 
@rdlowrey bigints use those exact words in their documentation: github.com/TazeTSchnitzel/php-src/blob/bigint/Zend/…
 
user895378
I'm pretty sure those slogans are emblazoned above the gate to Hell zend.c
 
user895378
@AndreaFaulds Oh, see. I was totally right!
 
9:10 PM
user image
8
hehe
 
:D
 
:D
 
Good afternoon
 
@ircmaxell feeling better yet ?
(afternoon)
 
not really, but been on planes for a while, so...
 
9:21 PM
crappy, feel better :)
 
thanks
why the hell do people do crap like that?
 
user895378
@PeeHaa If you will file a bug report about that and ping me with the address I will submit a PR to fix it.
 
long diff, are they all stupid changes @ircmaxell ?
 
@JoeWatkins as-if someone ran PSR-2 fixer on it
which ironically made parts more difficult to read
 
@rdlowrey k will do. But you will have to ping me once it is merged so I can update the docs if that windows message is not needed anymore :-)
 
user895378
9:26 PM
@PeeHaa no problem.
 
Or fix it yourself ofc :P
 
@ircmaxell I especially like what it did to some of the arrays
 
@ircmaxell then I dunno why people do that ...
 
@JoeWatkins because "It's standard, and that's good"
@NikiC yup
 
$temp[$ictr] = static::$tValues[0][$state[$ictr] & 0xFF000000] ^ static::$tValues[1][$state[$jctr] & 0x00FF0000] ^ static::$tValues[2][$state[$kctr] & 0x0000FF00] ^ static::$tValues[3][$state[$lctr] & 0x000000FF] ^ $schedule[$round][$ictr];
 
9:28 PM
especially since some of those arrays are actually matrices
but you can no longer tell that
 
@rdlowrey Would be feature request rite?
 
its awful ... I'm gonna stop looking ...
 
@ircmaxell Instant chrome crash
 
wtf psr dictates that
 
9:30 PM
it's been done to three other packages at least for the framework thing on that github account
 
user895378
@PeeHaa Um I think it's more of a bug report because it works just fine, it just doesn't correctly report the result to the by-reference output parameter.
 
@PaulCrovella Probably not
 
PSR-PaidPerLOC?
 
@rdlowrey But the fact that wouldblock doesn't work is clear from the docs
Meh I'll just report a bug
 
The fixer likely just can't deal with overly specific array formats
 
9:32 PM
Damn PHPs bug reporting tool is horrific
 
think of it as a tribute to the 1990's, that way it's retro, not horrific @PeeHaa
 
user895378
@PeeHaa Yeah the problem is just that the LockFileEx() function used in windows doesn't return EWOULDBLOCK in this case (which is what flock() checks for to tell if locking would block). Instead it returns ERROR_INVALID_BLOCK in such cases.
 
> Package affected: a long fucking list of god might now what kind of stuff is in there
 
user895378
So the conditional checking the return value just doesn't evaluate true and the wouldblock param is never set to 1.
 
Can you differentiate between "is already locked" and "some different error" on windows?
 
user895378
9:38 PM
Yes. The wouldblock parameter (in userland) is how you know it failed because it was locked and not because it failed for some other reason.
 
@rdlowrey ^
Yes I am asking whether you can find out in php src :)
 
I've had enough of today, night all ...
 
As in "isn't there some reason it is currently not working on windows" :)
@JoeWatkins later
 
user895378
@PeeHaa yes, that's how you know whether or not to set $wouldblock = 1 :)
 
user895378
In non-windows the error code is just EWOULDBLOCK.
 
9:41 PM
oooooh I see :)
 
user895378
But in windows the locking mechanism used by flock() under the hood returns and errno = ERROR_INVALID_BLOCK
 
user895378
So we only need to replace this line:
 
user895378
		if (operation && errno == EWOULDBLOCK && wouldblock) {
 
user895378
With this:
 
user895378
#ifdef PHP_WIN32
		if (operation && errno == ERROR_INVALID_BLOCK && wouldblock) {
#else
		if (operation && errno == EWOULDBLOCK && wouldblock) {
#endif
 
9:43 PM
God WHY U SO SUCK BUGREPORTING TOOL
 
lol
 
user895378
For many of those constants there are equivalents in windows_common.h but not for ERROR_INVALID_BLOCK
 
user895378
It's different in windows because sockets and files aren't handled the same way like they are in other operating systems ...
 
@PeeHaa because it's too difficult to report how bad it is
 
lol
> Incorrect Captcha
durdurdur
 
user895378
9:46 PM
@PeeHaa I did that last time I reported a bug too. Didn't realize you had to spell out the number.
 
there is a captcha?
 
ok we should have searched :P
 
So uh
I need to figure out how to modify ZEND_VERIFY_RETURN_TYPE such that it can cast the return value.
 
user895378
@PeeHaa lol okay
 
interesting book series: goodreads.com/series/99238-mindspace-investigation , genre: sci-fi/noir
 
user895378
dang.
 
@PeeHaa first 2 are the same link
 
Fix it Fix it Fix it Fix it Fix it Fix it Fix it Fix it
 
I'm migrating a table to another database but I want to make sure I migrate only those rows whose parent rows (in some other tables) exist in the database... it was easy to do using join... but in this particular case...the table being migrated can have either null or foreign key...so how do I check now?
 
@AndreaFaulds Shhhhh. This makes it look like it is super urgent
 
9:50 PM
Hey, everyone, @PeeHaa is a phony!
 
@AndreaFaulds Jesus. You new here???? :P
 
and the third has nothing to do with this
 
Tom
@user3692125 And does a NULL mean no other relationship and it should be excluded?
 
@PaulCrovella It has everything to do with it? :)
 
@Tom.... no.... if the column contains null.. it should be INCLUDED... (basically, there are some rows in the table without matching parent rows... and that's bad data... null is fine though)
 
Tom
9:54 PM
@user3692125 SELECT ..., table_a.possibly_null_field, table_b.some_column FROM table_a LEFT JOIN table_b ON (something) ... WHERE (table_b.some_column IS NOT NULL or table_a.possibly_null_field IS NULL); # Where table_a is the one you want to copy. Use it as a subselect.
 
user895378
@PeeHaa I'll get to it later tonight or first thing in the morning. Time to drink beer and watch sportsball \o/
 
@rdlowrey Yeah sure. I have a pending doc change which already fix the ZOMG NOT SUPPORTED BY WINDOWS for the LOCK_NB flag ready. Ping me when I can also update the $wouldblock stuff
 
user895378
@PeeHaa Will do.
 
Enjoy
 
10:16 PM
wait... what
L4	0x10e6cc000 ZEND_VERIFY_RETURN_TYPE        C0                   <unused>             <unused>
L4	0x10e6cc020 ZEND_RETURN                    C1                   <unused>             <unused>
it verifies one value then returns another
huh?
 
Insert magic meme
 
waiiiiiiiiiit
Oh, thank goodness, it won't double-evaluate
@NikiC You about?
I need to figure out how to make both ZEND_VERIFY_RETURN_TYPE and ZEND_RETURN use the same zval, rather than separate copies
 
@AndreaFaulds for which case?
 
@NikiC The normal one. Final return obviously doesn't matter since it's always NULL
if (CG(active_op_array)->fn_flags & ZEND_ACC_HAS_RETURN_TYPE) {
    zend_emit_return_type_check(&expr_node, CG(active_op_array)->arg_info - 1);
    if (expr_node.op_type == IS_CONST) {
        zval_copy_ctor(&expr_node.u.constant);
    }
}
opline = zend_emit_op(NULL, by_ref ? ZEND_RETURN_BY_REF : ZEND_RETURN,
    &expr_node, NULL);
 
@AndreaFaulds By case I mean operand type
I.e. are you referring specifically to the CONST case here?
 
10:29 PM
@NikiC I basically need to be able to modify whatever value's being returned
So even consts, I guess :/
 
@AndreaFaulds do you have working code for the non-const cases or do you have issues there as well?
 
I should check
That might actually work already
 
because if that's the case, you might want to simply handle the const case at compile-time
i.e. either cast or immediately reject
 
Oh, fair point
 
It's a bit different semantically wrt unreachable code, but I think it's still reasonable
 
10:32 PM
Oh, for the non-const case it's the same zval
 
;)
 
$ sapi/cli/php -r 'function foobar(): int { $a = 1.0; return $a; } var_dump(foobar());'
int(1)
Huzzah.
So, I just need to handle consts specially, I guess.
 
@AndreaFaulds Looks much better than before. :P
 
eh
strict type annotations ftw
 
That.
 
10:37 PM
I voted for always strict, but when I think about it, it could be useful for things like mysql data.
 
@kelunik I don't think return types should be always strict
if you want weakly-typed params, I don't see why you wouldn't want it for return types
The arguments for params mostly apply to return types as well
 
@AndreaFaulds "if" ;)
 
@NikiC Of course.
@NikiC I think it might be better if I just make it so that, if it's a "weak" "check", I'll stick the constant in some sort of variable, run the "check" on that variable, and then return that variable
Doing type checks at compile time is probably a bad idea
But this means I have to figure out how to implement this :p
Any ideas?
 
10:55 PM
@AndreaFaulds If you really want to do it like this, you can use QM_ASSIGN to convert the CONST into a TMP
 
@NikiC Ah, that looks like it's what I want
and yes I really do, because it's the last hacky approach
I don't want to error at compile-time, and I don't want to special-case scalars
Well, I probably should
 
$ du -h --max-depth=1 ./www
1.1M    ./www/themes
18M     ./www/vendor
56K     ./www/texts
16K     ./www/cli
480K    ./www/log
24K     ./www/cache
8.0K    ./www/public
528K    ./www/src
100K    ./www/data
20M     ./www
20 freaking MB :O
 
@PeeHaa how much of that is because people don't bother with this?
 
Is it possible for a content-header to create a 403 error?
 
First project I check amp-php... yeap... @PaulCrovella
 
11:13 PM
@jkaufman sure - why not?
 
I have one that's causing one and I have no idea how to fix it.
 
@jkaufman Presumably figure out what it is that the server doesn't like about that header?
 
It seems as though once I put in two boundary lines, it gives 403.
 
It works!
Thanks a bunch, @NikiC ^^
    if (CG(active_op_array)->fn_flags & ZEND_ACC_HAS_RETURN_TYPE) {
        zend_arg_info *arg_info = CG(active_op_array)->arg_info - 1;

        /* for scalar, weak return types, the value may be casted
         * thus, for constants, we need to store them in a tmp var
         */
        if (expr_node.op_type == IS_CONST && !CG(declarables).strict_types) {
            znode expr_node_copy = expr_node;

            zend_emit_op_tmp(&expr_node, ZEND_QM_ASSIGN, &expr_node_copy, NULL);
        }
        zend_emit_return_type_check(&expr_node, arg_info);
 
Content-Type: multipart/form-data, boundary=*****

--*****
Content-Disposition: form-data; name="image-name"

// string, "test"
--*****

@Danack The above works, yet, the below doesn't. Ideas?

Content-Type: multipart/form-data, boundary=*****

--*****
Content-Disposition: form-data; name="image-name"

// string, "test"
--*****
Content-Type: application/octet-stream
Content-Disposition: form-data; name="profile_img"; filename="img.png"

// hex representation of image
--*****
@AndreaFaulds This content header forces a 403 error, and I have no idea how to fix it.
 
11:25 PM
Odd :/
 
woot! I see some scalar type hints branch receiving new commits :)
 
11:41 PM
3v4l.org/62FEh < PHP 7 fails here. :-(
 
@NikiC Sure, but is that some intended BC break?
 
@kelunik yes
 
I updated the Scalar Type Hints RFC to cover return types
yay
 
@NikiC thanks.
 
11:59 PM
My Scalar Type Hints RFC for #PHP has been updated to v0.3 and now covers return types! https://wiki.php.net/rfc/scalar_type_hints #PHP7
 

« first day (1569 days earlier)      last day (3382 days later) »