« first day (1723 days earlier)      last day (3225 days later) » 

11:02 AM
A joke is supposed to be funny. That's just sad.
3
 
...
anyway
 
11:33 AM
Why does this work - 3v4l.org/HY1mn . And I don't mean how...I mean why. Other than it would be a pita if it didn't.
 
@Danack What you mean by it?
 
@Danack insert because aliens meme ?
 
It's a static method - why does it fall through to the parent class.
 
@Danack When did PHP ever change the inheritance rules for static methods?
 
I'm asking why were they chosen like that to begin with.
 
11:40 AM
What way should it have been chosen?
 
Something like in java @Overwrite?
 
The 'inheritance' of the static methods to the child classes just kind of seems weird. We (as a community) tell people "static methods are bad, because they strongly couple one class to another" while glossing over the magic inheritance stuff that happens.
 
@VeeeneX huh? Even in Java a static member is inherited by its children.
 
@Sherif It could have been done without magic inheritance, so calling PlaceHolderPlugin::blah fails due to that static method not existing.
 
So expected behaviour is to not inheritance it?
 
11:44 AM
@Danack It does exist though. I'm not sure what magic you're referring to exactly.
A child class inherits all of its parents public and protected methods.
Nothing is said of distinction for statically declared methods.
39
Q: Are static methods inherited in Java?

AlgorithmistI was reading A Programmer’s Guide to Java™ SCJP Certification by Khalid Mughal. In the Inheritance chapter, it explains that Inheritance of members is closely tied to their declared accessibility. If a superclass member is accessible by its simple name in the subclass (without the use o...

Java doesn't prevent static methods from being inherited.
I don't know of any languages that do.
Can you tell me?
 
@Danack we agree on something!
static method shouldn't be inherited, and if they do, we should be able to change their signature entirely (like public to private)
 
Well, all you're telling me is that it shouldn't happen. What you're not telling me is why. It's a false burden of proof. You ask me why it's inherited and I have to say because you extended the class and it's public. So as per the rules of inheritance it definitely should be inherited. Now the burden is on you to explain why it shouldn't.
Also where's the precedence for this? Which languages do this?
 
@RonaldUlyssesSwanson I don't fully agree with that. The fact that static method are inherited is weird though.....it's actually more like we've managed to combine classes (which shouldn't inherit static methods) with a meta-level set of data about the classes which should be a separate interface...
> Also where's the precedence for this
Why are you asking for that?
Some kind of appeal to authority?
 
No, I'm just trying to understand where this notion is coming from? Why is this strange when it's normative (as in adopted by everyone else)?
You can't just go to London and ask "Why do you idiots drive on the left side of the road?". Clearly that's normal there. Everyone agrees. What's not normal is trying to get everyone to change their ways because one person thinks differently.
What's important is that we all stay on the same page.
 
@Sherif for the same reason __construct can have different signature when you extend a class, there is no way to define a formal contract to fullfill (read "interface" for static stuff) and therefore forcing compatibility is not necessary
 
11:57 AM
@RonaldUlyssesSwanson What does that have to do with not allowing static methods to be inherited?
__construct is a magic method. It's a special case. Doesn't really compliment your argument here.
 
> Why is this strange when it's normative (as in adopted by everyone else)?
Because static functions are static except that they aren't.
 
@Danack Hmm? Do explain.
 
And what I meant by they seem to be mixing up meta info with class definition is that:
interface Info {
    static function getInfo();
}

class Foo implements Info{
    static function getInfo() {
    }
}
is kind of a short hand for:
interface Info {
    function getInfo();
}

MetaFoo implements Info {
    function getInfo() {}
}

class Foo {
	static $fooMeta = new MetaFoo();
}

Foo::$fooMeta->getInfo();
 
i have a bunch of emails in database i want to get from database and send mail?
is it possible
 
o.0
 
user1804599
12:00 PM
No, it's impossible to gather data from a database and then send emails based on that data.
 
....It's just really, really weird to me that the contract of an interface is applied to class inheritance for static methods.
@rightfold I heard one guy did it.
 
