« first day (3693 days earlier)      last day (1255 days later) » 
00:00 - 21:0021:00 - 00:00

9:00 PM
...cool, yeah. makes sense.
 
@cmb @cmb Fixed the catch-on-own-line. Everything else in that file uses brace-on-same-line for classes and functions, so unless we're going to reformat all of the examples at once there it seems better to stick with the convention of that page, at least for the time being.
Thoughts: Should null-safe methods go here (php.net/manual/en/language.oop5.basic.php), where methods and properties are first mentioned, or is there some better place? Also, since props and methods are separate sections, repeat the logic or have a null-safe section unto itself?
 
9:26 PM
Zend Engine -dev flag on release build ・ Documentation problem ・ #80420
 
9:38 PM
Big day tommorrow.
Got the champagne ready.
 
People don't use PHP right after the release. They usually wait a couple years
 
@SalOrozco Sure is. First chance I get to see the sun for about a week, and the last time for probably at least two weeks: bbc.co.uk/weather/2654675
 
s/years/point releases/
@Danack ...he says, as if he ever goes outside
it's only daylight in any meaningful sense for about 10hrs atm, fuck doing stuff outdoors
 
A few months ago. I decided to install decorative rock in my front lawn on the weekend. Seemed easy enough, decided not to hire anyone.
boy was it a mistake lol It was so much work.
 
@DaveRandom I bought myself a gimbal for a camera, and due to not also buying a modern camera for it, and instead using my trusty iphone 6s, can only take half-decent video when the sun is out. Have a boring video of me walking around 'the block' as proof I have left the house recently: youtube.com/watch?v=BKjX4z_cOFA
@SalOrozco I am ignorant, how much installation does a rock need? You need to run some duct work for the cables or similar?
 
9:43 PM
The project eventually ended up taking me few weeks on the weekend. I would only work from 6 am to about 11am.
 
@SalOrozco I'm reasonably certain you are doing it wrong, because the entire concept of "installing" a rock seems incorrect
 
Before the sun really came out.
 
> I will install this rock through your window
 
Thats the hard part
 
doesn't sound right
 
9:44 PM
That is what they call it.
lol
 
if you ever want to get rid of it I can lend you this
I spent waaaaaaaaaaay too long looking for a previous pic that I had before eventually giving up and putting my shoes on to go out to the van and take another pic
that is commitment to a shit joke
 
What were you working on.
I think i have the same hammer.
 
I got that from Home Bargains or somewhere like that for £5 20 years ago
so it's quite possible you do tbf :-P
 
I preffer all metal hammers, appose to wood with the metal attachment.
 
one of my favourite tools, although I don't have all that much call for a hammer but when I need one that thing never lets me down
I have that and a ball peen for detail work and a rubber mallet that's like 90 years old, trusty collection of hammers
@SalOrozco if you want to apply some serious force with it, definitely
there's something to be said for a wooden handle for precision stuff though
 
9:59 PM
I did framing in my early 20s. I still have most of my tools. Tool belt, hammer, measuring tape, chalk line, square ruler. I kinda actually miss building. U was in charge of doing the finishing details to houses before all the drywall goes up.
So all the windows and doors had to be the correct size.
 
"scared"?? like you had to jump out and shout boo at them? :-P
 
squared
 
oh lol
 
lol
the sealing line had to be straight
you could not have one trust lower then the other
 
I've never been very good at that sort of stuff tbh, getting things straight and flush requires a type of patience that I just don't posess
 
10:02 PM
or the line would look fucked up when you installed the dry wall
 
cba with painting stuff for the same reason
 
paralled entry doors was one of the key parts that had to be flushed.
or else it would look messed up
 
I like making big clumsy things, I can get mechanical precision absolutely correct as well, but square/flush makes me want to kill myself very quickly
 
lol
 
I was installing maglocks at the back end of last year, the tollerances there are like 3mm or something and I can't even be fucked with that
I mean I can do a good job of it but I hate it
I don't find it easy, I guess is the crucial thing
and I have no desire to get better at it
 
