« first day (1383 days earlier)      last day (3565 days later) » 

11:00 AM
hi
can someone suggest a nice book which gives step by step process for doing project in object oriented way from class diagram to coding?
 
hmm, not sure whether such a book exists for php in particular.
 
write it
 
"OOP Development with PHP7"
 
Chapter 1. "Best way to implement singleton with PHP 7"
 
I still can't wrap my head around the use of a factory class : \
 
11:07 AM
Chapter 6. "Skip this one"
 
which one? abstract factory?
 
Yes, I believe so. I've been through two tutorials on design patterns and I just don't get it yet.
 
factory is an instance, which creates other instances
 
That's the one where you'd write: class MyClass implements ..... { } isn't it?
 
no
 
I'm familiar with "extends" and that's about it. I'd love to get to grips with more OOP style stuff, it feels great when I move up a bit further in my understanding.
 
anyone gone past L22 in gameaboutsquares.com ?
 
hehe, I've infected them :p
 
I think it must have been simple factory I was thinking of, looking at that github page.
 
I kinda prefer it to 1024... no luck needed here.
 
11:11 AM
@Dan no, what you are thinking of is "inheritance"
 
so how does "implements" differ from "extends"?
 
one identifies superclass, other describes contract between two classes .. guess which is which
 
you can implement multiple interfaces but only extend one parent class.
 
forcrapsakethisshitissobadlycodedifeellikemurderingthatprogrammer.
 
if you do not understand the basic notation for defining classes, why the fuck are you "learning" about factories ?
 
11:15 AM
@tereško I assume that's aimed at me?
 
@Dan He's a bit frustrated by the fact that you don't know the basics of object oriented concepts.
@Dan I would suggest reading through all of this.
 
@Jack That's fair enough, I understand I have a lot of work to do, and a lot to learn.
 
What? @Dan's not a guru as well? Hello fellow normal php programmer :D
 
@tereško As for your comment: I've been in the chat rooms on SO many times, are YOU are without doubt the rudest, more abrupt person I've encountered. On more than one occasion you've insulted me, and others if I remember rightly. It does not say in the chat room rules that I must understand the concepts of OOP before joining in. You make be able to program better than me, but my god your social skills are poor.
@MoshMage ; )
 
I have this acute allergic reaction to a mix of ignorance and arrogance. It's a medical condition.
 
11:24 AM
@Dan @tereško brings balance to the room ... if not for him this room would be too friendly.
 
Reddit on PHP 7 Verdict. Mostly negative it seems.
 
@Fabien you could at least pretend to be surprised ...
 
Well it's just another case I have seen (albeit small) that most of the non-internal community seems largely in favour of PHP 6.
 
@Jack but then "if you do not understand the basic notation for defining classes, why the fuck are you "learning" about factories ?" isn't unfriendly /cc @Dan
 
from "outside" this decision looks like "the 7 was chosen, because it is a lucky number and there where 3 books published with 6 in the title 4 years ago"
 
11:26 AM
Tron would not be happy.
 
@Fabien I'm still puzzled on why people give a damn about an unreleased version anyway :P
 
just says, go learn basics first
 
if it's not out there, it doesn't exist. Internals states something else :P
 
@Ocramius Aye. Ah well. PHP is PHP.
 
@tereško I displayed an element of arrogance...? Read back through the chat. I didn't even ask you anything. In fact, I was mostly talking with Jack. This is a public arena, it's like you hearing people on the bus talking about PHP, and joining in for two seconds just to say "you're an idiot". You think that wouldn't piss people off?
 
11:28 AM
@iroegbu Err, I think your perception of what's friendly needs an adjustment :p
 
@Dan Yes, attempting to learn OOP design patters without even knowing what basic syntax for a class does, is arrogance ... either that, or it's just stupid
 
^ isn't unfriendly @Jack
just advice
 
It is now.
 
it says, quit doing stupid things... learn basics first.
 
@Jack well , yeah .. I got annoyed =/
 
11:30 AM
He's said worse :P
 
well .. you are free to report me to a moderator and demand a perm-ban
 
@tereško Well, let me try it for you. "If you want to learn about factories, try learning more about the basic OOP syntax first".
 
@Dan Okay, I think we got it now.
 
Some of us haven't.
But yes, point taken.
It's not a playground.
 
Damn, you guys should join internals.
 
11:33 AM
@Jimbo hell no. I would get an aneurism.
 
@iroegbu level 27 here
Also morning!
 
