« first day (2048 days earlier)      last day (2899 days later) » 

3:00 PM
@bwoebi Speaking from experience, when ROs kick other ROs (especially when kickee RO is upset), it usually doesn't end well.
 
@MadaraUchiha That was why I refrained from it…
 
So I support @DaveRandom's suggestion for everyone to take an hour or so break to cool down, and discuss the matter (I honestly have no idea what even the matter is) in lower tones
I don't usually see arguments get that heated here.
 
@JoeWatkins Maybe he shouldn't have been a dick then? And I seriously mean that. Someone has to call them out on the behavior. It's not okay to just leave it there.
 
We have already established that nobody has time for this discussion anyway :P
 
But it's also why I muted him immediately after.
I said what needed to be said and stopped.
 
3:03 PM
@LeviMorrison You don't get to drop a bomb then tell everyone to "let it go", that's not how chatting works, and you know that.
 
@bwoebi How would you translate the phrase "Wahrnehmung von Lehraufgaben"?
 
is it okay for Dmitry or I to say that you were being a dick when you stood in our way because you were "busy", if that's what we genuinely think ?
 
@NikiC In what context? teaching assistant?
 
@bwoebi basically
 
Don't worry guys. I got this.
 
3:04 PM
Not sure how to translate the first word elegantly
 
$ sapi/cli/php -r 'function foobar(null $null = null): null {} foobar(1);'

Fatal error: Uncaught TypeError: Argument 1 passed to foobar() must be of the type null, integer given, called in Command line code on line 1 and defined in Command line code:1
Stack trace:
#0 Command line code(1): foobar(1)
#1 {main}
  thrown in Command line code on line 1
 
regardless of what you genuinely think, we don't talk to each other like that, because it's not civilized ... there is never a good reason ...
 
Yay, it works.
 
@JoeWatkins Fair, but here you are calling me out on that. Who called out Nikita? Nobody had at that point so I did.
It has to be said.
It can't just go unspoken.
 
@NikiC not sure either
 
3:05 PM
you're missing the point, it does not have to be said, you have to find civilized language or shut up ...
 
@JoeWatkins I guess we disagree.
When things are said but shouldn't be said you should so be informed; that's my opinion anyway.
 
@LeviMorrison It's fine to call out people, but the one who is attacked/offended should rather refrain from that
 
srsly, this is not going to get anywhere useful for anyone until everyone climbs down a bit, which is not going to happen until everyone stops talking for a bit
 
Even the bunny gif failed
 
@DaveRandom I think we already calmed down…
 
3:06 PM
@bwoebi That just means that the attacked person is at disadvantage.
 
where is this attack ?
 
@JoeWatkins Just read the log.
 
@Levi github.com/php/php-src/compare/… - this has no tests at present, but it seems to work, and may be useful to you if you want to do s/void/null. Also, I'm willing to help write an RFC for replacing void with null if you'd like that.
 
I did
 
@bwoebi The current translation says "Percipience of teaching tasks", which ... is not English ^^
 
3:07 PM
which part made you feel attacked specifically ?
 
 
Don't make me get the platitudes out. I will do it. Don't think I won't.
 
@JoeWatkins I can't link them to you because he's muted.
I can't see his messages.
 
Since there's already blog posts on 7.1 having void, but it's changing to null, I think you need to skip to 7.2 and call it something completely different like "nil". There's precedent for this
 
3:09 PM
no no no
 
@MadaraUchiha quit feeding :-P
 
@KevinMGranger Hah
 
@Fabor You'd almost think this was Strict Type Hints 6.0
 
anyway, I'm going to go do other things (paperwork I've been putting off).
 
3:09 PM
I warned you
 
@LeviMorrison please unmute him now. It's all calmed down and I think we can now talk again on a normal level. Please.
 
:P
 
Oh god. The #drama. Luckily my internet is fixed just in time \o/
 
Which is not directly offensive, just aggressive.
But Levi took it (too) personal.
 
@LeviMorrison I disagree on this one. I think this was just badly worded, but not meant aggressively.
 
All of his messages directed at me during that time frame were aggressive.
Just read them again.
Anyway, you all keep saying to stop.
But then you keep bringing it up.
 
heh
 
@LeviMorrison somewhat true, sorry. I just was replying to Joe.
 
@DaveRandom any issue when I move everything out of /cli/run.php and include it from anther file. git keeps complaining about the permission being changed when I try to pull with changes in that file.
 
3:16 PM
@PeeHaa no idea, what's the exact error?
 
@Levi not bringing the topic back up now explicitly; may you please just change the RFC accordingly and then we can discuss it again later.
 
We can't forbid unsetting declared properties as that would be a big BC break that would need to wait for PHP 8, but can we forbid them on typed properties, @JoeWatkins? Or do you think that would alienate more support than it would gain?
 
