« first day (3860 days earlier)      last day (1078 days later) » 
00:00 - 20:0020:00 - 00:00

12:05 AM
Any idea why pecl is telling me that :
pecl/event is already installed and is the same as the released version 3.0.4
even tho:

find /usr/ -name "event.so"
find /usr/ -name "ev.so"
show me nothing ?
 
@bwoebi That just flattens the data instead of making it a tree?
@bwoebi You seem like and know stuff like this :P
 
@bwoebi got something similar:
let reservoir = []
for (const [key] of Object.entries(data)) {
  let children = data[key].children.entries();
  data[key].children = {}
  for (const [, name] of children) {
    data[key].children[name] = data[name] || {children: []}
    reservoir.push(name)
  }
}
for (const [, name] of reservoir.entries()) {
  delete data[name]
}
"problem" in js is that there is no aliasing/references, so you always need an object as the reference-point and then the name of the property.
 
@PeeHaa … but it is a tree?
 
oh ugh
Was looking at wrong output :D
 
@hakre even has exactly the same solution, just a bit more idiomatic JS
@PeeHaa also, goto bed;
 
12:13 AM
Yeah I should. Or rather should have a long time ago :)
Oh dayum
 
too late, yeah. nightly.
 
I see what the missing piece was
Thanks both! I can work with this <3
 
:D
 
@hakre but anyway, issues like these are why references are an important structure in PHP, especially with our value-type arrays
But @Levi does not want to hear that :-D
 
hehe, absolutely. how can you have variables w/o aliasing?
it is only half the fun
 
 
1 hour later…
1:20 AM
I should try to work through Eloquent JS again. I got stuck the first time doing it like halfway through the book.
"People think that computer science is the art of geniuses but the actual reality is the opposite, just many people doing things that build on each other, like a wall of mini stones." -- Donald Knuth
 
2:16 AM
@bwoebi Can these two lines ever be reached? heap.space/xref/php-src/Zend/zend_API.c?r=8082b4c9#1133-1134
I put an abort above the two lines and all the tests still passed, lol
 
 
3 hours later…
5:06 AM
@Crell what's plan re partial application ?
 
 
4 hours later…
9:05 AM
@cmb lol, I always love a good public function setFoo(Foo $foo): Foo as well
 
9:26 AM
I just committed a semi colon to three branches ... before that I omitted a semicolon from three branches and broke the build ... in three branches ...
3
 
9:48 AM
Morning all
 
morning :-)
 
@Crell I posted an update
 
10:31 AM
Morning-ish
 
SOAP HTTP socket not closing on object destruction ・ SOAP related ・ #81029
 
10:55 AM
S..O.. A.. P.. ? I thought that died a long time ago.
 
I wish
(Call it what it's not... it's not Simple)
 
OAP doesn't have the same ring to it
Sad Object Access Protocol
 
Well, I dunno... Old Age Pensioner seems fair :-P
 
most of the time you only receive raw XML strings, so maybe AP is sufficient?
 
I've wasted far to much time with WDSL files, and looking at the envelope structure to care... please, can it go :-)
 
11:03 AM
I'm fortunate to have avoided SOAP/WSDL, and I hope to continue to be as fortunate.
NITF on the other hand...
 
that's good a very good idea... and NIFT, what have you done with that (the one I've avoided).
 
Dealing with SOAP itself aint that bad IMO. If the server implements it properly :)
 
Does any server though?
 
@CraigFrancis just a standard format used by news agencies
I don't really have any opinions about it
 
@CraigFrancis some do .. most dont :)
 
11:06 AM
@Tiffany I loved how XML started out being something fairly simple, then the complexity just kept on coming with additional standards.
 
not to mention WSSE
 
@CraigFrancis add SAML to the mix
 
@VeeWee I found that even with the proper ASP servers, the system admins would often miss things.
@Tiffany Oh yeah, that's fun :-)
 
All of these are four-letter acronyms
 
Must be a conspiracy :)
 
11:09 AM
huh, good point... but their stuff is important, they had to move on from 3 letters :-P
 
They felt inadequate to HTML for whatever reason
 
nice... the one that took the idea of XML and basically ignored it.
 
😂
Isn't SGML the predecessor?
 
