« first day (3700 days earlier)      last day (1238 days later) » 

8:02 PM
@Crell var_dump(INF); // float(INF)
sign = 0 for positive infinity, 1 for negative infinity.
biased exponent = all 1 bits.
fraction = all 0 bits.
I'm on the wrong computer to test, but this should be encoded properly per en.wikipedia.org/wiki/IEEE_754-1985
 
Roger.
 
8:23 PM
 
DateInterval invert property should be bool ・ Date/time related ・ #80473
 
8:56 PM
@NikiC I'm confused. Normal division throws a fatal if you divide by 0 today. Isn't that why you'd use fdiv, so you can check after the fact rather than guard clause it before hand?
 
@Crell no, you use it if you don't want to check at all
 
But if you try to use INF for something other than printing you could get... interesting results.
 
Some code is designed to work with INF, so it really just depends.
 
@MarkR Eventually I'd like to make a library that uses fibers + threads + Amp to run existing PHP applications using only PHP as the server. Users could then add async parts to existing applications and immediately see benefits.
 
@Trowski The largest issue I've had with async based applications is the use of statics, this is a problem swoole has, you have no idea which thread you're going to read / write them to.
 
9:05 PM
@MarkR Eww… yeah, Amp doesn't do that. I've not been impressed with Swoole.
Threads in Amp are independent. There are data structures to share information if desired, but then it uses locking and synchronization to prevent such issues.
 
This is why immutable value objects exist. ;-)
 
@Crell Helpful, unless you're changing what object that thread-shared storage is pointing to :)
 
Wes
\o
 
@bwoebi What do you think, should I flag enums as final and work around the inheritance restrictions internally or should I introduce a new sealed flag? Also, let me know whenever you're getting tired of these questions ^^
 
Wes
9:19 PM
phpstorm being very imprecise lately on "unused element"
 
Re-using final could be a little misleading in that the class still has sub-classes.
 
Wes
getting a lot of false positives or no inspection at all
i just deleted a chunk of code that was actually in use
 
Jpv
Hey Guys , question if i'm using class contants correctly. I have a class that will have an array that will work as a dictionary( example ['WILLUPS' => 'Local Pickup & UPS Ground', 'WillCALL' => 'Local Pickup' .. etc ) . I'm planning to set this array and a class constant since I don't want anyone that initiates or extends the object to overwrite these values on their instance. M i doing this correct or constant are not mean to be used this way?
 
@Trowski That's why you have message passing instead of shared mutable state.
 
@IluTov you might have an idea how to go about this, did you do some AST manipulation? Cause I'm trying to be able to suppress exceptions with the silence operator @ and was thinking of doing some transformation by wrapping it by a try catch block
Not sure if that's the way forward tho :/
 
Jpv
9:23 PM
@Wes I get this often too, or get false errors highlighted. For errors sometimes i just have to wait for it to catch up. But for false hints, i restart php storm and wait until it re-indexes (i think is due because the project files are on the network )
 
@Girgias Doing this through AST manipulation could be challenging since you're converting an expression into a statement. I don't think you can do that cleanly because you'd have to store the value in a variable which would leak to the user.
 
Wes
also invalidate cache didn't work. i am using the EAP
 
@IluTov Right, makes sense. Just trying to wrap my brain around all the moving parts
Might need to tweak the HANDLE_EXCEPTION VM handler/helper
 
@Trowski I run Swoole in a single thread, my application makes use of huge amounts of in-memory caching to maintain linked lists of events to send to the end user when the API is hit, swoole allows me to keep them all in memory with no need to serialize/deserialize. For this specific use case the performance is off the charts compared to php-fpm
 
@MarkR Sounds like something that could be easily done with Amp, with a good API instead of a terrible one :)
 
9:30 PM
@Trowski It's something I intend to try at some point. 99% of the code is SAPI agnostic. Have you profiled the PHP-based HTTP parsing performance vs Swoole's in-extension handling by any chance?
 
