« first day (1430 days earlier)      last day (3515 days later) » 

2:00 AM
why are you doing this if you don't research properly? i can't understand that
really
 
I don't say standards are useless
I just didn't see why the standard would be helpful
@CSᵠ What do you mean by "research properly"?
 
I do! All these competing standards are fucking useless! We must unify them under "One True Standard™"!
 
@AndreaFaulds here, take a hint how it could be implemented: wiki.php.net/rfc/integer_semantics#vote
 
@DanLugg and have another one?
 
2:01 AM
@AndreaFaulds ORLY? ;-)
 
@CSᵠ ...?
 
:)
 
You linked me to the votes.
I don't get it.
 
@AndreaFaulds Sort of related
 
@AndreaFaulds it's a counter example to your "javascript does it too" fact
 
2:03 AM
@CSᵠ What example?
 
@AndreaFaulds bad copy paste (i need to learn how to do this :P) infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0475c/…
 
I dunno if I have Fowler to blame, but the fact that the term "container" is overloaded with DI-related context is pissing me off.
 
@CSᵠ What's the counter-example there?
 
problem: say numbers are apples, and NaN is not a number in this case (could be anything) so how many apples do we have here (and how many should we have)? 1+NaN+9
throw in a hammer in the apple basket
 
2:06 AM
are you going to count the hammer?
hammer=NaN now
well
 
You are rambling and you do not make any sense.
 
this is the question, are you going to count it or not?
 
$n + NaN === NaN
 
let's make an apple from the hammer now
(int)NaN
 
@CSᵠ Explicit casts do not fail. They never fail. They always convert to some value. The question is what that value should be if it's an integer cast and the input is a floating-point INF.
 
2:07 AM
how many do we have now?
 
Generally, it should be <expr> <op> NaN === NaN, no?
 
What should that value be?
 
@DanLugg "dependency injection" as a term itself kinda bothers me. whatever happened to, I dunno, just plain old passing parameters.
 
@DanLugg Well, NaN !== NaN, but yes
 
@AndreaFaulds Oh yea, right.
== ?
 
2:08 AM
@DanLugg isnan()
@CSᵠ Just tell me. (int)NAN must result in some integer value. What should it be?
 
@AndreaFaulds E_FATAL
 
I think the best option for what happens when you divide by zero is to "cast" the result as a float and return inf.
 
Invalid operation for the type.
 
@DanLugg Explicit casts do not fail, so what's the value?
 
I still like 2.
 
2:10 AM
@AndreaFaulds Personally, I say "fuck that rule", but given that holds true I retract my opinion.
 
@LeviMorrison I agree, makes more sense than FALSE. It's covered by Open Questions, though it'd be a second RFC.
@derp 42 > 2
 
@AndreaFaulds ... but doesn't that change the result of current RFC?
 
Explicit casts should be fallible.
 
(which changes current behavior?)
 
meh, 42 is just 2 * 21. we don't need 42 at all.
 
2:11 AM
@AndreaFaulds don't know yet really, I haven't proposed a RFC, need to do quite a bit of research to be comfortable to my proposition before publishing one, but you did and picked 0, that makes no sense to me and if you still want to publish it you should argue for it with valid arguments/facts
 
@derp The term, when applied to the automated implementation (or some other voodoo) is sensible, but yes, in the case of the manual practice of "passing parameters" to satisfy "dependency injection", the former term is better.
 
oa-res-27-90:php-src ajf$ php -r 'function objectively_superior($a, $b) { echo "Is $a objectively superior to $b? ", ($a > $b) ? "yes" : "no", PHP_EOL; } objectively_superior(42, 2);'
Is 42 objectively superior to 2? yes
@CSᵠ What is your proposition?
I'm yet to hear it
At least, not one which follows the rules set down.
 
NAN != NAN, but INF == INF?
 
(Must not fail, must result in some integer value)
 
@NikiC I think that is probably true as well.
 
2:13 AM
@DanLugg Yes
 
Thanks (sanity checking)
 
... I don't think you can compare equality with INF and INF.
 
@LeviMorrison You can.
 
@AndreaFaulds Do we really need to clutch onto this rule? Is what is being discussed a < "7" patch?
 
@DanLugg NaN is a special value that is designed to propagate through calculations when something goes wrong.
 
2:14 AM
@AndreaFaulds this is difficult to argue with
 
@AndreaFaulds Yea I know that, I just couldn't recall the equality rules.
 
i believe INF should not be equal to INF
 
@DanLugg I don't think we should change what explicit casts do, it's not a good idea. We could add safe casts, though.
@CSᵠ Too bad, IEEE754 disagrees.
 