<P>Cus, you know<P>This is fine.
Huh, yeah, you're right... "strongly influenced by SGMLguid, an in-house Standard Generalized Markup Language (SGML)-based documentation format at CERN"
 
As far as I know, HTML 5 never deprecated the functionality of <p> being allowed to be an open tag. It's gross, but it's still "valid"
 
11:14 AM
It is... I also love how tags in normal HTML mode are upper-case, but drop to lower case in XML mode :-)
 
Well, depends if it's generated using something like Frontpage or handwritten. Though I guess some people used caps lock for some reason...
 
(In terms of how the browser works, when building the DOM, it's upper-case).
 
Ahh
 
do this on any page with a <p> tag... document.querySelector('p').nodeName
 
Will have to try when I'm in front of a computer. Enjoying my morning dose of kitty cuddles
 
11:20 AM
aww, lucky
my 11 year old "puppy" has abandoned me today (gone downstairs to lie in the sun)
 
My cats are about that age. It's almost breakfast time, so one of them is being extra needy.
 
when is breakfast time for a kitty? I thought it was always close to food time (I've had a few cats as well, and they never seemed to get enough).
 
awww
lucky
that is a lot of fluff
 
@CraigFrancis I had been overfeeding them by mistake for a few months, so Ricky had been less annoying in the morning.
I had to cut back, and he's protesting
And yes, so much fluff. Lucy's fluff is the softest.
 
11:25 AM
That's my boy doing his party trick
 
Lol
 
do they look after their own fluff, or is it a full-time grooming job?
 
They used to when they were younger, but it seems that it's getting harder for them
It also doesn't help that they're in varied states of overweight that I'm hoping to reduce.
 
It's just extra insulation (or that's what I keep telling myself).
 
@CraigFrancis big backyard to run around in?
If I could only train them to use their giant hamster wheel (cat wheel)... only Lucy seemed tolerant of it moving and almost seemed like I could train to use it.
 
11:30 AM
nope, the smallest patch of grass (about 10m square?)... have to take him out for proper walks (got the Brecon Beacons a few miles away, so go there a bit)
 
Can't help but think of Torchwood from Brecon Beacons... heh
 
I didn't know they made those... but it does also require an active cat (mine weren't exactly up to much)
 
Lovely area though
 
Yep, very much... but you should take a map... I forgot once, came down at the end of a long day, getting day, via an area I later found out was full of "shake holes" (Sink Holes)
*getting dark
sorry, bbl... ~1 hour :-)
 
Up arrow to edit
 
11:33 AM
cool thanks
 
@CraigFrancis yikes
 
12:30 PM
No RFCs in voting, we can't have nice things.
2
 
12:45 PM
does anyone know since when you have to use object cloning instead of just saying $x = $x ? Was working in legacy code today where someone used $x = $y and $y always kept being changed instead of $x
 
Well it's for objects... were you doing it n an object?
 
the code was just $x = $y; and than all other logic
 
I rarely copy objects myself like this, I just prefer to make a new one with values from the old one
 
by value died with php4 ...
 
12:50 PM
sadly
 
I'm not sad
 
@Trowski looks weird to me, like if it should be gracefully handle a bad zpp?!
 
1:07 PM
@Tiffany If you're lamenting the lack of RFC's, you could read mine, is_literal (Dan's not sure on it, wants it to be more compelling, and I've edited it so many times I'm not sure it even makes sense any more).
 
@CraigFrancis no, we usually pin RFCs that are in voting. Jeeves used to do it then something broke that needs fixed, so back to manually pinning.
I think someone pinned "we can't have nice things" in reference to no RFCs in voting one time, so a bit of a throwback :P
 
ahh, ok... so pinning, as in, it would move them under the "In voting phase" heading?
 
I'll have a look soon* ... I still need to finish proofreading @Girgias's RFC which I failed doing "30 minutes later" >.>
 
It's fine :')
I haven't thought about it either
 
I know that feeling... and don't worry, it's only if you had some free time :-)
 
1:19 PM
@CraigFrancis no, SO chat and the wiki are unaffiliated in that regard
Jeeves scrapes the page
 
so, the "/questions/tagged/rfc-votes" page?
 
@Tiffany thanks :-)
 
