« first day (3890 days earlier)      last day (1073 days later) » 
00:00 - 18:0018:00 - 00:00

6:00 PM
Hm.
So if we could rewrite the patch to trigger distinct statements that would be better for Xdebug? I fear making them statements rather than expressions would undermine the whole "expressions" thing...
(I am talking mostly out of my butt here, to be clear.)
 
We do have some existing weirdness, such as setting a breakpoint on a line with a short closure.
The breakpoint will trigger on both the declaration and invocation.
 
@Crell Maybe, but I don't think I can show the intermediate results... which is what debugging users are really interested in (Same problem with these fluent interfaces)
 
Hm. Would step-in allow you to see the arguments that each function along the way gets?
That's probably sufficient for introspection purposes. The other question would be setting a breakpoint at the 3rd function in a chain instead of having to step through all of them, as with chained methods now.
 
probably not
 
OK, so xdebug is going to be not-ideal no matter what we do, basically. Understood.
 
6:08 PM
> Username auto complete is tab, not enter.
:-P
 
Stupid Slack has me conditioned for Enter
 
it's very unintuitive and you are far from the first
 
We all do it :-)
(or, at least I've done it far to many times)
 
IRC was tab, as well, so if I was still using that for most things, it wouldn't be unintuitive ;-)
 
you were going to say?
 
6:09 PM
btw what I just quoted is from the room description, which tbf no-one seems to actually read
 
@Derick, email addresses for primary-qa-tester: ramsey@php.net patrickallaert@php.net
 
OK
already done ;-)
 
Thanks!
so, you went ahead and guessed, anyway ;-)
 
the command you emailed me was wrong btw, there should not be a / between primary-qa-tester and mod
@ramsey No, I stole it from php.net/gpg-keys.php
 
I copied-pasted it from here: github.com/php/php-src/blob/master/docs/…
 
6:11 PM
I thought we did do this when we recorded the podcast ep, but that was only php-announce I think!
@ramsey Patches welcome!
 
Yep... I meant to add that I'll update it
So, the command is primary-qa-testermod ?
 
no, a space, not a /
 
got it... so ~ezmlm/primary-qa-tester mod
 
yes
 
@PeeHaa twitter plx.
 
6:25 PM
Doh! I also forgot to put @JoeWatkins's name in the release email complimentary closing
 
Tsk tsk
 
Just realized that, since git.php.net is no longer used, we're no longer updating user karma, so what a user has access to no longer shows up correctly on people.php.net
 
regular reminder that I don't run the room owner list btw :-P
 
Thanks, @DaveRandom
 
I mean it doesn't buy you much, you now have the ability to clean up other people's mess :-P
 
:-)
Cleaning up other peoples' messes is one of my favorite things to do!
 
6:47 PM
I suspect it's the main quality that unites all FOSS-oriented ppl tbh
 
/me raises his hand.
(He says, while rewriting all PSR-3 usage in TYPO3.)
 
I spent a solid 90mins just renaming lan switches so they naming scheme is consistent last night
 
Guys, in a PHP extension, if you need a global HashTable.
What would be the reason you would opt for a `HashTable myHash;` vs `HashTable *myHash;`?
to point or not to point... that is the question
 
you mean as a straight static var?
i.e. can you elaborate on "global"?
a straight static var can be allocated directly, anything that is not definitely only accessed by a single thread in a global context needs to go on the heap so the memory can be guarded
(...says one of the least experienced C devs currently here :-P)
 
@DaveRandom Which you can accomplish with module globals.
The global doesn't need to be a pointer though.
 
6:59 PM
yeh but they are still heap-allocated, right?
 
I mean, one of the globals you define between your ZEND_BEGIN_MODULE_GLOBALS(myext) ... ZEND_END_MODULE_GLOBALS(myext)
 
i.e. any local decl referencing them would need to be a ptr
 
AFAIK yes, though that's sort of beyond the scope here.
 
and that you usually access using a MYEXT_G() macro
 
Using a pointer is only necessary if you intend on swapping which HashTable the global is using.
 
7:00 PM
@PatrickAllaert ah in that case yeh shouldn't need the ptr afaik
tho again, prob the least-good person to listen to here :-P
 