why?
 
But he died :-P
 
user1804599
Must've been a magician.
 
... wait what?!
That doesn't even make sense.
@Danack It's really weird to you that an interface applies the rules of inheritance? You want the interface to break a contract?
 
12:03 PM
Re-read the example until it either makes sense or becomes a blur. The part of an interface that defines static methods, is, in at least one sense, part of a completely separate interface that doesn't need to be rolled in to the actual class.
 
If the method is required to be static in the interface, it would break the entire point of an interface if PHP allowed you to implement it as non-static. Static methods have no access to $this, and by allowing someone to not make it static would imply that you could use $this. Which might be a part of the contract.
 
We've chosen to do it in PHP, because other people have do it like that, and it would be a pain in the butt to not have it - but I think it's doing something subtly other than normal inheritance.
 
user1804599
I think inheritance tax should apply to programming as well.
 
55 secs ago, by Danack
Re-read the example until it either makes sense or becomes a blur. The part of an interface that defines static methods, is, in at least one sense, part of a completely separate interface that doesn't need to be rolled in to the actual class.
 
i have a bunch of emails in database i want to get from database and send mail?
is it possible
 
12:05 PM
Don't spam @madu. You already know it is possible, because @Danack just told you one guy pulled it off, but he died (in the process?)
 
@Danack You think I don't understand what your example does? I think you underestimate my ability to infer your point. My point is that you still have zero obligation to apply the contract of making the method static.
Thereby making the interface less useful. Not more so.
Interfaces should allow for tightening down the inheritance chain, not loosening.
 
I'm pretty you can understand the code, but I can't express this bit any more simply, "The part of an interface that defines static methods, is, in at least one sense, part of a completely separate interface"
 
morning
 
Mornings @kelunik
 
@Danack Why? Where? How? When? What?
Your statement is semantically null.
 
12:08 PM
It's been rolled into a single interface in PHP - but really it's a 'class level contract' and then a 'meta-level contract'.
 
It doesn't express any point. Rather the lack of one.
What are you talking about? Both things are a part of the class.
Where is this meta?
 
@Danack you made a good point, what is actually necessary is static fields only (as long with package-private fields) and the rest of the static stuff, lsb etc is totally redundant with regular oop
 
What a fulfilling conversation...
 
sorry wasn't actually following
 
@RonaldUlyssesSwanson and the values in the static fields need to be of a type that implement the meta-level interface.
...I'll make a blog post...
 
12:11 PM
Over engineering at its finest
 
yes, and also readonly would be needed
 
And probably a static initializer for the values.
I will actually write this up properly....I really hate annotations, but I can see the need for a meta-level data api for classes. I'd much rather see something be defined that was actually useful for other things than just the current use-cases of Doctrine, routing, and other things that ought to be in a data file...
 
What languages make static declarations "meta" data, exactly?
Does that mean that visibility specifiers should be meta as well?
This just sounds like yet another one of those brainy ideas that looks cool but turns out not to be useful in practice at all.
 
12:26 PM
@Sherif just fyi, when you talk like this, you come across as a massive ass. If you don't agree with or don't understand what someone is trying to say, just attacking them does not make them want to try and explain further. You could express yourself as "I do not understand what you are trying to say" - that would be a lot less likely to result in you being ignored.
 
@Danack I don't understand what you are trying to say.
 
What I mean is that within the past couple of weeks, several conversations you have had in this room have devolved into shouting matches. You might want to alter your behaviour if you want people to talk to you.
 
Re:
> I'm pretty you can understand the code, but I can't express this bit any more simply, "The part of an interface that defines static methods, is, in at least one sense, part of a completely separate interface"
 
@Jimbo could you ping me when you online?
 
people need to relax a bit in this room :\
however, can you guys recommend a good read about PHP error/exception handling? at this point i'm struggling to convert the errors into exceptions and i kinda don't like that
 
12:33 PM
@kodeart This is a good read on exceptions in general: today.java.net/article/2006/04/04/…
And what I do is just convert all errors into exceptions, and then squelch/silence the ones that I know about.
 