10:04 PM
They were so anal, that they had strips of thin carbord like. That you could use to get it close enough
and you would stable them to the studs.
 
yeh it's a massive ball ache
 
lol
ohh the hardest part was straighting a wall
 
I have had to do stuff like that before, and again I can do a good job of it, I just don't get anything out of it personally
 
if one stud had
a bump
you had to grind it down
 
and if you ever do stuff like that in your own house then you just spend the next decade seeing all the imperfections that no-one else can see even when you point them out
 
10:06 PM
do that to the entire wall
lol
I dont like doing that in my house
 
@SalOrozco yeh fuck that shit
 
i rather hire someone that does that everyday
they have practice
doing that
 
fucking slack-ass constructors as well who just throw everything up and nothing is square to start with
I generally don't bother with a spirit level, because most of the time all that matters is that it looks square, a lot of the time if you line it up properly it looks fucked because nothing else is straight
 
Knowing this magnifies what contractors are doing wrong. Because you know how it should be.
 
depends on the building, in the UK we have a lot of stuff that is 100+ years old and they are all wonky
new builds tend to be much better but also much worse build quality
 
10:08 PM
I was going to do my back yard mostly concrete, out here you need reebar so that the concrete does not crack.
 
old buildings are made out of rocks, new ones are made out of paper
 
Someone I knew, knew a guy that could do it for cheap
but was not going to install reebar
I didnt hire him.
 
yeh if you are going to pour concrete you have to do it right
 
Paper
 
the cost of fucking it up is too high
@SalOrozco pretty much, pine, gypsum and wallpaper with a 9" foundation and a sheath of prefab brickwork. Not going to stand the test of time :-/
 
10:10 PM
Last week a construction crew made the news here by having paved over a dead cat. Half the cat was sticking out from under the edge of the pavement. "Not my fucking job" award winners of the month.
 
@AndrasDeak that is pretty epic
 
lol
 
I can imagine that would happen accidentally (cat got run over by machine) but there's no way that no-one noticed
 
WARNING: 100% deterministic dead cat in picture here
@DaveRandom what is a "machine"?
 
tarmac roller or possibly road laying machine
 
10:13 PM
Road laying machine? Are those like unicorns? :P
 
they have those things now where you basically drive along and keep adding gravel and tar and it spits road out the back
I know it sounds like thunderbirds but it is honestly a thing
 
"We can re build it. We have the technology"
 
Wes
so hard to step through code with phpstorm taking me into amphp's internal files
 
it's not quite like it just spits out a finished painted road, but they have things that lay foundation and macadam and tar and roll it all in one go
 
@Wes is there no difference between step in vs step over?
or is this a PHP thing
 
10:15 PM
it's probably more just that the stack makes no sense because async
 
Wes
both take me into third parties' stuff
 
ah, I don't do async
I also don't do web but at least sync is sync
 
it's as complex as parallel, but very differently so
similar set of problems in many ways though, making shit happen in the right order
 
Parallel I get. Concurrent spaghetti I don't.
Then again the parallelism I'm familiar with it is just "here are these 1500 independent iterations, go for it". I.e. chimpanzee-level parallelism.
 
I can understand/sympathise with that, but I would also encourage you to keep looking at it again
I promise it does make sense and is good
but it is a headfuck and a half that I am also not super comfortable with, sometimes my brain hurts
 
10:18 PM
@DaveRandom so I'm told :) Although I'm also told that python's async is, uh, questionable at times. The main point is that I do scientific programming so this is completely out of any scope I might touch.
 
@AndrasDeak ah yeh I mean that's potentially worse than just sequential execution sometimes :-P
 
cmb
@samayo there is an explanation on windows.php.net under the caption "Which version do I choose?"
 
@AndrasDeak I struggle with python's desire to abstract All The Things 20 times over, and "green threads" are one of those cases
 
@DaveRandom there's usually enough cores to make it worth while ;)
 
Wes
in php it is much more complicated than it needs be right now. i can move much more nimbly in js's async
 