ha! I'm stuck 22
 
@Jimbo internals requires a lot of patience and meditation.
 
@Jack I don't doubt that it takes patience, or dedication. But meditation? No, let's just argue on the net instead of moving forward
 
@Jack technically it also should require some clue about language-design .. then again, the lack of it hasn't stopped anyone before
 
11:37 AM
^ could someone grasp the last comment?
 
sad part: he's proud of his work
 
@HamZa I think he assumes register_globals active…
 
I can translate it for you. He said "Please remove me as a friend from Facebook"
 
@Jimbo I meant that personally ... can't speak for the others ;-)
 
@Fabien we're not friends, I'm just in a certain group...
@Jack You do some yoga?
 
11:39 AM
hell no .. though, perhaps I should heh
 
@HamZa What an utter nob
 
Yoga is supposed to be pretty fgood.
 
speaking of meditation, time to address the kids patrol. cya
 
@bwoebi hehe I have no idea what you were talking about but I now see that it has been removed since php 5.4. No wonder :)
Damn register_globals is evil :o
 
what's register_globals? My PHP doesn't recognize that ..
 
11:43 AM
@AlmaDo removed since 5.4
 
@AlmaDo Removed
 
a-ha! two fellows trolled. I'm proud of myself (:
 
E_TRIPPLE_PING :d
 
idea was: don't use such an ancient crap :p
 
11:45 AM
@AlmaDo Well, that's questionable. :Ь
Well, I am going to do sh*t now in C#. :/ and f**k you soap
 
@Leri my condoleances
 
As if the language itself wasn't inconsistent enough, now the version is inconsistent as well. What a joke.
At least we're consistently inconsistent :P
 
@SecondRikudo sounds like you've just woke up.
 
@AlmaDo I haven't checked in since the vote was cancelled the first time.
 
hehehe
 
11:47 AM
and when it was different for PHP ? :p
 
BROWSERS!
 
SQL!
 
So is it final now? The next php is v7?
 
yep
 
11:48 AM
Finally :p
 
9 hours ago, by bwoebi
@NikiC @Levi @rdlowrey @ircmaxell can we talk about the next major as PHP Next (or PHP 6) in future. I don't like talking about PHP 7. I'm sane (well, at least sometimes).
^ that should be basically @wholeRoom11
 
@SecondRikudo Yes I saw that but again it's internals
 
lol
 
@bwoebi I don't know man, people might get confused. Especially since chat is sometimes indexed
 
@HamZa you just have to know what we're talking about :-D
 
@SecondRikudo the hopefully part made me suspicious :P
 
=P
Naruto's out BTW
Not much new
 
@bwoebi just saying. Also, I might start fiddling around
@SecondRikudo wuuut
 
Okay, so let's release PHP 11 next time and we are consistent again.
 
11:52 AM
sigh
 
@Leri ah, I see, increment in powers of two :-)
 
"Let's create our own php?" I wonder if that's plausible (time/work)?
 
@SecondRikudo it has been an ongoing disappointment for at least 6 month
 
@HamZa git clone -> write something and here we go
 
@HamZa no and no.
 
11:53 AM
@bwoebi :)
 
@tereško It has-_-
 
@SecondRikudo the current two that I actually wait for new episodes are: Breaker and Noblesse
both of which happen to be korean
 
@HamZa Let's create vm, call it hiphop and rename php to hack... and call ourselves facebook. -_-
 
I'm reading this https://nikic.github.io/2012/07/27/How-to-add-new-syntactic-features-to-PHP.html
I need to setup linux. I wonder if I should just go with a VM or remove this crappy windows and install lubuntu or something similar
 
@tereško There's SAO2 so far which doesn't show much promise, and there's Aldnoah.Zero which is brand new and looks decent
 
11:54 AM
@Leri I don't want to be a cactus :P
 
Obitooooooooo Nooooooooooooooooo :'(
 
@HamZa I have both.
 
php > interface a { function b($c = 1); }
php > class d implements a { function b() {} }
PHP Fatal error:  Declaration of d::b() must be compatible with a::b($c = 1) in php shell code on line 1
I don't get this. In PHP it's not an error to pass in too many parameters…
 
@HamZa I like how "remove this crappy windows" sounds. You're on the right way to go
 
@AlmaDo I did that last year. But this school of mine is totally windows oriented. So I'm hesitating...
 
11:56 AM
@bwoebi your implementation is more narrow than your contract declaration
 
@tereško Episodes as in anime or manga?
 
