« first day (1438 days earlier)      last day (3501 days later) » 

12:59 AM
p8p
 
?
 
1:13 AM
@Leigh To be fair, they made XML to get everyone away from SGML, which was much, much worse.
2
Oh yay, my display name change is finally showing up. I'm a real boy now.
 
 
4 hours later…
5:25 AM
Good morning.
 
morning
 
5:55 AM
moin
 
Good morning
 
1
A: If x is an element of y and y is an element of z, is x an element of z?

Ja͢ckYou have described the transitive property of $z$. $z$ is transitive if and only if: $y \in z \land x \in y \implies x \in z$ In your example, $z$ is therefore not transitive.

\o/ my first mathematics answer :D
 
6:35 AM
posted on September 23, 2014 by kbironneau

/* by MonsieurLeMarquis */

 
can we use virtual and overwrite keywords in Polymorphism in php
 
@PaulCrovella any other way to use polymorphism
 
what are you trying to do?
 
6:54 AM
php does duck typing easily. that's pretty much the purest form of polymorphism there is.
 
Hello! If I put a .php file in a folder with "Deny from all", will the server / PHP be able to open it ?
 
The model is supposed to get all the data from the database of choice and the controller will then handle that info and send it to the view. That is how MVC works. — AlexKvazos 6 hours ago
 
Someone here using Office365? Good morning everyone btw. :)
 
@Basj yes...as long as the user your scripts run as has execute permissions on the directory, anyway
 
@cHao ok so "Deny from all" is for server web pages, but PHP doesn't care about this, as it is local access to files ?
 
7:01 AM
@Basj pretty much, yeah. "deny from all" just tells the web server what stuff people are allowed to request directly
people won't be able to get stuff in that folder, but php can include it
 
"Deny from all" only affects anyone or anything making requests to the server, but php doesn't have that limitation.
 
ok thanks
 
morningz
 
@Ja͢ck i want to know how can we work with polymorphirsm in php
 
morning
 
7:04 AM
@Fairoz okay, could you give a practical example?
 
No, that's how Laravel and other frameworks, which abuse "MVC" name for marketing, work. It has nothing to do with actual architecture. Actually, your recommended approach violates several principles of programming. It also pushes both the presentation and application logic in something that you refer to as "controller". — tereško 4 mins ago
 
i have two functions with same name and different body in base class and child class, i want to inherit it and call to a specific function
@Ja͢ck i have two functions with same name and different body in base class and child class, i want to inherit it and call to a specific function
 
@Gordon are you around?
Good morning
 
@tereško "This question appears off topic because for the love of god, I'm so very tired of watching people fumble with MVC."
 
I actually think it is a duplicate
but I really don't want to use my mjolnier on it
 
7:09 AM
would it make you feel better if I flagged it?
 
@Fairoz you want to inherit what exactly?
 
it sounds more like you actually don't want to inherit it
it also sounds like you are violating LSP, @Fairoz
 
quack =]
 
@Ja͢ck i want to inherit two classes and i want call a function depending on requirment
 
nope
 
7:13 AM
Morning
 
@Fairoz Ehh, php doesn't allow for multiple inheritance.
 
yes
or function overloading
 
When does that comes in that liskov substitution principle
 
@Ja͢ck here i am using only single inheritance
 
@Fairoz You said you want to inherit two classes ... so what does that mean?
 
7:16 AM
@Ja͢ck yah one is base class and second one is child class
 
class X extends Y, Y extends Z ?
 
class X extends Y
 
sounds like he wants functions with the same name, but different signatures
no you can't have that
 
@Leigh than what is the main concept of polymorphic in php, why should we use it?????
 
Nobody said you should use it
 
7:22 AM
is it me or I don't get what he wants?
he wants a method instead of his variable?
 
There's this widely accepted behaviour called, "picking the right tool for the job"
 
@FlorianMargaine i think he wants a special symbol that's only active inside a switch statement.
 
@Ja͢ck why is his variable not enough...
 
question is what would happen with multiple level switch
okay, i can take a guess, the inner most scope wins
 
