« first day (3883 days earlier)      last day (1065 days later) » 

1:12 AM
American English -> "a historic," "an herb"
British English -> "an historic," "a herb"
 
"an 'istoric," - depends on whether their accent. "a herb" - because there is a fine "h" in it.
 
Hi. How can I get the equation of a perceptron?

Is this correct?

b = bias
m = average of the weights
 
1:29 AM
I have a simple html page:
<html>
<body>
<?php echo "You should be able to see this." ?>
</body>
</html>
Nothing gets printed out. But PHP is working: telkitty.com/yiz_chook.php it has the same php statement.
What could be the cause?
 
It seems your webserver doesn't use a PHP cgi.
 
Ok, lemme me look into this.
 
if telkitty.com/yiz_chook.php is working, trying copying the html into that file and see if it breaks. If it doesn't break.....then it's possibly related to what filename you gave your html file.
or how you're accessing it.
 
2:22 AM
@TelKitty btw, if you're learning to code because you want to learn to code, that's awsome. If you're looking to make a business, you should look at something like squarespace.com/ragusea or maybe even offer your services as a 'squarespace' developer to other people.
 
2:43 AM
@Danack I would like to think that I am fairly experienced, have done some PHP server side programming before. This is a personal website, so I am surprised to see simple PHP not working in simple HTML.
PHP is working, HTML is working as well, just not PHP inside HTML.
Which is bizarre.
 
<?php echo "You should be able to see this."; ?> what about that?
 
Should print "You should be able to see this." in html body.
It doesn't.
 
errors turned on the server?
or do you have access to a shell on the server?
 
3:17 AM
What is the HTML file extension?
 
3:30 AM
@Tiffany Yes, I have root access.
@KimHallberg .html
 
3:46 AM
@TelKitty Change it to .php instead if you're going to have PHP in it. 👍
 
What difference does it make?
 
Depending on how your server is setup your .html files are most likely not being interpreted by php.
 
You mean, there is some config I need to twig on the server to make it work?
 
Think of it like this, you can have html inside a .php file but not the other way around. Unless your server is configured to do that.
 
4:31 AM
Oh, I am super excited for wiki.php.net/rfc/fibers 😃 will these be available in 8.1?
@X4748-IR Are you trying to build a machine learning library in PHP? 🤔
 
5:04 AM
@ideaguy3d I'm personally guessing yes, they're going to be in 8.1. Considering the API is already merged into master: github.com/php/php-src/blob/master/Zend/zend_fibers.c
 
5:42 AM
o/
 
5:58 AM
\o
 
 
1 hour later…
7:23 AM
Is gmail down?
@ideaguy3d Yes
 
@NikiC works here
 
@Sjon just recovered for me as well
Hm, still seems to be flaky
 
google.com/appsstatus#hl=en&v=status doesn't list any known issues
 
up for me, difficult to tell if slow, my internet is slow
 
 
1 hour later…
PHP.NET Certificate is not trusted. ・ *Web Server problem ・ #81099
 
sup phomies
 
insomnia mostly.
 
oh, I'm sorry to hear that
 
 
1 hour later…
9:52 AM
conifgure file --enable-all with wrong hint ・ Output Control ・ #81100
 
10:34 AM
Does one of you have a good use for fastcgi_finish_request()? I would be tempted to advise to stay away from it. WDYT?
 
It's for people who haven't figured out queueing background tasks...
 
10:48 AM
> I agree, but I'd make it accept a string|int much like JSON.stringify
does, because that way you let people pass in tabs too, or "🚀" if
that's how you want your JSON indented..
 
@PatrickAllaert Can be useful if the user is starting a long running process (e.g. generating a report), so you send a "loading" page to the browser, call fastcgi_finish_request(), then continue to do the work... the browser then keeps reloading the page (meta http-equiv=refresh) until the task is complete.
 
@Danack Yeah, really my point. Avoiding message queuing.
 
meh. Redis is quite nice for simple stuff.
 
