« first day (3801 days earlier)      last day (1154 days later) » 

1:45 AM
Undefined behavior when match branch is function returning void ・ Documentation problem ・ #80858
 
 
2 hours later…
4:01 AM
TIL that FFI is marked experimental in the docs: php.net/manual/en/intro.ffi.php
 
 
2 hours later…
5:41 AM
Have a bug that's driving me insane! I cannot get it to replicate on a desktop. It only happens on phones. How to reproduce:
1. visit https://woolchambers.com.au/indexProto.php
2. wait for the page to load fully
3. click on an image

Most of the page should hide, and your chosen image should be shown in higher resolution.

If the higher resolution image has the correct aspect ratio, there is no bug.

If the higher resolution image is very tall and narrow, that's the bug.

What's causing it? And why can't I replicate it on a desktop?
 
6:12 AM
Invalid opcode. ・ opcache ・ #80859
 
 
6 hours later…
11:49 AM
@Trowski Interesting. I wonder if it would be worth thinking about having to opt-in into experimental features. Like a global attribute or a setting in php.ini. Otherwise people might not even realize they're using something that's not considered stable.
 
12:03 PM
Every ((65535*n)-1)th element in glob() and DirectoryIterator() appears twice ・ *Directory/Filesystem functions ・ #80860
 
 
1 hour later…
1:17 PM
@JonathonPhilipChambers "cannot get it to replicate on X ".. sounds like normal CSS. But srsly, you can use remote debugging, f.e. for Android you can use USB connection + Desktop Chrome and use the Web Inspector to check calculated attributes and so on.
Similar for iOS Safari on Mac Safari, might need to enable web inspector in the phone and webdev tools for safari, google helps. Worst case you can install either XCode/iOS Simulator on mac and use that one or AndroidStudio, create an Emulator via AVD manager and debug inside the Emulators Chrome.
 
1:31 PM
@JonathonPhilipChambers mobile phones tend not to like almost a megabyte of html...
 
@IluTov The problem I see with that is then no one uses them and they stay experimental. :) FFI is not targeted at your average PHP developer. With it enabled by default, a library can use it internally and still provide benefit to the average user.
 
@Trowski Which makes the experimental flag useless because people aren't aware their using the experimental feature and their code will still break if we make changes to it...
 
@IluTov It does tell the hypothetical library author that they need to accept the maintenance burden. In generally, PHP people have been quick to update libraries to be compatible with new versions. I don't entirely disagree with you obviously. I'm a library author that just noticed. :)
Who has even used FFI, lol
 
@Trowski Well it depends on what experimental means. Does it mean: 1. Your code could crash randomly 2. The API might change 3. We might suddenly drop the feature if we decide it's too high of a maintenance burden. Cases 1 and 3 will still have an impact on the end user.
 
1:52 PM
Things the library author should weigh, depending on how stable or how much effort they want to put forth to maintain it. I'm not trying to argue there aren't drawbacks, my point is that I'd rather have an experimental feature than one that never gets used due to poor access.
 
2:18 PM
"I will not reply the comments." - at this point I don't think it's so much a language barrier, and more a cultural difference.
 
cmb
One problem of marking stuff as "experimental" is that these warnings are never removed; e.g. php.net/manual/en/function.xmlrpc-decode-request.php is there for maybe 15 years. Still, users don't regard that function as experimental, but using it in production, and complain if there's no PECL package available.
 
@Danack Yup through in a comment, because now Swoole are just looking like clowns
 
2:39 PM
@Danack Well that explains why he didn't post on the list: twitter.com/doubaokun/status/1370745765774163970?s=20
 
2:52 PM
@Girgias yeah, well he's probably quite busy running his company that sells services for swoole - find-and-update.company-information.service.gov.uk/officers/…
 
I imagine, ngl the Swoole people are just looking like clown who don't have any confidence in their product at this point
 
