« first day (3419 days earlier)      last day (1520 days later) » 

12:40 AM
@MátéKocsis Only Dmitry is doing some PHP work.
 
 
7 hours later…
7:39 AM
@Derick Oh, thanks for the correction
@NikiC Pretty much so ^^
 
8:23 AM
mornings
 
8:49 AM
o/
 
@MátéKocsis If we want to do that, now's the last chance ...
Going to be really hard once messages have already hardcoded all those "to be"s etc
 
@NikiC Sure. After upgrading some dozens of messages, my feeling was that the current formulation won't scale. Probably it will be ok for the majority of cases, but there will be problematic edge-cases..
That said, I'm going to fix the problem.
 
And that brings us back to what the error message should be ...
I think it's worth keeping in mind here that we also have the (extremely large) set of docref error message, which have the format "function_name(): Error here"
 
how do you mean this? You preferred the "argument .." style all the time?
 
The docref format would be something like %s(): Argument #%d ($%s) must be of type %s, %s given then
 
9:00 AM
uh. it would be really cool to first convert all the warnings to exceptions (that is possible) to save some extra work.
so I'll only address exceptions for now, and a bit later we can finalize the docref texts. :)
 
Do them at the same time with a macro.
 
The problem is that gazillions of tests have to be adapted.
 
@MátéKocsis Sorry, what I meant is that we can follow the format of docref
 
@NikiC Oh, but nevertheless, I'll have a closer look at them as well.
 
Could we add a new debug-only token to do the trycatch_dump trick? Would make upgrading significantly easier
fn() was the only way I could think of to have code execute inside the catching function, unless there's a way to move AST inside it without a function?
 
9:14 AM
I really need to make a list of which extensions have been covered about the Warning to Error promotion
 
Won't a bunch of them need redoing anyway if there's a new API?
 
Changing the error message is easier than having done the promotion IMHO
As you can bless the tests way easier
 
9:30 AM
@Girgias Yeah, you are right. I realized after writing that the overhead is not that big.
 
:p
 
10:23 AM
@MátéKocsis Want to chat about wiki.php.net/rfc/write_once_properties on the PHP Internals News podcast?
 
10:43 AM
"Hi,

Would you be interested in buying/owning the domain name phpinternals.com so
you can redirect it to your website?

Kind regards,

XXX XXXX
Domain Name Broker
"
No, feck off? :-)
 
whois says its pending deletion anyway
 
11:11 AM
Where do you see that?
I see:
Updated Date: 2020-01-21T00:00:00.000Z
Creation Date: 2018-12-12T19:38:28.000Z
Registrar Registration Expiration Date: 2019-12-12T00:00:00.000Z
 
https://www.whois.net/ > phpinternals.com
Domain Status: pendingDelete https://icann.org/epp#pendingDelete
 
posted on February 14, 2020

To my wife: Your toothbrush is in my bathroom bag. It’s the teal one, not the blue one. The blue one is mine. Don’t use the blue one. That would be gross. Don’t be gross.

posted on February 21, 2020

Truth be told, I’ve only sort of adopted the minimalist lifestyle of today’s comic. When I moved to Hawaii last year, I dumped 80% of everything I own, threw the rest into storage and came out with two suitcases. I’ve acquired a few things since then, but not all that many. I’ve done this a few times in my life (unloaded possessions… not moved to Hawaii). Each time I purge my stuff, I only

 
11:50 AM
INSERT INTO @DaveRandom SELECT * FROM Tea t1 INNER JOIN Tea t2 ON 1=1
 
12:44 PM
DateTimeImmutable::createFromFormat() does not permit decimal point in Atom ・ Date/time related ・ #79305
 
1:12 PM
o/
 
\o
 
2:11 PM
\o
 
o/
 
just FYI because I've just added other stuff to here, if there's any repo you regulars would like to have on heap.space ping me for it
2
also FTR it's re-indexing every day 2am UTC
 
2:29 PM
report LIBZIP_VERSION undeclared when compile. ・ Compile Failure ・ #79306
 
2:40 PM
httpd crash when combine strings in php ・ Apache2 related ・ #79307
 
2:52 PM
@Ekin fyi you can get away with much more frequently than that, it only indexes changed files
I had lxr.11 set up for once an hour I think on a pretty low spec machine and it was fine
 