@CraigFrancis To me that is a terrible idea to run a long running process in PHP in general. Even more if it's not with CLI.
 
@PatrickAllaert If you're taking some POST data to configure the report, and it's taking more than 100ms... if you're in the 20s range, I agree, but there is a window where it's easier to keep it all within the same script, why not?
 
10:56 AM
I tried to find a justified use for it which isn't about avoiding message queuing but couldn't find one.
 
generating a multi-page PDF is about ~3 seconds, can't have the user waiting that long.
 
yeah, but then your blocking an fpm process for 3 seconds
 
and, I've got loads spare
 
generating pdf, reports,... all this to me should be done consuming a queue
 
makes the project quite a bit more complicated when that's all it needs to do
I agree, that when things get bigger, maybe more users, maybe a more complicated/slower process... but something this simple, why complicate it?
 
10:59 AM
Correct, I'm wondering why a message queue is not kind of always part of the basic elements of a web architecture
 
cmb
@Derick, did you have a look at github.com/derickr/timelib/pull/110? This is supposed to fix a regression in timelib 2021.03.
 
meh, why bother when it's not needed... trying to keep track of multiple processes is unnecessary.
 
@cmb I had not - this is master only, right?
 
Why have a webserver when you have php -S :-p
 
cmb
@Derick yes
 
11:03 AM
@PatrickAllaert A lost of hosting options are already setup and ready to go with that, installing extra stuff is an extra step that's often not there by default :-)
 
@cmb It's sensitive code, and I can't just ack/nack this without significant time investment. I also haven't covered the type2/type3 comparisons yet.
 
cmb
I see, but reporter claims that would be a bad BC break.
 
Yes, but I haven't finished with this yet.
 
@CraigFrancis Hello @CraigFrancis. What would you consider an acceptable time range for this? I understand that this may be useful, but also should be avoided at some point.
 
@JérômeVieilledent If the script is taking more than 20 seconds, that needs more care/attention.
(btw, the ones I'm looking at rarely go above 5 seconds)
 
11:12 AM
I think that an HTTP request should never ever take more than ~300ms.
More than that, you can already perceive something is slow.
 
@CraigFrancis OK Thanks. I'm currently looking to define some acceptable boundaries. e.g. "not more than 30% of the time of the script AND not more than 500ms"
 
@PatrickAllaert Yes, exactly, so use fastcgi_finish_request to show a loading page, because people will get annoyed and start hitting the submit button.
 
RabbitMQ is sooooooo easy to use and I have it everywhere... So already having it (or ActiveMQ) in all infrastructures, I wouldn't bother with it.
 
@JérômeVieilledent Seems reasonable... I don't know why, but I set myself a budget of 100ms to give a response (as network time needs to be considered for the user to experiance 500ms).
 
cmb
@Derick oh, maybe misunderstanding; OP claims this affects PHP master, so would be an issue with timelib 2021.03
 
11:15 AM
yes, which is only in master
 
@CraigFrancis Thanks :)
 
@PatrickAllaert Yeah, maybe, but I've got a todo list that's far too long already, the stuff works well, so why invest in something else that will need setup/maintenance/etc.
 
Because managing messages not being processed well with message queues is so much easier than investigating why php-fpm is not handling new requests?
 
@PatrickAllaert Not a problem I've had... the sites I build don't have many users, and the server is basically idle all day... for your stuff, I'm sure is make sense, just not needed for mine :-)
 
12:06 PM
@Danack Well we all knew it was coming. It was nice knowing you all! o/
:)
 
12:21 PM
@Danack They first came for the moderators
 
12:41 PM
And I said nothing because imo half of them were being arses.
 
cmb
the good thing is "that nothing will change"
 
Morning all
 
Is it me, or is PHPStorm way more enthusiastic about using italic fonts than it used to be?
 
@NikiC After having read the RFC, I like this approach! And thanks for resurrecting this RFC, if anybody, you can make it accepted :9
yeah, I've just read it :)
 
12:54 PM
Heh, good timing
 