@NikiC just a random thought regarding new in initializers… but wouldn't it be possible to have a separate internal constructor which has the merged properties from all parents (and in particular child property defaults override parents if a particular property is redefined in a child, if you want to skip a default from a parent) … that internal constructor would then be called implicitly on new (but not on deserialization, reflection instance without ctor, ...)?
so basically bypassing the inheritance problem by merging it flatly within the individual child classes
 
@CraigFrancis Is he... pooping while standing on the fence? That's just impressive.
 
1:29 PM
@StatikStasis lol... it is a good angle... although, in boring reality, he's jumping... the video works better for that bit ;-)
 
@CraigFrancis I think it just parses the 'in voting phase' section of wiki.php.net/rfc
also mornings
 
morning... and I think you're right (or it did), I assumed the wiki page would be the source, but I mis-understood Tiffany, and assumed there was more to the process.
 
:)
 
I have need to send an request to an api. I have an array with multiple nested arrays. I am using `json_encode($colors, JSON_FORCE_OBJECT);`
In only one of the nested array I need the result as
["Red","Green","Blue","Orange","Yellow"]

and the rest should be like this {"0":"Red","1":"Green","2":"Blue","3":"Orange"}
Any clues how I can do this?
Currently all of the result are like: {"0":"Red","1":"Green","2":"Blue","3":"Orange"}
 
$colours = ["Red","Green","Blue","Orange","Yellow"];

$output = json_encode([
"a" => $colours,
"b" => (object) $colours,
]);
By removing JSON_FORCE_OBJECT, PHP returns the output dependent on the input types.
 
1:52 PM
There is no other way around this? I really need to use JSON_FORCE_OBJECT for the rest so it is unique.
 
in what way does it need to be unique? (I'm just wondering if you can make it unique earlier in the process)
 
I am working on an existing code The functions I am working on is used in ton of other places. I guess I have ti refactore it in earlier process thanks
 
@luffy remove the JSON_FORCE_OBJECT ? but I'm guessing you also do want the indexes elsewhere....
 
@luffy Yep, sorry, the cleanup would have to be earlier, hope it goes well.
 
Removing the JSON_FORCE_OBJECT and then doing something like: 3v4l.org/pD4Bp for the bits where you need the encoding as an object - but I'm guessing the real problem here is ever needing JSON_FORCE_OBJECT to begin with.
 
2:02 PM
JSON_FORCE_OBJECT Was need in some places But I wil have to refactor it in earlier process
Thanks
 
@bwoebi Yeah, maybe it's to set them if the format is wrong. Caught me up when I changed from fast zpp to regular zpp. What was really strange is the test passed for me, somehow it must have not actually recompiled the file. ¯\_(ツ)_/¯
It's mostly the second part that bothered me, trying to figure out what went wrong in my workflow.
 
2:18 PM
@Sara trolling everyone again
 
@Sara you've got experience with php-web right? Do you know how to set-up permanent redirections for certain doc pages?
 
@JoeWatkins nice
 
2:37 PM
@NikiC My top-post reply? :D
 
@Sara yeah
 
@Girgias Yes. But I don't recall exactly where the mapping is... sec...
Yeah. Check error.php in the root of the repo
Not sure what you're looking to redirect, but github.com/php/web-php/blob/master/error.php#L257 is a common map to make use of.
@NikiC You may take my karma, but you'll take take me trolls!
 
Let's not give Nikita any more karma. It's already sentient
 
@JoeWatkins It's been more than two weeks and the feedback was either positive or neutral. I'm game to call a vote this week if you and @LeviMorrison are. It seems uncontroversial and popular.
 
Somewhere deep in my email archives is a message from a younger Niki saying my blog posts got him into PHP's internals, so I take full credit for all he's done for the runtime ever since.
@Crell Oh hype.
 
2:48 PM
@Sara "Marketing". :-)
 
PFA: An idea who's time has come.
Pipes: An idea who's time will.... eventually come at this pace. Just a matter of time, really.
 
Also unblocks pipe.
 
Yeah
 
Yeah, once partials are in, I'm re-upping pipe. I don't know if there's anything worth changing in it other than rerolling the patch and improving the examples to use partials.
 