that's true, I was thinking of making it every 2-3hrs last night
even hourly should be fine, yeah
 
most of the time it's doing nothing for 99% of the repos on there because they don't change much
 
think I'll do that
indeed
 
you just need a guard in there to prevent it doing more than one index at once if it overruns
I had an flock based guard
you need that anyway regardless of the time span, iirc when I added hhvm it took a couple of days for the initial index :-P
also have you added an exclusion for directories named test/tests?
 
it always takes about 5 minutes to complete
 
2:57 PM
yeh but you can't rely on that always being the case, if you end up with two running at the same time it will corrupt the index and you have to rebuild the whole thing from scratch :-/
(I learned that the hard way :-P)
 
I didn't exclude tests because I was searching stuff in php-src tests
I see :)
 
on balance I concluded that removing tests was better because it cuts down on a lot of noise, it might be worth having separate repos for them? I dunno, never really thought about it
I suppose it is useful to be able to grep tests, it can get annoying when you are just trying to read source though
 
I wish you could exclude while searching
 
you might be able to, lucene is a complex beast that I don't really understand
 
btw before opengrok I actually tried out this one livegrep.com/search/linux - source
and I love how fast that thing is
I still have it somewhere because at some point I want to extend that somehow
 
3:00 PM
the weak point in the whole thing (with opengrok at least) is ctags
or certainly was
it hasn't had a stable release for years
 
through snap or something, can't remember what I did for ctags for opengrok at all right now :p
 
I had to yeh that's what I used, I pegged it to a specific commit I think though because there aren't any tagged releases :-/
 
 
1 hour later…
4:09 PM
I was wondering if @ircmaxell or someone else can help me with this. I'm trying to traverse the CFG of a program (From PHP-CFG) and symbolically executing it. I'm having a hard time understanding the structure of Assertions (https://github.com/ircmaxell/php-cfg/blob/master/lib/PHPCfg/Assertion.php)
An assertion has a $mode parameter and a list of other assertions in the $value parameter. In case of if (is_int($a)) ... else , for the else clause, I'll have an Assertion node, with its value set to NegatedAssertion and its inner value set to TypeAssertion (Assertion->NegatedAssertion->TypeAsse
 
@Silverfox Think of an assertion as a condition for a variable
function foo($x) {
	if (is_int($x)) {
		bar($x); // type assertion INT
	} elseif (is_float($x)) {
	   	baz($x); // type assertion ~INT & FLOAT
	}
	if (is_string($x) || is_array($x)) {
	    biz($x); // type assertion STRING | ARRAY
	}
}
 
@ircmaxell Is it safe to assume that only the parent Assertion node has $expr and the $value and its descendants will only include Negated or Type assertions?
 
I don't think so, because assertions can build on each other.
Actually, yes
and for execution, you don't need to worry about assertions. They are only really useful in static analysis where you don't know type information, and hence have to put assertions on to limit the possible types in certain areas
 
4:24 PM
@ircmaxell Oh right, that's true! Thank you for the information!
 
And the reason $value can be an Op, is it allows variable type assertions to unknown types at that portion of the runtime
example:
function foo($x, $y) {
    if (gettype($x) === gettype($y)) {
        // Type assertion here that $x is same type as $y
        if (is_int($x)) {
           // type assertion here that both $x and $y are ints
       }
    }
}
 
Minor Service Outage | Notifications has Partial Outage
Minor Service Outage | API Requests has Partial Outage | Notifications has Partial Outage
 
grumble grumble
 
Incident on 2020-02-25 16:36 UTC | API Requests has Partial Outage | Notifications has Partial Outage
 
@NikiC et. al. Do we have a diagram / flow chart somewhere about what happens when a class is instantiated? Lookup class, realize that it is not declared, trigger autoload, require, compile, realize that it extends another class, realize that it uses a trait, ..?
 
4:37 PM
@bwoebi Regarding property accessors ... we currently have this ugly situation where $obj->prop =& $ref doesn't work at all with magic methods. And that prevents us from having properties with accessors from being fully equivalent to native properties...
@SebastianBergmann It's complicated. Do you have a specific question?
 
@NikiC No specific question, other than the wish to illustrate "what all happens" when a class is used.
 
Incident on 2020-02-25 16:36 UTC | API Requests has Partial Outage | Notifications has Partial Outage | Gists has Partial Outage
 
@SebastianBergmann I mean, your description is a reasonable high level interpretation
As long as you're not interested in things like variance or early-binding
 
Incident on 2020-02-25 16:36 UTC | API Requests has Partial Outage | Notifications has Partial Outage | Gists has Partial Outage | GitHub Pages has Partial Outage
 
I think we are exactly interested in those nitty-gritty details. And by we I mean Arne who asked me if I had a flow chart like that lying around :-) He is preparing a presentation on Preloading and thinks a visualization like that could help explain some details.
 
