so, by the end of the next week you should start working on alternating between refactoring existing code and adding new/missing features (I would estimate, that it will take a week to catch all the existing fuckups), @Shafizadeh
@LeviMorrison was up all night working on something but I keep getting stuck on the same thing: imagine you have a BST and you're searching for a node. You want to know if you've found what you're looking for, or to go left or right. So you compare for ordering first, ie. <=>, and it returns 0 (equal ordering). 0 doesn't necessarily imply equal value though so check if equals return true. Equals returns false... now what? Left or right?
@tereško That's what our UI/UX designer decided .. I just can respect to her idea .. noted that, it doesn't look that much bad for us Persian people :-)
@NikiC or is this a case where relative ordering should never be 0 unless the values are equal? SO pick a side one way or another, and go with 1 if there's no clear choice?
@tereško actually we have followed SO .. As you know, SO hided the "asking" button from the other pages and placed it inside questions .. So that red button is for asking lamtakam.com/qanda/132/…
As a technical point: when you click on one of the result, a back button will be created on the top-left under header .. it is a 5 layers stack which holds a json of the page and which create the dom again when you click on it
@FlorianMargaine Yes, I was contacted by platform.sh on stackoverflow, and have scheduled an interview with on Monday for the role of "DevOps/SRE". Thank you very much <3
@FlorianMargaine I'm guessing if eslint is a dependency for another package, and the other package installed the update, it could be compromised as a result
@FlorianMargaine I think the malicious script would upload your npm keys so other packages may be affected in the meanwhile (trying to find where I read that..)
So we have (quite often) an odd thing where the first time we run a search it is quite often much slower than when we run it not long later. I don't believe it's caching. I read maybe it's choosing a crappy execution plan, then after it updates to a better one. Feasible or nah?
@NikiC sorry for the spam / thinking out loud. I just have one question: would it be possible to add another arg to zend_object_compare_zvals_t handler def without breaking things in a bad way for extensions?
typedef int (*zend_object_compare_zvals_t)(zval *result, zval *op1, zval *op2, int ctx);
@Jimbo yeah that's true... My goal now is to learn Kotlin with the hope that a lot of Java shops will start to move to that over the next few years. But will probably be decades if it's a bank...
@PeeHaa I wouldn't if: 1) either we drop __equals and just accept that __compareTo == 0 means equality or == only uses __equals and the rest only uses __compareTo; 2) only use it if $a->__equals === $b->__equals; and 3) return values wouldn't be coerced
I don't understand people who complain about argument order. I mean, I look up the functions in the manual nearly every time I use them to check for error conditions, gotchas, etc.
Keep your phone on. Don't let the flight attendants use their scare tactics to turn off your electronically devices. =p
I have a screenshot of my gps registering almost 300mph when landing. It never picks up the towers in the air. Not sure if because of the protections (I know it cannot do speeds over 600 because of the possibility of misusing for weapons) or if it just doesn't pick it up due to location.
@PaulCrovella mostly agree, but at the same time those are the only valid use cases I have been able to come up with for non-comparison operator overloading. I'm not convinced there are enough use cases to warrant full-fledged operator overloading in userland. Comparison operators are a slightly different matter, I'm more OK with doing that, but I personally would rather just deprecate == with object operands and let the dust settle before doing anything there
(obv if it were deprecated I would also introduce a function that provides the old behaviour if you explicitly want that)