« first day (3230 days earlier)      last day (1703 days later) » 

12:00 AM
@Danack totally stealing twunts
 
 
3 hours later…
2:36 AM
\o
life is really going terribly for me at the moment ... and I need to vent ... so <rant> ...
I was pulled over by police on Friday, and informed that my vehicle is not legal, I've run out of time (in this jurisdiction) to change it over to Spanish plates and it was ordered off the road ... to change it over to spanish plates now will be hugely expensive (it's tyres can't touch the road) ...
Kids start school in two weeks and I have to take them to school and pick them up, wife doesn't have a car license (or big bike license) ...
 
 
2 hours later…
5:07 AM
Good morning
 
@Trowski I still think that was a mistake ... we should've distinguished between something being a real promise and something being yieldable (and every promise being implicitly yieldable).
It just made the API less ergonomic
These tiny things are still annoying me
The only difference being that it then does not wait for itself to be resolved when passed as resolution value to Deferred
 
6:03 AM
posted on August 20, 2019

 
MGE
I have a question. I have a Value Object for Currency, there is a validator to check if the CODE is allowed, for example: USD, EUR, JPY... but this validator values could be updated via admin panel, to add edit or remove these codes. How could I get these values from ddbb in the V.O? V.O is in DOMAIN layer and I don't know how to add this (infrastructure?) without breaking the DDD pattern.
 
/me casually slips word into English language
 
6:26 AM
morns
 
7:07 AM
@bwoebi We made that right. People didn't understand the Message API, that's why we introduced Payload.
 
What's so hard about "just yield it"?
 
7:32 AM
o/
 
7:51 AM
Morning all
Anyone able to assist with a question that is possibly related to htaccess?
https://wordpress.stackexchange.com/questions/345431/dashboard-of-other-languages-gives-302-error?noredirect=1#comment506557_345431

Having a terrible time with this
 
@PeeHaa no
 
ethereal of or relating to the regions beyond the earth
 
8:34 AM
Giving a talk about runtime DI vs compile-time DI to a bunch of Googlers on Thursday. Wish my death to be a swift one.
 
@Trowski It's all greenfield so pretty easy :)
 
@NikiC What's the deal with github.com/php/php-src/pull/4547 ? It really should be in beta3
 
moin
 
@bwoebi No idea, but people always just call ->read() and yield that, receiving just the first chunk.
 
8:55 AM
How do I find which users are using my laravel/my app mostly/frequently like by showing graphs or charts (would be fine i their are laravel packages for this)
 
@DaveRandom Did you know? That laravel user statistics package... doesn't exist in the world! Cuz' GOOGLE can't find it :P
 
@Derick Dmitry is on vacation, I believe
 
Try typing your question into google before typing it into chat
cuts out the middle man
 
@NikiC OK. Then we need to bump API for RC1 :-/
 
9:33 AM
do you really need dmitry @NikiC ?
 
IMO, @NikiC is right to wait for his review
 
trying to avoid a bus factor of 1 also seems like a good idea, this isn't really an area where we defer to dmitry for knowledge, as in the case with opcache/o+/jit ... this is just normal zend stuff ...
it looks like a no brainer, the only possible objection one might have is that they have another plan possibly ...
I mean waiting is cool and everything, I just don't see waiting as necessary on this occasion ...
also, you did wait ...
 
In this case, it doesn't matter too much to wait though. It's not really blocking anything
 
bumping api between beta and rc is a little strange though ...
 
well, we can call RC1 beta4, and just have one RC less. It's not like anybody tests anything anyway :-/
 
9:42 AM
yeah, that's true
 
cmb
if nobody tested 7.4, bugs.php.net/… would be an empty list
 
I meant they don't care whether it's a beta or RC release
 
cmb
ack
 
10:01 AM
opcache_compile_file(FILE); segfaults – #78429
 
@Rob it seems google is trying to cater to the elderly nowadays as after the google results youtube is also huuuge now :P
 
 
2 hours later…
11:51 AM
Anyone remember back to PHP 5.4 days?
> Fatal error: Internal zval's can't be arrays, objects or resources in Unknown on line 0
What's an internal zval?
I seem to be getting this when it destroys the properties on my class entry.
 
