« first day (3895 days earlier)      last day (1050 days later) » 
04:00 - 18:0018:00 - 23:00

6:00 PM
Do what most people do, copy and paste it each time :p
 
that's just lazy... and I'll remember eventually... I'm getting to a point where it's less of a headfuck
 
RecursiveDirectoryIterator, DirectoryIterator, FilesystemIterator ... i don't remember which to use 99% of the time.
 
Hi
 
@MarkR I have 65", unfortunately it's my TV and with ~2m distance I need to make everything very large, so there's not enough room on the screen. :P
 
@kelunik is it Bob that has the crazy good sight with everything super tiny?
 
6:14 PM
@Tiffany yes :D
I also have good sight, but don't want to strain my eyes.
 
I have mimic original code with this https://3v4l.org/dRinl
The main issue is that I cant check if `foo::getConnect()->getUserName()->getCall('tt1')` is not null.
So work around is to add additional condition for null check like this
`foo::getConnect()->getUserName()->getCall('tt1') != null && foo::getConnect()->getUserName()->getCall('tt1')->bb;`
Is there any way to this not null check.
 
@kooldev Could you give me access to your secret project, too? I can give you access to our secret project in exchange if you want. :P
 
@Exception maybe: (foo::getConnect()->getUserName()->getCall('tt1') ?: (object)['bb' => null])->bb
it checks for everything that is not false.
 
@kelunik Done. It is not so much a secret project, I just want to make sure that nobody uses it yet and will blame me if something breaks. ;-)
 
thanks for the help. but I want to completely avoid adding any extra code in $str variable.
 
6:26 PM
@Exception I thought so, which is why I removed the string.
 
@kelunik The main branch contains just the basic building blocks for async. The libuv branch decorates PHP socket streams to perform all IO and DNS lookups in an async way.
 
with the result not adding any more, but removing plenty ;)
 
@kooldev Also sent an invite, thanks! :-)
 
@Exception if you have NULL fall-through you can just do foo::getConnect()->getUserName()->getCall('tt1')->bb ?? null actually.
it's fine if getCall('tt1') returns null.
my first line of code it just doing too much
 
I have plenty of clients who are using CMS items and it contains "foo::getConnect()->getUserName()->getCall('tt1')->bb" now my client team don't want to go at each client cms item and make changes in above cms condition. So I can't suggest them to change that cms condition
Hence I am looking for change other functions like getCall()/ write any custom code that will solve the issue
 
6:35 PM
okay, what do you want to check with the eval?
should it return false if getCall('tt1') returns null?
and that should trigger the exception?
or should the exception be triggered if ->bb is false?
or should the exception be triggered if the PHP code is invalid?
must the semicolon at the end of the string be part of it?
 
@kelunik Thanks. I will have a look at it tomorrow.
 
It should check getCall('tt1') is not null and should not throw any exception. once it is found that it is null then the further conditions should terminate.
 
terminate, but not by exception, so how?
and what if ->bb is null?
 
Looks like you need nullsafe. Are you on php 8?
 
BIGINT support ・ PDO Core ・ #81143
 
6:44 PM
like && condition works
foo::getConnect()->getUserName()->getCall('tt1') != null && foo::getConnect()->getUserName()->getCall('tt1')->bb

Here as we know that once the first condition becomes false then it's useless to check other conditions as we are using AND condition.

So, I am looking a solution which will internally check getCall('tt1') is not null
So that I don't need to write !=null i $str variable
 
so null fall-through would be fine or not? because with null fall-through you perhaps could communicate by value (NULL is the useless case).
this could be wrapped at the eval() call point.
 
Basically I want code equivalent to foo::getConnect()->getUserName()->getCall('tt1') != null inside eval()
 
remove the semicolon and check that.
e.g. if (eval('return ((' . $conditionResult . ') ?? false);' ) === false) {
but still many of my questions unanswered so it's not clear to me when you want to throw an exception and what terminates means.
you could also wrap the eval in a try {} catch (throwable $t) {} block for what its worth.
 
By the word terminate I mean checking of further conditions after ->bb should terminate OR perhaps once!=NULL if false then all the other conditions like ->bb && som_other_condition shouldn't be executed
 
you execute anyway everything as you're using eval(), don't you?
 
6:53 PM
yes
 
so why worry about that?
 
ok
 
well, then ok I guess ^^
 
@cmb About 5 minutes.
@Crell Seems like a typical userland thing to do.
@Girgias Great. Let's hope you'll be OK tomorrow... but I guess you will because you're a young un
 
incoherent grumpy old man noises
 
7:04 PM
@Derick fingers crossed
 
@Girgias \o/
 
7:20 PM
you'll be fine @Girgias :-) I was "not quite right" for like 4 days but that was as far as it went, didn't have any time off work or anything, I just had that feeling of like "going to be ill tomorrow" for longer than usual
 
@SaifEddinGmati does not call factory on rewind - is not lazy :P
 
@kelunik eih, the newer macbooks have an even bigger resolution on the same screen space… :-D
 
@bwoebi I'm pretty happy with my 27" 1440p screen.
 
@Crell You have an example for what you said about sealed classes and static properties?
Not sure I got it
 
7:39 PM
Yep, one sec.
 
user16222983
guys where should i put ajax code in laravel and how do I put it?
 
Hm, actually, would class constants be supported in your current patch? I'm realizing that may be more what I'm thinking of.
 
@Crell nope, class constants and static props are one bucket ;)
 
Weird.
I'm pretty sure my syntax is off somewhere because I'm distracted, but this is what I'm babbling about: gist.github.com/Crell/4a43ddf10571ec15eb7c1d2c8727a060
 