It's just that I have the x flag on it because systemd, and git sees it as a change when I try to pull the file. No big issue, but happens often lately and I am lazy to reset the permissions before pulling
 
Anonymous
Is it possible to cherry-picks icons from font-awesome?
 
@LeviMorrison There are reasons why we allow this (allow magic method access)
And this should not become impossible with typed props
 
3:20 PM
You mean the @Ocramius' trick for getters/setters?
 
for example
 
@LeviMorrison I want to understand ... I'm sorry but I don't see aggression, I genuinely believe you do, but I just don't ... I implore you not to resort to that kind of language, you can articulate that someone is being a dick without calling them a dick, and we all expect that of each other, let us not stoop to the level of reddit or hackernews when trying to have serious discussions, please ....
 
that's the main example and quite reasonable
 
I disagree about the reasonable part.
It's definitely abuse that I hope we actually fix one day.
 
regardless I think it would alienate a lot of people ...
 
3:22 PM
And that's why I suggested it: if we want to fix that why permit it in a new feature anyway?
 
@LeviMorrison I'm not sure whether we want to ever fix it.
 
Marcus has spoken up, but you can be that a bunch of people are relying on such magic in the wild ... hopefully they are too ashamed to admit to it :D
 
As Ocramius said, if we drop it we have to provide an alternative first
 
@Levi the other point is about unset()'ing values (breaking cyclic refs etc.)
 
@JoeWatkins In Dmitry's mail, the first two points are not related to his last sentence right?
 
3:24 PM
I wish unset on a property was simply assigning it to null.
 
How things are initialized shouldn't have bearing on optimization
 
That seems a far more reasonable decision than removing it from the table (or pretending it is removed)
> The special NULL value represents a variable with no value. NULL is the only possible value of type null.
 
@NikiC what exactly is problematic on initializing nullable values to null?
 
As per our documentation this seems to be the exact purpose for null.
 
@bwoebi Did you take a look at @Andrea's example?
It basically has the same problem as implicitly initialize anything else
 
3:26 PM
@NikiC the optimisation thing seems moot to me given you'll have to deal with non-nullable types too
 
@NikiC yes, but it doesn't make sense to me…
 
@Andrea Exactly
 
Anyone else having "push lag" at Github? I'm seeing my pushes show up after like 5 minutes.
 
I think I see why
 
@NikiC my example was partly contrived actually, I would've had public $head; (no typehint), but PHP initialises that to null, which is just as unhelpful as implicitly initialising $tail to null would be
 
3:26 PM
If I don't init it, it's because there's no node
 
the weird runtime check referred to is the uninitialized access check
 
But as it's just setting = null as default ast… dunno.
 
@NikiC That is true only for BC break. We don't need to support it for a new feature.
 
so the first point is related to that
 
He can't have code that depends on typed properties.
 
3:27 PM
@LeviMorrison but he'll have in future
 
the second I'm not sure about, seems related to the first point rather than last sentene
 
@LeviMorrison or you'll forbid him to use a very useful feature for all his hydrated entities
 
@LeviMorrison From a compatibility perspective, indeed. However it's pretty likely that ORMs, where this technique is currently used, are pretty interested in typed properties. They would not be able to use them if we forbid it.
 
@LeviMorrison not if you want objects to still be usable within the context of currently existing serializers/ORMs
 
No, they won't be able to redirect access through undefining it.
 
3:28 PM
otherwise, you are basically telling users to fall-back to docblocks again
 
It's solved in languages that do not have magic access – it doesn't have to be done this way.
 
SO chat gem of the day: If you go to your preference page, you can activate "faster notifications" which would make the time between chat ping and main notification much shorter, allowing you to get notifications as the conversation is going on, and not 20 minutes after it's finished.
 
@LeviMorrison then provide an alternate solution, since it's "solved" :)
 
Anyway, it seems I got my answer about why it's not forbidden.
 
can anybody think of an alternative ?
 
3:31 PM
as said above, we're fine with having the limitations, if they can be worked around or if there is an alternate clear solution
 
@MadaraUchiha Sometimes notifications seem to be lost entirely. (I think if you have a chat window open on some computer, the notifications are swollowed, even if you never dismiss them there.)
 
Wait wat. There is a list of tiny avatars?
 
the only actual alternative I can see, is not doing it, in this case ... we're talking about disabling a thing because it's forward incompatible, we can't really have an alternative without having the same problem, can we ?
 
@NikiC They aren't, but we miss them ^^
 
3:32 PM
@PeeHaa Yeah
 
@JoeWatkins If we some day disable it, we shall disable it for all…
 
Oh it's not even that bad
 
@NikiC Never happened to me.
Even without the faster notifications feature on
 
also when your page refreshes, like mine does every time I go away for a few hours because "connection lost", you loose notifications too @MadaraUchiha
 