@Leigh you mean we cant use polymorphirsm in php right ???????
 
7:25 AM
I think his code would be like switch ($obj->someMethod()) { ... }
@Fairoz It seems that your "?" key is stuck, please look into that.
 
@AlmaDo maybe
 
@Fairoz please put a minimal coded example in a pastebin/pastie and formulate a full question.
 
@FlorianMargaine $myVar <- This is the solution.
 
@LeviMorrison yeah, I agree
 
@Fairoz You can use subtyping, you can use function overloading, you cannot use generics or functions with multiple signatures. !!!!!!!!!!!!!!!!!
 
7:29 AM
switch ($myVar = (some expression)) also works, so...
Definitely not some new syntax just to get the variable.
 
@Leigh you can use function overriding, not function overloading
and generics don't make sense
oh god why am I answering to a troll
 
____Base Class___

public class fish {
public eat() { echo "fish eat"; }
public swim() { echo "fish swim"; }
}


______Derived Class______

class Dolphen extends fish {
public eat() { echo "hello"; }
public swim() { echo "hi"; }
}
 
yes sorry, derp, overloading is the same as having multiple sigs :P
 
i want to call the function from there
 
call what function? from where?
 
7:31 AM
inheritance sucks
 
from child class any function
 
and dolphins aren't fish
 
@Fairoz From child = $this->eat(); ... from parent = parent::eat();
 
^*2 that too
 
7:32 AM
especially that, actually.
 
@PaulCrovella It's a Dolphen ... totally different.
 
Dolphens are basically autistic Dolphins, mainly because they have some fish DNA
If mammals and fish could mate... Dolphens... nods
 
Reminds me of a South Park episode.. markdrought.com/images/LawyerDolphin.jpg
 
class Mammal {
	function mate(Mammal $daddy, Mammal $mummy) { ... }
}

class Panda extends Mammal {}
class Dolphin extends Mammal {}
I like where this is going...
 
morning
 
7:38 AM
a baby Pandolphin?
 
yes!
 
morning @Naruto
 
@Gordon what may cause that SE sites will prohibit visitor due to "country restriction"? (like SO can't be accessed, because "site isn't available from your country" )
 
ahhh coffee, the great motivator
 
@AlmaDo US sanctions is a not-uncommon culprit
 
7:49 AM
Inner classes are awesome!
 
Morning
 
@RonniSkansing thx ^^
 
any humans here?
 
8:04 AM
 
morning...
 
morning peepee
 
good morning
 
8:19 AM
I didn't get it... 3v4l.org/hgpGU
 
i didit get it either
question
why is that korean girls are hot?
 
@boyee They are?
 
yes
they are freakin hot
i love them
see this?
 
yeeeahno
1 message moved to Orphan GIFs
 
8:29 AM
neh not my thing sorry
 
hahah
what do you like?
any body here likes to play dota2?
 
someone is sharing his fetish with us? :)
 
we can chat along
lols
its just admiring lol
 
@boyee not asian
 
i was hoping any koreans here
 
o/ @SecondRikudo
 
@Naruto \o
 
posted on September 23, 2014 by kbironneau

/* by Jrich */

 
8:40 AM
mornings
 
hi, @DaveRandom
 
@DaveRandom hey
 
what the happy haps?
 
What is happy? It's too damn early
 
Not long till the conference now.
 
8:46 AM
anybody here likes to play dota2?
 
@Fabien inorite
 
@PeeHaa busy :) But I try harder to join more often.
 
is it worth buying phpstorm 8?
 
@DaveRandom How many crashing at yours?
@Prasanth Do you currently have a licence for < 8?
 
afaik just Joe, although can probably squeeze another in if required
 
8:49 AM
To spoon with Joe on the sofa?
 