for example, in ext/ffi there is 1 "HashTable" => "HashTable types" and 2 "HashTable *" => HashTable *symbols and HashTable *tags
as part of the ffi module globals
 
types are constant, symbols and tags are not
there's the key difference
or rather, types are pre-defined
tho actually that may not apply now I think about it more, the HT has a constant size and always needs to be allocated
/me goes to shop and butts tf out
 
Guessing that has to do with those tables not always being needed.
 
So far I see one benefit in my use case. The hash table may not be used, which means being a pointer, it can be NULL.
Testing whether the structure has been zend_hash_init'ed can be done testing that the pointer is not NULL.
Having "HashTable myHash", I don't see any zend api telling me whether it has been inited or not.
 
@PatrickAllaert You would always init the table in your MINIT function.
 
7:08 PM
If a table is, for example, always inited / destroyed on (R|M)INIT / (R|M)SHUTDOWN, I can see the point of not using a pointer
@Trowski you mean if not using a pointer?
 
@PatrickAllaert Right, exactly this.
Sorry, GINIT, not MINIT
 
However, as soon as the HashTable can be inited/destroyed at different places, that has nothing to do with INIT / SHUTDOWN hooks, I see some values in the fact of having a pointer rather than the structure
 
Well, depends on what it's storing I guess.
 
Well, in my case it would be a HashTable of pointers with string indices
 
Pointing to what?
@PatrickAllaert This probably explains it better than I can.
 
7:13 PM
@Trowski pointers to zend internal functions
 
Sounds like a true global, so GINIT.
It is meant to live between requests, yes?
 
@Trowski PHP Internals Book is generally a good resource, indeed!
@Trowski nope
anyway, you cleared up my mind @Trowski / @DaveRandom :-)
Thanks!
 
Err... that uses the term 'true global' for an actual, non-thread safe global.
 
There is no way to figure out whether a "HashTable myHash" has been inited with zend_hash_init(&myHash), right?
 
So ignore my usage of the term, I was conflating that term with RINIT vs. GINIT.
 
7:17 PM
@Trowski Well, it would be thread safe as it is accessed using a macro
 
for me a "true global" is static thing_t varname;
 
GINIT is per thread, then MINIT, then there's RINIT per request.
@DaveRandom Right, that's what it is.
What he wants is a thread-safe global I'm sure.
That's what I should have called it.
 
Sorry, at all time I meant a TS module global
 
I understood that, it was my fault using the wrong term.
 
@Trowski ...something which afaik doesn't really make much sense anywhere in php-src (?) there isn't really any situation I can imagine where it's safe to have something globally writable like that, and you aren't writing it then prob just use a macro?
^^ that's a question despite not being phrased as one :-P
 
7:21 PM
I was wondering about:

`ZEND_BEGIN_MODULE_GLOBALS(myext)
HashTable myHash;
ZEND_END_MODULE_GLOBALS(myext)`

vs

`ZEND_BEGIN_MODULE_GLOBALS(myext)
HashTable *myHashPtr;
ZEND_END_MODULE_GLOBALS(myext)`
 
myHashPtr has to be allocated before use, which enables you to allocate persistent memory or point it at something that already exists, if you don't need either of those things then you don't want a ptr (imho)
in fact more generally, if you don't need to control the alloc/free you don't need a ptr
 
@DaveRandom Only things designed as such, like a pthread_mutex.
 
sure, but that's thread control metadata which is like a 2nd-level red pill :-P
 
in both case they need to be `zend_hash_init`'ed.
But giving a specific lifecycle, one fits better than the other.
If init/destroyed at (X)INIT / (X)SHUTDOWN, the non pointer version seems good.
If init/destroyed randomly, e.g. inited because of a custom extension userland function and destroyed by another one (or at RSHUTDOWN), then the pointer seems more adequate.
 
sure, the HT is only the constant sized "header" of the table, not the buckets, so it still needs the initial state definition
bear in mind as well that PHP "globals" are still a struct that is heap-allocated, afaik there is no consistent guarantee across platforms about what the data will actually mean even if you memset it to 0 or whatever
like a pointer with a value of 0 != NULL everywhere (I believe, tho also I think it is everywhere sane)
 