@cmb Ok, my opinion is that it's a bug. A lack of result should not be an error. Commands are not out of sync, because after UPSERT query is executed there is nothing else waiting on the wire. You can prepare a new statement and execute. Fetching should always return an empty array. The behaviour is similar now to what emulated prepares did and what made them unusable for me. I think we should remove that error. I will submit a PR soon.
 
@MarkR No, I have not. I would imagine that the extension performance would be a little better, but in Amp apps the HTTP parsing is generally far from the bottleneck.
 
@Trowski For my app (0 IO in 99.9% of cases) I found it to be a factor, although im having trouble remember which one it was I tried before
I do recognise that's an incredibly niche setup though
 
@MarkR If the requests are very light, then yeah, I can see parsing being a factor. Does sound rather niche.
 
@Trowski Polling based communications loop (websockets often blocked due to ultra-strict firewalls). Multiple thousand requests per second per thread.
 
9:41 PM
@MarkR Yep, that sounds like parsing would be a huge factor there :)
 
@beberlei I swear that at one point I stumbled across a document showing how someone used the AST processing hook to compile new PHP files and load those instead of the originals. If I remember correctly, it has phrasing and misspellings common to asians who know English as a second language. Ring any bells? Trying to find it again and can't.
 
\o @Bill.Caffery
 
The HTTP/2 parser in Amp is pretty fast (especially with JIT), so for real-world applications the difference is probably negligible.
 
@LeviMorrison hm no, the only real use of the asst processing hook that i know of is the Google Stackdriver Debugger PHP extension
 
Wish I saved it somewhere I could remember it. It'd be a shame if such a novel technique gets lost only because of SEO and language barriers :/
 
9:43 PM
@Trowski When I'm not so utterly buried with time critical work I'll give it a shot and if I get any meaningful metrics i'll give you a shout
 
@MarkR Cool. I'd especially be interested in the Amp version using ext-fiber.
Probably the way you'd want to go for anything new anyway.
 
How does it handle the common DB extensions, does code need to be abstracted out to be able to take different ones?
 
@MarkR Amp has it's own async SQL interfaces and libs for mysql and postgres.
With ext-fiber, you could write an adaptor that converted almost any DB interface to use the async implementations.
 
@LeviMorrison this? github.com/bendmorris/pphp
 
Or, I would argue, that the Amp ones could become a de-facto standard.
 
9:48 PM
@beberlei Nope, that's not it.
 
@MarkR They are, in my mind, what PDO should have been.
 
@LeviMorrison this is crazy stuff though :o
 
@Trowski I'm browsing the mysql one now, any chance it supports MYSQLI_OPT_INT_AND_FLOAT_NATIVE ?
 
@MarkR Yes, int and float columns are ints and floats in result sets. There's actually no way to turn that off.
The library talks directly to the mysql server, it doesn't use mysqli/mysqlnd.
In constrast to the postgres lib, which is able to use pgsql or pq.
No one ever added async support to the mysql extensions, it was just "easier" to write a client from scratch.
 
*for bob :)
 
9:54 PM
that sounds appealing
 
@PeeHaa Right… I've spent hours reworking and understanding that code to migrate and upgrade it.
 
:D
 
Eh… it works. It actually hasn't changed much in the last 5 years. Mostly had to change because of Amp changes.
 
Welcome to my life! :P
 
Migrating it to use ext-fiber took me less than 30 minutes.
@PeeHaa v2 to v3 will be easier than v1 to v2. I know this because I did the migration from both for most of the Amp libs.
v2 to v3 is mostly removing yield and Amp\call.
@MarkR If you have the time and are interested, I've updated the Fiber RFC quite a bit in the last few days. I'm probably going to announce it to internals in the next week, but I could still use feedback.
 
9:59 PM
@Trowski I'll take a peek
 
@IluTov flag as final :-D
@PeeHaa haha
 
I'm really not understanding how the fuck does an exception backtrace to the nearest try/catch block :(
Even if that's probably useless to what I need to do >-<
 
Still looking for a way to solve warning to exception migration for io?
 
Feels like the magic happens in the ZEND_HANDLE_EXCEPTION handler...
Basically yeah
 
Do you think it's worth it?
 
