« first day (3051 days earlier)      last day (1888 days later) » 
00:00 - 20:0020:00 - 00:00

12:00 AM
@JoeWatkins :(
 
@Tiffany well if the only reason to use Linux is for the terminal, then I can do most of my things with CMD/PS as most of the tooling is available anyway
I do miss things like gdb/valgrind/strace as those kinds of tools are much better on Linux than the alternatives here, but that is it
 
@Kalle I like keeping PHP and web server separate from my gaming machine :P
(boxed up in a VM)
Though, I did have xampp installed at one point to get some quick and dirty work finished, but I think it's gone now
It's just personal preference
 
I used to quite like the tooling in windows, many moons ago, I haven't used it for years, but in general, it was less forgiving and would show bugs easier than nix, stuff would just work on nix that was clearly broken, but windows would always catch it ... alas, it wasn't enough to keep it around, and I don't really game either ...
 
Yeah I get that, like I just have a partition for development stuff and that works fine for me
@JoeWatkins sorry to hear that with Dmitry, I'm not sure what is up with him lately, he seems "stranger" than usual and more distant
 
stress maybe?
 
12:04 AM
Maybe, wasn't he supposed to depart from Zend very soon?
 
everything is fine, all the while you agree with everything he says ...
the moment you try to voice an opinion he doesn't agree with, or do anything he doesn't like, he throws his dummy out of the pram, I'm pretty fucking tired of it ... I don't like the way he talks to me, or anyone for that matter ... and I don't care what the reasons are either ...
 
Yeh I get that, and it makes contributing to those Core parts even harder than already is
 
I take it he can't be reasoned with? Like if you try seeing it from his side, and reasoning ... well... I'm guessing if you try reasoning with him on what his viewpoint is wrong, that would just make things worse
there is a trick to convincing people, I just can't remember it at the moment
 
I'm not that familiar with optimizer, don't pretend to be, but the patch I done was approved by nikita, and it is correct, it fixes an exported api function, and he wants to work around the bug in opcache because it makes some faulty assumptions ... that's so backward, the api is broken, it should work no matter who is calling it ...
 
lolwat
 
12:09 AM
if there are bugs in opcache then fix them, but that's not a good reason to leave the api broken ...
 
I agree with that @JoeWatkins, always fix the root of the issue
@Tiffany sure you can reason with him, but I do also believe that the language barrier for him plays a part in this at times or at least so it seems
 
that's the whole... not relying on side effects of a class (or function, or piece of code...) to produce a desired outcome
 
I know he'll revert it and do whatever he feels like ...
 
@Kalle that's too bad
 
@JoeWatkins that sounds like Jani (Sniper) back a decade ago
 
12:13 AM
I'm not really sympathetic to a language barrier, a language barrier may stop him from understanding wordsworth, but it does not prohibit mutual understanding of code ... he just has very strange ideas sometimes ... on everything ... the other day he suggested I make some changes to pcov that make it 15% slower, then said 15% wasn't really significant ... if anyone done anything that made any code 15% slower in PHP, he would loose his shit ...
implementations have been rejected for less ... several times ...
 
I agree that you shouldn't really be sympathetic to a language barrier, especially not after so many years of contributing and taking part of the project.
 
@JoeWatkins maybe comes down to what you find rewarding as a human being, ie more rewarding to be right or acute than to be a contributor to a common goal.
 
Well yeah, you could see what almost happened with the ??= operator @NikiC implemented, where it seemed like he would lean towards not implementing it due to complexity or possible slowdown (forgive me if that is wrong, but that was how I understood him)
 
Some people are incredibly good at things but the motivation sometimes warp a bit and perspective is lost.
 
Anyway it is 2am, I got to go to work, later Gents
 
12:17 AM
o/
 
he's a very excellent programmer ... but not a great collaborator ... why is it do you think that zend don't employ two dmitry's ... it isn't because they don't exist ...
\o
 
heh
back to watching lecture video
 
2am is a really strange time to go to work
 
12:33 AM
Depends on what shift you work. When I worked at a teleconferencing center third shift didn't start until after midnight.
But, yea, it is a pretty weird time to work in general.
 
I think @Kalle must moonlight as an exotic dancer ....
3
 
If I want to release an alpha on pecl, do I just use alpha for the stability?
 
@JoeWatkins I would like to work at 2am. That would be a dream job for me, night shift as a dev.
 
I think so ... you don't often see alpha, anything other than stable is a bit harder to install, "pecl install thing" doesn't work out of the box ...
it's 01:45 @Tiffany ... it's ... not that great ... I spent all day working and all night being annoyed, pretty normal for me ...
 
@JoeWatkins it's weird for me, I tend to have the motivation and thought processes required to program at 2am ...
during the day? I have to force myself. 2am? it's like it magically comes to me. (though I have to be awake through most of the day prior)
 
12:47 AM
it's probably to do with something other than magic, or the position of the hands on the clock ... I do most of my best stuff at night, just because no interruptions ... no energy left for brain stuff today though ...
 
I'm doing this CS50x course, I've learned more about binary and stuff in the first lecture than...ever...and it's explained in such an accessible way.
@JoeWatkins could be, I'm calling it magic :P
 
I think I've had enough of yesterday, I'm going to sleep ... nn all
 
goodnight
 
@Tiffany I use Stripe.js with the Elements API to integrate a CC payment field into the websites checkout.
It allows the CC field to be like any other form field in the checkout.
 
1:10 AM
@Trowski alright. I had started with Elements, but Checkout looks easier but less customizable. I may go with Checkout initially just to get something going, but switch to Elements later.
 
 
4 hours later…
5:16 AM
Never move a node_modules directory around in a JetBrains product
Indexing...
More indexing...
Still indexing...
Lots of indexing...
Did you know I'm indexing?
Because I'm indexing.
Also, indexing.
 
sounds like you're having fun
Coincidentally, I set up a node project on OneDrive, I ran audit which added/removed a bunch of files. OneDrive sends an email asking if I intended to delete so many files.
I'm messing around in scratch for an online course and... not getting what I want... plus cat sitting in front of keyboard isn't helping
 
it's another excuse for sword fighting
somewhat interesting that once I change some js file npm build insta notifies me of build success... like not even a full second... takes x5 more time for a css file change
 
5:31 AM
I think I'm being told it's bedtime by one of my cats
 
:)
 
