« first day (3609 days earlier)      last day (1336 days later) » 
00:00 - 22:0022:00 - 00:00

10:02 PM
Hmm… I'll have to give that some thought.
 
@Trowski to take it to an extreme… class Fiber extends Generator {}
then we can also just use it with Amp\call() and all our existing tooling
 
Avoiding that tooling is most of the point.
 
because it's all just a Generator
 
We don't want to have to use Amp\call() everywhere.
 
@Trowski no, surely not… but you still need it if starting new Fibers to do two things in "parallel"
 
10:04 PM
Amp\call() would essentially go away in a version of Amp using ext-fiber. (Might retain for BC of course).
@bwoebi You're probably referring to what I called async() in green-thread: github.com/amphp/green-thread/blob/master/src/…
 
yes.
@Trowski Generators are also still cheaper than Fibers, for single level operations
I imagine library code may still contain Generators
 
So little would return Promises directly that using generators in the same way wouldn't really happen.
 
possibly amp is a bad example, but for general, non-event loop usage - anything interacting with Generators now, can also interact with Fibers in future…
because it's essentially the same thing in the end, for any consumer
the difference is solely on the producer side
and as such, there is zero point in providing different APIs
Also, I think there's no benefit in separating the Fiber construct and start
new Fiber($callable, ...$args)
 
@bwoebi I did consider this.
 
It can then be started at the first advancing
 
10:11 PM
Though a generator doesn't actually start until you call current().
 
like we do with generators
I mean, a generator is $callable(...$args) - callable and argument need to exist at the same time - should be for fibers as well
@Trowski yeah, I think we just should mirror that
 
I feel like generators are that way because they needed to fit the existing Iterator API, not because that was the best design choice.
 
@Trowski there is no reason why we couldn't for example have started Generators immediately up to the first yield
or have required a call to a start() function first doing exactly that
 
@bwoebi You'd still have to call current() to get the value… so not starting them was probably better.
Same with Fiber. If you start the Fiber immediately, another method will need to exist to get the first suspension value.
Fiber::start() starting it and returning the first value makes a bit more sense IMO.
 
@Trowski we could have made start() also return the current value as a shorthand
on Generators
 
10:17 PM
Whether the arguments should be given to the constructor or start() is debatable.
 
If we have a dedicated start(), then it should be part of start()
 
Some method is needed to get the first suspension value. If implementing Iterator, I guess that method would be current().
 
@Trowski yes
 
I'm not sold on Fiber implementing Iterator though. That's not really the intention of fibers.
 
@Trowski that is not what you had in mind for Fibers … but is there any reason why they should not be able to?
I have at times fought with generators because existing function accepted callbacks and … called these with values
yeah, but in a normal generator you just cannot yield right through the callback
the fiber would allow that
 
10:30 PM
Seems like using a saw to cut paper. Sure it'll work, but it requires more resources and is more dangerous than using scissors.
 
I'm by no means advocating broad usage … but there are instances where I wished I had fibers, which are not tied to I/O.
 
You could write a generator that used a fiber to produce values if you wanted.
 
@Trowski you could do that … or just have a Fiber which is a Generator right away
 
s/Generator/Iterator
 
there's no point in requiring people to write decorators for the sake of it
 
10:32 PM
Well, I guess you could have a shared interface, but it won't inherit from Generator.
 
@Trowski no Generator, it having also getReturn() and send()
@Trowski why not?
 
Well, maybe it could, but I'm not coding that, lol
 
It would receive like a generator, send like a generator, throw like a generator and return like a generator … and then it's supposed to not be a generator?
 
Mostly due to time :-P
Ruby has generators and fibers, but don't share an API.
 
Wes
@PeeHaa do you have jeeves comics still stored somewhere?
 
10:35 PM
I think so
The blank ones?
 
@Trowski making it extend from generator is really just setting ce->parent
But an interface would be fine too
 
@bwoebi I assumed I'd inherit properties, etc.
 
@Trowski there are no properties on generators
and you anyway override the methods
 
I think an interface would be better. Extending something that it's not is weird.
I'll give it some thought, but I'm still not really sold. I think it's a pretty narrow use-case.
I'd like to hear what others think about the current API.
 
10:53 PM
@Trowski Extending something that it's not is weird. I agree on the statement, but I disagree that it applies here … I think a Fiber is very much a type of generator
the current API is not inherently bad fwiw … just I think we lose absolutely nothing by streamlining it with generators
 
I'm developing a despise for cpanel akin to wordpress
 
Wes
11:08 PM
@PeeHaa yes
btw i found this
:B
 
I have them all. Want me to post them in a chat room here or do you want a zip?
Or something else?
@Wes :D
fwiw remember @Wes remember I had issues with the bounding box of text in the comics?
I think people fixed that in recent PHP versions (if you also go the gd route)
 
Wes
i remember vaguely yes
you couldn't get the metrics of the text bounding box in order to center it in the image, or something like that, right?
multiline text
 
Yeah. I basically kept making the font bigger until it didn't fit in the box anymore
But the bounding box sometimes thought it was smaller than it was :P
I suspect this might fix it, but didn't test it github.com/php/php-src/pull/1845
 
cmb
yes, likely (but that fix only affects the bundled libgd)
 
Wes
font metrics are complicated
 
11:20 PM
Does that mean upstream is still borken @cmb?
 
cmb
not sure, but likely it produces different results
code has rather diverged
 
And that is why open source sucks :P
Honestly I consider gd generally mostly broken anyway
 
cmb
I won't disagree. :)
 
11:38 PM
Do you guys suggest that teams move to PHP 8 right when it comes out?
Or would you guys only suggest it for teams that have the extra capacity to make a lot of changes?
 
@Alesana "extra capacity"?
You mean enough developers on a team to account for changes?
 
@IluTov I didn't understand the question at all.
 
@Alesana no
 
This has nothing to do with debugging, but everything with code coverage
 
You never move to anything when it just comes out :)
You set up extra CI pipelines to test what to expect though
 
11:42 PM
Test the codebase on it at least
 
@PeeHaa I figured so
That's what I said pretending to know what I was talking about :P
 
PHP releases tend to be a bit broken for the first two patch versions of each new major
 
It's a decent philosophy to follow for most things, especially with tech
 
And yes it is generally good advice
 
Unless you absolutely must have the shiny new gadget that just came out, problems with it be damned
 
11:45 PM
There is nothing wrong with starting to prepare the code for 8 at some point though
 
Random question that has absolutely nothing to do with what I'm currently being impatient about: about how long does it usually take for a company to get back to a candidate after the final interview and completion of code challenge?
 
Wes
user image
11
i think it makes a nice t-shirt :P
just a sketch rn
hate/eight... too subtle?
 
I find it excellent
"let go of the hate, here comes eight"
 
Wes
:D
 
I still need to look into the features of 8 a little bit better to prepare
I'm upgrading this one microservice from 5.6 to 7.4
 
00:00 - 22:0022:00 - 00:00

« first day (3609 days earlier)      last day (1336 days later) »