1:06 PM
I'm trying to compile PHP today and I don't know what I am doing but I get a lot of JIT compilation erorrs
is it just me?
/mnt/d/projects/php-src/ext/opcache/jit/zend_jit_x86.dasc(1692): error C2065: 'executor_globals': undeclared identifier
/mnt/d/projects/php-src/ext/opcache/jit/zend_jit_x86.dasc(1692): error C2224: left of '.vm_interrupt' must have struct/union type
/mnt/d/projects/php-src/ext/opcache/jit/zend_jit_x86.dasc(1693): error C2065: 'executor_globals': undeclared identifier
/mnt/d/projects/php-src/ext/opcache/jit/zend_jit_x86.dasc(1693): error C2224: left of '.vm_interrupt' must have struct/union type
 
@Dharman Looks like some kind of ZTS NTS mismatch
 
@NikiC preventing surprising stuff like this could be done with final? (in a separate rfc probably) Or people who write could like that could just be pointed and laughed at...
 
@NikiC modulo the usual rebinding and reflection workarounds - does that mean that reflection is allowed to overwrite readonly properties, or just regarding scoping? I think the RFC should clarify that (and I think it should allow for overwrite).
 
@NikiC NVM, I dropped the last 2 commit from dmitry and now it works
 
@bwoebi scoping, no overwrite
Will clarify
 
1:19 PM
@NikiC what's the reason to disallow overwriting here? As far as I know, other languages reflection typically allows that
At least for Java and C# this is true, I don't know about other languages
(I mean, after all, it's the all-powerful reflection…)
 
what's a legitimate reason to allow it, the property being readonly provides the guarantee that after the first succesful read, the value cannot change (you don't have to read it again), wouldn't changing it be pointless then ?
 
@JoeWatkins to me reflection means that I'm aware of the inner workings of a class and accepting any BC breaks by minor versions … sometimes I need it in C# to just make a library class do what I want because for some reason it doesn't.
And if I know exactly what I am doing, and know that changing the presumed immutable value gives me the result I want, I will do that.
But obviously only if I really do not have any other way. At least I prefer a minimally invasive change via reflection over just outright copying the code
 
I just have a hard time imagining the code that would see the change, presumably you're not passing around typed properties by reference - some some class gets a read only property in it's constructor, and then would never see the change, right ?
probably a failure of my imagination
 
@JoeWatkins sometimes not everything is designed as cleanly as it should and a ctor has a side-effect pulling a value into a readonly property
 
I agree, reflection ought to be all powerful, generally ... I was just trying to imagine what is going to use that power ...
 
1:30 PM
like it's reading something from a config which I cannot trivially change, but I need it for this specific instance.
 
@JoeWatkins in a array like class, "count" is read only, but if you add element, it may change, no ?
 
yeah that's true, also the rfc allows for mutability in the private scope, which I missed as a detail ...
 
(but perhaps I miss context about your enswer)
 
@JoeWatkins (but only once)
 
oh where does it say once ?
> However, readonly properties do not preclude interior mutability. Objects (or resources) stored in readonly properties may still be modified internally:
 
1:33 PM
> A readonly property can only be initialized once, and only from the scope where it has been declared. Any other assignment or modification of the property will result in an Error exception.
@JoeWatkins this is just about $obj->thereadonlyprop->interiorProp
 
oh I see I see
hmm
 
@RemiCollet as you're here - I'm slipping in a BC break to Imagick which probably will affect no-one, but might, so also adding a hack to disable it. If no-one complains I'll remove that bit.
Also, how goes the migration of linux distros to ImageMagick 7 ?
 
Don't think it's a good idea to hardcode a github URL on an exception:

Currently installed version <version number here> of imagick does not allows the creation of 0 size dimension images
 
true - will update to phpimagick.com
and setup redirect.
 
Agree with @ln-s I'd just start with "don't do this" and let the link to github live in docs
 
1:42 PM
Would be nice to tell the guy the imagick version
so he can figure it out
@Sara o/ What's up, how's life
 