7:32 PM
My C book will say that, but in practice I see 0 == NULL relied upon.
 
same, but (again, afaik :-P) the ethos of php-src is broadly defensive when it comes to stuff like that
and tbf "write it the way that definitely works everywhere" seems reasonable :-P
 
php-src definitely relies on that.
Though yes, it's pretty defensive to be portable otherwise.
 
idk if the proscribed initial state of HT is all 0s anyway, don't they have a refcount which should presumably be at least 1?
not sure how array CoW works
 
Yes, a HT of all 0's is garbage. Needs to be init.
Some things don't… like ZVAL_UNDEF(&zval) is the same as zeroing the zval.
Well, same thing is misleading.
Unneeded if the zval is zeroed I should say.
 
ZVAL_UNDEF() is just zeroing out the type presumably? or does it zero out the value as well? just out of interest
 
7:46 PM
Only the type.
 
this has given me an insane idea... bbiab :-P
 
@Danack words of wisdom
 
zend_long is guaranteed machine byte order right?
 
Destructor is invoked even if invoked manually already ・ Scripting Engine problem ・ #81126
 
zend_long is either int64_t or int32_t, nothing magic going on.
 
8:01 PM
fuck today, it's shit ...
 
What's up?
 
internet disappeared, ISP are dicks, tethering is slow as fuck ... and I've got a list of 5 things I haven't done and can't really do now
oh @Trowski I approve of that PR, but I just wanted to suggest that we might want a fiber test extension, it's not your fault, but the zend test code is getting pretty confusing now, I was thinking about breaking it down into sub modules, core, observer, and fiber ... but I can't do it myself now, so whatever, it lgtm ...
I started to reorganize the pr a little, pulled out the standalone ze changes, then I was in a meeting and the world crashed, and I don't think I'll be able to push code (2.5/3g, I dunno, crap)
 
not sure if weed or crap 5g network.gif
 
@JoeWatkins I can do that, test.c is huge now.
 
8:10 PM
@JoeWatkins I suggest finding a nearby cuddly person or animal and hugging
 
grrr
@Trowski that'd be good
 
One extension, just multiple files yes?
Multiple extensions seems overkill.
 
/me faxes @JoeWatkins a hug.
 
@Trowski yes
multiple pr's would also be nice, just to keep them small ...
(and may be easier for you, tear out the test parts and merge this, then open a fresh pr for test part)
 
@JoeWatkins Yes, that would probably be better. I can add the fiber tests in one PR, then move the observers in another PR.
 
8:23 PM
rubber ducking because I just found something out about this XML file that makes me want to scream ...
Wordpress uses numeric IDs for categories
XML file I'm working with is a Wordpress export
Not all posts have a numeric category ID, the vast majority use a slug name for category instead
I'm planning to encapsulate posts within a class, with three properties for post ID, category ID and category slug name
I need an intermediary data structure stores categories IDs with slug names that I can refer to when mapping a post ID with its corresponding category ID (based upon slug name)
 
@JoeWatkins Thoughts on a secondary vote for ... vs ...? Just to shut people up? We have Mark R, Jordi, and Levi now leaning toward ...? so I don't think we can ignore it, even though I would rather just use ...
(Context; Partials.)
 
@Crell Welll so0o0o0o0o0ry for inconveniencing you :P
 
@Tiffany so when there's a numeric id, there's no slug?
 
@FélixGagnon-Grenier there is a slug...somewhere... but slug is known elsewhere
I need to be able to map post ID with category ID
but I can't because this Wordpress site is terrible and I hate all of it
 