thanks @Danack, i thought there is more PHP-ish approach :) but a good practice is a good practice.
yes but error to exception conversion messes with the execution flow. sometimes you want to continue instead throwing an exception
 
@kodeart btw there is what I consider to be at least one mistake in that article on the "Multi-Line Log Messages" bit. You need to be able to filter logs by process, so this just isn't an issue.
 
@Danack See in my experience the people who negotiate from a position of "either do this or I'll do that" will typically just do that anyway. Regardless of what I say your mind is already made up :) Case in point ^
 
@kodeart Yes, but you can do that by just doing e.g. @fopen() to squelch the error, and then check the return value.
I haven't found a case yet where i) an error occurs and I want to continue and ii) there isn't a way to check if there was an error or not.
 
yah, some age cases probably
 
12:40 PM
Damn you random_bytes Y U issue warning!?
cc @SammyK :P
Uhhhhmmm could anybody debunk this. I mean I can see it happening using HTTP_X_FORWARDED_FOR, but using REMOTE_ADDR??
 
@PeeHaa Yea probably not REMOTE_ADDR, but in his case it could be the reverse proxy is configured to pass it into REMOTE_ADDR or quite possibly somewhere in his code he just overwrote REMOTE_ADDR?
 
@PeeHaa it could easily happen......if you screw up your webserver config...
 
But isn't it the last address in the list is the client's address?
 
@Sherif But the proxy cannot pass anything to REMOTE_ADDR AFAIK. Well it can but the webserver would /dev/null the info
@Danack That sounds like a reeeeally fucked up config :P
 
12:56 PM
@PeeHaa Well it can technically.
 
Yeah....but even in nginx, it would be easy to do:
fastcgi_param  REMOTE_ADDR        $remote_addr;
 
> Well it can but the webserver would /dev/null the info
 
But you're right it's not normal.
 
vs
fastcgi_param REMOTE_ADDR $remote_addr"I am not good with computers";
 
Oh it has nothing to do with the web server. It's up to the SAPI.
 
12:56 PM
hehe :P
 
I've just seen setups where people inject the remote client address directly to the third tier to avoid doing stuff like HTTP_X_FOWRADED vs REMOTE_ADDR in PHP
Which makes sense since some people tend to make that mistake often in their PHP
But even then they are smart enough to strip out the leading proxy list and leave the client ip
You definitely went out of your way to do something screwy if you're getting the proxy list in REMOTE_ADDR
 
Yeah that's my thought. Thanks. Fuck all this shit. I'll just blindly use REMOTE_ADDR and if somebody ever raises an issue I will personally punch them in the face
 
Violent much?
 
Only when people do stupid shit like that
 
Yea bad code tends to instill much rage in people :)
 
1:01 PM
:P
 
I remember at some point, many years ago, I was in a meeting where an entire hour was devoted to discussing the atrocity that was all of one line of code (that was deprecated by the way).
heh
 
@Sherif lol
 
1:14 PM
Holy crap. This reddit thing is getting more bizarre by the minute!
source: https://www.reddit.com/r/TrollXChromosomes/comments/3bgg4n/matt_mcgorry_knows_whats_up/ http://t.co/7En9fah5wo
 
1:44 PM
/me needs to create an HTML mail. Wish me luck...
 
user1804599
Pee Haa Pee
 
user1804599
@PeeHaa don't.
 
user1804599
it's not worth it
 
Too late!
 
2:19 PM
Hi guys
 
'ello
 
Is there any way where we can run second cron after first one finishes
I was curious about cpanel cron
 
@John I googled it and I found the solution. stackoverflow.com/questions/6565393/…
 
I don't all my crons code in one single file. Just to diffentiate I have placed them in separate files
@HassanAlthaf I read it already but don't find descriptive
I don't want to put*
 
morning
 
2:25 PM
@PeeHaa Be sure to include some JSON for a nice action button in GMail. :)
Something like that: i.imgur.com/OkIMJ8T.png
 