things that "can't be arrays, objects or resources" suggests constants
 
@LeviMorrison does it mean interned?
 
12:16 PM
@LeviMorrison static property is an array, object, or resource
or, default (member prop)
 
"or, default" ?
 
you might declare a class property, and then set it's default value to some unsupported type
 
IIRC, this is everywhere we set props on this class: github.com/DataDog/dd-trace-php/blob/levi/…
 
@LeviMorrison see internal dtor, find references to it, you'll see what's going on ...
 
Morning
 
12:25 PM
@LeviMorrison so it wasn't that simple, but the thing I thought was going on is going on ... but turns out doesn't matter if you are setting default value, or just value ... those internal properties can't have those types ...
or at least, you cannot leave the engine to destroy them ...
 
Yeah, I think I've found a spot where I don't' dtor it correctly. I think it's fixed, but now I get a much worse (imo) error so... need to think through it.
 
wanna show or figure it out ?
 
It's PHP 5.4 -- you really volunteering? lol
 
it's on lxr, I'll take a shot ...
 
==55395== Invalid write of size 8
==55395==    at 0x60CFCF: ZEND_RETURN_SPEC_CONST_HANDLER (zend_vm_execute.h:2257)
==55395==    by 0x608287: execute (zend_vm_execute.h:410)
==55395==    by 0x5CCD20: zend_execute_scripts (zend.c:1329)
==55395==    by 0x5455F4: php_execute_script (main.c:2502)
==55395==    by 0x671933: do_cli (php_cli.c:989)
==55395==    by 0x672962: main (php_cli.c:1365)
==55395==  Address 0xffeffcc88 is on thread 1's stack
==55395==  328 bytes below stack pointer
==55395==
Pretty sure our ext is responsible for that one ^_^
Not sure how, just yet.
If you care to look its branch levi/5.4-zend_execute_internal
 
12:29 PM
EG(return_value_ptr_ptr) points to invalid memory, but guess you knew that ...
or I can paste what would be my gdb session, if that is more useful ...
 
I would prefer to just switch to zend_execute but because of the recursion which causes segfault due to being out of stack space our team is not so keen.
Pretty sure the issue is either in this code: github.com/DataDog/dd-trace-php/blob/levi/…
 
trying to get a 54 build going, I'm getting that zendparse error you showed the other day ...
@LeviMorrison what fixed that (other than an nts build) ?
 
I think I nuked EVERYTHING and started clean.
And skipped zts.
 
12:45 PM
attempt 14
 
The test I've been using is tests/ext/exceptions_and_errors_are_ignored_in_tracing_closure.phpt, with -m passed to run-tests.php
 
I'm on attempt 16, still no build ...
what on earth is wrong with 5.4 ?
zend_get_configuration_directive errors now ...
> /opt/src/php-src/Zend/zend_ini_parser.y:156:5: error: too few arguments to function ‘zval_update_constant_ex’
> /opt/src/php-src/Zend/zend_ini_parser.y:180:16: error: too few arguments to function ‘zend_get_configuration_directive’
> /opt/src/php-src/Zend/zend_ini_parser.y:194:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘void’
I think I might be using an unsupported bison/yacc maybe ...
what you got ?
 
Actual wth, people edited the short tag RFC without my knowledge
 
I only see edits before voting started
they just added their name to the supporting counter argument bit ...
 
Zeev, Sara, Dimitry and Rasmus (which was added by Zeev) put their name in support for the counter argument without my knowledge after the voting started
Yeah which I don't really appreciate doing without asking me
But at this point whatever
 
12:55 PM
they done it within 24 hours of voting starting ... I dunno if the timestamps are right, but the day is the same ...
you didn't object when someone added the counterargument link ... you'd have a stronger case if you had ...
I wish you had ... it's a horrible precedent ...
 
Maybe should have done but I didn't have the energy to care anymore for this thing
 