@Danack IMHO, if you release a 3.4.x update, this should better be "off" by default (perhaps a notice in this case), and switch to "on" in a 4.x version
/me always prefer 2 steps, 1 informational one before 1 with the change
 
I prefer fatal errors instead of notices
but that's me
makes the language more solid
 
@ln-s switching from "nothing" to "exception" seems a bit hard to me.
 
I think that the general concensus is to move to a bit more of a strict approach regarding types, errors, etc but I could be wrong, in my personal case as a PHP end user, having more errors and turning on strict types to 1 has greatly improved my code
 
@DanackI don't know about other distro, but RHEL-8 (and up) don't have ImageMagick anymore, and Fedora still have v6, but this paclahe is now orphaned, unmaintained, and looks like nobody serious will want to take care of it (one of the worst project I know)
@Danack I was expecting some 3.4.x version, with PHP 8 support and no BC break, and later some 4.x, dropping support for IM6, and with some BC break if needed
 
1:54 PM
Oh. Is there anything replacing it, or is it supported through non-RHEL repos?
Yeah, still support IM6 for now.
 
If it's good for anything, I actively use imagick
 
was going to drop support for php < 7 and IM < 7 at the same time.
 
@MarkR NeEd NeW mUsIc...
 
it is in EPEL repo (fedora effort), but same think, no owner, nobody really care about it
@Danack I'm thinking about providing 2 set of packages in my repo, php-pecl-imagick-im6 and php-pecl-imagick-im7 (or some other name)
 
@ln-s running clean of all notices is a good aim for new code; when you have a few hundred thousand lines of code, written over a period of 20 years, it's somewhat less realistic
 
1:56 PM
@IMSoP But this BC is for 8 right ?
and 8 is a major release
 
Hmm. And I just got some sponsoring.... but there's a worrying (and inevitable given how unpleasant they are to support) number of things that don't have sponsoring.
 
@ln-s I was just responding to the general "errors are kool" sentiment
 
Always talking about major release 8 here sorry if I wasnt clear enough
 
major release or not, it's better to have a chance to see where things are about to break and chip away at them, rather than "you can't upgrade until you fix every one of these things"
 
Hi everyone! I'm looking for a proper way to escape shell cmd that I'm passing as argument to another shell cmd (ssh).
 
1:59 PM
@Kirzilla php.net/escapeshellcmd ?
 
@Danack for my repo, I'd like to be able to give user choice, but I also have to deal with "vips" which also pulls ImageMagick, so waiting for 8.11 with loadable coder, to be able to ensure stack consistency (vips + imagick + im6 OR vips + imagick + im7 BUT no mix)
 
Even tho you shouldn't be doing anything shell plus the core code for that function is a bit funny :D
 
"waiting for 8.11" vips 8.11? (I've not looked at it at all)
 
@ln-s Exhausted, but good.
Oh fsck, it's thursdya
 
@Sara Ditto
well more or less :)
 
2:01 PM
@ln-s Yep, I know about escapeshellcmd/escapeshellarg. But I can't make it work. Gimme 1min. and I'll show you with code example.
 
Fine. I'll write the announcement after I finish this pot of tea
 
I failed to link to the list unmaintained GNU packages above.
probably they aren't going to break, but still.
 
@Kirzilla php.net/manual/en/function.escapeshellarg.php for arguments if you are using them
 
How large is @Sara pot ot tea...?
 
2:05 PM
```<?php

//command that I want to run on remote server
$remoteCmd = "cd /tmp && echo 'Hello world' > ./hello";
$localCmd = ['/usr/bin/ssh', '-o ConnectTimeout=10', 'user@host', $remoteCmd];

echo implode(' ', array_map('escapeshellarg', $localCmd));
// '/usr/bin/ssh' '-o ConnectTimeout=10' 'user@host' 'cd /tmp && echo '\''Hello world'\'' > ./hello'```
 
/usr/bin/ssh doesn't looks like an argument to me
 