@kelunik Uhhhm WT? That actually works?
 
in JavaScript, 2 hours ago, by phenomnomnominal
At first I thought that 70 stars was ridiculous. Then I realised that to many it is proof that in some place, at some point in time, someone slept with a developer.
 
Any idea??
 
@FlorianMargaine there's need to bring drama into this room from other places.
 
wrt that:
@Danack ... it's a joke?
 
2:30 PM
ah - thought it was gamer gate related...
 
OMFG it is an actual thing @kelunik. /me puts on his marketing hat and tell his client we are going to pursuit another fancy annoying thing!\o/
 
@kelunik more info?
 
Right below the animated gif in the mail of course :P
 
<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "EmailMessage",
  "action": {
    "@type": "ViewAction",
    "url": "https://magnum.travis-ci.com/kelunik/amp-chat/builds/133438",
    "name": "View Build"
  },
  "description": "View Build #75 on Travis CI"
}
</script>
^ That's all you need. @PeeHaa @FlorianMargaine
@PeeHaa And don't forget to add emojis to the subject. ^^
 
@kelunik awesome
 
2:36 PM
2
A: JavaFX Tic-Tac-Toe Game

Michael Put the Circle and Label objects in arrays so you don't need all those "showCircleNumber()" methods. The Random object should be class-level. It should only be created once The way you are returning booleans in the isOccupiedByX and isOccupiedByCircle methods is over-complicated public boole...

 
@kelunik :P
 
@PeeHaa (jsfiddle does that)
 
@kelunik The moment I got my first mail from them I marked them as spam
 
Hm, even a Travis mail received on 31 May has that code, but GMail doesn't show the button there. Maybe it's only for new mails.
 
option failure due to network I/O java.net.SocketException Connection reset by peer socket write error eclipse
why error is coming in eclipse
when connecting ftp
?????
 
user1804599
2:53 PM
Because the peer reset the connection while Eclipse was writing to the socket.
 
user1804599
Should be pretty obvious to everybody reading the error message.
 
how can i resolve
 
user1804599
By posting an SSCCE on Stack Overflow.
 
@PeeHaa What thing shouldn't be called edit?
 
@kelunik @bwoebi was talking about using DELETE /message/{id} and PATCH /message/{id}
 
2:58 PM
messages/edit is just the internal command name (which is also used by websockets), see github.com/kelunik/amp-chat/blob/backend-refactor/api.php#L100
 
Ah yes
 
 
1 hour later…
@Sjon Would be nice to have a simple way to view the diff between two output areas @ 3v4l.
And the selection thing doesn't work any longer, those results just keep open on hover.
@bwoebi Regarding %, there's another thing that should be fixed: 3v4l.org/LfQoH
 
4:55 PM
Ugh... I think the soap extension writers went out of their way to make it complicated.
 
@Trowski Isn't that like... kinda the point of soap?
 
Apparently. I'm trying to convert the remaining E_ERRORs to thrown Errors. Soap is too much of a mess though.
I'm close to saying screw it (for soap).
 
Soap, CSV parsing and the file iterator stuff are some great examples of stuff that should never have been implemented as extension code...
 
@Danack If you have a few minutes, could you take a look at what I've done here: github.com/php/php-src/compare/…
 
5:33 PM
@Trowski done, but you really ought to not take me reviewing something as saying it's fine. I am a.....iterative developer. aka ship bug and fix them style of guy.
btw I'm guessing that the spl_dual_it_next thing is actually a bug in the current PHP - I can't see how to trigger it though.
 
@Danack I agree with your points, but I think making a fatal error into an Exception instance would be considered a BC break.
@Danack Yeah, I have no idea how to trigger it either. There's no test to cover that scenario.
There were few tests to cover anything I changed, lol
 
@Danack haha
 
6:25 PM
And no I didn't bother finding the right dupe
 
6:54 PM
I'm working on a set of classes extending Error so more specific types can be thrown. Thoughts?
AccessError
    ScopeError
    ContextError