@Crell Heh, that's pretty wild
 
7:52 PM
Enum-based tagged unions would probably be better, but I'm pretty sure that's not going to be completed for 8.1.
/me is a wild and crazy guy (not really).
 
8:07 PM
Anyway, yeah, that's what I had in mind when asking about the RFC. Even without that I still think it's a good addition for the reasons in the RFC, but that would be nice icing on the cake.
 
don't think Sealed classes is going to be in 8.1
implementation is not yet complete, and RFC is still in draft, i want to wait until Joe is free before moving forward
 
:-(
Sorry I kept him busy so long. :-)
Speaking of, Joe, we should call the vote soon. Do we include a secondary vote on the variadic marker or no?
 
Eeep sounds like I finally need to read that RFC
 
Seriously? :-P
Also, @NikiC, please don't take my commentary on the readonly RFC as opposition to it. I'd rather have readonly than have nothing, by a wide margin. I just think it requires clone-with to be able to match asymmetric visibility's range of solutions.
 
8:28 PM
Is clone-with necessary if asymmetric visibility where a thing?
 
no, because then you can say that it's publicly readable, and privately writable
 
It becomes a nice-to-have. I'd want it either way, but the level of impact it has is less.
clone-with on readonly lets you avoid return new static(10 different arguments repeated in every method) in larger value objects. In AV, you could do the existing $new = clone($this); $new->field = $newVal; return $new; dance that we already do now.
A readonly property would preclude that.
Though clone-with would still be nicer in either case.
 
I'd rather then not have clone-with because it muddies asymmetric visibility.
 
class A {
public readonly $foo;

public function __clone() {
clone($this->foo); // same as $this->foo = clone $this->foo;
}
}

?
 
Why would clone-with muddy AV?
 
8:34 PM
Actually I should say it muddies readonly when the property should be private-write.
clone-with adds an exception to a readonly property.
 
I wouldn't say it adds an exception
The property is still properly readonly
 
It's an exception in a place where it has to be; the other being deserialization.
All 3 relate to making a new object anyway, so you have a small window in which to set things.
 
At least if you think of "clone with" as "set the properties I explicitly specified and clone the rest"
 
That's not unreasonable I suppose since those are sort of constructors.
 
My preference order would be:

1) AV + clone-with
2) AV alone
3) readonly + clone-with
4) readonly alone
...
90) None of the above.

(Bearing in mind that 1 and 3 together is entirely possible, given adequate time.)
 
8:42 PM
Yeah, ok, you've changed my mind, clone-with does make sense with AV.
Assuming AV in that list includes readonly, yes?
 
AV doesn't include readonly per se; it includes "public get, private set", which I argue is close enough, and Nikita argues is sufficiently different. :-)
 
it is different
readonly cannot change after initialization
that can ( since private set )
 
Yes, it's not the same. I would argue that it's close enough as long as you trust the author of the class setting the visibility to not do something dumb with their own class. (Which, admittedly, PHP devs are not always that disciplined.)
 
What purpose would clone-with serve without readonly?
 
@Crell It's really not doing something dumb
If you see "public get private set" your first assumption really shouldn't be "okay, this is actually immutable"
Having a property that can only be privately modified is a perfectly fine use case, just a different one
And I mean privately modified in a more substantial way than "clone and set"
 
8:52 PM
@Trowski Reduces a common case to a single expression.
 
A lot of common things would be public get, private set, such as a count.
But obviously not immutable.
 
Right. My point is that the distinction between readonly and private-mutable is not something that needs language level enforcement, the way public-immutable does. It could be nice to have, but it's not a requirement.
 
> it's not a requirement.
technically, nothing above assembly is a requirement......but it's really convenient. In particular, it stops people from modifying something that isn't meant to be modified. And/or makes any PR that changes that be really obvious.
- private readonly $foo
+ private $foo
> er, why are you changing that?
 
Anyway, I didn't mean to repeat the whole thread from the list here. :-) I just wanted to clarify for Nikita that I didn't want to dissuade him from readonly, because between readonly and nothing this cycle, I'll take readonly, hands down.
 
@JoeWatkins fyi i just got an email notification that your domain failed to auto-renew... idk why I got the email but I feel like this will be a more obvious notification :-P
apparently I still have access to your domain from when you first bought it, happy to retain that as an escape hatch if you want but also feel free to nuke my access
 
9:06 PM
@DaveRandom keep it please, I got no other notification, and don't know why and can't beb bothered to find out
also, thanks
 
lol no worries :-P
 
current status - remembering that the grey album is a thing that exists: youtube.com/…
 
9:27 PM
I remembered about that like a month ago, didn't listen to it tho as it's basically musical wheelies :-P
it did however get me back into mr scruff, which I realise is a weird leap on the face of it but a time and a place... and a lot of shrooms
also ninja tunes anthology releases are kinda interesting but my word are there a lot of things that should end sooner than they do
 
@DaveRandom cat video
 
that is such a weird message to literally everyone else
 
Not to the people I've also sent it to lol
Only ones I think would enjoy it
 
10:30 PM
@Crell I fixed the short functions status (moved to declined on the /rfc page)
@ln-s Swoole is rather large. Fibers are very small. The task of taking a big library with years worth of work and making it unopinionated and something the majority agrees upon is likely impossible.
 
@IluTov I knew I was forgetting a step! Thanks.
 
04:00 - 18:0018:00 - 23:00

« first day (3895 days earlier)      last day (1050 days later) »