@Ocramius Read the meta-data from the database and generate the class from it? I know of at least one Java project that does this.
 
3:33 PM
And I have chat open at all times in at least 2 different computers.
 
(also my connection is never lost)
 
@JoeWatkins Chat notifications? Yeah.
 
Also, GSON serializes objects via mapping functions.
 
Main notifications? No.
 
user895378
@bwoebi Starting saturday my girlfriend will be out of the country for two weeks so that's my window :)
 
3:34 PM
yeah chat ones
 
@LeviMorrison yeah, because that's compiled languages. Then we'd have to basically transpile type-checks into getters/setters again.
If we talk transpilers, we can do anything, yeah, of course, but it would be a mess
 
@rdlowrey \o/ … but to prolong window … you just (kidding) could … break up :-D
 
53 secs ago, by Levi Morrison
Also, GSON serializes objects via mapping functions.
 
then you basically re-invented babel for PHP, and babel for JS is just a flustercluck
 
That's not a compiler/transpiler thing.
My point is there are several ways to do this.
 
3:35 PM
@LeviMorrison this is not about loading/saving data, but about lazy-loading
if you have different ways of doing it, I'd like to hear them. I don't have any decent approach to hiding private state even to private API
unless you indeed transpile everything
 
@Ocramius Say what you want about babel, but babel pushed the entire technology forward in much the same way we say jQuery do years ago.
I don't know how well it would work with PHP though
It succeeded because it allowed you to use shiny features now.
 
@MadaraUchiha I fully agree, but do you really want to see that happen to PHP? PHP doesn't have the "support all browsers" problem
 
Also, to be honest transpiling from a database schema seems less error prone.
 
@Ocramius Honestly, PHP doesn't really have "shiny future features everyone are looking forward to" either.
So no, I'm not really seeing it in PHP.
 
@LeviMorrison if you base your entities on the DB, and not the other direction around, then you are likely building a mess :P The point of using an ORM is to hide the DB
 
3:38 PM
@MadaraUchiha short closures … somehow.
 
@Ocramius I understand but what happens when you add a property that doesn't exist in the database?
 
@bwoebi Short closures aren't as shiny in PHP as they are in JS
 
@MadaraUchiha I built few libs that turn PHP into Java, I just don't think that's the way to go. Things become really really complex
 
@MadaraUchiha why?
 
Especially since you don't have the REALLY annoying this problem that JS has.
 
3:39 PM
wat
 
@LeviMorrison you get a mapping error, usually. The DB should be updated, not the other way around ;-)
 
php is great for alot of web problems
 
@MadaraUchiha haha
 
That lambda expressions in JS solved
 
!!rfcs
 
3:39 PM
anyway, I still want to see the solution
 
practical solution to lazy-loading, no bullshit like "you could do X", but an actual code example
until then, kthxbai
 
@DaveRandom the auto-pin/star cancelling really works \o/ \o/ \o/
 
@Ocramius You are suggesting that I actually implement it for you rather than pointing you to prior work in the area.
 
@LeviMorrison pseudo-code also ok
 
3:40 PM
I also saw it work the other day, was amazeballs ...
 
PHP "short closures" would still need to explicitly define the variables they take from outside, right?
 
I did something like 3 years of work in this area
 
You don't get automatic closure binding?
 
don't give me this bullshit. If I knew a way, I'd use it.
 
@MadaraUchiha No; Bob already implemented this proof of concept.
 
3:41 PM
now, since this channel is properly pissing me off again, bye
 
So you can't do something like this: $addCurry = $x ~> $y ~> $x + $y
Right?
 
no, don't go anywhere marcus ...
 
user895378
@bwoebi @kelunik @Trowski I'm worried about the excessive OO nature of the new amp/loop lib ... constructors aren't free. If we start down that road the massive performance advantages of amp will completely disappear
 