@JoeWatkins 2.6.4
FROM debian:9
RUN apt update && apt install -y \
        vim build-essential git re2c libxml2-dev pkg-config \
        libsqlite3-dev autoconf libcurl4-openssl-dev libssl-dev \
        gdb valgrind clang-format

ADD mirror.sergal.org/gnu/bison/bison-2.6.4.tar.gz /tmp/bison-2.6.4.tar.gz
RUN cd /tmp && tar -xf bison-2.6.4.tar.gz && cd bison-2.6.4 && ./configure && make -j install
^ That's my dockerfile, then I build PHP and ddtrace from inside (I bind-mount in those locations).
Okay, found a leak (forget to efree user_retval in trace.c if it is unused, only dtor it).
Seems I have 1 more leak, plus the invalid write...
They seem related, actually; the leak was allocated here: lxr.room11.org/xref/php-src%405.4/Zend/zend_vm_execute.h#2254
I think maybe we're just doing this bit all wrong.
I need to call a function, and then get its return value to pass into a closure that I'll call afterward.
 
It will take about 1000 years for me to do the docker thing ... I've only got 4g internet connection and it's crappy ...
 
Looks like maybe we should set the EG(return_ptr_ptr) to somewhere we want before the call, or something?
 
1:05 PM
Oh, 100%. I lifted it off of execute_internal, just trying to get something to work, lol
 
1:26 PM
What's the difference in these two? EG(return_value_ptr_ptr), EX(original_return_value);
 
Okay not sure how to fix the ext/ffi/tests/008.phpt (FFI 008: Array iteration) test with regards to the PR that makes count throw a TypeError
005+ TypeError: Parameter must be an array or an object that implements Countable
005- FFI\Exception: Attempt to count() on non C array
 
2:20 PM
@bwoebi We could trivially add a Yieldable interface to coroutines. However, I'm not sure that's simpler than just having a class-specific method returning a promise.
 
2:48 PM
hello pheople! back from some looong vacations :)
 
o/
 
Hola @pmmagao/
 
all good around here? :)
 
aye
You?
 
2:51 PM
as well, trying to get back to work rythm
 
Where have you been?
/ what have you been up to?
 
went on a small euro-tour with the GF. Been to London, Amsterdam and Berlin
 
Cool
Although amsterdam always -1 :P
 
and then some relaxing back home to prepare to go back to work
 
2:53 PM
hehe :P
 
cmb
broke macOS builds (AzurePipelines)
 
@pmmaga Noice
 
you still around the land of the bird? ;)
 
Yep
 
nice :)
 
2:55 PM
Where are you living nowadays?
Back in NL or still back home?
 
still in PT yeah
2 years now of working from home
I don't think I would get used to going to an office again :P
 
Once you get pantsless it's hard to go back :P
 
Oh I thought you were from Portugal.
 
I am!
but maybe my english broke a bit :D
@PeeHaa exatcly :D
@StatikStasis but I lived in NL for 6 years
 
@cmb github.com/php/php-src/commit/… for clang may be needed
Though that seems like a very questionable revert in the first place
 
3:02 PM
@PeeHaa I still wear pants.
 
@LeviMorrison You are doing it wrong ™
 
Well, shorts most days, not pants, per se.
 
Getting there :D
 
In zend_execute in PHP 5.3/5.4, how do I know where the return value is? PHP 7 is so much nicer >.<
Anyone remember?
It changes somewhat in PHP 5.5 because there is execute_data, so I might be able to find it there. Not sure on these older PHP 5 versions, though, where all I have is op_array.
 
cmb
@NikiC, Sara wrote "the user can request IDNA2003 variant for their
conversion, but if their ICU is new enough, they'll get UTS#46
variant anyway"
 
3:12 PM
@LeviMorrison "where" it is?
 
Please help me with FFI ) How to access raw memory address when accessing a property of structure in FFI which is declared as "some_type** field". "$obj->field" already points to the "some_type" structure, but I need to work with raw pointer. FFI::addr($obj->field) also returns an address of structure, but not the pointer itself..
 
@beberlei Yeah, its address.
In newer versions we literally have a zval *return_value. In older versions its calculated somehow, I think.
 