Pipes needs PFA, PFA needed named args and auto-capturing closures, it's all building blocks, bruh
 
2:50 PM
Welcome to my world. :-) (Though PFA doesn't need named args to work, IMO.)
 
@Crell Ideally a pipe into a partial would be optimized, but due to the semantics of partials I'm not sure this is possible. May be grounds to change partials.
I'm busy, but the idea is that 1 |> foo($bar, ?) should compile to foo($bar, 1). In error cases, are they still equivalent?
 
@LeviMorrison That would be nice, but that optimization would be above my head at the moment. :-)
 
It's something I think we may want to be sure of before voting on pipe.
 
The current implementation produces the exact same AST, and then on error messages rebuilds the original. (That seems to be how it's done.)
 
There's probably room for unwrapping the closure, but it'll be delicate with scoping
 
2:56 PM
o/ @Sara
 
morns
 
\o
 
anyone happen to know what the composer release schedule is based on, or when the next release is likely to be?
 
3:28 PM
@Crell seems that way, go for it ...
 
@JoeWatkins Cool. I'll send out a vote warning, and then open later this week.
 
3:57 PM
wordpress ・ JSON related ・ #81030
 
4:09 PM
@Jeeves ಠ_ಠ
Seems like they're reporting a bug on the wrong site
Either wrong site or they need to give more info other than a bloody error message by itself
 
also they spoke Portuguese not Spanish, still there's a good chance they'll understand ... maybe ...
 
cmb
maybe the WP bugtracker is hidden in an even darker place of the Web :)
 
this thread on internals about how to post to internals shows exactly what is wrong with internals, ~25 responses in 24 hours ... but you can ask about your PR and get no responses, ever ...
eager to focus on stuff that just doesn't matter ... what an utter waste of everyone's time ...
 
that's not related to internals
it's the concept of bikeshedding
 
cmb
:(
 
4:23 PM
same thing everywhere
 
maybe, but this is happening in my inbox ... 25 times in the last day ... it's so annoying ...
 
cmb
"but it's within its own thread and not hijacking other ones, so no harm in discussing it" ;)
 
well that's just wrong, I don't want this crap to keep jumping to the top of my screen several times an hour while I'm awake ... it's a waste of my time and effort even though I'm not reading it or participating, it's still going on right in my face ...
 
I'm assuming it's one of those where most the participants have never made any direct contribution ?
 
cmb
Law of triviality is C. Northcote Parkinson's 1957 argument that people within an organization commonly or typically give disproportionate weight to trivial issues. Parkinson provides the example of a fictional committee whose job was to approve the plans for a nuclear power plant spending the majority of its time on discussions about relatively minor but easy-to-grasp issues, such as what materials to use for the staff bike shed, while neglecting the proposed design of the plant itself, which is far more important and a far more difficult and complex task. The law has been applied to software...
 
4:55 PM
Do y'all add client/business name to namespace, like \Client\Model or something like that? I've obviously been mixing both in hope of developing a preference, but the only thing that's been developed is confusion. Please lend me a strong opinion on that topic :)
 
Yes
It's the vendor in our case
`OurCompany\ThePlatform` it prevents collisions
 
You mean like \Me\Client\Model?
 
What is Client?
No vendor is us
 
Client is the person paying me
 
I don't work for clients like that :)
Sorry
:D
I think the question is do you have collisions issues if you drop the client
 
5:00 PM
Np :) I'd still try to understand what you saya tho. Could you show like a dummy first level of src file?
No collision issue really
More of like, a semantic questioning
 
<?php declare(strict_types=1);

namespace OrderDesk\App\Presentation\View;
is in /src/Presentation/View
OrderDesk is us and App is so that we can use our own "external" libraries under OrderDesk\LibraryName
 
Yeah that makes sense, thanks. It might be helping in thinking about my situation. We have a section of the app that is more like our tool that is used by client to manage the site itself, and that section has slight potential for collision :)
 
@Crell PFA rfc in draft
 
@cmb I'm looking at this building problem again.

Have you ever encountered this issue - where *.h files are found in /usr/local/include before they're found in php-src/ext/gd/libgd ?
I traced through the way my packages are installed. Looks like my libavif has registered that its header file is in /usr/local/include, even though it's actually in /usr/local/include/avif
 