nor is '-o ConnectTimeout=10' - it needs to be passed as two words
 
You know php has an ssh library right
 
$localCmd = ['-o', 'ConnectTimeout=10', 'user@host', $remoteCmd];
echo  '/usr/bin/ssh ' . implode(' ', array_map('escapeshellarg', $localCmd));
 
Yeah, thanks. So output will be /usr/bin/ssh '-o' 'ConnectTimeout=10' 'user@host' 'cd /tmp && echo '\''Hello world'\'' > ./hello'
 
2:11 PM
yeah; and although the quotes around '-o' look odd, they'll be interpreted by the shell, and the actual ssh command won't see the difference
 
@ln-s Yeah, but I'm modifying already existing code that is using proc_open
The main question is command string passed to ssh. esacapeshellarg is using single quotes to wrap the argument value. But argument's content already have single quote.
It is impossible to escape single quote inside single quotes, so escapeshellarg replaces inner ' with '\'' (close quote, add escaped quote, open quote).
 
ultimately, it's the shell that will be interpreting the quotes; the invoked command gets given an array of strings (which is why '-o' needs to be separate)
 
Would be also dependent on which shell is being used as the default shell at the SSH server
Maybe it's zsh, fish, csh
 
Also, the ssh extension is unmaintained. Whoever wrote it should be flogged, publicly.
 
I don't believe escapeshellcmd covers all those nor does escapeshellarg
@Sara hahaha
 
2:16 PM
@ln-s not at the SSH server, only the server where PHP runs the command
the SSH server will see the unescaped version
 
@Sara got it :) But no, we're "glued" to bash/sh.
 
said quirks should perhaps be added to the docs
 
you can actually see this in action with PHP on the command line: run php -r 'var_dump($argv);' -- foo 'bar' 'baz'\''baz'
 
@Kirzilla Set it on fire and get out of there
 
PCRE2 10.37 shows unexpected result ・ PCRE related ・ #81101
 
2:22 PM
the shell processes all the crazy quotes and escapes, and PHP just gets the 7 characters "baz'baz"
 
@Sara rose tea? (I think)
 
@Tiffany Yep. Assam with rose petals is my morning jam.
 
@bwoebi Would need a reflection-specific bypass. It's not like visibility where it's just a matter of scope rebinding.
 
@NikiC Yeah, I expected that technical reason, but from an API perspective this shouldn't be the case.
 
@bwoebi From an API perspective, I don't really see the need to go out of our way to allow that
Much like we don't allow reflection to bypass final modifiers
Where there would actually be quite a lot of reason
 
2:34 PM
@NikiC yeah, but bypassing final is only useful in context of inheritance, so it'd require something like [ReflectionBypassFinal] attribute on classes
it's not really a reflection thing … as long as we don't allow dynamic class creation via reflection
Am I missing something or is your comparison just apples and oranges?
 
@bwoebi My point there was just that reflection is not all-powerful in PHP :)
There are lots and lots of things it could do, but doesn't. Like replacing a method
Scope-rebinding is pretty much the only "bypass" that reflection supports
Everything else is ... well ... reflection (as in, reading metadata)
And even scope rebinding is not reflection-specific functionality
 
@NikiC (it was before closures though)
Don't know, in c# it's possible with some unsafe code to just substitute the CIL instructions of methods or replace it outright … basically doing nearly everything … I wished PHP wasn't that restrictive. It's too easy in python or JS :-D But TBH rather annoying that PHP is so restrictive without extensions like uopz
 
oh I forgot about that ... you know what, I changed my mind, reflection should not be all powerful in the same way as uopz ... I dunno what I was thinking ... it's reasonable to want this sort of functionality, but it does not need to be available to every wordpress plugin in the world, it should be in the hands of a few people ...
 
@JoeWatkins yeah maybe … I'd never need it in production library code
just tests and application code
 
yeah
 
cmb
3:01 PM
@BenMorss, send empty mail to internals-subscribe@lists.php.net to subscribe
 
Allowing it to change would nerf the prospect of using it for optimizations down the line?
 