NameError
    UndefinedFunctionError
        UndefinedMethodError
    UndefinedConstantError
LogicError
ValueError
 
Not sure whether I like NameError
 
I'm sure I don't like NameError.
But UndefinedError isn't any better.
 
Do you need such specific Exception/Error classes. Surely doesn't the message already provide that level of information?
 
@Trowski It's all the same, you just encode the name. Sounds better suitable for a field of a type instead of a new type each, doesn't it?
 
@kelunik NameError I wasn't happy with either.
We've started having specific Error classes like ArithmeticError and DivisionByZeroError. I was trying to carry that through.
 
7:13 PM
And I like the more verbose version InvalidValueError more.
 
@hakre Having subclasses for different exceptions is generally the accepted way of doing things. Adding a field would seem unusual.
 
@Trowski Probably, however an Error is not an Exception, isn't it?
 
@kelunik Ok, and how about UndefinedNameError?
 
Also sucks :)
 
And Exceptions have messages, too. See ErrorException.
 
7:16 PM
@Trowski Well, the name is defined, but not the thing behind it. ;-)
 
@hakre Error isn't an instance of Exception, but it is an exception.
 
UndefinedSomethingException
 
404Error :P
 
@kelunik Could just eliminate NameError and shift the children up the tree.
 
UndefinedSymbolError?
 
7:18 PM
A RealException occured and was not caught.
 
@PeeHaa Perfect :)
@kelunik That I like.
 
@Trowski I'm not sure there is that much point creating a hierarchy of these. The program basically needs to stop for any of them.....which is different to exceptions where they can be caused by the outside world, and it's okay (in certain conditions) for the program to continue.
 
throw new AmazinglyUnexpectedException('Never thought this would happen but yay, I threw it!');
 
@Danack That occurred to me too. But then why throw TypeError or ArithmeticError?
 
@Trowski or just call all of those UndefinedError. Which also avoids having to introduce new ones per language feature.
 
7:20 PM
@Danack I thought about that too, but I think it may be worth, because it's one word summarizing the error, the $message is just for additional info.
@Danack Just that it gives you the hint that the actual error is undefined. But I'd be fine with all those sub-types being a UndefinedSymbolError.
 
@kelunik which is fair enough, but it doesn't need a hierarchy for that........which you just said after I wrote that sentence.
@Trowski give me three years and I'll give you a coherent answer for that.
 
I could keep it simple. AccessError, UndefinedSymbolError, LogicError, and InvalidValueError.
I think I like that better actually.
 
Also InvalidAccessError instead of AccessError?
 
@kelunik Yeah, that's better.
 
7:39 PM
@kelunik what selection thing doesn't work? Any ideas for the pretty diff between versions?
 
Hey the 3v4l guy!
Bedankt for that thing!
 
@Sjon Regarding selection: Clicking on the output of version used a URL hash before and stayed in the extended view.
 
@PeeHaa graag gedaan ;)
 
@Sjon thanks for creating that. And feature request - some of the time I only want either current latest PHP or PHP 5.6 + 7. Would it be possible to select what gets run, to reduce server load, but also to make it quicker to run some code, edit it and then run the new version.
 
7:43 PM
@kelunik It still does, if you click on the header?
 
@Danack I have wanted that before too
 
@Danack I have something ready but it's in beta, checkout 3v4l.org/quick/5.6.6
 
@Sjon Ah, the header, right, thanks. :)
 
@kelunik should it also work on clicking the output itself/
?
 
I expected it to work, so probably yes. You just have to be careful, not to break text selection with the mouse.
Additionally, it would be nice if the output areas would be textareas, you could use Ctrl + A to select the whole output.
 
7:47 PM
@kelunik maybe I have too many hidden features ;) Did anyone ever find the release-date of php-versions?
@kelunik yeah, maybe I'll add a js for that.
 
@Sjon there are dates listed on this page - php.net/releases
They may even be accurate? Who can tell...
 
@Danack sry I wasn't clear. I also show on on each page, if you hover over a version in the output
 