manga
 
@AlmaDo and that's an issue, especially because the parameter is optional?
 
@Fabien What'd you think was going to happen? :|
 
I guess I should have called them "chapters"
 
11:57 AM
@tereško Yeah, it's getting exciting
@tereško yup
 
I just see issues when the function declaration uses more non-optional parameters…
 
@bwoebi right. Your interface is saying: "ok, I may have parameter or I may do not have it". However, your implementation responds: "I will always have a parameter" - thus, it's more narrow and that's why it isn't allowed
 
Obito will be revived with Minato, Neji and Naruto's mother. Win the battle. Naruto becomes hokage and everyone lives happily ever after. Source... "Let me believe!"
 
@AlmaDo err… the impl has no paramater.
 
@Fabien what about sakura?
 
11:59 AM
Meh. Always useless.
 
hehehe
 
@bwoebi oh, so, I misspoken. "I will never have a parameter" is implementation response, sorry
 
Also. Sasuke and Naruto become best friends and joke about their first kiss.
 
@AlmaDo yep. But the impl might internally want to use func_get_args(). It just has no default parameter there.
 
@bwoebi that's the trap (:
 
12:01 PM
@Fabien Although
 
@AlmaDo !?
 
@Fabien The protagonist might die. Not that uncommon :P
 
@bwoebi interface doesn't know what is inside implementation. But what is obvious - that it's "not always" follows declaration. And there's no "middle point" in this issue. Either implementation follows declaration or it doesn't. Simple.
 
TBH I just want more Attack on Titan anime to release at this point.
 
12:03 PM
@bwoebi this will work :
interface A
{
   public function test();
}

class B implements A
{
   public function test($x=1) {}
}
 
Also I got a feeling that this should be the last "arc" for naruto. I can not imagine a follow up story when this finishes
 
but not in reverse way
 
@AlmaDo I don't get why the interface doesn't like this, because it's no error regardless of the impl.
 
yup
I want a Minato era spin-off
 
@bwoebi because your implementation is more restrictive than your declaration
 
12:04 PM
@AlmaDo restrictive by omitting parameters?!
 
yes
 
you still can pass more parameters in, it'll never error out.
the only issue is when you have an interface…
 
your interface has optional parameter, your implementation prohibit parameters as well
 
no, it doesn't prohibit parameters. It won't cause any issue if I pass more parameters than in the parameter list.
 
you're confusing formal features with language features
 
12:06 PM
no, I'm not. I just expect the formal features to match the language features.
 
ok, this will work:
interface A
{
   public function test($x);
}

class B implements A
{
   public function test($x=1) {}
}
and this won't:
interface A
{
   public function test($x=1);
}

class B implements A
{
   public function test($x) {}
}
 
well, the latter makes sense.
 
it's same thing
i.e. you can't have more narrow implementation
 
because here, when you call $interfaceA->test(); with $interfaceA being instanceof B, it'll error out.
 
hm.. hard for me to find better way to explain (especially why referring to fact, that you can pass parameters if they are not declared in prototype, is wrong for this case)
 
12:13 PM
I'd understand these interface semantics in Java, but not in PHP.
 
this. You're referring to language-specific features (which for you should justify this case). But interfaces are about - to define formal semantics.
 
What's the benefit here?
 