@AndreaFaulds Disambiguate?
 
@AndreaFaulds this is how it works: 1. you have a proposition (RFC now) 2. some people refute your facts 3. you either gather better facts to support your proposition or throw the RFC down the drain (or parts of it)
 
2:14 AM
@AndreaFaulds Ah, this is why I was thinking this:
> You can test whether a floating-point value is infinite by comparing it to this macro. However, this is not recommended; you should use the isfinite macro instead.
 
INF == -INF too, IIRC.
 
@DanLugg Nope.
Infinity is like any other value, really.
 
Shit, lol
 
I can't think of a case where Infinity doesn't act like a normal number
 
Wait, I believe I've seen implementations of something where -INF == INF (though that may not have been 745 compat)
 
2:15 AM
make it better or nothing
 
It's basically the largest float.
 
@AndreaFaulds i know, but it's my oppinion, i'm not forcing anyone to addopt it
nor promote it (yet:D)
 
@AndreaFaulds Care to expand a bit on "safe casts"?
 
@DanLugg Ones that error for nonsense input.
 
Ugh. So, two casting mechanics.
Mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmnothankyou.
 
2:17 AM
For example, safe_cast_int('12'); would work but not safe_cast_int('blahfoo');
 
Well, we sorta have that with the filter_*... or something.
I'd rather just see scalar cast operators make sense.
 
Anyhow.
@DanLugg Breaks code and breaks the fundamental guarantee of an explicit cast. Not in favour.
But I need to sleep. Goodnight.
 
Sorry, didn't mean to sound rude, but I just couldn't conceive adding additional casting mechanics.
Night :-)
 
@AndreaFaulds well it shouldn't because it isn't an exact number...
 
Also (and I know it's easy to pull out the "WE'RE NOT <X>" argument) but explicit casts are fallible in other enviros/langs.
Maintaining our deviation isn't really helping anything but to perpetuate the deviation.
 
2:20 AM
so.. is this a voted direction php goes? casting is infallible?
 
well, at least it's consistent :)
 
In the same spirit as the proposed scalar type-hint/cast, dataloss should be fatal. (int) "11" is okay, but (int) "noodles" should shit the bed wildly.
 
@DanLugg agree
 
@DanLugg And "11 noodles"?
 
@LeviMorrison Shit the bed. Data loss.
 
2:22 AM
also trash
 
b bu but dynamic stuff!
 
either it's a mismatched datatype or trash
 
That's not dynamic, that's goofy.
 
E_FATAL
 
Okay, what about (int) "0xbb" ?
 
2:23 AM
why cast then?
 
What about " 11"?
"11 "?
 
Data loss.
 
the same
 
"11 " is data-loss?
 
convert vs. (cast)
 
2:25 AM
hello guys!
 
@LeviMorrison well.. what do you have there?
 
If $string != (string) (int) $string it should be a fail.
 
What is this sanity?
 
@LeviMorrison lol, did you mean in-sanity?
 
is it 11 and a typo space? is it a string that happens to have 11 and a space?
:)
 
2:26 AM
Data loss of type x -> y occurs if (y)(x)something !== something ... probably?
 
@DanLugg No :D
 
:D
I'm a fan of draconian casting. Dynamic language or not, there are many really stupid things that make it through the cracks.
@Ja͢ck Yes, thank you for generalizing :-)
 
what's new?
 
hey @reikyoushin
 
Now, some might argue that (int) $float shouldn't because use-cases. To that I say floor()
 
2:27 AM
@Ja͢ck Well... not true. Assume you can cast an object to a string, then back to an object. The second object will not have the same address as the original, but is equivalent.
That's the only corner case I can think of. Oh, (float) (int) $f == $f where $f is a float will not be the same.
 
@DanLugg good example
 
I don't think it's possible in PHP though.
 
@CSᵠ been a while since i've been here. :P
 
Yeah, object conversion should be treated as string, then ... for now
 
@LeviMorrison Objects are a corner case, but that's because user-land handlers.
 
2:28 AM
imho, the fine line should be between convert and cast
 
At least in the case of string.
 
What about (int) "11.0"?
 
Casting to float may be interesting because of the precision ini setting :)
 
@DanLugg no they are not, they are datatypes (should be?)
 
@derp Fail. floor((float) "11.0") Welllllll...
 
2:29 AM
@derp another good question
@derp ieee754 approves that for float(11)
 
Yea, that's a tough one, because the $x == (x)(y) $x rule holds true, no?
 
@DanLugg perfect example for the cast ! (or should floor return integer by default?)
 
Floor should, IIRC.
 