No :(
 
@Prasanth You tried the trial?
 
@Prasanth I have finally migrated from ST to storm 8, will eventually buy it
 
I am actually using the EAP thing, and it's pretty cool
 
So if you think it's worth buying, buy it.
I buy mine.
 
8:51 AM
I think it's cool, but I am not sure if it's worth it.. especially compared against eclipse. it is based off eclipse isn't it?
 
@Prasanth No, it's based on IDEA platform, not Eclipse.
 
I really wish they do the end of world sale again (remember 21/12/2012)
 
@AlmaDo sanctions due to russia trying to annex parts of ukraine might be a cause.
 
@boyee that's just ... a bit spooky.
 
@Gordon is that some sort of official policy for SE? Or it's inherited from some US state laws?
 
8:54 AM
@Gordon that would be bad
 
@PeeHaa pff, racist .. what if your soulmate was Asian? :)
 
@AlmaDo state law
 
@Ja͢ck hehehe my taste for women ha nothing to do with my racism ;)
 
@Gordon ok, got it, thanks. So SE isn't the cause, right?
 
@PeeHaa :D
 
8:55 AM
@AlmaDo if you see any such restrictions it's due to law not due to SE taking political position I would presume
 
@Gordon I was asking that because those restriction page was under SE domain and with it's stylings etc.
not like request was blocked somewhere in the middle
 
@AlmaDo is there anything useful you can tell me wrt: I'm about to move a MyISAM database to another server by copying the data files. I believe this should work. I don't have any other options as the source server won't boot.
 
@DaveRandom eeeeeeek
 
cool!
 
I know
 
9:00 AM
It should work, actually.
 
'nin
 
It would work with InnoDB as well, if you chose to have each table in a separate file.
 
'in @JoeWatkins
 
We can has named parameters now?
 
Now?
 
9:01 AM
@Ja͢ck Last time I had to parse and mostly manually restore a ibdata file of 80G :P
 
I did some reading and I believe it should Just Work™, and obviously I'm going to copy the source files so I'll still have clean copies, but it sounds like the sort of thing where there would be a lot of potential gotchas
 
As in I want.
 
@PeeHaa Yeah, I only became aware of that per-table feature afterwards :(
 
Same here :P
 
Named params ... I see good and evil in it.
 
9:03 AM
What's evil?
 
Good timing. Mwahaha.
 
Yeh, @Jimbo is evil
 
what's the process for someone to have a php.net account? I added one yesterday, and it seems like when someone feels like having enough time to do it, is that it?
 
@FlorianMargaine basically, yeh
What did you ask for, src karma or docs?
 
@DaveRandom ? what do you mean "don't boot" ?
 
9:04 AM
@DaveRandom src
what's karma for? rfc voting?
 
And yes- if MyISAM versions are same, it will work. But I strongly don't recommend to do that
 
@FlorianMargaine Check with Ferenc on karma.
@DaveRandom That MX issue is rather familiar ... the one on ML
 
@Ja͢ck nah, I requested src :P
tbh it's more to have an account to assign bugs to myself
 
@FlorianMargaine Ah; if you have supplied a few good patches that were merged it's pretty easy to get karma on php-src
 
what's karma? :(
 
9:06 AM
@FlorianMargaine Ability to push to git.php.net
 
@FlorianMargaine Commit access, basically
 
But it also doubles up as voting rights and a few other things.
 
I'm not sure I want it... but well.
1 min ago, by Florian Margaine
tbh it's more to have an account to assign bugs to myself
 
9:07 AM
You don't have to use it
 
yup I know
 
php.net upcoming conferences seems broken
 
@FlorianMargaine In fact if you go explain that to Ferenc (Tyrael) there's a good chance he'll give you what you need.
How so?
 
@DaveRandom Hmm, the current behaviour of checkdnsrr() is technically correct, no?
 
@Ja͢ck Defaulting to MX is an API wtf
 
9:10 AM
In my case I would follow the CNAME, though.
 
But yeh, there's nothing strictly wrong with it
 
@DaveRandom Oh, I meant the other issue that was highlighted.
The default is just weird.
 
oh not read it
one sec
 
eek, look at the time ... bbiab
 
9:12 AM
Yeah I read that, was curious what peoples thoughts were
 
> This is one reason premature, and possibly uneccasserry, optimizations are bad.
made me laugh
just the word
 
I already said what my thoughts are ... if you have knowledge of the best way to do a particular thing, then it's not a premature optimization to deploy that knowledge, in any case, ever ...
 
I almost sent a reply to that thread.
Asking for a PR to do the optimization on VM opcodes.
 
do it
> Edited to add that there are probably some interesting stack implications with jumping to before the try statement from within a catch block.
he obviously knows what he's talking about, imagine it'll take half hour to patch it so everything is perfect ...
 
9:23 AM
I don't understand that
 
nor does he ...
 
I mean, I do... but I don't see where he wants to go
 
@JoeWatkins 10 minute patch, tops. Clearly knows what he is doing.
 
lol
 
that said... is there no effort to try to optimize said interpreter? the one translating AST into opcodes
I'm not saying it's an easy thing to do, far from it
 
9:26 AM
I'd be more interested in peep-hole vm optimizations.
 
but I'm sure there are things that could optimize the generated opcodes
 
Typically JIT happens in layers.
Peep-hole vm optimizations are probably the first and simplest layer.
 
googling "peep-hole" :)
 