if the slug is functionnally the same as an id (as in unique in the same ensemble), would there be particular problems with having a single id field, containing whatever (string that's numeric or not)
 
8:34 PM
@Crell if you ask a silly question, you get a silly answer ... but whatever, ask the question on the rfc if you must ...
 
I just don't want anyone voting against it on those grounds. Or if we have a more concrete argument for not including it other than "it's a pointless extra character and that's silly."
 
@FélixGagnon-Grenier the rest of the code I will be working with relies upon the category being a numeric ID, in general, using the numeric ID is easier
 
we are not introducing the symbol "...", that is an existing symbol, with an existing meaning which we are using "zero or more" . The thing that comes after is a different symbol, ...? means zero to one, and that does not make sense
 
/me will attempt again to make that point on the list.
 
@FélixGagnon-Grenier you do bring a point though, and it's something worth keeping in mind, but I think ultimately having the category ID will be easier than relying upon slug name
 
8:37 PM
I think we already know that point, we just disagree with it :-)
 
you are wrong
 
Tell that to function foo(...$args) :-)
 
that's two symbols, like I tried to explain already ...$ is not a symbol, not in any way is it a symbol ...
 
It's ... followed by a variable name, in this case there is no variable name, so it's being followed by ? instead. Now if the argument was should "...?" and "... ?" be different, t hat would be worth discussing.
 
we can either have precise semantics or not, ? can either mean one precisely, or it can be included in a symbol that means zero or more, that looks like zero to one ... why you don't see that this is no better than ? meaning anything I just don't get ...
 
8:44 PM
Perhaps I don't see how you're so readily discarding the existing usage of foo($a) meaning one arg, and foo(...$a) meaning 0 or more args.
It was also pointed out on the Reddits that the largest confusion was that foo(...) looked like ... represented something that was omitted from the snippet, (In response to Nikita's all-args-only version)
 
If you view ? as the omission of an expression, ...? makes more sense.
 
I can see the argument Mark is making, I just don't agree with it and still find it unnecessary.
 
and I'm fine with that, which is why I've asked for a secondary vote, knowing full well that it gives more people an opportunity to disagree with the proposal to use ...? I suspect though ...? would get a pretty clear majority
 
that does not make it correct
 
9:00 PM
If a solid argument can convince me (and presumably others) that there's something fundamentally wrong with it, i'll happily bang the drum for using ..., but so far that convincing has not yet been forthcoming.
Either one is better than plan A and the trailing ? having special meaning
 
I mean, I have some faith in the process, reasonable in, reasonable out ... but ask a silly question and expect a silly answer ... it is a silly question, if we want ? to mean precisely one ...? inescapably means zero to one, by existing semantics, and ones we are reusing, barking mad ...
 
@JoeWatkins Does foo(int ...$args) mean "one or more ints" or "zero or more ints"?
 
zero or more, always zero or more ...
 
So... I can't believe I'm arguing this side of it, but... if that means "zero or more ints", why does "...?" to you mean "zero or one placeholders"?
 
it means zero or more, the int means ints ...
 
9:05 PM
foo(?, ...?)($a, $b) = foo($a, ...$b) would be the "natural" interpretation of ...?
foo(?, ...)($a, ...$b) = foo($a, ...$b) is the actual interpretation
 
@NikiC So... you're saying ...? would make it seem like a placeholder for a variadic parameter, rather than a variadic placeholder itself?
 
? is an expression placeholder, not a number of arguments.
 
@Crell yes, basically
 
I can buy that argument. @JoeWatkins? @MarkR?
 
I can see it, but Nikic's "natural" interpretation would not have been mine.
 
9:15 PM
He does have a point, maybe some would interpret ...? as requiring an array param.
 
i think he's saying the same thing I said, another natural interpretation is
foo(?, ...?)($a) = foo($a) would be the "natural" interpretation of ...?
 
Well I'm not sure where to go other than to put some kind of poll together and throw it on Twitter and Reddit to collect some data. We have existing data to suggest that foo(...) is confusing.
 
no other interpretation seems to make sense, so it means zero to one
 
What data says foo(...) is confusing?
 
I was thinking of ...? to mean omitting zero or more expressions, but if you view it as strictly a one-to-one replacement, I can see that being confusing too.
 
it depends how you read the page, I see almost as many people agreeing with the statement that it makes sense by analogy ... and someone said "it took me a minute", not "I really struggled to understand this, please change it"
 
New test for AVIF is too long ・ GD related ・ #81127
 
I don't have an easy answer. Ultimately I'm going to vote in favour on the primary either way.
 
That is reassuring at least. :-)
 