we differentiate between userland and internal calls. but the line you pasted above the weird one is about the one we use
 
!!rfcs
 
3:17 PM
There are no RFCs in voting. Sorry, but we can't have nice things.
 
yes exactly this one, copied from php-src
 
That's kind of a bummer that it works for you, because that means we goofed something up somewhere else >.<
 
we don't take & of it
and store it as ptr not ptrptr
but thats inside zend_execute_internal
 
Yeah, my internal stuff is working, just not my userland.
Wondering if I need to grab through one of these: EG(return_value_ptr_ptr), EX(original_return_value)
 
is that not just EG(return_value_ptr_ptr) ? *EG(return_value_ptr_ptr) : NULL?
 
3:22 PM
Maybe -- I didn't write this code, just modifying it to work in a different place on PHP 5.4
 
Looks like these two lines github.com/php/php-src/blob/master/ext/ffi/ffi.c#L4140-L4142 in FFI prevent copying of pointers via FFI::memcpy(), because there is hidden pointer de-referencing (( @NikiC
Or I'm doing something wrong...
 
3:42 PM
@cmb So the new API doesn't support the old variant anymore?
Remind me, did we already deprecate / drop it?
 
cmb
I haven't really checked, but I think so.
And yes, this is deprecated as of 7.2.0, default changed as of 7.4.0 and removed in master.
 
3:56 PM
touch() with timestamp not setting "last modified" date – #78430
 
 
1 hour later…
4:57 PM
Hey pals, greetings!
I have a query here. I have been handed over a CPanel with deployed wordpress site having PHP scripts running on backend. So when there is any form submission, Php script is called. The code is tightly coupled and all APIs have been handled in a single switch case. Those are invoked when user submits form
My task is to connect mobile app to those php calls for login - I mean those scripts
I am unable to understand what should be path of my url
Can anyone guide? I am novice here
 
5:15 PM
Trying to format a string using PHP, does anyone recognize these characters that are scattered throughout: &#x11; &#x1d; , a lot have 1-2 characters after the string (&#x11;H0, &#x1d;0, &#x11;(0) Not even sure how to google this. Unicode but with extra characters appended?
 
@NickS. you can google for "character encoding problem" probably. basically when stuff is converting from one character set to another stuff like that can happen.
@NickS. In particular apparently that might be from something encoding to XML 1.0 allowed characters, and something else is not unescaping those characters when reading from that xml document.
 
@Danack Thank you
 
cmb
@lisachenko, try $obj->field[1] etc.
 
What version of php is now ?
 
Can someone add the Waiting for Review labels on my various PRs ?
 
5:30 PM
@VueJavascript 7.3
 
ping @MadaraUchiha
 
pong @PeeHaa
 
@MadaraUchiha I created a new account for testing purposes and am trying to access chat with it, but for some reason I am user\d+ in chat and it still tells me I need 20 rep to join
Is that caching or is something borked?
Any chance you can sprinkle some magic over the account somehow or point me in some direction
inb4 all my accounts are merged into one :P
 
s/merged/banninated/
 
:D
 
cmb
 
Thanks @cmb
 