\o
 
6:01 AM
posted on February 22, 2019

News will be up later today. After my nap.

 
user image
4
@Ekin ^
 
ha, perfect :)
 
6:43 AM
\o
 
7:26 AM
o/
o_
o zzz
 
mornin
 
8:00 AM
minion a servile dependent, follower, or underling
 
@DanLugg oh so much that
or basically: compiling and indexing. First compilation takes an eternity and then it indexes the autogenerated sources...
 
8:12 AM
@bwoebi What language are you compiling?
 
@NikiC mainly protobuf to java
and it's a lot of this, a few million lines of generated code
so each time I change anything in the proto defs, it needs to reindex the whole of it...
 
@NikiC have you read any of this email thread about get_call_op ?
he wants to break it to suit optimizer, I've repeatedly asked him not to do that, with every combination of words I can think of, and he insists it's the correct thing to do ...
he doesn't seem to understand why it's necessary that those flags are respected either ... I don't know what else to say to him ...
 
@JoeWatkins I've only glanced over it, but I think he's right
 
8:27 AM
so it should be impossible to hotswap functions ?
 
@JoeWatkins It should not necessarily be possible to hotswap functions while optimization is enabled
 
and jit ?
 
And if it should be possible, then it needs to be checked comprehensively. As Dmitry said there are lots of places in optimizer making assumptions about this, especially that internal functions do what they're supposed to do
 
@beberlei here is the notes on hotswapping, I give up on it, apparently I'm not allowed to fix the compiler because opcache, and opcache will probably continue to ignore compiler options and break the ability to hotswap ... if you've any questions ask, but I don't intend to continue working on it anymore ...
 