> What about visibility? I suppose this works even outside the object scope?
should this be mentioned?
 
5:13 PM
But if /usr/local/include gets put on the path, it takes precedence over the files in the repo, and that's not good...
 
@Crell and @JoeWatkins Oh yeah, we need to check method visibility. IMO it should maintain the visibility at the site it was bound, not called.
 
I would agree. If you bind a partial to a variable, then return the variable, the variable should remain callable.
Shall I add a test for that to see what happens?
(Assuming the branch is still where it was the last time I touched it.)
 
@cmb btw my libjpeg and libpng are both in /usr/local/Cellar, so they wouldn't cause a conflict.
 
@JoeWatkins Any thoughts on Nicolas' comments regarding the stack depth et al? I have no idea myself.
 
5:29 PM
@BenMorss I'm assuming that you're building on macOS and thus, when you build, /usr/local/include is usually the place where ./configure will search for headers, whenever I need to change that I use the --with-libX-dir=[] parameter (not sure if that's the issue though)
 
@Dharman whyyyyyyyyyyyyyyyyyyyyyy
 
@FlávioHeleno You're right; I am building on MacOS. Not being hugely familiar with autoconf/libtool, I was looking at config.m4, where PKG_CHECK_MODULES() is used to find directories
 
@Dharman it's not that much harder to force Gmail to bottom-post, it does take a bit getting used to, but it's not that difficult
 
@BenMorss I'm happy to help you with it if you need. I had my fair slice of challenges with it
 
that would be spectacular
 
5:32 PM
@BenMorss would you mind elaborating in a few words what are you trying to do?
 
@Dharman and hopefully you've read idallen.com/topposting.html... not everyone uses gmail... keep that in mind (Joe, Derick, Crell, off the top of my head)
 
@FlávioHeleno, I'm trying to add support for AVIF to the bundled libgd
Which means it needs to link in libavif, if the right flag is used
I've added this to config.m4:
 
@Crell Yes, please.
 
On my system, the libavif header file lives in /usr/local/include/avif
Looks like the package is configured to say the header file's in /usr/local/include
I think that's why this path ends up getting added to the libtool command
 
@BenMorss how did you install libavif?
 
5:35 PM
I did it a while ago, so I'm not sure. I might have done it in some hacky way
 
let me see if I can reproduce the install here, just a minute
 
I notice that my other graphics libraries are installed in /usr/local/Cellar
 
Dear god I hate array-oriented code.
 
@BenMorss /usr/local/Cellar is used by brew afaik
 
This is true
And I know I built libavif from source
The problem I'm concerned about is that PHP's bundled libgd relies on a local gd.h
 
5:37 PM
@BenMorss this is an important detail :-)
 
A filename that also is used, of course, by libgd
So this conflict could pop up again
 
@Crell
<?php
class Foo {
    private $bar = 42;

    public function method() {
        return function() {
            return $this->bar;
        };
    }

    public function trace() {
        throw new Exception();
    }
}

$foo = new Foo();
$bar =
    $foo->method(?);

var_dump(($bar())());

try {
    var_dump($foo->trace());
} catch (Throwable $e) {
    printf("%s\n\n", (string) $e);
}

$trace = $foo->trace(?);

try {
    var_dump($trace());
} catch (Throwable $e) {
    printf("%s\n\n", (string) $e);
 
@Tiffany Why what?
 
int(42)
Exception in /opt/src/php-src/bind.php:12
Stack trace:
#0 /opt/src/php-src/bind.php(23): Foo->trace()
#1 {main}

Exception in /opt/src/php-src/bind.php:12
Stack trace:
#0 /opt/src/php-src/bind.php(31): Foo->trace()
#1 /opt/src/php-src/bind.php(31): Partial->__invoke()
#2 {main}

Exception in /opt/src/php-src/bind.php:12
Stack trace:
#0 /opt/src/php-src/bind.php(39): Foo->trace()
#1 /opt/src/php-src/bind.php(39): Partial->__invoke()
#2 {main}
 
If I'm reading that correctly, the answer is "yes, it adds a stack level, just like if you'd used fn()"?
 
5:39 PM
@BenMorss let me do some testing here and see if I can reproduce your issue..on which branch are you working on that?
 
@Crell it adds one frame, no matter how many times you apply ...
 
Oh, I see.
 
@FlávioHeleno thank you! The branch is called... not very creatively... avif
 
@BenMorss no worries, I'll take a shot at it..let's see how far it goes.. :)
 