@IluTov I think the details of the problem need to be in the intro. "are by far the worst" doesn't mean much, and will make people think that you just don't like them. Further down "If the term between the two braces is not compatible with option 3" that doesn't mean much.
Also, you should get in touch with the rector guy, and talk to him about writing an upgrade rule for that sort of thing, so you can 'people can run this tool to update their code'.
Also....maybe a later version for deprecation might be appropriate. Assuming that we're going to have an 8.2, deprecating stuff later is better than earlier, as it means that people who never upgrade their code to 8.2 never have to worry about the change.
 
@Danack I suppose so, although deprecating stuff earlier also means you have more time to realize this change is going to happen and changing things before your code breaks.
@Danack Thanks, yeah that's true. I'll see if I can reword these sentences to be more objective.
 
3:09 PM
@IluTov I don't think that actually helps much. There's two scenarios i) someone has a piece of software that is being actively maintained/developed ii) someone has some piece of software that is stable, and doesn't currently have developers working on it.
for i) it doesn't make much difference when the deprecation notice comes in. for ii) it means they either have to find someone to stop these annoying deprecation notices, or abandon that piece of software before 8.1
 
@Trowski ehm. :-P
 
@Girgias meh. They could still think their software is better, but not want to give up the natural advantage they have of equivalents also needing extensions.
 
@bwoebi Err… poorly phrased. I meant that I've used FFI and didn't notice.
 
But yeah, I don't think their objections are to the details of the RFC, just market share ones.
 
Fair, but then don't try to argue that the Fiber RFC is bad when it's just market based.
 
3:15 PM
I'm not surprised they voted no. I expected it. The smear campaign is what I didn't expect.
 
@Trowski Don't worry, I'm going full stupid balistic mode on Reddit, we can be two playing this game. (and I don't mind being the stick hitting the hornest here)
 
@Girgias have fun, if you're having fun, but I'm not sure there's that much 'prize' to be won, as the RFC seems on course to pass, barring last minute shenanigans.
 
@Danack The guy annoyed me, so no prizes to be won is not the main motivation for that :D
 
3:30 PM
user image
2
 
3:50 PM
@IluTov new Foo() is (Foo|int) seems to do the same for me. Either I don't know how to read the output properly or you're running some test command I am not.
 
I'll have to look at the implementation again if none of those examples seem to trigger the problem.
 
@Danack He does have a vote, is that a prize?
He retweeted one of my rebuttals though, so maybe he understands my point-of-view.
 
4:23 PM
@Trowski Classy
 
Is he actually part of the Swoole team, or just a fanboi?
 
@Crell Fanboi AFAIK.
 
@Crell Are you still here? I'll check out the branch and try it now.
 
@IluTov Hi hi!
 
@Crell Hey :) I suppose you don't mind if I rebase onto master?
 
4:38 PM
It's your branch. :-) I did nothing but add 2 lines to the test file to se what would happen.
 
4:49 PM
@Trowski that chap does say some odd shite.
 
@Crell Ok, done.
 
Stand by while I recompile the world...
Have you been able to replicate the issue?
 
@Crell Working on it.
 
Huh. Now I DO manage to replicate it.
Bizarre.
 
@Crell Yeah, me too. Even var_dump(new Foo() is Foo); should be enough to do the job.
> ZEND_DONT_UNLOAD_MODULES=1 USE_ZEND_ALLOC=0 valgrind --track-origins=yes sapi/cli/php Zend/tests/is/003.phpt
> ==161569== Invalid read of size 8
> ==161569== at 0x7A5DC4: ZEND_INSTANCEOF_SPEC_TMPVAR_CONST_HANDLER (zend_vm_execute.h:16062)
 
5:03 PM
I'm using make test TESTS="-m Zend/tests/is/"
 
This will execute ZEND_TYPE_CHECK followed by ZEND_INSTANCEOF which will both attempt to free op1.
@Crell I'm just running php directly to avoid anything interfering.
 
Can you run the phpt directly like that?
 