Morgnins
 
8:44 AM
@JoeWatkins Re-reading what I wrote last night, I suppose I was too tired to even write a sentence with anything meaningful, naturally I meant to go to bed so I could get up to work which I was actually late to (thank you public transportation in Finland) =(
 
@PeeHaa wanna poke jeeves about why bugsnet issues stopped being posted?
 
Sure
Is bugs broken in specific of jeeves just down?
!!uptime
 
╔═════════════════════════════════════════════════════════╗
║ [15 days, 7 minutes and 58 seconds] without an accident ║
║               since [2019-02-07 08:44:38]               ║
╚═════════════════════════════════════════════════════════╝
 
!!reboot
 
Restarting now! o/
 
8:52 AM
bugs specifically.. other stuff has been working
 
k let me see
 
9:23 AM
!!uptime
 
╔════════════════════════════════════════════════╗
║ [2 minutes and 13 seconds] without an accident ║
║          since [2019-02-22 09:20:54]           ║
╚════════════════════════════════════════════════╝
 
given:
<?php
$i = 0;
$a = "a";
while ($i < 1000) {
    $i++;
    echo $a;
}
echo $a;
echo "\n\nEval Output:\n\n";
eval($rawCode);
$times['Eval Code'] = microtime(true);

echo "\n\nCompiled Output\n\n";
PHPCompiler\Backend\VM\VM::run($opcodes, $compileContext);
//($opcodes->handler->callback)();
$times['Run in Compiled'] = microtime(true);

$opcodes->handler = null;
echo "\n\nVM Output\n\n";

PHPCompiler\Backend\VM\VM::run($opcodes, $compileContext);
$times['Run in VM'] = microtime(true);
Eval Output:

a...a

Compiled Output



VM Output

aa...aa // Twice as many "a" here

Timers:
  Initialize Libraries: 0.032742977142334
  Parse: 0.004755973815918
  Traverse CFG: 0.00032997131347656
  Reconstruct Types: 0.077357053756714
  Compile: 0.0009009838104248
  JIT Compile: 0.059746980667114
  Dump CFG: 0.00043797492980957
  Eval Code: 0.0012500286102295
  Run in Compiled: 0.00061893463134766
  Run in VM: 0.73058104515076
it's really weird, the output of the compiled execution occurs after the execution, and after PHP outputs the debug string which is on the next line
 
Test. Ignore me. – #77654
 
it's almost like they are in different threads
 
@Jeeves \o/
 
9:31 AM
Now to update the server and break it all again :P
 
\o/
 
What does "sheets" exactly mean in CSS? (This room seemed like the best one since I couldn't find a HTML/CSS room.)
If I'm linking an external ".css" file, sheet would mean the ".css" file itself. This makes sense.
What if I'm adding rules in a style element? Does "sheet" have any meaning in this context? I just have an element, and cascading style rules in the element. I don't think "sheet" would mean anything. If the meaning were to be strecthed, it'd mean the style element...
I'm going to explaing what CSS is to some beginners and I want to be sure about what I'm saying.
 
It's coming from the pre puter era
 
There were literal sheets/papers? Can you elaborate?
 
Most terms like that are coming from ye old print media
!!wiki style guide
 
9:41 AM
A style guide (or manual of style) is a set of standards for the writing and design of documents, either for general use or for a specific publication, organization, or field. (It is often called a style sheet, though that term has other meanings.) A style guide establishes and enforces style to improve communication. To do that, it ensures consistency within a document and across multiple documents and enforces best practice in usage and in language composition, visual composition, orthography and typography. For academic and technical documents, a guide may also enforce the best practice in...
 
Oh, haha. So it doesn't directly related to web. Now it makes sense.
not*
isn't*
I need to take a break :|
 
:)
oooh RIP travis? :(
 
morning
 
Morgens
 
Long String in Return Value is Empty – #77655
 
10:05 AM
morns
 
o/
 
10:29 AM
@PeeHaa Is there a blog list?
!!blogs
!!help
 
Built-in commands (* indicates admin-only):
 admin - Manage the bot's admin list. Use 'admin help' for details.
 *alias - Add a bash-style alias
 *approve - Approve the bot for talking in this room. Room owners only.
 *ban - Ban a user from interacting with the bot for a specified period of time
 command - Manage command mappings. Use 'command help' for details.
 help - Alias of 'command list'
 invite - Invite the bot to join a room. This can also be done through the chat web interface.
 *leave - Ask the bot to leave the room. Room owners only.
 
@Jimbo No. We use feeds for blog posts
 
I see too much @DaveRandom in these comments
 
Jimbo has made a change to the feeds posted into this room
 
@Jimbo You are attempting to start again? :)
 
10:34 AM
Yep, it'll be some PHP but also Golang too :)
 
Cool
 
posted on August 08, 2018 by James Mallison

Most of the code you write in Swift has to at least consider asynchronicity when building an iOS app, apart from updating the ui, and even then you have to think about where the correct place to do this is.

 
Yeah except that's like 8 months old - interesting how I can't delete it :)
 