I would not be surprised, in fact, if your case will "work", but it would be a bad example for PHP. It's good that PHP treats that as an invalid thing
Benefit is - you're defining formal structure and do not rely on language magic. OOP is language-independent, so it's implementation in certain language should not rely on language-specific things (that's my point)
 
What's the reason to do this?
@AlmaDo I'd not consider that language magic, but a feature, which we really can rely on.
 
@bwoebi in this case it's a magic (because of flaw in parameters behavior which is allowed)
to illustrate:
mysql> create function test () returns int return 1;
Query OK, 0 rows affected (0.00 sec)

mysql> select test();
+--------+
| test() |
+--------+
|      1 |
+--------+
1 row in set (0.00 sec)

mysql> select test('foo');
ERROR 1318 (42000): Incorrect number of arguments for FUNCTION database.test; expected 0, got 1
i.e.: the thing that you can pass argument while prototype doesn't expect arguments, is a language magic
 
12:22 PM
@AlmaDo s/flaw/feature/ ; the only reason why this doesn't work in C++ etc. is because of technical/performance reasons. In asm you have to pass exactly as many parameters as the function expects. There's no other way. Or it gets expensive (see variadic fcalls in C).
The only thing I see is that many languages just overtook C(++) semantics later.
 
ok, it's "feature" in terms of language context, but "flaw" in terms of formal semantics
 
I wouldn't say so.
 
user895378
@DaveRandom Yes. That works because you're assigning the context at the time the socket is created. But that's not the problem. The bug is that if you set SNI_server_name in the ssl context after you make the TCP connection and use stream_socket_enable_crypto() the context option is not respected.
 
user895378
The 5.4/5.5 code only pulls in the SNI name from the context if it is assigned at the time of the socket's creation.
 
user895378
It should also pull it in if you enable crypto yourself.
 
12:27 PM
@rdlowrey why is that a problem, sorry? (bare in mind I've not seen the code in question)
 
user895378
This works fine in 5.6, BTW, because I coded it sanely.
 
bear? I have literally no idea which is correct there
 
user895378
5.6 is correct.
 
@bwoebi to justify this, then you need to have a way to distinct two cases: when test() is a function, which accepts any count of args (zero-count included) or when it's a function, which should not accept any args. Once you'll have syntax-supported way to do that, your case may have sense
 
user895378
It's just like any other context option. If it's assigned when you enable crypto it should be respected.
 
user895378
12:29 PM
It shouldn't have to exist at the time the socket is first connected.
 
@rdlowrey I'm not entirely sure why you have to (or even can) create a sock without knowing the name in order to set the ctx opt at creation time though?
 
user895378
@DaveRandom you can because TLS is an entirely separate layer from the TCP connection (and because it works just fine in 5.6). The two are unrelated.
 
user895378
The crypto handshake itself has nothing to do with TCP and isn't temporally bound to the creation time of the socket.
 
user895378
In any case, I can fix it. Don't worry about it.
 
No I totally get that, but I don't see why in the specific code you are writing here you can't just set the ctx opt at sock creation time
 
user895378
12:31 PM
I could, but it's still a bug. You shouldn't have to do that.
 
I see the wrong behaviour, I just don't see why it's necessary to encounter it
@rdlowrey Indeed, I thought it was blocking the lib though
which it doesn't seem like it needs to
 
user895378
@DaveRandom not sure I follow your logic here
 
@Fabien My first chat message this morning was "how but hurt are you guys on the oncoming 7?"
 
@rdlowrey The way you were talking last night, I thought it meant you couldn't get a viable release of the connector/broker lib without fixing this problem
 
user895378
I can because the CryptoBroker is a wholly separate thing from the TcpConnector
 
12:34 PM
@DaveRandom What colour is this site for you? charnicinteriors.com
At work we're getting yellow (old site). But outside and some work PCs it's the updated grey. This change was made in January :P
 
@Fabien you mean the top/bottom banner? dark grey
 
I've never been to that site on my 'formatted' work PC and I still see the old.
 
Level 30... What a pain...
 
user895378
I wanted them to be decoupled because it should work. But I guess I'll have to create another class, maybe CryptoTcpConnector that does both things.
 
@HamZa I liked Euclide much more..
 
12:36 PM
28
 
user895378
It's just annoying because it's a clear bug. I'd like to fix it in php-src either way.
 
@rdlowrey Your TCPConnector code can just always set that opt regardless of whether you may or may not enable crypto. If you do enable crypto it will work, if you don't it won't do any harm
 
@AlmaDo I see
@iroegbu 29 is crazy lol
 
What game are you guys playing?
 
user895378
@DaveRandom Yeah, it's going to have to :/
 
12:36 PM
@rdlowrey yeh I agree it should be fixed
 
user895378
Also: the pre-5.6 branch openssl streams code is all over the freaking place.
 
@rdlowrey meh, comment fixes All The Readability WTFs!
 
user895378
The things that should all be in the same places are split across files.
 
 
@HamZa Oh, another push the squares clone, giggity.
 
12:38 PM
@rdlowrey Have you figured out who to shout at about that yet? It makes lxr much harder to follow as well
 
@SecondRikudo this one is less based on randomness :P
 
Not a lot of point in shouting I suppose
 
user895378
@DaveRandom no, I think it's just the result of people who didn't do the original implementation adding things like SNI after the fact.
 
user895378
I'd rather not bother trying to refactor all of it in those older versions. 5.6 is sane so whatev. I can hack my way through to fix anything without moving all the code if necessary for the next two years in 5.4/5.5.
 
My remote address from the network waterfall is different to what is reported (and correct) from a DNS checker. Keeping in mind I've never visited this site before. Where would this cache be?
 
12:40 PM
@HamZa godamn this game is addicting.
 
@MoshMage sure. I wonder how many levels there are. I'm at 35 30
 
user895378
It drives me nuts when people say things are "addicting"
 
user895378
Nothing is addicting.
 
I'm considering not working the rest of the afternoon and find the answer to that question ;D
 
user895378
Things can be addictive, but they cannot be addicting.
 
user895378
12:42 PM
This is not a word and it's only a matter of time before it becomes accepted usage because everybody says it.
 
user895378
</rage>
 
My bad, @rdlowrey you're profoundly correcto
 
user895378
Sorry to drop the language bomb on your face. That rant has been building for years listening to people who aren't you say it :)
 
Nah, it's ok; I have those as well x)
 
@rdlowrey Well at least you are correcting us. First time heard someone correcting it. So thanks
 
12:43 PM
And i actually enjoy being corrected when writing engrish as it's not my first-language and sometimes i do crass mistakes :)
 
what an awesome situation: I am doing everything that I can to not any blame on my coworkers for any delays
 
@tereško good guy greg, is that you?
 
@rdlowrey I'm fairly certain that has already happened
 
but of those assholes blames anyone but himself
 
user895378
@cspray Regardless, everybody says it and it drives me crazy. Whether the language gods on high have officially relented at this point I cannot say.
 
12:45 PM
and to add insult to injury, he has the attitude: "I cannot possibly give you an exact estimate for the task X, therefore I will write it down as 2 hours"
 
@rdlowrey Yay verbification. I'm sure eventually I will addict you to it.
 
Well, when I google 'define addicting' it gives me addictive... but lists addicting as an adjective. I get your frustration though, I have some family/friends that say "irregardless" and it is everything I can do not to slap them in the head when they say it
 
:-P
 
user895378
Oh, irregardless is another one that makes me crazy
 
@HamZa should be 35
 
12:47 PM
@cspray lolwut first time seeing "irregardless"
 
> the word appeared in print as early as 1795
 
@rdlowrey irregardless reminds me of SNL's "The ball game" :)
 
Welp. I just got an error "that is not a correct dateTime string" asked the database guys what on earth were they expecting to recieve, answer: "something like 08:00"; "but.. that's not a dateTime string", I said, to which he answered "we only need time in readable format" ba-dum-tss
 
Also @rdlowrey it was a newspaper in SC that is the 1795 usage, so blame your people for that :-P
 
user895378
@DaveRandom of course it was. This is brilliant.
 
12:48 PM
@cspray if they're using irregardless properly then there's no bad in it, though if they use it instead of regardless I can understand your pain x)
 
@Jack Do you get irritated for "de enigste" vs "de enige"
 
user895378
@MoshMage that's the only time anyone here ever seems to use it :)
 
Starting new job in 16 days.
 
Congrats Leri
Guess the task was good enough :p
What are you doing?
 
@rdlowrey such inconsideration. how dare they! :x
@Leri HUZZAH!
 
12:53 PM
@HamZa yeah, but "de enige" is by definition "de enigste", just not the other way around ;-)
 