@Crell Yeah. PHP doesn't care what extension your file has.
 
... When I tried that last night, I got a syntax error.
 
As long as the script section is closed (?>) you should have no issues.
 
5:06 PM
Do we have code coverage available?
 
It was an error at the start of the file. namespace coming too late or something.
/me sighs.
 
@Crell Oh ok yeah might not work for every file.
 
I hate C.
 
@Crell Why? That's a PHP thing.
 
I hate that, too, don't worry. :-)
 
5:07 PM
@Crell THEN WHAT ARE YOU DOING HERE? :P
 
If you don't hate a language, you haven't used it enough.
 
@Girgias .....dude......chill out. there's pushing back against, and pushing back too hard...
 
@Danack When you start saying that people are pressured to vote yes on the proposal IDGAF anymore
 
@Crell I had some time today and drafted an RFC for deprecating some nonsense string interpolation things. wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation Do you mind helping me with wording? I have trouble explaining things in simple ways. E.g. Dan suggested explaining what options 3/4 do in the proposal section, but I have no idea how to do that in one sentence.
 
English I can handle...
 
5:17 PM
@IluTov putting it on github so pr's can be made is always nice...
@Girgias If you've got energy to spare, could I interest you looking at implementingCallable types or function autoloading? Both of them have code for most of what's needed, but they are obviously out of date. Or maybe you could go for a nice walk.
 
I looked at the callable one quickly a couple of weeks ago, did the implementation handle inline callable types already?
 
@Girgias unless I'm mistaken, it supported inline callable types, but not declared ones.
And this is a point that provokes disagreement. Some people value inline ones (and not declared ones) because they want to use them inline. And other people (including myself) value the declared ones (and will never use the inline ones, as too yucky) as I want them to allow libraries to share what types of callables they allow.
 
@Crell Nice, feel free to just edit it directly. Or I can put it on GitHub if you prefer so that @Danack can also propose changes.
 
@IluTov and also not have to think in docuwiki....
 
@IluTov One push back on ${var}, that's the syntax used by a lot of other string interpolation implementations. Javascript template literals, for instance. It may be useful to keep that for compatibility but drop option 4? If that's possible?
I still don't fully grok what 4 is doing from your description. I need to read it again...
 
5:32 PM
@Crell That would be possible. The problem is that 3 is not the same as other string interpolations. Most string interpolations allow arbitrary expressions, option 3 does not. If it were consistent it would require ${a} to be written as ${$a}.
But that will be interpreted as option 4, thus the whole confusion.
@Crell Which is why I suggest removing it :) It does a dynamic variable lookup. So basically $a (option 3) vs $$a (option 4).
"${a}" is the same as (string) $a, "${(a)}" is the same as (string) $$a.
 
${foo} supporting only literal variable $foo and nothing else is what JS does. And bash. That's really the only argument to keep it.
@IluTov Ah, now I begin to follow the problem. Is this a conceptual problem or does it come up in practice? Is there some parser simplification to it?
 
@Crell ES6 allows arbitrary expressions in ${}. developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/…
 
Oh. Well, never mind then.
 
@Crell Basically, I was looking for ways to allow arbitrary expressions in string interpolation, but then I discovered the mess that is PHP.
 
@Trowski You've said in multiple places before why ext-fiber doesn't actually work as a pure extension, right?
@IluTov Beyond what {$...} already does?
Would this significantly simplify the string interpolator? Is that it?
 
5:44 PM
@Crell Yeah. It's really annoying to terminate multi line string to embed an expression that doesn't start with $ (e.g. something like strtoupper($foo)). With heredoc that would even be impossible. You could still do it with temporary local variables. But that still not great. Before suggesting new things and making the situation worse I thought it might not be bad to clean up what we already have.
 
So you want to enable {strtoupper($foo)}, but that would cause too much confusion right now with ${foo}? I'm not sure I follow.
 
@Crell It's mostly small improvements which would rely on core integration, like a bit better backtraces and not needing a custom opcode handler
 