Morning
 
Morning
 
3:18 PM
@Derick phpinternals.news/87 seems to point to the home page?
 
@cmb thanks! I wondered if I'd find more info on this forum :)
Oh, and now I know what you meant by "r11"
 
@Girgias How odd
@Girgias it's out tomorrow
I made a typo in my twitter list of buffered tweets
 
Aren't they usually released on Thursdays tho?
 
did you read my other replies? ;-)
 
I can't see the typo .-.
 
3:26 PM
I typoed 03 instead of 04
for the date, to publish
 
I mean yes, but that goes back to, "Aren't the episodes released on Thursday"? Because all the other ones were IIRC
 
Yes, it is out tomorrow.
the tweet was send a day early
 
But we are Thursday
 
oh, yes
it's not friday
then I typoed the released date for the post with 04 instead of today's 03 ;-)
 
Okay, now everything makes sense :D
Seems the Monday bank holiday is confusing us :p
 
3:29 PM
I set this up last week, but "sure".
Fixed now. Thanks!
 
 
1 hour later…
4:50 PM
json integer is converted to string ・ *General Issues ・ #81102
 
That ^ is not PHP my dude
 
> General Issues
 
cmb
wishfull thinking sometimes helps
 
@PeeHaa o/
 
5:05 PM
Hey buddy! o/
 
5:17 PM
@JoeWatkins Is this simple enough to just merge myself? github.com/php/php-src/pull/7094 I'm not really clear on where that line is.
 
@Jeeves ಠ_ಠ
Also lol @cmb
 
5:34 PM
@NikiC I would not expect this to work. 3v4l.org/pZiO3 Even though it's semantically ok, from a user perspective I would like to trust that the value doesn't ever change. Currently this only holds for final properties/classes.
 
@FlorianMargaine hah that is very funny :)
 
6:19 PM
@NikiC These two tests now fail with libmysqlclient github.com/php/php-src/commit/… What shall we do?
 
6:53 PM
 
morns
 
@Trowski is all of that magic macro stuff really necessary ?
 
@JoeWatkins Nah, I can just define the enum as normal. Otherwise seem fine?
 
yeah
the line is hard to see, and I've just tried to define it for you about 10 times and failed ...
when it's strictly a bug fix, you are best qualified to know if the bug has been fixed or not ... if I open a PR for fibers I expect your approval before I merge it ... if you are fixing a bug there's no particular reason to seek anyone elses approval, except as a matter of courtesy, myself or nikita are not going to keep you waiting for days, so it seems smart to reach out to one of us ... what you don't need is the approval of swoole or any representatives thereof ... when it's a bug fix ...
when it's not so strictly a bug fix, I think a bit of collaboration is required at the moment, we do want the swoole guy involved in the conversation, but that's not to say he has the final word, we do, collectively, empowered by the vote already taken place that accepted fibers the way they were implemented ... to be clear, I am not happy for fibers in zend to grow as complicated as they are in swoole, for example, I don't like this magic memcpy switching context thing
I would rather the code were clear and leave micro-optimizations up to the compiler ...
 
cmb
7:14 PM
 
@JoeWatkins maybe a compiler may recognize all fields copied being continuous and do a memcpy like thing himself, but at least the order in the EG() would need to be continuous for that, because the compiler is not allowed at reordering these
 
So that basecamp stuff was even more stupid than I thought: platformer.news/p/-how-basecamp-blew-up
 
that's a reasonable change, and now is a good time ... that was just an example, if someone can prove it's not a micro-optimization, you could change my mind about that ...
but I have this feeling we are going to keep getting pull requests until we have something totally different to thing we initially merged ...
 
@Trowski I think it just depends on what you consider truly simple … not everyone has the same standards for simple … so if it's truly simple, merge it, if it's no external behaviour change
 
@JoeWatkins Sorry, guess I'm a bit thick :P
 
7:20 PM
@JoeWatkins is this strictly a problem? It depends very much on how fragile and ugly the changes are going to be
 