cmb
not that it would help much, though :)
too many open PRs :(
I mean in general (~ 190)
 
Yeah :(
 
@PeeHaa Looks like it
I force refreshed from main account, seems to have done the trick.
 
I mean Nikita needs to have a look at them
 
5:41 PM
Glorious \o/
thanks <3
 
Oh yeah there is my docref PR also lol
Nearly forgot about that one
 
 
1 hour later…
6:53 PM
@Trowski got a present for you in a few seconds :P
 
Ooo… I hope it's candy!
 
Don't get your hopes up :P
Disappointed? :D
 
@PeeHaa A little. If you do what the error message is hinting does it work then?
 
1 sec
@Trowski Yep that works
 
@PeeHaa Please pull master and try that again.
 
7:13 PM
I am looking for site like realpython.com which will send me tips & tricks for php
 
object(Amp\Http\Client\Response)#39 (8) {
["protocolVersion":"Amp\Http\Client\Response":private]=>
string(3) "2.0"
["status":"Amp\Http\Client\Response":private]=>
int(200)
@Trowski
ty
 
7:34 PM
There is nothing like working somewhere that you're having the time of your life.
@Exception Why wait for them to come to you? Why not just search the great Google?
 
searched a lot on google but didnt find it
 
What kind of "tricks?"
 
7:47 PM
Ok
I think I managed to not fuck up the merge upwards with php-src
 
@Girgias Merge looks fine
 
\o/
Did you have a look at the array func warning promotion PR @nikic ?
 
@Girgias Only briefly, it's way too large
 
Oh
Should I do one function at a time ?
Same with the string one I suppose then ?
 
yeah
 
7:58 PM
Okay will do that then
 
@Girgias Feel free to directly land the error message normalization though
 
The strpos changes ?
 
it's really unrelated and I don't see any issue with it
 
Okay will do that then
 
(I mean the part about changing everything to use the "Offset not contained in string" message, just to be clear)
btw, did you see the bless_tests.php script?
 
7:59 PM
Yeah I got that bit
No I didn't
You mean I've been doing shit manually when there is an automated script ?
facepalm
 
@Girgias It's not perfect, sometimes it introduces too large diffs. But it's what I use for the majority of my test updates
 
Okay
I mean with the TypeError/Error change I need to go through them manually for the most part anyway to add try catch blocks
The error message change should target master right @nikic
 
@Girgias I feel like a lot of these conditions are wrong, at least as written. Note how they are checked before the offset values, which means that if you have an empty haystack/needle, you may not get the illegal offset warning you would otherwise get, which is pretty weird
Which is an existing issue of course
 
Mark did contact me about adding an API to it but I'm not sure if it's necessary?
I mean I was totally confused by the implementation of strpos and co
 
8:06 PM
I'll have to look at the strpos stuff more carefully
I don't have much time this week though, because we have a full team meeting, so little time to get work done ^^
 
I suppose the conditions could be removed ? (well maybe need to find a way to keep it for str(r)ipos
Sure no worries
 
lol, looks like we're skipping beta3
 
Yeah seems like @derick messed up his numbering :p
 
@Girgias maybe not removed, but at least moved below offset checks or something
 
@Trowski are cookies handled automatically or do I have to manually add the cookie interceptor?
 
8:09 PM
Okay, well I'll let you have a look at it when you got time
@nikic question how does the bless-test script work ? Does it try to find all .diff file and apply them ?
Because I'm on WSL if I do make test I get a bunch of "normal" failures because it tries to run Linux test but then some fail because the underlying OS is still Windows
 
Make your life easier and install virtualbox :)
 
I mean I'm used to it
And I know which failures are, for the most part, unrelated
 
8:50 PM
@Girgias yes
 
Ok good to know
 
or rather all .out files and normalizes them
 
Okay,
I having fun with git atm to split the changes lol
 
you can run it with a specific path though, if you have many false positive tests
how many failures are there on wsl?
 
About 30 ?
 
8:52 PM
in which area? FS stuff?
 
Chmod related and time
Like timeout
Oh and file permissions
I could always give you a list in a gist if you want (but not now) ?
 
not sure if worth fixing
wsl is dead right?
This issue shouldn't exist with wsl2, I'm assuming
 
Yeah, I would assume so
Need to look into how to upgrade to WSL2
 
@PeeHaa You need to add the cookie interceptor.
 
9:08 PM
@NikiC citation?
 
@LeviMorrison did you see github.com/php/php-src/pull/4555 ? its not done yet, but clear i guess
 
@beberlei Nope, I'm unfortunately ignoring php-src and github due to volume right now.
Will take a look.
 
@PeeHaa I tagged another RC of http-client. Please test. :-D
 
@Trowski Will do
Currently looking at some weird behavior where I am either doing something stupid or the requests or just flaky
 
9:37 PM
@PeeHaa Probably my fault :-P
Describe the weird behavior.
 
I hate to say it, but it seems like it is :P
I am making several requests to log the bot into stackoverflow and get the chat websocket url
            $body = new FormBody();

            $body->addField('roomid', '198198');
            $body->addField('fkey', $parameters->getFKey());

            $request = new Request('https://chat.stackoverflow.com/ws-auth', 'POST');

            $request->setBody($body);
Sometimes I get a nice shiny 200 with the response I expect and a lot of other times I get a 400 instead
Technically could also be SO doing it I guess
Maybe SO is throttling logins
Nope login works fine
It seems to have troubling with the post somehow
 
@PeeHaa You're getting a 404, sure the URI is being set correctly?
 
let me dig a bit in the client
 
9:54 PM
Always possible the driver is mangling it somehow.
 
Yep string(62) "REQUEST URI IN CLIENT: https://chat.stackoverflow.com/ws-auth"
Let me open a couple of chats in the browser to make sure SO doesn't do something wonky here
 
What's the URI supposed to be?
 
https://chat.stackoverflow.com/ws-auth as in the uri is fine
 
Well… that is a 404, so all seems well in the client.
 
@Trowski It's a post
And might need the params
 
9:57 PM
Oh, so it's not respecting the method?
 
It is. It seems it's doing everything right as far as I can see
Besides the fact I get random 404s :P
When I try to repro in the browser by loading 10 chat screens it seems to work just fine
 
Dump the whole request object before it's written in Http2Connection line 256.
 
Does it even do http2?
It does not dump anything for that request
Nope. It uses http1 for that request
 
Yep. Uses HTTP/1.1 in my browser as well.
Anything on chat.stackoverflow.com seems to use 1.1
 
hmmmmm I might see something
Not sure what it tells me yet, but I see a difference in cookie data between a working and a broken request
Which makes sense as the 404 is probably telling me I am not logged in or something
s/probably/possibly
 
10:11 PM
That seems the most likely thing. I haven't worked with the cookie package at all.
Are cookies being sent on the request resulting in the 404?
 
What the actual fuck......
I am getting so confused right now :P
Not sure if SO or the http-client or all of the above is trolling me now :D
The second request is the actual login request
When I use wrong credentials I sometimes get back a 200 and sometimes a 302
I don't even
Pretty sure I fucked something up earlier in the chain
 
Differing responses seems odd. On a tangential note, I've always wondered why servers return a 200 on incorrect credentials. You'd think a 4xx code would be more appropriate.
403 would seem to make sense.
 
The reason SO gave is that if you do not have access to a specific resource for all intents and purposes it just is not there
Feel free to disagree as I do :P
Oh the other way around
Yeah that 200 is just bollocks
 
404 makes total sense when accessing a resource that you aren't authorized to access.
I was more thinking of the response to a login attempt… 200 seems wrong, but whatever.
 
Yeah
\o/
I think I got it
PEBKAC
I think it I get a captcha page which I do not handle
:|
 
10:25 PM
Heh… well then…
 
Yeeeeeaaaap
...
They are throttling logins
Well that sucks :P
But at least I know it's my fault.Sorry for doubting you @Trowski
 
@PeeHaa You had good reason to doubt. There's sort of a lack of tests right now for http-client.
 
@Trowski Isn't there at least some way to easily set up integration tests on some standard test suite?
 
@PeeHaa There's a nice tool for checking servers which we use in http-server. I could write a test script using http-server that the client talks to during tests.
Unfortunately that doesn't really handle error conditions well, since the server won't misbehave.
 
:P
 
10:36 PM
Testing that is more annoying, since I have to purposely build incorrect binary frames and send them to the client.
 
Yeah that would kinda suck
Oooh it seems like the keep-alive issues have been fixed based on the two sites I knew artax had trouble with \o/
 
10:55 PM
@PeeHaa Yeah I completely rewrote how server connections are handled.
 
11:21 PM
@beberlei Looks okay from a distance. Personally I've abandoned the error_cb approach as I was hitting too many issues on when it was called and the state of my span stack, etc. Now I'm just attaching exceptions. That's still a WIP but it looks like it will work decently well.
I think zend_ast_process has a lot of promise, and there I can only catch exceptions, so it would have feature parity.
 

« first day (3230 days earlier)      last day (1703 days later) »