10:20 PM
@DaveRandom I can't comment on that. Although I like the abstractions normally, so perhaps I'd disagree if I knew this domain.
 
PHP is not a particularly good language to work with either, if you are learning async, because the stuff we have is bolted on the side by bastardising generators (atm)
I personally would recommend JS, probably node but also client side if you have a good use case
 
cmb
@DaveRandom someone asked today on #winphp-dev how to build 5.2.17 on Windows; they need to support 20k+ customers. So maybe s/years/decades ;)
 
C# is a language that I would happily marry and have its babies, but that's a bigger leap
 
I have a certain aversion to JS so maybe not ;)
 
I mean language wise. Marriage/babies are up to you.
 
10:22 PM
and I'm told .NET core is cross-platform now so it's not even tied to windows
 
@AndrasDeak C# is The Best™ programming language so maybe go with that
/runs away
 
That would have been my only issue with C#. And the fact that it has C in the name
 
@AndrasDeak the implementation and docs for Golang's way of running stuff concurrently is a pretty good way of understanding it, and also why other languages versions (so far) are terrible imo.
 
@Danack Thanks for the tip :)
 
@AndrasDeak oh yeh I mean mono is very definitely mature, a shitload of stuff runs very well on it in production and it can frequently out-perform windows by a factor of 10 or more, depending on what you are doing
C# was historically "nice language, shame about the framework" but that is no longer true :-)
 
10:24 PM
@DaveRandom Didn't even know it had a separate name
 
I don't like it for front-end web stuff though, really don't get why people use it for that
 
@cmb @Girgias Another one for the list: github.com/php/doc-en/pull/241 - Covers parameter and use trailing commas.
I'm probably also deleting upwards of 100 comments today. So there's that.
 
I even saw and wrote some C#... about once, for lab practice. It's gone from my head without a trace.
 
@AndrasDeak mono is one of several ".net core" impls for *nix, the most mature and most popular, those are facts, I have no valid opinions on this topic :-P
 
@DaveRandom right, nudge nudge wink wink :P
 
10:26 PM
no I mean I actually just don't know
 
Of course (wink wink)
 
I've never done devops on that scale for a .net app
 
Wes
so Promise<Promise<MyFoo>> is not a thing
it gets flattened to Promise<MyFoo>
 
I've always just run them on IIS because it's easy
"easy"
:-P
 
Wes
i wonder if that's the case in js as well
 
10:28 PM
and everything I have ever been responsible for was internal and used by like 10 people
 
@DaveRandom that's a nice flip-your-table size of userbase
assuming they live close enough I mean...
 
eh, like bug trackers and shit, the kind of things that everyone is secretly pleased when they break :-P
my C# is generally GUI/CLI apps and services
it's a great language for making things that do stuff, I've never been good at making anything look pretty
that's what designers are for
 
making things pretty is almost as hard as naming them
 
#notmyproblem
or at least, I try to engineer things so that it isn't my problem :-P
 
plot twist: the GUIs run in a terminal
 
10:32 PM
oh yeh but my GUIs are purely functional for like network tools and stuff
 
Wes
(async () => {
    const p = new Promise((r) => {
        r(new Promise((r) => {
            r("poop");
        }));
    });

    console.log(await (await p));
})();
 
I very rarely make stuff for real humans to use
 
@DaveRandom so... haskell? ;)
 
I'm not a masochist
I like to accomplish stuff when I sit down to write code
(plus, I don't get it)
 
@Wes does that bork?
 
10:33 PM
Haskell is cool if you don't do any IO. And don't mind a language that has basically NO syntax, by design.
 
which is obviously the actual reason
 
Wes
it does
 
@Crell "no I/O" is like, the direct opposite of what I do :-P
 
Wes
Promise<Promise<T>> in amp gets "normalized" to Promise<T>, whereas it remains untouched in js
 
Haskell tries to be as terse as possible, to the point of being not just pointfree, but syntax free. :-)
@DaveRandom You wouldn't like Haskell then. :-)
 