10:07 PM
Well I think it is, but I've "only" spent 5hours on this
And it's the first time I really had a look at the VM and AST, so trying to understand all the moving pieces
 
Is this where you're looking at using @ to suppress exceptions for certain internal functions?
 
Well more generally but yeah that's the intent
 
10:29 PM
@Trowski I'm struggling to wrap my head around this, the first thing I'm getting confused by is will there be multiple schedulers all acting at once capable of handling different tasks?
 
@bwoebi Cool, ended up doing just that ^^
 
cmb
@Dharman fine! Thanks for looking into this.
 
@PeeHaa but just give me a spec (or something resembling a spec in the mysql case) and a reference impl to test against … I'll most likely figure it out
don't mean it'll be quitck… but…
 
10:52 PM
@bwoebi All the same. Nothing more enjoying than implementing something that is specced out properry
 
@Trowski Where's your fiber draft again? It's fallen off the sidebar.
 
I think 6hours on this and still not having any clue is enough for today
Don't know how to go about it, I imagine some OpCodes/Line jumps but I don't understand how these works and how I'd pass the necessary info to the HANDLE_EXCEPTION handler...
 
11:10 PM
@Girgias thinking in async is hard to brain?
 
@Tiffany It's not async, just trying to understand how the PHP VM deals with try/catch
 
I misunderstood I think :X
 
Well my brain is mush atm so might be me
 
No, it was me. Reading upwards through chat to find context
My brain isn't quite mush but the night isn't over yet so I have plenty of time
 
@JukEboX sorry, beer happened :-P
I'm out all day tomorrow but I'd be happy to look at this tomorrow eve from like 6pm UTC
I'm pretty sure I can fix your issue, ftr :-P
 
11:17 PM
@Girgias maybe look from the other end? heap.space/xref/PHP-7.4/Zend/…
 
@Tiffany @Girgias I can vouch for the fact that @Tiffany's brain is in fact irreparable mush
no worse than anyone else though so it should be fine
 
one of us, one of us, gooble gobble
 
@Danack The thing is I'm not even sure if I can use that mechanism, wondering if trying to mimic try {} finally {} might be less complicated >.<
Also I find it very hard to understand what the uint32_t in these functions are meant to represent .-.
 
@Danack I think more gobble that anything else
maybe a bit of rofl, definitely a sprinkling of lolwat
 
11:27 PM
I've been staring at that for like 3 hours
 
so thats a no then xD
 
maybe he was just meditating on it
 
@DaveRandom I blame you guys
 
yeh but as a mushy brain owner your opinion is irrelevant
:-P
 
@Girgias I would say go for a walk....but it's a bit late. so maybe some a little light thinking music - youtube.com/watch?v=Q16KpquGsIc ?
 
11:30 PM
@DaveRandom I wonder if Tiffany's brains are green and suitable for putting in litle white polystyrene pots.
 
@Danack Gonna try one last thing before leaving it for today :)
 
@MarkR yes, but unrelated to what's at issue here
I will leave you with this open.spotify.com/track/…
I can offer you this open.spotify.com/track/… but if you aren't on board with that then I'm afraid we just don't get each other
 
Does anyone know why this test case is switched off permanently? github.com/php/php-src/blob/master/ext/pdo_mysql/tests/…
 
8 messages moved to Trash can
lets just do that, and say, have a nice night sleep everyone who should probably be asleep.
@Dharman did you follow the blame notice?
> # (Note: Doesn't work currnetly on HEAD, see:
# http://news.php.net/php.qa/64378)
 
actually I suppose I will suggest open.spotify.com/track/… as well as open.spotify.com/track/… just to make it a bit hard for passers by to get any kind of handle at all on my music taste
 
11:39 PM
"I'm trying to port a simple test from PHP 5.3 and PHP 6.0 and I'm failing. "
 
@Girgias This looks like it makes more sense if considering fall-through of the catch opcode checks
 
oh look, an eagle - exits stage right
 
(into the lobby of the hotal California)
 

« first day (3700 days earlier)      last day (1238 days later) »