:P
 
an hour and a half ... I really hate docbook ...
 
10:57 AM
 
11:43 AM
@Trowski what's going on here ?
 
posted on February 22, 2019 by James Mallison

Golang doesn't provide constructors but instead advocates for a package-level factory method with the New convention. If only this were then the singular way of initialising an object; unfortunately this is not always necessarily the case..

 
!!rfcs
 
11:59 AM
\o/ /cc @NikiC
10
 
\o/
 
\o/
 
\o/
 
12:13 PM
@JoeWatkins congrats on passing the narrow margins RFC ^^
 
was nikita really
 
it takes a village
 
@JoeWatkins nice
 
yeah, one less thing to worry about ... but I'm just waiting for z to write a new rfc that changes it next week ...
 
He most likely will do a comeback soon, but his was very controversial IMO, some good points but just as many fault ones
 
12:21 PM
the total silence (+ vote results) after he spoke up on the vote thread might have sucked the wind out of his sails
 
Doubtful
 
guys, how do you do the pagination for REST API responses?
 
I'm not sure I like the idea of editing the original voting RFC with the new changes, shouldn't we be maintaining process docs somewhere?
 
I dunno, but that's what we said we were going to do, so I done it ...
 
Ugh I hate making typos in tweets
 
12:28 PM
every damn time
 
the unspoken rule is that you can delete such tweets and anyone who liked/retweeted will do it without pointing or laughing ...
 
@JoeWatkins congrats!!!!
@tereško jsonapi next links
 
hmmmmmmmm
 
12:48 PM
I'm one more condescending bullshit email away from blocking dmitry aswell ... I'm so fucking exhausted with this shit, he won't listen to anyone, he doesn't care what businesses people have, he doesn't care that opcache fucks with everything ... he pisses me off ...
 
@JoeWatkins I think it would be good to take a step back and explain what the problem (as in the business problem) actually is
Because I sure don't understand how APMs and hotpatching are related
I think you're assuming that everyone knows the context here, but at least I don't
 
is it possible to do this in an apache virtual host conf file
<Directory ${PUBLIC_PATH}>
(using environment vars)
 
1:07 PM
Morning
 
Good morning, room.
 
> 3.8 Stake

The Stake Pattern is evident in problem ridden software written by
designers who have since chosen the management ladder. Although
fraught with problems, the manager's stake in this software is too
high to allow anyone to rewrite it, as it represents the pinnacle of
the manager's technical achievement.
 
@tereško I see this a lot.
 
1:22 PM
!!friday
 
Thanking you, @Jeeves
 
@salathe couldn't it at least have been nyannyancosplay or belle delphine, I mean even a rickroll but this =(
 
@Kalle ♪ It's Friday, Friday. Gotta get down on Friday…
 