10:34 PM
@Wes what does that mean? Awaiting the outer thing automatically awaits the internal things?
 
(He says, having never written a line of haskell himself.)
 
Wes
yes @AndrasDeak
 
that does sound like poop
 
Wes
it should be fine
 
10:35 PM
@Wes ?
 
That's a conscious choice rather than the consequence of the implementation, right?
 
I don't think that is right
 
Yes, controversy!
 
Wes
@PeeHaa if a promise resolves to a promise, i.e. Promise<Promise<X>>
amphp saves you to write yield for both
apparently
whereas in js you have to await for both the promises
 
@Wes no, but when a promise resolves to a promise, yielding waits for chain resolution
(right?)
 
10:36 PM
yes
afaik
 
reading between the lines I think that's what is happening @Wes
it's not that you are waiting both, it's just that waiting the outer promise resolves all inner promises
 
Wes
how so?
also the returned value should be a promise, but instead i get the inner value
 
I'm really sorry but I am tired and slightly pissed and don't really understand ampv2 without docs so I just cba making an example :-P
 
Wes
ahah ok no problema
 
@Wes yeh, that's the key point
waiting a promise that returns a promise, will wait for the "inner" promise and return the result of that one
 
Wes
10:39 PM
doesn't seem right
 
I don't know if there is a way to circumvent that behaviour, there may be
 
Wes
no because i didn't wait for the inner promise?
 
yeh but the wait for the outer one intercepted the return value and waited for the 2nd one
it's the way the engine works, it's in the docs somewhere
I remember reading it, hence why I said chat.stackoverflow.com/transcript/message/51017328#51017328
@bwoebi @kelunik @Trowski may be able to elaborate more on the whys/wherefores and whether there is a way to not do that
although also I'm not sure why
if you are waiting for a value, surely what you want is the value, not another promise of a value eventually at unknown nesting depth
 
Wes
it works fine in my use case, but what if i need that promise for a Promise.race or something?
looks like undesired automagic
 
use the outer one for that?
I'm not sure why you would wait for partial completion of a task, you'd use pub/sub updates for that
 
10:43 PM
Resolving a promise with a promise moves the resolution callbacks to the new promise.
When you await resolution of a promise, you don't want to be given a promise as the result.
 
I think this statement ^ is what's at issue here
 
cmb
@Crell added to list (after desperately searching for "trailing"; it was "trailling")
 
Did I typo?
 
cmb
nope, someone else :)
 
Wes
why not? @Trowski
 
10:45 PM
Oh good. I'm going through the comments now to see if there's anything else to incorporate while I'm here.
 
cmb
+1
 
@Wes You would use the outer promise… why would you wait for an inner promise to give to Promise\race()?
 
@cmb oh, I normally typo it as trialing.
 
Wes
what if i need the original promise for a key in a map or something
 
@Wes There's no purpose to it. Replacing one placeholder for another is equivalent.
 
Wes
10:48 PM
not an actual use case i have right now, i am just saying that you are hiding some steps, and that's the kind of automagic stuff that can go wrong
 
You can always resolve with something like [$key, $promise] if that's your purpose, but then that's not replacing one placeholder directly for another – some other information was conveyed.
@Wes Every promise or placeholder implementation I'm aware of has that behavior.
You don't resolve a placeholder with another placeholder – that's non-sense.
 
Wes
javascript:
(async () => {
    const p = new Promise((r) => {
        r(new Promise((r) => {
            r("poop");
        }));
    });

    console.log(await (await p));
})();
@Trowski it might be nonsense, but you are assuming that's a favor i need
which i might not
what if i need to do $actualPromise === $expectPromise
 
more likely you should change this
 
Wes
just as example
 
function foo()
{
    // some async stuff
    return bar("some value");
}
$r = yield foo();
to
function foo()
{
    // some async stuff
    return "some value";
}
$f = yield foo();
$r= bar($f);
not a good example
 
Wes
10:52 PM
but you are denying me that because the promise i was expecting disappeared
 
basically you should probably extract some nesting into a sequence
 