@NikiC The last thing I need for return types (pending bugs that may arise) is to verify that functions which are generators can only specify type hints of Generator and its superclasses. Any ideas for doing that in a reasonable way? Only solution I can think of is hand-coding string comparisons, because of the aforementioned opcache behavior.
 
I dunno, I'm starting to haze out here. Night folks.
 
2:32 AM
'night @DanLugg
@reikyoushin hell is breaking loose in php, everybody starts throwing bad words near "php" ---->
 
@CSᵠ but it has been a while since that has been happening right? >.<
 
yup
 
Blargh. I thought my laundry was done.
 
lol
why would INF ever be zero?
why ohh why?!?! <--- can't sleep, that effectively killed me
can't think of any single reason
add 2+3+INF is a lot if we have floats, cast the INF to (int) and we get 5? WHY?
can anyone think of any reason this makes sense?
or cast them all
 
2:48 AM
@CSᵠ 2 + 3 + INF isn't "a lot", it's INF.
 
exactly
it makes sense to say it aloud "a lot"
so, does it make sense to have an answer of 5 if cast to int?
 
@CSᵠ What doesn't make sense is expecting equivalent results when you cast to different types.
 
Well, it's a tough call. I would think INF == (int) INF, which is broken given INF is of type float.
 
why would one want to cast?
 
No idea, I'm just following your example.
If I were to write a language/standard, from the ground up, I'd personally make INF it's own datatype. Along with NAN.
 
2:52 AM
same here
NaN could be anything except numbers even better
 
Eh, I dunno. It should remain reserved for arithmetic purposes.
Casting INF to int would yield an InvalidCastException. Likewise of -INF and NAN.
 
problem here is, people only know about ieee754 and that's it, it's like the holy grail, but it's actually not
infinity is available to integers too
 
However, operators for the Infinity and NotANumber types should be overloaded to preserve sanity in an arithmetic context.
 
earlier you were pissed about folk not reading that standard
 
just not defined in ieee754
 
2:54 AM
Thus preserving 42 + INF == INF.
 
@derp INF must not be zero, ever, and it still happens
because.. limitations
my feeling is Andreea's RFC only acknowledges some grave issues with datatypes, conversion, casting and arithmetic operations, and proposes some quick-and-dirty fix/patches to some of them
 
"be" - right there is your problem. When you cast to a different type you no longer have the same thing. INF will never be zero. Zero is simple the integer value you get when you cast INF to an int.
 
the actual problems are at a lower level and there's the need for involvment
@derp then... how does that help? and why? and how? and where?
 
Well, INF != 0 e.g.
 
i can't answer those questions, really
@Ja͢ck damn right, so why when casting between number types should be converted to zero?? makes no sense
 
3:02 AM
I mean var_dump(INF != 0); yields true
But (int)INF == 0.
 
@Ja͢ck please refer to @AndreaFaulds 7star message pinned there -------->
:))
 
I guess this discussion is over then.
 
nothing makes sense
lol
actually it should be a good start
@Ja͢ck needs a better fix
or idea
eg. 3v4l.org/EOPGG $r in a 32bit machine would be zero, but the programmer/user didn't want this, zero or infinity? what should it be?
 
bottom line is that developers who care about proper conversion shouldn't just use (int) cast.
 
morning
 
3:12 AM
you could argue that the proper integer value for INF or NAN should be NULL, but that goes against the casting system.
 
I'd argue that casting INF to int should just fail.
same for NaN.
 
I argued for raising a notice but allow the cast.
Like how casting from new stdClass to int currently works.
 
@Ja͢ck I'd use a warning, but allow the cast too.
 
The precedent is to use notice.
 
Break precedent, then use that as precedent for making the other ones compatible.
 
3:16 AM
try to create a new precedent?
 
=)
 
c'mon, these aren't laws, it's science
 
there's science behind raising a warning or notice? :p
 
well.. in a sense, for the poor computer, they are laws :P
there's definitely a science for Infinity bot being equal with null or zero
and one for infinity being able to exist for both real and integer numbers
 
I didn't know INF is a member of Z
 
3:19 AM
i'd argue for the cast to yield integer(INF)
 
which language defines INF for integer types?
 
@CSᵠ impossible. At least not without certain complexity.
 
@bwoebi give it time :)
 
Isn't there a way to generate the skeleton for a PHP C extension?
And if so, is it up to date with PHP's master branch?
 
@CSᵠ I'm just saying it's not worth it,
@LeviMorrison yes
 
3:21 AM
Hi
How to install xmpp on server just host?
 
@LeviMorrison Isn't there ext/skel ?
 