(I know that's not how the syntax looks, whatever)
 
user895378
These things matter. And in systems programming you can't afford those niceties. We should be focused on providing the most performant possible internal implementation.
 
3:41 PM
@MadaraUchiha you can do that.
 
@bwoebi Wouldn't you have to add an annoying use to carry $x over from the closure?
 
@MadaraUchiha Correct.
 
@rdlowrey you were using stdClass with dynamic props, so be quiet :-P … but I agree that we shall remove the ctors
 
$addCurry = $x ~> $y use ($x) ~> $x + $y
 
user895378
@bwoebi exactly. No constructor
 
3:42 PM
@LeviMorrison Not as shiny :P
 
@MadaraUchiha no, that's not needed … that's the point.
 
Is there a big benefit from that?
 
user895378
and no method access. internal things.
 
removing the ctors?
 
@MadaraUchiha I misread. I though you said "You wouldn't have to" not "Wouldn't you have to"
 
user895378
3:43 PM
@RonniSkansing it's a slow function call like every other slow php function call.
 
So you get automatic binding of all variables from closure?
 
@Ocramius I'm hoping we can think of some new api to replace the magical hacking ... would be nice if you could give that some thought ... I can totally see that there's no replacement today, but one must be conceivable ...
 
@MadaraUchiha yes. by value.
 
@bwoebi Neat
What about $this?
 
you get this anyway
 
3:44 PM
is inherited like for normal Closures
 
lexical this
 
Still enclosed by the calling method
 
hmm?
 
not calling scope, lexical scope ...
 
return ($x) ~> $this->somePrivateCall($x);
 
3:45 PM
When throwing an exception up to a higher layer of code to handle, should the message be descriptive like a human is reading it, or should it be a code which can be translated by the upper layer for it's own purpose?
 
Possible?
 
@MadaraUchiha yes
 
@Sean Why not both?
 
Or.. should the exception name be specific enough to fully understand why it was thrown?
 
@Sean Exceptions have a "code" and "message".
 
3:45 PM
@MadaraUchiha just checkout my original patch and play with it ^^
 
@LeviMorrison Oh!
 
I've never seen anyone use the code
 
@bwoebi Yeah, I'm not going to do that :D
 
<.<
 
@JoeWatkins Database exceptions are the only ones I've actually used.
 
3:46 PM
I really don't have the time (or willpower, really) to checkout PHP and compile from source.
 
user895378
@DaveRandom Why does anyone actually need to know the connection state of their postgres connection? github.com/amphp/pgsql/blob/new-api/src/Connection.php#L22-L30
 
Nothing personal, the work you guys do is amazing.
 
user895378
Is it not enough to have a connect method that returns a promise?
 
@rdlowrey Is a function call really that expensive?
 
@Trowski yes.
 
3:47 PM
I kinda think they should be optional, exceptions are for humans ... if your software produces so many exceptions that you are considering writing software to manage your software, obviously you need to stop and think about what you are doing wrong ...
 
It's one of the most expensive primitive ops
 
@MadaraUchiha you are aware that building php can take as little as a minute ?
 
user895378
@Trowski yes. If you want perf you must avoid as many fcalls as possible in your internal code.
 
@JoeWatkins given that you have installed all deps …
 
@rdlowrey I'll have to duplicate a lot of code then just to avoid those function calls.
 
3:49 PM
@bwoebi yeah, okay .. the second time then :)
 
:-D
 
@JoeWatkins I'm doing at least 3 other different things while chatting on SO at the moment
 
@Trowski Are you sure?
 
mostly Compiling™, sure, but still
 
user895378
class Watcher {
    use Struct;
    // public properties here
}
 
3:51 PM
I don't really have time to play with features on work time
 
user895378
@Trowski ^^
 
@MadaraUchiha you spoke as if it took real effort to build php is all ...
Don't forget to run 'make test'.


real    0m48.066s
user    5m41.118s
sys     1m21.377s
 
... you're actually right.
 
user895378
This is systems level code. If you make it really nice internally it will not be performant enough to be useful.
 
user895378
I agree that the aerys code needs to be a bit nicer internally at the expense of some small performance. But the underlying async loop and primitives have to be as performant as possible because those costs are incurred at every step of an async application.
 
3:53 PM
okay, turns out monte carlo simulations in php is a bad idea
who would've thought
 
@rdlowrey I agree. It's not that much code that has to be duplicated and it's pretty simple code.
 
@rdlowrey That
 
@NikiC why? too slow?
 
If you look at Bluebird's code
You'll see it do horrible horrible ugly hacks
 
@Trowski right.
 
3:54 PM
But it's thanks to those hacks that bluebird is about 6 times faster than native promises (lol)
 
lol
 
@MadaraUchiha Makes sense. The loop lib won't be pretty when I'm done, but it should be fast and that's all that matters.
 
@rdlowrey feel free to propose cleanups … but the uglier things typically are the hottest paths too…
 
Things like "instead of using a closure to create a new function, I'll use the new Function() constructor and pass a string of the function, that will make V8 JIT and optimize it"
 
@Trowski it shall be both.
 
3:56 PM
@bwoebi Yeah ... okay for small parameters, but if you need a billion iterations it gets problematic
 
Hmm... where should the Struct trait live now that things are being separated?
 
@Trowski redefine it in both libs
it's so small that it isn't a problem
 
@bwoebi Actually I probably only need it in loop.
 
user895378
@bwoebi yeah I agree ... that's the thing ... we could make aerys a little easier to maintain but none of the decisions on how things are structure currently were made without careful consideration
 
user895378
They're very specific optimizations so ...
 
3:59 PM
Since amphp/amp will either be marked as abandoned or completely reworked anyway.
Or amphp/amp could hold general purpose tools like Struct.
 

« first day (2048 days earlier)      last day (2899 days later) »