Do constant propagation and stuff like that.
 
oh I see
and you mean peephole optimizations on the opcode?
 
9:29 AM
Yeah. Or maybe the AST if that is stored.
But I think the AST is destroyed for memory reasons.
 
that's the kind of thing I meant then
 
But either way, focus on the simple, low-hanging fruit.
 
yeah, ast is gone by runtime unfortunately ...
 
We don't want to do code generation at first.
Simple, higher-level optimizations first.
 
not sure when it should be done though
if it's on every opcode-generation pass, it may take too long
 
9:31 AM
morning
 
WTF does DateTime::add () both return a new datetime instance as well as mutate the current instance :|
 
@PeeHaa ...wat
 
> Returns the DateTime object for method chaining or FALSE on failure.
sounds decent
it's not a new instance apparently
... according to the doc
 
Ow. Still WTF
 
9:39 AM
@PeeHaa why?
return $this; is pretty common
 
@FlorianMargaine Laravel is also pretty common
 
@PeeHaa Yeh it is the same instance, just checked
 
@PeeHaa ... method chaining isn't a bad thing
 
It is
 
/me wonders if we could fix the datetime API in 7
 
9:40 AM
In 90 % of the cases it is a wrong solution
 
@DaveRandom I'll try to make it use ZEND_OBJ_ARG_INFO everywhere instead of ZEND_ARG_INFO for starters
 
It can't, because the inheritance is fucked
 
@FlorianMargaine Is that why directed to me? :)
 
9:41 AM
k :P
 
well, let's say yes, actually
I'm interested in your argument
 
It should be class DateTime { /* immutable */ } class MutableDateTime extends DateTime {}
 
$something->is()->wrong()->in->this()->chain()->somewhere()
 
@DaveRandom no.
 
...
 
9:43 AM
mutable and non-mutable containers may not extend each other. It's an LSP violation.
 
$obj = $something->is();
$other = $obj->wrong();
$stuff = $other->this();
$chain = $stuff->somewhere();
@PeeHaa your argument sucks
 
@NikiC Mutability is an extension of immutability. The immutable variant should not have the mutating methods, though.
 
@FlorianMargaine I think he means backtracing to oneliner is hard
 
@FlorianMargaine Actually it still stand :)
 
meh.. I don't buy it
 
9:44 AM
Again I'm not saying you should never do method chaining
Datetime just isn't one of the cases where it makes sense
 
@DaveRandom The mutable variant reuses the same method names as the immutable one. What you say is only possible if the mutable version adds addMut, subMut, etc methods. Not if it uses the same names
 
imho
 
@NikiC Yeh it's obviously not possible using the existing class names, and I'm also aware it will never happen. But from an OOP PoV, ignoring the current situation it does make sense.
 
@DaveRandom No.
Your inheritance tree is broken. Using separate names just makes it less broken
Immutability is an invariant guaranteed by the parent class, you can't (i.e. shouldn't) break it in a child class
 
Morning..
 
9:57 AM
@NikiC Disagree, but can see where you are coming from I suppose.
 

« first day (1438 days earlier)      last day (3501 days later) »