@bwoebi if it's worth doing something right, then that thing shouldn't have to be built by patching patches over the already patched thing
...forgot to mention some patches also^
 
How to install XMPP server jabbered or Openfire on web host server "JustHost" or "Godaddy"
 
@Ja͢ck @Levi yup, and it's up to date too.
 
Thanks for the pointers.
Hopefully can figure out the rest.
 
3:24 AM
@CSᵠ but creating int(INF) would exactly do that: patching the patches with new patches.
 
@bwoebi i'm sure at a deep enough level it wouldn't mean that
 
and it still wouldn't be "right"
 
@derp "right" it would be, alone in it's own standard would be another thing
or out of standard
 
Yeah, let's create our own integer standard :D
 
hi jack ;)
 
3:28 AM
hullo :)
 
Let's be sure to have -0 in our standard.
 
I'd say (int)INF casting to int(INF) is even wronger than it'd be to cast it to 2. At least 2 is an actual integer.
 
it sucks being on the wrong side of the planet. most of the people are gone.
 
you just have to stay up longer or get up earlier :)
 
Or move.
 
3:30 AM
i already moved, i was in europe before :)
 
oh well, brb. im stuck with some js stuff. >.<
 
Well, Ja͢ck, I'm nearly finished with return types.
 
Nice!
What's left on the table?
 
Just need to add reflection and figure out what to do about generators. I think I'll have to resort to string comparisons because of an opcache bug: bugs.php.net/bug.php?id=66773
Actually, even if that bug wasn't there I'm not sure if that would be helpful.
 
Woah, that's a funky bug hah
 
3:37 AM
Basically, I'll have to hardcode \Iterator, \IteratorAggregate, \Traversable and \Generator as the only valid options when you use a generator.
 
Doesn't generator have its own type?
 
I included it, didn't I?
 
Yeah, I mean ... why not only \Generator?
Oh, because of covariant ..
 
Yeah, for instance function getIterator(): Iterator; should be able to be implemented via a generator.
 
Right
 
3:40 AM
But we don't care if subclasses return generators; just \Iterators.
IteratorAggregate Oops, that one shouldn't have been in there.
Just habit from working with those three common types in Ardent :D
 
:)
 
Also, I probably should figure out some new macros to allow for internal functions to have return types.
So I can write a C extension for Ardent with them :D
 
3:54 AM
hehe
 
4:09 AM
@crypticツ popped in :-)
 
4:31 AM
@bwoebi what's going on?
: Docs, Backlog | Tools: Explain, phpdbg, devdocs.io | Addons: [cv-pls], PHP Manual Linkifier | Snippets: ext/mysql | Reference: QAs
9
 
PHP Y U NO HAVE NATIVE HTML FORMATTING?
 
hmm?
you mean "hello"->bold();? hehe
 
I am trying to show an array in view using foreach dd(array) shows that I have 53 records in it but the output shows only 5 records and that also same values -- Laravel
anyone free enough to help ?
no one at all ?
 
4:49 AM
@crypticツ slept from 9 to 5 this night ^^
@DanLugg PHP is better without :-)
 
5:12 AM
Morning
 
Morning.
magento??
 
morning
 
I want to calculate article view my site like stackoverflow question views
i am using symfony...
@Leri Morning
 
I need help to remove product image slider and want to show all images full in magento.
 
moin
 
5:26 AM
@JoeWatkins moin
 
could anyone tell me that is there any bundle available in symfony to calculate the views of page like stackoverflow question views?
 
static is considered harmful ... that's not an endearing name ... AxeMurderer, RebelWithoutAClue ... equivalent ...
#justsayin
 
static isn't bad… we're using this keyword all the time in C :-D
 
in C it is not synonymous with "terrible" .. it actually does something useful there ... but true, yeah ...
 
btw. @JoeWatkins I'm trying to rewrite your socket stuff to use a full-duplex connection in phpdbg… I just try it, though, I have no idea what I'm doing there :-D
 
5:35 AM
cool cool ... yeah me neither :)
 
6:00 AM
M-orning
 
@JoeWatkins inorite~ i love static!
 
6:21 AM
@bwoebi html_format($html, HTML5) -- is all I want. And tidy... tidy is not that.
 
make it =]
 
@DanLugg Implement it in PHP userland first
 
6:35 AM
posted on September 15, 2014 by kbironneau

/* by BrodBen */

 
7:06 AM
mkeeeey
gitlab migration has been successful
 
hi guys :)
 
morning
 
I'm trying to find the proper way to make a method that kind of decorates another one inside an object. I mean, a method which semantic should be 'do that action with these arguments and then do other stuff'
I know I can use something like $this->$action($args)
but how can I specify that $args should be all the parameters that are passed to the parents beside the first two?
 