I feel like it would be nice if the local dir took precedence over /usr/local/lib. I don't know what usually happens multiple header files with the same name are found.
 
5:41 PM
@Tiffany I don't know if it's possible to set GMail to hide the quoted content. The point is I don't want to read it again. It was already as part of the previous message. Unless part of it is relevant to your reply then why should I see the whole previous message with date, email address, signature, etc. before I see your reply.
As I showed on the screenshot, the first one is clean and clear. The second one is a mess and with long messages it wastes screen space on mobile devices as you have to scroll down to see the reply
 
They currently do, since they work by creating a Closure-esque object called Partial with an __invoke() method. However, if you partial the same thing multiple times then only one stack level gets added. That is:

function test($a, $b, $c, $d) { throw new Exception(); }

$first = test(?, ?, ?, ?);
$second = $first(1, ?);
$third = $second(2, ?);
$fourth = $third(3, ?);
$result = $fourth(4);

The stack at the end will contain only one partial "level", not 4.


-----

@JoeWatkins Accurate response for the list then?
 
yes
 
@BenMorss besides libavif, what other libraries are you enabling during compile time? (ie. which flags are you using to build gd with?)
 
@FlávioHeleno ./configure --enable-debug --enable-gd --with-avif --without-iconv --disable-opcache-jit
(I had some odd problems with iconv and opcache-jit, so I just disabled them)
 
Okay people are posting with emoticons in their names on the ML. I'm ready for us to burn it to the ground now.
 
5:52 PM
@BenMorss look at this:
checking for GD support... yes
checking for external libgd... no
checking for libavif... yes
checking for libwebp... no
checking for libjpeg... no
checking for libXpm... no
checking for FreeType 2... no
checking whether to enable JIS-mapped Japanese font support in GD... no
checking for fabsf... yes
checking for floorf... yes
checking for zlib... yes
checking for libpng... yes
checking for libavif... yes
 
is it happening... twice?
 
well, it checks twice, but it finds the library
it ends up failing at a different place:
/Users/flavio/Documents/open-source/php-src/ext/gd/gd.c:571:48: error: implicit declaration of function 'gdPngGetVersionString' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
php_info_print_table_row(2, "libPNG Version", gdPngGetVersionString());
^
/Users/flavio/Documents/open-source/php-src/ext/gd/gd.c:571:48: note: did you mean 'gdVersionString'?
/usr/local/include/gd.h:1687:27: note: 'gdVersionString' declared here
BGD_DECLARE(const char *) gdVersionString(void);
 
Is there a more compact and less ugly way to check "this array key is set, and it's an array, else default to an empty array."

is_array($itemConf['saveAndClose'] ?? []) ? $itemConf['saveAndClose'] : [];
Just checking ?? only checks existence, not array-ness.
 
you should have been able to write test(?) not test(?, ?, ?, ?)
just fixed that now
that's why delayed response
 
:-)
And it's the ability to do things like that which makes the separate Partial class instead of reusing Closure necessary, right?
 
5:56 PM
you could add a test for that ... I thought we had one covering that, a bunch of people had asked about (?) meaning "all args" ...
 
I'll do some tests this afternoon. Right now I'm updating a huge patch to handle type failures in the arraycode that is TYPO3. :-)
(See above inquiry.)
 
@FlávioHeleno Exactly the spot where I had a failure. The problem, for me, is that the system is linking /usr/local/include/gd.h, not php-src/ext/gd/libgd/gd.h
 
same here:
/usr/local/include/gd.h:1687:27: note: 'gdVersionString' declared here
BGD_DECLARE(const char *) gdVersionString(void);
let me see what I can do..
 
So I feel like the build process needs to ensure that the right gd.h gets found
And this is where my paltry experience with libtool reaches its limit :)
 
@BenMorss I'm not a specialist either, but I like fiddling with challenges :D
 
5:59 PM
Thanks so much!
 