Idea for wildcard use statements: use \NS\To\Foo* which translates any class reference beginning with Foo into that NS
 
1:34 PM
Even without a job, Fridays feel grand :P
 
@NikiC I'll try again tomorrow, I'm too annoyed now and am getting words wrong ... the fact that we have to give these kinds of reasons to fix what are clearly inconsistencies between opcache and zend, is also annoying, but whatever, I'll try from that angle ... you also made the same sort of assumptions dmitry is making which is a disappointment, I need at least one person to be reasonable, that's normally you, you're just as happy to ignore the inconsistency imposed by opcache as he is ...
I don't get that :(
 
@ircmaxell sounds like a way to encourage people to use prefixes/suffixes for their classnames :(
 
1:50 PM
no examples yet, but docs for parallel exist ... I got bored of xml ...
I forget everything I learn about docbook every time I use it, just laying out a class so that the methods are in order is not easy ...
 
2:03 PM
@JoeWatkins The secret to writing DocBook XML is... copy and paste :P
 
PSA: There is a Square Enix Sale currently at Steam and you want to buy store.steampowered.com/app/319630/Life_is_Strange__Episode_1 if you are into good storytelling adventures.
easily one of the best games I've played in a while
 
2:23 PM
any ideas how to tell if PHP is a debug build or not inside of PHP?
 
Do you guys know the difference between burro and burrow?
 
2:48 PM
@Gordon saw something like 30min of LetsPlay ... was not all that impressed
 
@tereško 30mins cant do justice to the story depth. it's an interactive movie really.
 
dunno ... it looked like there was only one path though. Like that bandersnatch thing from netflix
I was more interested in the Final Fantasy ... or some of Squeenix classics (since I already have all the good parts of Deus Ex)
 
@ircmaxell I feel like it would be saner to just import a whole namespace in that case. I.e. everything beginning with foo should really be just part of a (sub-)namespace foo.
 
@tereško it has two endings and there are decisions inbetween that slighlty alter the way there. but even without that it would still be a great story with interesting characters
 
@Gordon if you want a story-game, you should probably bookmark Hellblade
 
2:55 PM
@tereško the gfx look like I can play this in five years :) but looks interesting
 
0
A: GCCJIT, get the size of a type

chasep255I managed to hack together a solution but I feel like it was way harder than it should have been. There definitely should something like gcc_jit_type_sizeof(...) function added to the api in my opinion. I realized that in C code sizeof(T) = (size_t)(1 + (T*)0) so I tried to implement this wit...

so yeah... this is going to be fun...
 
@Gordon TBH, the biggest turn-off for me the way characters talked: "how 40+ year old people imagine teenagers talk"
 
@tereško the voice acting is terrific. but I am 40+ ;)
 
I have no qualm about the quality of voice-acting ... it's the things that they have to say :D
 
IDK how teenagers in the US talked by the time the game was made. I dont think its relevant. They talk like most teenagers in the movies
 
3:11 PM
@JoeWatkins Can you update the description of github.com/php/php-src/pull/3787 to link to the Weakrefs RFC?
 
@Gordon man, I wish. But, I bought FF9 for Switch before job loss, so I have that I can play.
 
@Tiffany it's 4 euros. cant do anything wrong with it
 
I have to really think about it. Plus, I already have so many games to play.
almost 400 in my steam library...
 
:)
 
3:26 PM
@Tiffany started looking for a new one or are you currently taking the extended vacation ?
 
@tereško I was "forced to resign" on Monday
 
ouch
 
stuff has improved since then though, found out therapy has a "sliding scale" for payment, and the cost is reasonable
I can try switching to a non-stimulant medication for my ADHD since I was reliant on Vyvanse (stimulant) specifically for my job. Stimulant medications require visiting a licensed professional every three months, but there's no sliding scale for those. If I can switch to a non-stimulant, I don't think I have to visit every three months.
 
sounds like you need to hit the books instead of hitting the steam :P
 