ah - cunning.
 
@Sjon ProTip: Add a question mark cursor for tooltips others should discover.
 
How about InvalidOperationError instead of LogicError, just because of LogicException existing?
 
7:54 PM
@kelunik yeah that's a good one
 
@Trowski Well, actually, everything that's a LogicException should be a LogicError.
 
@kelunik Yeah, pretty much.
 
Maybe we can even deprecate these old exceptions that should be errors in PHP 8?
 
Beginner question - what does echo $hint === "" ? "no suggestion" : $hint; mean
echo $hint === "" ? "no suggestion" : $hint;
 
@kelunik That's what @bwoebi and I were thinking.
 
7:57 PM
@kelunik You mean that spl crap?
 
@PeeHaa Stupid PHP language? Yep.
 
@PeeHaa thanks :)
 
@kelunik God yes. That stuff was the most stupidest of the entire thing
 
@kelunik yes please
 
8:00 PM
LogicException, InvalidArgumentException and things like that.
 
evening all o/
 
And remove them in PHP 9, long way to go. And I know, there are old applications still running, they can define those exceptions then in userland.
@RonaldUlyssesSwanson morning. :P
 
@RonaldUlyssesSwanson Yo biatch
 
no, i would deprecate them now, and remove them in php8 :P
 
@RonaldUlyssesSwanson That's fine, too.
 
8:02 PM
@RonaldUlyssesSwanson Morning
 
@RonaldUlyssesSwanson Yeah I would also deprecate that shit somewhere in 7.x
 
i would love php to have a clean deprecation process. a page that says "barBazFoo" is now replaced by "lolRoflBar", the "barBazFoo" will be removed in 48 months [php 8.0]
 
8:18 PM
@Danack I don't ignore peoples opinions. I just hadn't heard them back then when I committed yet.
@kelunik it's a cast to int. … not a bug actually.
 
@bwoebi But maybe we should still fmod before casting?
 
Hi!!
 
Holaelevenoneoneone
 
@NikiC not really, because it's out of range (> 2^52) to be precise actually.
 
hhvm gives the correct answer
 
8:23 PM
so, I don't see any benefit here
@Sherif does there exist a correct answer?
 
I have a little doubt with MVC, I have the three objects separated by three files, the problem is that I don't know which object I should instance. I just need to instance one and then the object will find the other objects and instance them as class properties
 
yea
 
@Sherif By accident ;)
 
Okay, looks like I'm now really going to RFC warning or exception in PHP 7.0. …
 
Yes. it's by accident. It just always returns 0 then.
 
8:25 PM
@Manulaiko read about the repository pattern
 
@NikiC Interesting
 
@bwoebi I think it's too late for that.
 
div0 warning restored
 
@kelunik no. had just a discussion with RMs
 
that seems alright to me
 
8:26 PM
Python gives me 21
Well, 21L
 
@Andrea yes, I know. I agreed to, for beta 1.
 
@RonaldUlyssesSwanson Thanks, I'll take a look
 
@Manulaiko i've assumed that you were talking of domain objects, is that right?
 
@bwoebi I'm not sure we should have removed it anyway
I think there's a good argument to keeping it around
 
@Andrea me neither.
I think we really should make it an exception
 
8:28 PM
We could, it's an option.
 
@bwoebi division by zero?
 
yes
 
@Andrea lol.
 
there is a bunch of warning that should be Errors. do you really want to start this? times are not mature yet
 
@NikiC why lol?
 
8:29 PM
@bwoebi Because of who said it ;)
 
@RonaldUlyssesSwanson I'm making a MVC appilcation and I want to know if I have to link all components in the model or in the controller so there's no need to instance manually the three objects, if you want to take a look at the Cloud9 workspace: ide.c9.io/manulaiko1/cms
 
@NikiC The very person that was opposed to it in the original discussion?
 
@NikiC Hmmm ^^
 