from gd.c@60 it actually has to load gd.h from /usr/local/include, I wonder if there is another place including the bundled one as well
 
@Crell too much context missing to summon an answer ... I don't like what I'm seeing though ...
 
@JoeWatkins TYPO3 is riddled with code that does foreaach($foo['bar']['baz'] as ..) or if (is_array($foo['bar']['baz'])) ..., which fails a lot in PHP 8 due to notices now being warnings. I'm trying to make that at least not break, so that we can change it to something not-terrible later. Just trying to figure out the most compact syntax for "this value exists and is an array, use it, else use empty array." Or similar cases.
 
is_array($itemConf['saveAndClose'] ?? [])
that will always be true
 
(Yes, it's disgusting. I just got here; I haven't had a chance to fix it yet. :-) )
Not if $itemConf['saveAndClose'] == 3.14159
 
6:03 PM
ah right, I see ... well what are you doing, fixing the array or using it ?
 
Just trying to make the code type safe under PHP 8. Nothing more.
 
the word Just does not belong
 
/shrug
As in, changing the code structure to not have the potential for this problem in the first place is a future task.
 
that's probably where I'd be going, if the code assumes the array is a certain shape, then make it so, don't work around the wrong shape in code using the array ...
but I get it, whatever gets you there, eventually ... that seems like it would be faster to achieve to me, and you throw away some debt in the process ...
 
Right. I was hoping there was some syntactic trick that made it more compact, as some of the vars being used are, deeply nested.
I've only been here a week. :-) Not enough karma to change the architecture yet. And when I do, it will be to make objects out of everything instead which solves all of these problems.
 
6:07 PM
@FlávioHeleno I actually don't know if /usr/local/include is on my include path, but of course one might hope it is.
but that is an interesting point...
 
@BenMorss I'll add some prints to the config.m4 and compare with and without avif, it may give us a hint
 
@Crell so how you enjoying it ? good fit so far ?
 
Everyone is very nice so far. The code base is not. :-) Right now I'm mainly building karma by doing janitorial work (PHP 8 compat) so that I can rewrite everything later.
But the "sit at home and work on PHP code at your own pace all day" is a nice change from the last role.
 
@Crell code you can change though, right ;)
 
Exactly. :-)
 
6:16 PM
what was your previous role @Crell? if you don't mind me asking..
 
Good people + Bad code > Bad people + Good code.
 
people are much harder to program than machines ... yeah
 
@FlávioHeleno Developer Relations for a hosting company.
 
oh, that's right, I remember seeing it on twitter I think
 
Oh my god, this code "works" by casting an object to an array as a matter of course.
 
6:23 PM
@BenMorss I've compared both config.log files from --with-avif and without it and although the build goes fine without it, when we have enabled avif it adds '-I/usr/local/include' to the flags and that causes it to look for the wrong gd. I've checked and the local copy of the file takes precedence but for some reason it's not working as expected..I'll do a little bit more digging here
 
So the local copy does take precedence? (As one would hope?)
(thanks again for looking at this!)
 
it takes in the variables set by the config.m4 (GD_CFLAGS="-I$ext_srcdir/libgd $GD_CFLAGS") but although is set like that it does not work as we are expecting it to
when you look at the LDFLAGS: PHP_LDFLAGS=' -L/usr/local/Cellar/libpng/1.6.37/lib -L/usr/local/lib'
by moving /usr/local/include/gd.h to /usr/local/include/_gd.h I got it to pass that point @BenMorss :) so it is def the issue with the include path
need to figure out how to fix that
 
I feel naively like our gd.h should have a different name
 
@BenMorss could be that
 
But it's probably been this way for many years
 
6:32 PM
what's going on here with gd and whatever ?
show me a config.m4/source code with config.m4
 
@JoeWatkins Here's what I've done in my branch: github.com/morsssss/php-src/blob/avif/ext/gd/config.m4#L83
 
@JoeWatkins @BenMorss is adding support for avif in gd, when built from source, libavif gets installed in /usr/local/include
 
Then, if you happen to have libgd installed, libgd's gd.h takes precedence over PHP's gd.h
 
by including it, the build system no longer uses the bundled gd.h but instead relies on /usr/local/include version of it
 
you see, we agree :)
 