oh I have been
Tuesday and Wednesday I had to clear up some RL stuff. Last night I started CS50x. I'm going to try finishing it before end of next week.
 
3:33 PM
have you decided, which tooling you want in the next job?
php? c#? mysql? pgsql? mssql?
 
I'm not sure, honestly. I kind of want to try Go, but I need to learn it. I know there are tons of free tutorials for it, so I need to go through those. But I don't know if I want that, or if I want to delve into C#, or try and find something PHP again.
 
with Go you would end up as junior - not a good plan
but, yeah - I would start by deciding what I want for the employment
 
I've also been working on my dad's website as well, ... I started doing that yesterday, then realized I didn't have any scratch paper, so I got sidetracked in producing scratch paper to use by clearing out some legal pads with junk I don't need anymore.
 
... ya know the small things, like "not laravel"
 
yeah
Good thing is I have a bit of leeway. Not a lot, but I can afford to be choosy.
 
3:37 PM
btw, do you know how to use docker?
 
I wish. Docker only supports Windows 10 Pro, not Home ... -_- ...they have this community edition, but it's not full-fledged, and it blows
 
hmm ...
 
I wonder if Linux has that limitation? Maybe I can partition and install Docker on Linux.
 
no
linux does not have that limitation
also, there is no "Linux Pro" (no matter what Redhat keeps trying to say)
 
RH is swayed by Oracle I think
 
3:39 PM
you misspelled "corrupted"
 
:P
 
also deciding if I want to try hard for remote work, or find a job out west, or settle for a job near Chicago or St. Louis
@tereško any different than Clean Code?
 
I never read "Clean Code", but it should be
anyway, you should be torrenting it, since you are currently in the "unemployed" bracket
 
I have a copy of Clean Code I need to read through. Basically I'm going to spend the next 30 or so days polishing my skills so I can get a midlevel job and not have to settle for a junior position.
 
3:42 PM
awesome
 
and I don't have any errands I need to run today :D
 
so, no playing PoE :P
 
I only play PoE when I need a break, then I go back to working on stuff.
 
:D
 
though, I tend to loosen that before bed ...
 
3:46 PM
hi everyone...
is there any workaround for the fact that dd() is now showing all the html instead of rendering it?
 
@JoeWatkins I'm not really sure. The composer autoloader is included automatically, and from what I can tell if Yii.php is included, Yii's autoloader should be initialized, so I'm at a bit of a loss.
If anyone here is familiar with Yii, could they please have a look at this issue.
 
Aren't all those Clean Code / Clean Architecture books filled with examples in Java? Is it relatively simple to transpose those in your mind into PHP?
 
@Varin Yes
PHP's OO is fairly similar to Java in a lot of ways
There are also various patterns in Java that are not required in PHP, like the Strategy pattern.
 
Or singletons, although I'd argue that Java doesn't need them very often -- it's over-used.
 
@LeviMorrison Those are an antipattern in Java as well
Also, in PHP it's much simpler to just use global, if you've reached such a low point in your life that you need to use a global variable, no need for singletons even for whatever singletons are supposed to be good at...
 
4:00 PM
I've been in plugin patterns where they don't give me everything I need, and I need a particular object. Ideally you'd fix the pattern, but you can't always do that.
In PHP that should never happen, due to the request/response lifecycle.
Everything is short-lived, including most frameworks...
 
@LeviMorrison In civilized Java programs, the singleton-ness of an object is not enforced by the object, but by the framework
You tell the DI container that this instance/interface is to be instantiated once and shared, and that's that
 
Which should also be true in any sane PHP framework.
 
@Trowski Yes, although the "singleton" lifecycle setting is different in PHP frameworks than it is for Java frameworks
 
@MadaraUchiha Is it?
 
"singleton" for PHP is like "request" for Java
Since you don't have persistent memory across the entire server lifetime
 
4:04 PM
@MadaraUchiha Right. My view of PHP is different from 99.9% of those writing PHP.
 
@MadaraUchiha Who doesn't? :P
 
@PeeHaa Your mom.
 