Wes
for the record that's not a valid pro argument
but with double await i get to decide what i want
 
@Wes something something broken promise
 
Wes
if you hide me a promise, you took that decision for me, and i don't like it
 
@Wes I know what you mean, but I have never yet come up with a valid use case for it
 
Wes
10:54 PM
probably there is none, but you can't prove that, is my point
 
at the end of the day, the PHP engine takes a shitload of decisions for you about memory management, thread creation, simple x-platforn interop...
the whole point of this is to get shit done and take away decisions you don't need to make
 
> if you hide me a promise, you took that decision for me, and i don't like it
:D
hehe
 
I completely understand the sentiment
 
Wes
:B
 
@Wes
let promise = new Promise(function (resolve, reject) {
	resolve(Promise.resolve('test'));
});

promise.then(console.log);
 
10:56 PM
I am basically being a voice of reason I don't really believe :-P
 
That doesn't result in [object Promise], that logs "test".
 
Aren't the double "resolve" calls equivalent to two awaits there?
 
Wes
in general i dislike anything magic. not necessarily because it caused me problems
 
@AndrasDeak no, it returns a resolved promise object
 
It's not magic though.
 
Wes
10:57 PM
but even just because it causes me astonishment and goes against my expectations
 
Ah, OK, I'll shut up then, thanks :)
 
You have a placeholder for a future value.
 
@AndrasDeak it is, as mentioned, a headfuck and a half :-P
 
@DaveRandom that's less of an issue. I don't know PHP and I don't know JS and I don't know async... so my curiousity is mostly a burden :D
 
I used to sort of understand it, then I went back to no understanding at all, I'm back to maybe 60%
 
10:58 PM
@DaveRandom that's Dunning--Kruger for you
 
Wes
@Trowski i completely get your point, but again, feels to me like unneeded magic
 
one of the good things about having actually understood stuff at one point is that you will forever be aware of how little you understand it, regardless of the transient level of understanding
you can call that the DaveRandom effect if you want
 
@cmb How often do comments refresh? I've deleted a crapload today but they're still showing, hours later.
 
Not in this case. The API promises (pun sort-of intended) to only invoke the callbacks registered once it has an actual value. A promise is just another placeholder.
 
maybe the Fucktard Effect
 
cmb
11:00 PM
@Crell don't now; maybe only once a day?
 
Wes
        $responsePromise = yield $this->sendRequest($request);
        $response = yield $responsePromise;
        var_dump($response);
 
Yeah, that would be terrible.
 
Wes
i wrote this and i thought it was so trivial it'd just work
 
Hm. I thought I used to see them gone within an hour.
 
Imagine having to always check if you got a promise back from yield.
 
11:00 PM
that would indeed be terrible
 
/me just doesn't like promises, period.
 
why on earth would you want the return value of request to be anything other than response?
 
yield (yield (yield()))
 
yield from @PeeHaa;
 
@salathe: Thanks a lot and well deserved. Never forget when you insisted on corrections in one of my SO posts. All the best!
 
11:01 PM
@DaveRandom That is going to be disappointing
 
@Girgias I know, people keep telling me about it
 
@PeeHaa depends what you are primed with
 
@cmb Any thoughts on where to put nullsafe?
 
Wes
@DaveRandom do you know all the use cases evar and future? :P
 
@Crell On that note, if you have a few moments I updated the Fiber RFC. I appreciated your feedback in the past, since you're at least familiar with the concepts, but not in as deep as many of us :-P
 
11:02 PM
yield from $yielding_generator("peehaa")
 
@Trowski Same URL, in the pinned list to the right?
 
@Crell Yes, last commit was this morning.
 
@hakre bonus sadism points for a dynamic invokation
 
Wes
well, at least it works now
 
@DaveRandom yield from eval('return $yielding_generator("peehaa")'); (never tried)
 
11:04 PM
@Wes no, but I do know that if you want status updates pub/sub is a much better way to do it, and that I cannot imagine any unimagined use case that would not be served by same
 