@Crell Potentially, we'd have to think about that in a second step. We have to think about if we want a new string prefix ($"") that enables string interpolation, or if we want to accept some BC break and just add a new kind of string interpolation to current strings. Either way, some of the current options are bogus.
 
@Crell JIT compatibility, some issues with error reporting and handling which an extension can't manipulate, better handling of destroyed fibers (the extension overloads a the catch handler, adding overhead), the ability to allow other extensions to use fibers, integration with profilers and observers.
The other reasons revolve around visibility and availability. Libraries like Symfony are unlikely to use a feature that requires a 3rd-party extension.
 
@IluTov Right, I'm just trying to fully grok why it's bogus so I can sell it as bogus. :-)
 
5:58 PM
@Crell Basically, usually (for other languages) ${} means embed whatever you want. For PHP it's not true. Technically foo in ${foo} would be a constant. It's interpreted as a constant for option 4, but for option 3 for some reason it's interpreted as $foo. The two are just confusing. Option 3 has no real justification for being there since we already have 1 and 2. 4 might be useful in few instances, but the fact that it clashes with 4 makes it super confusing.
 
@Crell Those reasons are either in the RFC or the list :) I'd add to the RFC, but I'm still wary of touching it, even if it is adding information.
 
@Trowski Yeah, I was just responding to someone on Twitter and wanted to fact check first. :-)
 
@Danack Right, so the more logical would be to make declared one as a separate feature? I might look into that as I want to look into intersection types too
 
@Girgias IMO, they would be better as separate features. Easier to digest.
Even if I want both.
 
@Crell Well yes that's what I'm suggesting x)
 
5:59 PM
@Girgias And I am endorsing your plan. :-)
 
But because I need to look into how the type system work anyway x)
 
@Girgias one of the reasons why the earlier RFC didn't pass is that the authors were.......'dismissive' of declared ones, and said they would vote against it if it was brought up separately. And I personally really don't like the inline one.
 
6:20 PM
@Danack what, that's a weird take, I think with union types, and expanding the type system being able to declare a type makes sense as a stand-alone feature
 
@IluTov Edited. Try it now and make sure I didn't screw up anything. :-)
The only question about out of band type aliasing is autoloading. Like, if I declare

type stringish = string|Stringable

In a.php, and use it in b.php, how does that work? What happens? Does it autoload like a class?

Other than that, I don't see an issue with it. But that shouldn't block adding inline callable definition syntax.
@IluTov I presume you've not had a chance to think further about partials? :-(
 
@Crell Huh, that's an interesting question
 
@Girgias Indeed, and I have no answer. :-) But that's one of the reasons I think it's fine to punt on type aliases to later, and move forward with callable types as is.
 
6:41 PM
@Crell that's where the function loader comes in. it would make it easier to autoload other types through expanding the types supported.
 
@Trowski as long as nothing on the propsal itself changes and it's just new info, you can add it at any time
I mean, a RFC is also a good documentation for future what the motivations were and can give information before there is official docs
 
7:15 PM
morns
 
@Crell cool, thanks! I'll have a look later.
@Crell no, i might have a look soon-ish.
 
@IluTov puppy dog eyes
 
8:12 PM
Is the most recent implementation at github.com/amphp/ext-fiber?
 
@LeviMorrison yes
 
I am surprised there isn't a language branch version, since language integration was a motivation for inclusion in core.
 
@LeviMorrison what do you mean? as in native async/await keywords?
 
8:27 PM
I just remember discussion about how having it in the language had benefits aside from always being available.
Something about exceptions... something about opcodes, maybe.
 
3 hours ago, by Trowski
@Crell JIT compatibility, some issues with error reporting and handling which an extension can't manipulate, better handling of destroyed fibers (the extension overloads a the catch handler, adding overhead), the ability to allow other extensions to use fibers, integration with profilers and observers.
 

« first day (3801 days earlier)      last day (1154 days later) »