@Varin it's a matter of learning the concepts being taught, not the language syntax. Abstract the language syntax into concepts, they can be applied elsewhere.
 
@MadaraUchiha No
Your mom
 
Also, nearly every single PHP developer outside of this room.
 
4:05 PM
@MadaraUchiha But I do. :-D
 
@MadaraUchiha My hope still is that's going to change starting from 8
 
@PeeHaa Really? The web SAPI is going to be deprecated?
Or something close to deprecated?
 
@MadaraUchiha better support for long running php
better support / more developer awareness
 
@PeeHaa What's the API going to look like?
 
@JoeWatkins why your response to dmitrys update on JIT?
 
4:07 PM
@MadaraUchiha Currently there are already at least 3 projects working towards it
 
@PeeHaa I know how those look
They don't seem very accessible (when compared to the ease of access of the normal web sapi) to your average PHP developer
How will engine support look like, though?
 
@MadaraUchiha async support is going to help a lot
 
@PeeHaa That much is true regardless of context.
 
@MadaraUchiha Basically the great work in github.com/concurrent-php/ext-async
That would make it a lot more accessible and hopefully would bring more and better tooling
 
My favorite part is that interfaces don't have to differ between sync and async.
 
4:23 PM
posted on February 22, 2019 by CommitStrip

 
@Trowski Yeah that's just super nice
 
5:21 PM
@Trowski I really like that as well, the only catch is that you're not always applying a boolean locking flag around everything. However if we are assuming a method must be only executed once at the same time for an object - and someone does add an async call somewhere in the call tree of that method, it leads to hard to find blow ups in production.
 
@JoeWatkins i am wondering if it would be more helpful if FCALL_BEGIN+END would be "inside" the op_array of a function and not on the call side. Although I imagine its a bit harder because you need to a.) find all exit points b.) call the opcode handler even when an exception is "skipping" the frame
 
I wish there would be a possibility to guard code blocks / methods against async calls within them and blow up then instead of possibly going very wrong. @Trowski
 
@PeeHaa haven'T seen that extension before, it looks quite good
 
And obviously if you use async calls within them, you need to make sure that state remains consistent if called twice ... or ... ... shift the responsibility to the dev to not call it twice from different async context, which is also quite error prone @Trowski
so there's definitely something to keep in mind - it can work well, if people are extremely careful. Can we make it in a way so that people don't easily shoot in their own feet?
 
I'm not sure what the right solution is… seems like if we try and fix it for them that solution might have it's own pitfalls.
 
5:27 PM
yes, it's not easy, otherwise I'd have told you the solution :-P
 
I very much agree it's a problem – I've written quite a lot of async code and weird object state due to simultaneous method calls still trips me up from time to time.
Optional blocking to simultaneous calls sounds reasonable, but say a call to another method is made – does that just throw or wait?
 
@Trowski throw
and the throw will give you an exact stacktrace where it happens
or maybe even wait and emit a warning
hm
waiting and a warning might be safer actually in a production env
if everything else is right except the guarding
there's no reason to throw
it might introduce some latency - but that's not worse than crashes
in this case - after all, in both cases the errors will show up in your monitoring
In the worst case it will just lead to a catastrophic queue, which, still, isn't worse than crashes
@Trowski thinking about it, I wonder whether we can make "must be executed only once on a same object (or globally if static/bare func) or not do async calls (otherwise warn and block) by default - otherwise all calls to anything doing an async call must explicitly await it (or we throw)"
so that you are forced to see your synchronization points in your actual multi-access-async methods
but for everything else it's transparent
basically a path to hiding in business logic and forcing visibility in async logic
because obviously I want to see my synchronization points. Sure it still is possible to not back all the state up, but at least I see what calls I need to analyze
At least I definitely want this topic to be thoroughly discussed before we bring async to PHP. It's - for me - the single largest pitfall with async via fibers...
 