@JoeWatkins I'm concerned it's a micro-optimization that makes the code non-obvious.
The changes got rather ugly. There were a couple of good ideas and bug fixes baked in there, but a lot of it is opinionated changes or simply a different implementation for the sake of being different.
 
@cmb I think I found an incomplete bug fix made by you. I wonder how should I fix it. Can you advice?
Instead of
if (zend_hash_index_add(row_ht, i, data) != NULL) {
Z_TRY_ADDREF_P(data);
}
It should have been
Z_TRY_ADDREF_P(data);
zend_hash_index_update(row_ht, i, data);
 
@Trowski this is what I see happening also ^ bob
we asked for iterative changes, and we're not getting that, and we've asked more than once for that ... when Aaron tries to argue the case, we just get things like "this is what swoole does" ...
 
As you've said, we're free to ignore that.
I can cherry pick out the useful parts.
 
@Trowski I agree on not doing the memcpy() but I would do the re-order in EG()
 
7:24 PM
@bwoebi Yeah, that's totally fine.
 
cmb
@Dharman given that this was long ago, I suggest you file a new ticket regarding the wrong behavior
 
@Trowski can you eli5 what are obvious consequences of having main be a fiber ?
 
Surprisingly little response to the latest PFA. Should we take that as endorsement?
 
I think this is one of the things that will keep being pushed for, afaict, this maybe important if you're writing your own framework with it's own scheduler, like swoole, but the immediate benefits and consequences of doing that for everything are not clear to me ... and they're not really being discussed ... and it sounds like the kind of thing that might have consequences ...
@Crell or exhaustion :)
 
@JoeWatkins It's mostly about treating fibers as a stack, where you can only resume a fiber or suspend to the prior fiber. Main isn't abstracted as a fiber in that model because you can only ever suspend to main, you won't resume it.
This is the asymmetric model that the boost.coroutine2 library uses, swoole uses, and the userspace API is modeling.
Symmetric fibers jump from one fiber to another. Main is modeled as a fiber because it needs to be a valid destination.
 
7:32 PM
@JoeWatkins I'll accept exhausted endorsement.
 
@IluTov So you're saying that "readonly" should be invariant during inheritance?
 
Asymmetric fibers can be used like symmetric fibers, but with more context switches, but are generally easier to reason about.
 
@Dharman We only test libmysqlclient against PDO. Do tests fail there?
 
No, PDO is fine
 
mysqli_both overwrites numerical indexes ・ MySQLi related ・ #81103
 
7:36 PM
@Dharman So you're trying to make mysqli tests pass with libmysqlclient as well?
 
It's impossible to make them pass as mysqli can't work properly with libmysql, but I am trying to get the test cases I have messed up recently to not fail with libmysql at least
 
right, am I right to assume that main only needs to be a fiber if you're running an event loop (or some scheduling mechanism) in that fiber, and that an extension may essentially change fibers from asymmetric to symmetric if required, and that the simplest implementation for us to have is the one we have now (asymmetric) ?
 
@cmb I meant more the dynamic instantiation using new and without CatRepository having a constructor, I thought using new required a __construct method, but I found out I was wrong. The 3v4l example I pasted was a very simple replication of something I encountered in our code base, and I pulled it apart to figure out on 3v4l and a whiteboard to figure out how it worked.
 
Hey, does anyone know some secret for how to use git apply or equivalent and resolve conflicts?
Assuming that I'm using the piece of shit software that calls itself Phabricator and has never heard the term merge base
And thus does not provide latches in .patch format, only as raw diffs
 
@NikiC with raw diff, you mean the index xxx..yyy lines are missing?
 
7:47 PM
@bwoebi yeah, just file diffs
 
I got nothing, we use arc workflow and it's the second worst piece of shit in the world, straight after phabricator ...
 
Hm, I just managed to apply the patch with patch --merge -p0 < %s, didn't even have to resolve conflicts
I hope this generalizes
 
@NikiC checkout the merge-base, commit it on top of that and then merge this into current?
 