@Andrea /me Runs to youtube to find it…
 
cmb
@Crell good question! I think the OOP intro is really bad, so maybe put in on a separate page for now?
 
@cmb Hm. It is quite terrible, but there's not all that much to say about it. Does it justify its own page?
 
@Wes If you really want a promise from another promise, just resolve it with [$promise] and use [$promise] = yield $otherPromise.
But… I have wrote a lot of async code and have never wanted to do that.
The closest I can think of in Amp code is here, where we remove a promise from a list of pending promises based on the objects ID, but we didn't need the actual promise object for that.
 
Wes
that's a nice to know workaround. you are very likely right though, it's how it should be, but can't be totally sure, i think
reminds me of IteratorAggregate::getIterator() that can return other IteratorAggregate instances. had suffered a lot with that once
all that just because return $ia; is shorter to write than return $ia->getIterator(); :B
you maybe share the same sentiment on this, it is "unnecessary magic"
but, it's not the same thing, of course
 
11:13 PM
@Wes Not exactly, though I would liken that more to the case where a promise could return a promise rather than the current state.
IteratorAggregate is suppose to be used by the engine anyway, why do you care what it returns.
It's actual return type is Traversable, that's not terribly useful in user code.
Well, other than with foreach and yield from, as it's intended.
 
Wes
if i recall correctly in that particular case i needed to get the iterator because i needed to iterate two iterators in parallel, something i cannot do with just foreach()
so like i was doing e.g. $o->getIterator()->next() and rather than getting the iterator i was getting another iteratoraggregate
Traversable is also a big clusterfuck, i am glad i read recently you are trying to get rid of it
maybe i read wrong though
 
@Wes Wha? That's news to me
Must've been someone else.
 
Wes
i mean you = you all
english pronouns confuse me
 
Ah, I understand now. I've not seen anything about that, but I may have missed it.
 
Wes
i think in php8 extensions will be required to implement iterator. ie they no longer can implement traversable "alone" without implementing also iterator
 
11:24 PM
I do recall seeing that. I think that's for consistency with userland, where a Traversable must be either an Iterator or IteratorAggregate.
@Wes To be fair, I only realized getIterator() returned Traversable the other week. I thought it had to be Iterator too :D
 
@Trowski "A FiberScheduler defines a class is able to start new fibers using" - I had to read that sentence 4 times to figure out the grammar in it. I eventually did but it's very clumsy.
 
@Crell A word is definitely missing there.
 
Wes
@Trowski haha, and it's also recursive if i recall correctly, like php does stuff like $o->getIterator()->getIterator()->getIterator() indefinitely until it finds something actually iterable :P
 
@Crell "A FiberScheduler defines a class which is able to start new fibers using"
 
That works much better.
 
11:33 PM
Probably better would be simply "A FiberScheduler is able to…"
 
cmb
@Crell hmm, maybe just add a section at the end of "basics" then?
 
@Wes Precisely.
 
@cmb Works for me if it works for you.
 
cmb
Then please go with this as PR. Maybe someone else has better suggestions. :)
 
Roger. After I finish reading the latest fiber draft, if I have time before I have to leave the hospital. :-)
@Trowski ReflectionFiber applying to both fibers and schedulers feels super weird to me. Also, while I love the static constructors that's, I think, inconsistent with all other reflection classes.
 
11:47 PM
@Crell I see about more feedback on that. It could be two separate classes, though the API would be almost identical of course.
 
@Trowski Lots of reflection classes have nearly identical APIs. But AFAIK reflection is pretty solidly one-class-per-construct, with no static methods. Let's stick to that.
A separate RFC that adds nice create() methods to every reflection class would be a separate matter. No idea if that would pass.
 
@Crell I suppose I can use the pattern like ReflectionFunctionAbstract :-P
 
"Adding this feature directly to PHP core makes allows it to be used by a wide variety of library authors without concerns of portability." - Grammar parse error.
 
00:00 - 21:0021:00 - 00:00

« first day (3693 days earlier)      last day (1255 days later) »