6:35 PM
yeah ;)
 
It's possible that libavif wouldn't normally get stuck in /usr/local/include... but if it ever could, I feel like this conflict shouldn't happen
actually just confirmed with someone who works on libavif that that's a common location. That is, more specifically, /usr/local/include/avif
 
6:49 PM
thanks for looking at this... I'll be back in a bit!
 
/opt/src/php-src/ext/gd/libgd/gd_avif.c: In function ‘gdImageAvifPtrEx’:
/opt/src/php-src/ext/gd/libgd/gd_avif.c:593:6: error: void value not ignored as it ought to be
  593 |  if (gdImageAvifCtx(im, out, quality, speed))
      |      ^~~~~~~~~~~~~~
make: *** [Makefile:796: ext/gd/libgd/gd_avif.lo] Error 1
make: *** Waiting for unfinished jobs....
you can get a build going, just configure libavif in a non standard location while you're working, I'm sure @cmb knows the autotools spell that will be needed ...
@FlávioHeleno -DCMAKE_INSTALL_PREFIX=/prefix
I use /opt
PKG_CONFIG_PATH=/opt/lib/pkgconfig ./config.nice --enable-gd --with-avif=/opt
 
I got to that point by removing my local libgd, but was trying to find out the autotools spell :) hopefully @cmb will know it and help us out
thanks for your help too Joe
 
7:19 PM
People really want to talk about bottom-posting, I guess?
 
...yeah, I've been deleting emails the entire day so I can actually keep track of the rest of the topics.
 
@LeviMorrison What's the text equivalent of liking the sound of your own voice.
 
Thanks, @JoeWatkins. Yeah, I was figuring I'd just move libavif somewhere else and keep developing. I haven't been able to build enough to find the no-doubt-obvious errors you're now fortunate enough to be discovering :)
 
@Ekin this is fucking stupid, someone should shout at these people, very loudly ...
I get why vets are saying "no", and mostly leaving it at that, they don't want these newbies to ruin everything, but this is just getting ridiculous, they need to stop, we're not changing it ...
someone, using diplomacy and tact (which I have none of), shut down the conversation, please
 
I tried.
 
7:33 PM
@Ekin That is futile to attempt... I have 848 unread in my inbox and my deleted folder shows over 61k unread.
I need to just do Ctrl+A delete one day and start fresh
 
> php-src generally doesn't suffix interfaces with the name "Interface"
 
@MarkR Narcitextic
 
^ This is correct, right? There isn't a large corpus of interfaces with the suffix that I'm not aware of?
 
I don't think anything in php-src uses *Interface, does it?
 
DateTimeInterface would like to have a word
 
7:36 PM
@JoeWatkins Thoughts on Nicolas's idea of Partial::createFromCallable()? I don't really see how you'd use it.
@NikiC There's always one...
 
And a grep reveals SessionHandlerInterface, SessionIdInterface and SessionUpdateTimestampHandlerInterface (wtf)
As you can tell, this was designed by Yasuo
@Crell Seems pointless
@BenMorss By the way, I fixed that php-cli -a segfault you ran into
 
oh! That's an unexpected bonus
Wow
 
@NikiC I concur.
 
Let me know if I can download a patch
 
However... Hm. @JoeWatkins What happens if you pass a keyed array as a variadic to a function where one of the keys has a ? value?
That would be read as passing the string '?', right?
 
7:42 PM
no strange effect
it's a string, yeah, not the special token "?"
 
@BenMorss Haven't followed the whole conversation (it's long...) but I do understand correctly that pkg-config --cflags libavif returns -I/usr/local/include?
 
@Crell agree with you both, and am suspicious of "some use cases" when one wasn't even provided (and I can't really think of one)
 
Roger.
 
SessionUpdateTimestampHandlerInterface
this is my favorite thing today
 
He forgot AbstractSingletonBeanFactory
 
7:51 PM
@BenMorss That would be github.com/php/php-src/commit/…. Note though that php-cli -a without readline is really not useful: What it does is just let you enter code and then do Ctrl+D. The proper interactive shell requires enabling readline (or libedit)
 
@NikiC yep
 
00:00 - 20:0020:00 - 00:00

« first day (3860 days earlier)      last day (1078 days later) »