@bwoebi Like I know the merge base
 
well, the software doesn't either :-D
 
7:49 PM
Phabricator happily discards such unnecessary information from patches
 
Why would anyone use that
 
we were threatened by facebook heavies
probably, a lot of the same reasons people used hhvm for 10 minutes (if it works/worked for facebook, it will work for us), but it's a lot easier to switch back to php when you realize hhvm isn't worth it, than it is to switch collaboration software ...
I've never heard anyone that is forced to use phabricator say anything nice about it
 
8:04 PM
someone mentioned this in passing the other day and I didn't think it was serious
excellent, a reason to burn it with fire
 
8:19 PM
@JoeWatkins I think the asymmetric model is easier to use and reason about, so yes IMO. If main were an event loop it probably wouldn't need to be a fiber at all. If all user code was run in a fiber, it could suspend to the event loop.
The extension I was playing around with mimics this model by running the event loop in a fiber and using a suspension abstraction to move between main, the event loop fiber, and other fibers.
If there was an easy way to wrap script execution into a fiber, I wouldn't need the abstraction, but so far I haven't seen a way to do this in an extension without having potential breaks with other extensions.
 
okay, got it ... if you're going to keep pushing against changing the model, and he's going to keep pushing for it, at some point you might need to go back to internals, this sort of detail was left out of the RFC, so to sw* it seems like an open question I guess ...
 
8:41 PM
Are the typical internals denizens qualified to have a meaningful opinion on the matter? I'm fairly sure I'm not.
 
I mean hopefully we don't have to do that, because ... no, not really ... but if we were to do that, we would have to just hope that everyone listens to both sides of the argument and makes the decision based on what they understand from that, or defer to people that do understand ...
 
I prefer my choice of ignoring the situation entirely on the grounds im woefully underqualified :P
 
reasonable
 
9:11 PM
I'm with @Crell, I really can't see anything constructive coming out of an internals discussion, we're better off here.
 
10:06 PM
@NikiC Yes. I checked what TypeScript and C# do. TypeScript allows removing readonly in sub-classes. C# only allows overriding properties but not fields so it doesn't apply there. Apart from being potentially confusing for users, I don't see a reason for doing this except working around readonly which would defeat its purpose. Keeping it strictly readonly could also help static analysis tools make more assumptions about your code.
And potentially the optimizer as well.
 
10:25 PM
Howdy! I'm checking to see if a string is present in an array, in an either uppercase or lowercase form. Is there an easier way to do this rather than this long-ass conditional? if(!(in_array($usersArray["base"],$dupes[$usersArray['decon']]) OR in_array(strtoupper($usersArray["base"]),$dupes[$usersArray['decon']]) OR in_array(strtolower($usersArray["base"]),$dupes[$usersArray['decon']])))
I would normally just make the strings being input into the array all uppercase from the beginning, but I need to maintain their formatting in this instance
 
I was helping someone solve a json_encode problem and noticed this little quirk when certain numbers have 15 ones after it, the last one turns into a four. Anyone have any idea why this is happening? Never noticed it before: Fraction quirk.
 
Float values are funky and will occasionally do stuff like that
"The size of a float is platform-dependent, although a maximum of approximately 1.8e308 with a precision of roughly 14 decimal digits is a common value (the 64 bit IEEE format)." php.net/manual/en/language.types.float.php
 
@SlamJammington First lowercase the values and then just check?
array_map('strtolower', $dupes[$usersArray['decon']])
 
@SlamJammington Nice one, thanks for the link. 👍
 
array_map just returns the edited function right? It's frustrating that some array functions return the new array while some just apply it to the existing array variable
 
10:40 PM
array_map returns a new array
 
Gotcha, that's what I meant. Thanks!
 
array_walk uses reference
 
11:38 PM
Warning: "Failed to set memory limit to ... bytes" emitted after exit in debug ・ Scripting Engine problem ・ #81104
 

« first day (3883 days earlier)      last day (1065 days later) »