6:07 PM
@bwoebi Often though it's not just the same method, but just object state between method calls (or worse, closures referencing object properties)
I think blocking certain calls will have to many gotchas to be viable – instances were state is protected where it needn't be or where state can be altered when it should not.
 
@Trowski true...
 
An optional way to mark a function that only one execution path may be executing it might be useful.
 
But the way it currently is I predict nightmares of debugging if you are not familiar with the whole stack
 
@bwoebi you don't want to blow up, what you want is a synchronized block Like Java basically.
 
If it's async the order of execution is entirely non-deterministic
 
6:16 PM
^ Was just going to suggest something like that.
 
@kelunik yes.
But still synchronized is also a bit feeling like applying bandaid
You want to have to worry the least possible about async states (unless low-level libraries)
Also @kelunik like @Trowski says, synchronized would only apply to a specific code, not to all accessors at once
 
synchronized (?object) { … } could act as a mutex around a code block based on a particular object (or entire thread if no object is given).
 
In this context I must think about how rust has a concept of ownership...
not applicable to PHP i guess though
 
synchronized on a function could apply to that function or method of a particular object.
@bwoebi Hmm… not really, no.
@bwoebi amphp/sync provides this functionality already with it's synchronized(Mutex, callable) function. I've used that function when cache was stale to prevent simultaneous requests. So basically this, except with a keyword.
 
6:35 PM
Well @Trowski - now we're talking about solutions to the problem how to fix the arising issues. My point though is how to prevent them from happening or catastrophically propagating accidentally. It's like the easiest mistake to make...
 
@bwoebi I'll give it some thought, but I question anything that could be automatically applied without limiting low-level libs or having too many holes.
 
@Trowski well, low-level libs would for once have to explictely specify their synchronization points. That's not even limiting, just making it readable and safe in the first place I think-
I am happy to see yields everywhere in my low-level code.
 
@bwoebi So you're thinking the opposite – everything is synchronized unless explicitly marked as safe to enter multiple times.
 
Just not in my business logic, there it's annoying
@Trowski yes, that's where I#m coming from
 
Maybe… I wonder if that would get annoying or not, since so much high level code (e.g. a request handler or middleware in http-server) is designed to be executed any number of times.
 
6:45 PM
but you're not doing async calls in most middleware. And most request handlers don't need to write to the objects either
request handlers are generally idempotent towards the state of their object
they maybe access a cache layer but the cache layer itself is already safe
 
Most request handlers are certainly doing async calls to shared objects, such as the database pool and redis pool. For middleware it depends. The session middleware certainly makes async calls.
 
Generally all mutable state of request handlers is either safe or recreated
@Trowski sure, but the shared objects themselves are safe
the problem only arises if there's state which is accessed multiple times at once and isn't safe
 
@bwoebi Yes, so long as those are marked safe that would probably work. But now we've introduced a new pitfall - unnecessary blocking – though a safer one.
 
@Trowski I know. But you can warn about that unnecessary blocking. The user must design his code in a way the unnecessary blocking does not happen (i.e. fix the bug why it was accessed twice or make the specific thing safe)
You obviously cannot avoid all pitfalls, this one is inherent to async fibers
But you can move the pitfall to a less harmful, less subtle way
I don't want to be bitten by it all the time. Now imagine hoards of junior PHP devs being forced to deal with bits of async code, you can be pretty much sure it will bite them often.
At least if you're warned about it, you can look the warning message up and learn how to deal with it
 
7:14 PM
@bwoebi Very much agree, If we can make the default be that the code works, but isn't concurrent like it could be that's way better than hard to trace bugs. Is this possible within ext-async, or only if it were part of the engine?
@bwoebi Speaking of junior devs, I'm confused a bit with this issue. Do you have any idea why the extra autoloader I added in this commit does not appear to be working as I intended for Yii?
Yii appears to be initialized by including Yii.php, which registers it's autoloader.
 
7:48 PM
stop_go_no_further.jpg
 
00:00 - 20:0020:00 - 00:00

« first day (3051 days earlier)      last day (1888 days later) »