@Leri I wonder if I will be quitting my current on in 30 days ...
because today I have already spent about 90 minutes on various "review meetings" and I will be probably spending 90 more
 
@Fabien Thanks. Basic responsibilities will be creating back-end for games, including game logic, also removing old betting system and integrate new one. That will be hell of work.
 
@Leri so, Spain?
 
@AlmaDo Don't know about them yet. We are releasing plugin I made this Friday.
 
@Leri huh? I mean, you were about to relocate to Spain (for new job place)
 
12:56 PM
More likely, I won't be moving there. Situation was/is pretty bad.
 
@Leri neat!
 
@AlmaDo Well, the thing is if I start and I will this job, I won't be relocating.
I.e. I won't work for them anymore.
 
hm. I got this. It's.. not such a good thing in this. But yet - congrats
In context of latest changes in our laws about Internet & public activities, I'm thinking to relocate. Now serious
 
@AlmaDo Thanks. Well, the good thing is that with them it did not work well. For example, today I needed some data from their soap ws and property was missing. I told that to their dev and he's told me that it's missing from wsdl, so now I am trying to parse soap xml manually. :/
 
they want to create new USSR with Iron wall, and I don't want to be inside that
not sure if that's same in your country
 

« first day (1383 days earlier)      last day (3565 days later) »