4:42 PM
@NikiC but &__get() does exist?
 
@bwoebi &__get() handles $ref =& $obj->prop
 
Incident on 2020-02-25 16:36 UTC | API Requests has Partial Outage | Issues, PRs, Dashboard, Projects has Partial Outage | Notifications has Partial Outage | Gists has Partial Outage | GitHub Pages has Partial Outage
 
But nothing can handle $obj->prop =& $ref
 
oh okay
@NikiC I feel like this should probably do $obj->__get("prop") =& $ref then?
 
@AsyncBot this outage is rapidly getting less and less partial
 
4:44 PM
no bullshit
 
@bwoebi Wouldn't work, as it needs to overwrite the reference itself
not the content of the reference
 
yeah
 
It would need something like __set($name, &$value)
 
@NikiC I wonder whether we should defer that until we get explicit caller pass by ref
 
@nikic I think such a flow chart would be useful to have at some point to document how things work. But if it does not exist right now, it does not exist right now :) Anyways, gotta run. Cheers!
 
4:46 PM
@NikiC though … we do not have any may-be-ref in userland while this would be an ideal case for that
 
@SebastianBergmann Yeah ... I kinda wanted to write a blog post about preloading at some point, because there's some interesting stuff there... not sure if I ever get around to it
@bwoebi It's a bit more tricky than that
I don't think it can really be part of existing __set(), because you still need to decide whether or not you perform by-val or by-ref assignment inside the __set
 
__setRef() :-/
 
@NikiC well, if the value is passed by val to __set, you can still do a by-ref assignment, after leaving __set() it will be rc=1 then simply
 
@bwoebi You can't do a by-ref assignment, because that would break an existing reference, so the semantics would be wrong
 
sigh
I honestly am not sure whether $obj->prop = &$ref makes much sense at all
 
4:53 PM
It's not that I even care about $obj->prop =& $ref working, but it sucks that you can't have a normal property and a property with accessors behaving exactly the same...
The obvious solution is to simply always forbid $obj->prop =& $ref :P
 
@NikiC if we had proper property accessors (i.e. per property), then we still would have that issue and need some setRef
 
@bwoebi proper property accessors is exactly what I'm concerned about
 
We do not have a possibility to return the variable source currently, just a reference to that variable
I don't think so, but would it be possible to somehow return variable sources?
so that by-ref assignments to function retvals do actually assign to the source behind
 
@bwoebi What exactly is a "source"?
Something like IS_INDIRECT?
 
@NikiC as in is_indirect as opposed to is_reference … temporarily increment refcount of container by 1 until the tmpval is freed
basically an indirect holding a ref to its container (ref as in refcount)
 
5:01 PM
@bwoebi I have been thinking about something like this as well. I don't think it could really work similar to indirect, it would be more like container + key/offset
or ... is it really safe to have an is_indirect into a container as long as you increase refcount?
 
@NikiC no, arrays are separated
 
@bwoebi But not if you increase refcount, as it would get separated
 
yeah, then you get edge case behavior with destructors manipulating an array to which an indirect is held
where one part of the information is lost
 
I think generally something like this may make sense, and would be a large part of the answer to how we can remove references entirely ... but it's also a very big hammer
Not something we can add to fix a small problem ^^
 
@NikiC dynamic property tables resizing?
 
5:06 PM
@bwoebi yeah, that would be an issue, right
So it would have to be container + key/offset, probably plus a direct reference that can be used after checking for invalidations
 
yeah
or …
we evaluate the right-hand value of a by-ref assignment first
and then we immediately assign upon return of the callee @NikiC
(before actually leaving)
 
@bwoebi ...
 
well … it be guaranteed safe
 
It be guaranteed magic :P
 