Actually the code to instance the other objects looks something like this:
/**
* Sets model object
*
* Will be called when a new controller is instanced and will find the model
* class for the controller and set $_model object.
*
* @return bool True if the model was found and instanced, false if not
*/
private function _set_model()
{
//Replace namespace
$model = str_replace("Controller", "Model", get_class($this));

//check file exists
if(class_exists($model)) {
$this->_model = new $model();

return true;
 
I think I like warning and INF/NAN better because it's got benefits of both
If it's non-critical, your code may still produce an okay result
 
8:31 PM
@Manulaiko yes, the repository pattern + DAO is the answer
 
But you at least know it's happened
 
@Andrea the issue is the may.
 
If div0 is a frequent thing somewhere and you don't want the warning, you can silence it
@bwoebi Yeah :/
Because OTOH you might get a garbage result and if you don't check it, it'll pass
 
and hence better safe than sorry.
 
@Manulaiko your current design is very limiting and very much awkward imo
 
8:32 PM
though that's the case currently
thing is, in the case where you want div0 to pass through, catching an exception is awkward and you need to invent a value
ideally you'd have optionally signalling NaNs
ducks
 
also "Model" is not one class only
 
@Andrea like C does for division by zero (integer)?
 
@bwoebi the 754 standard says you can have "signalling NaNs" and "non-signalling NaNs", there's actually two kinds of NaN, one that throws an exception, one that doesn't
something like that
it's a bit of a mess :p
 
@RonaldUlyssesSwanson I've read about Repository pattern and I don't find how I can implement it, anyway I'll read about DAO
@PeeHaa Currently I just need to instance an object and everything will be ready, I think it's cool but I'm open to suggestions
 
hmm, you know what.
 
8:35 PM
> there's actually two kinds of NaN...
 
Make it an exception.
 
How... nice...
 
@PeeHaa huh? … oh.
 
@PeeHaa oh yes, IEEE 754 is wonderful
For PHP and JS though, there's just one
They don't use signalling NaNs.
 
@Manulaiko Do you want to test your code at some point?
 
8:36 PM
So anyway: Make it an exception. If people need to, they can catch it. If someone really needs to let it become INF/NAN, we could add a per-file flag for it.
declare(div0=warn);
runs
 
@PeeHaa I don't get what you mean, it's for a browsergame I'm making
 
@Andrea heresy!
 
@Andrea lolwut :P
 
obviously you're forgetting the secret protocol of the scalar type hints RFC, section 2, subparagraph B
 
I knew there was a catch!
 
8:41 PM
$x = new StuffRepository(...);
$stuff = $stuffRepository->getById(30); // returns the aggregate root Stuff, by using the DAO "class StuffMySQLDAO" (and even other DAOs, the method is supposed to return the whole aggregate cluster, not just instances of Stuff)
 
Zend knew too much. That's why they were silenced.
 
QuarkSequenceBuilderCOWBuilderWrapper gotta love that naming
 
@RonaldUlyssesSwanson At the momment my DAO is handled directly in the Model base class, I'm not using a database but a Socket connection to the server that actually runs the game. The web just prints user info.
I think I'm doing it wrong xD
 
model base class doesn't exist. the model is a series of classes, i presume you are talking of domain objects/entity objects?
 
I have a base class that represents an object, then a base class that makes operations for that object and then another class that will print the object values
 
8:48 PM
such objects should not be aware of anything that is about persistence, they should be filled from the outside, not filled by the inside. it's the dao/repository that by using factories creates the instances and puts them together
 
then I should make another class that links the other classes?
hmmm
 
that class is called repository or dao, depending on how you want to design it @Manulaiko
 
oh
I see now
thanks for opening my eyes xD
 
eh, it's not simple :P
 
@Andrea and if it is critical, you can promote it to an exception....i.e. the current situation gives the best of both worlds...
 
8:54 PM
@Danack Oh, true
Exception handlers still exist in PHP 7 :p
 
the error/exception divide is actually a great strength of php over Java.
 
what I love from PHP is the power of the flow that offers you
for example the set_exception_handler, $$var, {$name}, magic methods...
 

« first day (1723 days earlier)      last day (3225 days later) »