Wait what is the argument in favor of ...?
Is it just that people don't understand what ... means on its own or?
 
9:35 PM
I don't know
 
That it mirrors foo($arg) and foo(...$arg) syntax, that the presence of the ? makes it more obvious that it's a partial (whereas ... would not have the ? that everyone would be looking out for), and that in all other mechanisms, ... is followed by another token to indicate its purpose, and by maintaining that style, it slightly reduces the chance that at some hereto unknown addition down the line, "..." would be less likely to conflict with a future syntax
 
> whereas ... would not have the ? that everyone would be looking out for
wouldn't they only be looking out for that if ...? were the symbol ? why isn't ... on it's own the same sort of indication that it's a partial ?
 
is this bad? gist.github.com/tiffany-taylor/… it feels service locator-y
 
Why would you be looking for it, ... either means 0 or more in a function declaration (what a partial is) or unpack an array in an expression context
And by that logic, shound't it be ?... ?
 
that's it, I'm leaving
 
9:39 PM
@Girgias I think you broke Joe with ?...
 
Oh I'm for just having ..., because I don't see why you'd need the extra ?
 
hmmm... I'm trying to math and I'm not having a clear win. We want to constrain the users profile pictures to specific width * height ratio as well as number of pixels. sometimes users will use 3000x3000 pictures whereas we need 500x600 or something of a similar order.
 
I think one would naturally expect partial placeholders to have some resemblance to each other.
 
such big images need be shown redimensioned on most screens, or rather browser windows, so the user is presented with the redimensioned image, and a redimensioned selection box to choose where they want to crop their picture.
 
Are you uploading via web? Cropper JS is your friend.
 
9:41 PM
but I can't hit the desired exact pixel measures, sometimes there's a factor division that results in a lost pixel
 
@Tiffany Depends what Category is. If it's just a value object, I think that's fine. If it's a service, it feels icky.
 
@MarkR But why??? ... means 0 or more, ? means exactly 1 (well that's the semantics I hope is has)
 
@Crell I think I'm intending it to be a value object
 
@Girgias Same reason that foo($arg) means exactly 1 arg and foo(...$arg) means 0 or more.
 
@Girgias That is correct per the current spec/implementation.
 
9:42 PM
The only reason you have a variable name is so that you can reference the va args within the function body
 
@Tiffany Then I think it's fine. You could make it two separate parameters but it doesn't really matters if it's a plain value object.
 
@MarkR Maybe I just don't see the problem because in C a variadic is just ...
 
@Crell thanks
 
@Crell Nice! Really need to read the proposal properly now that it seems to be somewhat stable
 
@Girgias At this point I think it's reached its Final Form, modulo the debate about ... vs ...?
 
9:45 PM
Not yet, it doesn't have ultra instinct.
 
great, so I can join the bikeshed on the mailing list
 
And I think we can take it to a vote sometime next week, baring anything else coming up, so get to reading now. :-)
 
Well, I'll try to not get too distracted by Mahjong and/or Dorf Romantik
 
I'd be surprised if it wasn't above 95% in favour
 
I thought the same about enums, but it still had a sizeable opposition.
(The only people who gave a reason were "I wanted a new zval implementation", but only 2-3 gave a reason.)
 
9:51 PM
@Crell baring or barring?
I guess it's too late to edit
Going to ask a dumb question and feel free to laugh at me or tell me how stupid my question is: how difficult is it to create a new zval implementation?
 
@Tiffany From what I gather from Ilija and Levi, very.
 
@Tiffany Depends what, adding support for complex numbers should be rather easy, because it is an existing C type
 
so is wchar_t :D
I'll wait here while you do it ...
done?
I made myself giggling, that's what's important ... giggling ..
I've no idea of context, what did they mean by new zval implementation ? not sure what that means on it's own ...
 
10:18 PM
/me sleeps
 
10:45 PM
perchance to dream.
 
11:37 PM
@Crell Yes, tomorrow, or otherwise Monday morning (my time)
 
00:00 - 18:0018:00 - 00:00

« first day (3890 days earlier)      last day (1073 days later) »