haha
Not saying we should do that, but would be an option if the indirect assign doesn't work out
But in the end I cannot think of any simple solutions to this problem
 
5:14 PM
Me neither
I hate references
So much trouble everywhere
 
I like refs from userland and hate them from internals perspective
 
5:32 PM
Incident on 2020-02-25 16:36 UTC | API Requests has Partial Outage | Issues, PRs, Dashboard, Projects has Partial Outage | Notifications has Partial Outage | GitHub Pages has Partial Outage
 
The only use-case for references I can think of that can't feasibly be replaced or discouraged is by-ref closure capture.
But maybe simple refs like this are not so bad. It's when complex objects or arrays contain references that it really sucks, right?
 
cmb
5:51 PM
@NikiC, re github.com/php/php-src/pull/5208: that commit looks good to me (thanks!); even better than the current implementation; I'll try to have a closer look at that. And we should document that class.
 
Incident on 2020-02-25 16:36 UTC | API Requests has Partial Outage | Issues, PRs, Dashboard, Projects has Partial Outage | Notifications has Partial Outage | Gists has Partial Outage | GitHub Pages has Partial Outage
 
6:10 PM
@NikiC let's remove them!
 
6:20 PM
Incident on 2020-02-25 16:36 UTC | API Requests has Partial Outage | Notifications has Partial Outage | Gists has Partial Outage | GitHub Pages has Partial Outage
Incident on 2020-02-25 16:36 UTC | API Requests has Partial Outage | Notifications has Partial Outage | GitHub Pages has Partial Outage
Incident on 2020-02-25 16:36 UTC | API Requests has Partial Outage | Notifications has Partial Outage
 
6:43 PM
Incident on 2020-02-25 16:36 UTC |
All issues have been resolved!
 
Narrator: For now
 
7:16 PM
:D
 
 
1 hour later…
8:20 PM
Could someone please point me in the direction of where objects are freed? I'm looking at ZVAL macros and I'm not seeing where / how it handles an existing value being overwritten.
Say if $x = new Obj(..); $x = 123;
 
my gues swould be the zval_ptr_dtor macro
 
Thanks, will take a look. I was just reading the conversation from earlier and was trying to learn how references work internally
 
8:37 PM
@cmb Yeah, I was quite surprised when I didn't find the class in the docs
 
8:53 PM
is there a good vagrant box or similar for hacking on PHP? I've previously been using github.com/rlerdorf/php7dev but it's not been updated in a while, so I'm not sure if it will work nicely with master
 
No idea
@IMSoP As you on Linux or on macos?
If you're on Linux, you shouldn't have much trouble doing a build
 
I'm on Windows, sadly; obviously I could just grab a generic Linux VM and go from there, but it was handy having the pre-requisites all ready to go
 
Ooooh Windows
 
lol
 
WSL
 
9:06 PM
yeah, that might work; never sure how much to trust it to behave like the real thing
I always start off with a quick thing I want to hack on, and end up yak shaving just to get a dev environment with the right tools on :(
 
10:00 PM
What... a... day...
 
10:21 PM
UGH what a day is right...im sure my reasons are different... but optimizing processes is frustrating.
Is anyone still hanging around right now?
anyone know a good general rule for if its better to query MySQL like 40k times or read the dataset into an array and loop through it? For best performance.
 
well, the general rule is never ever query in a loop, but I guess there's always exceptions to ever rule
 
10:38 PM
Heres the issue... a query with 190k records.... for each record I have to use some data from another query of 60K records to calculate something, then update the orig record. I am currently reading all 190K records into an array, and all 60k records into another array then looping through the 190k records with a loop for the 60k records doing the processing.
The problem is its too slow. Instead of reading in 60K records... I COULD query the DB for each of the 190K records and return just about 5 or 6 records for each. But I agree.... I dont think querying the DB 190k times is a good idea.
 
is there any way to get real-time rates of gold and other precious metal in a website?
I need help please
 
alpaca probably would work for you... realtime stock info from an API
I bet Gold is a stock symbol
well maybe
 
gold is usually handled as currency
 
is there an other
i can use?
 
10:57 PM
Morngins
 
Well I gtg...
 
11:46 PM
@Derick I'm really sorry, but I only wish I were that good at public speaking :/
 

« first day (3419 days earlier)      last day (1520 days later) »