@gandhi - that looks like spam to me?
 
@fusillicode not sure what your question is... but are you looking for this? php.net/manual/en/function.func-get-args.php
 
7:20 AM
@Patrick thanks for the ref I was thinking about it but sincerely I hoped there was a more elegant solution
 
@fusillicode, maybe you are looking for variadic functions - new in 5.6! uk3.php.net/functions.arguments#functions.variable-arg-list
 
@halfer yep I saw that feature and it seems it is what I need
anyway just for the record, what I need is something like the sponge operator in Ruby :)
 
1 message moved to Trash
 
and I think the variadic functions are just that...so...there is nothing before 5.6?
 
@fusillicode only func_get_args()
 
7:29 AM
@bwoebi yep I'm just looking in the docs :)
it's all well explained :)
btw thnx to everyone! :)
 
np
@fusillicode If you can't use 5.6, then the get args approach is the way to go (and isn't too terrible, imo)
 
7:47 AM
or pass [] ?
 
@JoeWatkins actually using full-duplex was really easy…
 
Morning
 
Morning
 
@JoeWatkins next thing to do: accepting ^C on stdin and make it interrupt execution
 
8:04 AM
@PeeHaa morning sir :)
 
morning
@bwoebi excellent stuff ... will update ui later (this week) ...
 
@JoeWatkins :-)
 
@bwoebi neato :D
 
now the complicated part begins. I need to parse ^C in stdin. But also when not being in fgets() call. So needing async IO. Going to have fun with SIGIO handling etc. :-D
 
good mornings.
just stumbled over this comment which is kinda harsh:
PHP, the server-side IE. — Marek Mar 23 at 15:03
 
8:16 AM
moin @hakre
 
@JoeWatkins now I need to decide on an API for the xml/text switch. I think I'll use #define phpdbg_(notice|error|write)(xml_tag, attribute_sprintf_format, english_sprintf_format, ...)
 
I'm trying to write some code that is able to detect if PHP would convert the index or not - perhaps most easily done with testing via an array directly ... .
 
and vspprintf() being my friend :-)
@JoeWatkins any imminent objections?
 
vsprintf() in PHP has some nice details, like accessing by index, not by key.
 
@bwoebi whats xml_tag for ?
won't that be set by the macro (notice|error|write) ?
and why two sprintfs ?
 
8:24 AM
@JoeWatkins yeah, once the English text, once the xml?
 
so here is my simple array key validation loosely typed filter. the trim() is not needed, it's what I do, too: 3v4l.org/ZEQdJ
basically $filtered = key(array(trim($label) => 1));
 
@JoeWatkins to name it <watchpoint ...> etc. notice/error/write is just an attribute, a suggestion how the IDE should handle it.
notice/error/write will most likely end up like severity="normal/notice/error"
 
I see I see
go ahead, let me know when you have something to look at and I'll look then ...
 
for severity I can really suggest to lean on the keywords in syslog rfc.
even if you don't use all of them.
but in this case it's perhaps just PHP keywords.
 
yeah, just php keywords.
 
8:31 AM
posted on September 15, 2014 by kbironneau

/* by Nick Nagy */

5
 
@Feeds Every single time
 
@PeeHaa yep, even if you don't understand it, the client is always right ;-)
 
if the client is always right, it's normally a good indication that it doesn't matter what you're actually programming ^^
 
good morning :)
can any one help with this question stackoverflow.com/questions/25842481/…
 
@QasimKhokhar what does "it behave unexpectedly." mean? Do you get any errors? How have you debugged it?
 
codeigniter shopping cart making problem when i insert new item to it.
 
I doubt we are of much use for code igniter questions
 
@QasimKhokhar if visiting an outside link is required to understand your question then your question is incomplete and should be edited to include the additional information necessary.
 
My guess is, that is has nothing to do with ci
 
8:49 AM
cpu is at 100% since a windows update this morning. added more cpu and it just eats it up. it's ~10 php processes that use 10% each... I have no idea what's happening, but I am the only IT guy in the office today... Has anyone an idea what could cause this? :(
 
@RonniSkansing thanks now i am going to edit mty question then i ll show u.
@derp ok
 
Sounds great @QasimKhokhar
 
hallo experience dev
can u help me with postgre?
i seems to have this error when using decrypt(field,'secretkey','aes')
for postgre
i'm not yet well versed in postgre since our db will be migrated to postgre along with the encryptions please do help
 
For starters there is no such thing that I know of that is called postgre
 

« first day (1430 days earlier)      last day (3515 days later) »