« first day (1431 days earlier)      last day (3531 days later) » 

1:00 PM
@salathe I'd be more likely to contribute to docs if I could do PRs against them. The archaic system is too convoluted for me.
 
btw @salathe I still have news.php.net/php.doc.cvs/12793 marked as unread in my inbox, I just haven't had time to do anything about it yet but I will get to it, I'm not just ignoring it
 
@Leigh yeah, you and a thousand other people... it's silly that we haven't moved yet
@DaveRandom cool, no rush :)
 
@salathe anyone done scoping work to see what it would take?
I suppose it would be nice to ditch the XML at the same time, which is no small task
 
The systems are all ready to go (more or less) I think, but some of the translator don't like it because apparently for them SVN rev numbers > git SHAs
 
@Leigh the only blocker is making edit.php.net Git-friendly
 
1:03 PM
@salathe I thought yannick has already done a lot of that work?
 
Well @Irker mainly, a long while ago
 
There have been so many discussions about it that I forget where it lands every time :-/
 
Yannick doesn't know enough about Git (his own confession) to make the changes
 
hmmm, wonder what chobies libgit2 is looking like these days...
 
Also @salathe did the whole translation rev/SHA issue get resolved? It seemed there were quite a few objections along those lines at one point
 
1:06 PM
@DaveRandom I'm not entirely sure that's even an issue… if the revision number / sha isn't the current English rev / sha, then the docs need updating.
if the SVN rev is 1, 10 or 1000 behind, that doesn't really mean anything
 
hm you're only up to mid 250k revisions, you can brute-force the git hashes so they always start or end with a SVN revision number
 
markmail.org/message/5uovnasmbs25n67z is I think the most recent ML thread on the matter
 
what people want is an easy way to answer "what has changed in EN since the translated file was last changed"... which just needs education for Git
 
@DaveRandom well the concern about replacing SVN rev with git hash... how about... replace SVN with date of git commit...
even more sensible than an SVN rev in the first place
 
@Leigh this
 
1:17 PM
ok , who's here in USA with really good connection?
 
what's "really good"?
 
100Mbps+
 
@ircmaxell will be here shortly (probably) with insane conn
 
can't help
 
I need the data transfer speed for two sites (on hosted in US and one in Latvia)
 
1:24 PM
@tereško lol, what a twat.
 
also, anyone here from UK or DE with 100Mbps+ line ?
@tereško Have you ever read the book, it is a great resource on design patterns. seriously... — Mahdi 2 hours ago
Then I am sorry for your ignorance and lack of knowledge — Mahdi 14 mins ago
lol
 
:'(
 
1:29 PM
Nowhere near @ircmaxell's but speedtest.net/result/3764016938.png for NY
 
@salathe 4500 miles to London? :-S
 
@DaveRandom yeah, the speed test script is a bit confused about the server location
 
@salathe could you make a quick check comparing the download speed and ping that you get from airdog.com and blindsave.com (one is hosted in US and one in LV)?
 
@salathe I was just wondering if Scotland had moved in anticipation of independence
 
@salathe That ping is unpossible Shirley?
 
1:32 PM
Maybe someone got confused about the "new Scotland" and thought it meant Nova Scotia
 
Oh, distance is wrong - not speed of light broken.
 
@Danack both servers are in "London"
 
London, Ontario?
 
Nope, the other one
 
Nebraska?
 
1:34 PM
Ohio?
 
Nope, the other, other one
@tereško do you have a big file to download?
 
hmm ... lemme see
uploading test.exe .... (it's opera's setup)
 
^ trojans :p
 
while($row = mysqli_fetch_array($result)) {
// if($row['price']){
echo $row['day'];
// }
//  printf ("%s \n", $row[1]);
}
why it return null
 
1:40 PM
^ because there's no return there ?
 
Good morning
 
morning
 
I try on phpmyadmin and results...
 
good morning
 
but I don't know because with ajax return null
 
1:43 PM
@tereško what you need?
 
5 mins ago, by tereško
@salathe http://airdog.com/test.exe and http://blindsave.com/test.exe
download speed that you get from:
(those exe file ARE harmless)
 
Should've called them "nsa.exe"
 
@ircmaxell reddit.com/r/PHP/comments/2ggg60/… I would appreciate an opinion on this. That's what I've been rambling about yesterday
 
@tereško 2014-09-16 09:47:57 (85.9 MB/s) - ‘test.exe’ saved [33808696/33808696] vs 2014-09-16 09:48:11 (4.89 MB/s) - ‘test.exe.1’ saved [33808696/33808696] (respectively
 
1:48 PM
GUYS GUYS GUYS I finally said 'PHP "7"' on the list news.php.net/php.internals/77247
 
UK Rackspace 1Gbit connection
Airdog - 2014-09-16 13:47:21 (11.6 MB/s) - `test.exe' saved [33808696/33808696]
Blindsave - 2014-09-16 13:47:32 (20.8 MB/s) - `test.exe' saved [33808696/33808696]
 
@NikiC I think we can draft cases on both sides...
I've been going the other way, wanting to make it looser and looser. To accept more and do it more transparently...
 
I named my vm "teresko"... now it feels bad to destroy it. :'(
 
@ircmaxell Sure. The main point is that I've come to the conclusion that a value-base type-system is not a good idea.
 
Here me out here. One of PHP's biggest strengths (and weaknesses to be fair) is that it's incredibly forgiving with scalar types. As in, will pretty much never fail, even if it doesn't make sense what you're asking for
 
1:52 PM
Because values are a lot more volatile than types.
 
this makes PHP incredibly easy to use for junior developers, because it's so bloody forgiving that you almost can cobble anything together and it'll just work (tm)
It's a nightmare for defensive programming, because you need to do all sorts of validation yourself
but that's how PHP got to where it is today, by being forgiving. Which also makes it quite robust to outages/errors. Even if there is a massive logic error, the rest of the page/site will function just fine. And if you're handling error reporting properly, all that'll happen is that one part won't work right
 
So what's wrong with scalar typehinting being opt-in?
 
And as much as I'm for static analysis and predictable typing, I'm not sure that really fits, especially since the exact demo of users it'll hurt is those most benefited from PHP itself
 
those junior devs can still have their apps that freely convert between types, and those of us who have stricter requirements can have those too
 
If you want a more predictable platform, others exist. If you want a more forgiving one, very few exist...
 
1:56 PM
you're awesome, @salathe
 
@Leigh because I don't want a language full of "bolt ons" because it sounded nice, even though it's completely patched together and inconsistent.
 
thnx to @ircmaxell and @Leigh too =]
 
Hell, look at HHVM. They bolt things on, because screw the research that showed you shouldn't do that, it's handy! So yay to type inconsistencies!
 
@ircmaxell I didn't mean opt-in as a bolt on, I meant included in core as a supported feature, but without it feeling mandatory to use them
 
@ircmaxell I have two responses to this: a) It is "robust" (as in "ignoring") without any scalar types. However introducing even non-strict types it will be throwing fatal errors, at which points it's in no way forgiving anymore. b) In the profession (as opposed to lets-install-wordpress) world, I'm pretty sure PHP programming is transitioning more and more to the defensive side. Because PHP is so forgiving and you can't be reasonably sure about anything.
 
1:58 PM
@Leigh if it's in the language, it's not opt-in. It's part of the language. It's not optional (since you may need to deal with 3pd code that uses it)
 
I guess my view is biased, since I went from strictly typed -> PHP, and have never really taken advantage of the loose typing.
 
@NikiC a) sure, but it's still forgiving where it makes sense to be. And where it doesn't, it'll raise an error. It allows for a mix of defensive and non-defensive programming (or a "I want to defend against problems without making life a PITA for me everywhere")
@NikiC b) to some extents yes. But to many, I don't think so. Because if it was going truely defensive, people would be moving away from PHP to a language that's got a richer type system
 
@ircmaxell It defends you in the same way as causing an assertion failure at runtime in a C program defends you. The kind of defensive that informs you that there's a problem, but that is not supposed to be actually triggered.
 
Learning a new language to the proficiency that you already know PHP is a lot harder than making PHP have the features you want
 
As I've said before, My big issue with strict types is that sometimes types unpredictably (at static analysis time anyway). And raising errors in those cases is going to be weird. Granted, most of those cases could be ironed out by simply adding a numeric pseudo type which was a union of int and float...
 
2:01 PM
@ircmaxell I think the fact that the PHP community has been very vocal about wanting strict scalat types shows that people want to be more defensive without pulling the radical option of using an entirely different language.
Also, I don't think there is a language that is "PHP, but with better type system"
Both ruby and python, the usual alternatives, don't do type annotations
 
@NikiC I also think that the majority of those asking for strict scalar types haven't actually thought through what that would mean or look like...
@NikiC I was thinking more like Go or Rust
and yes, they are not "php, but with...", but they have more robust type systems...
 
I enjoyed my time with Rust so far, but it's certainly not an alternative to PHP
 
@ircmaxell those are two steps down the ladder form where php is
 
posted on September 16, 2014 by kbironneau

/* by Thelosouvlakia */

 
Especially Rust is in absolutely no way a PHP substitute
 
2:04 PM
I'm not saying a substitute
 
Using Rust instead of PHP is very close to using C++ instead of PHP
 
close, but not... Rust is garbage collected, without low level allocation access. It also uses type inference.
 
@ircmaxell Lots of companies started by using PHP with "crappy" code and are then improving the code later. Switching to another language is seldom an option.
 
anyway, that's tangential to my points...
 
@ircmaxell Rust isn't garbage collected in any usual sense of the word
 
2:06 PM
@Patrick and, improving code with strict typing is just another iteration in that process
 
@ircmaxell Have you written anything in rust beyond hello world?
 
I originally learned to write web code in Cold Fusion. The best way to explain the difference between the two is that CF is a prefab shelving unit you buy at an office store, while PHP is Home Depot, where you buy wood, nails, circular saws and hammers and build... stuff. Some people like prefab shelves and that's OK, but not everyone is capable of using a circular saw
 
@NikiC no, but it has a concept of ownership, which makes traditional GC less needed
@LeviMorrison yes, but nothing huge... And not in a while...
 
You may have used it back when it still had a stringer GC aspect
 
Junior developers don't have to use scalar type hints, just the same as they don't use PHP's existing type hinting. They still manage to use 3rd party code. Suggesting strict scalar type hinting is "bad" on the basis of what someone new to the language might have trouble with in some random 3rd party library is absolute nonsense.
 
2:08 PM
 
@ircmaxell I always just use unsafe memory because I can manage my lifetimes easier that way >.<
I need to use it more to get used to it.
 
Yup. I'd like to write something in Rust. Just no idea what :D
 
@NullPoiиteя: Do you realize that the website link on your profile page is broken?
 
yupp i know it
 
2:11 PM
and that's symbolic somehow?
I think I missed the joke -_-
 
@CodeNewbie :P
 
@CodeNewbie Maybe this will clear it up en.wikipedia.org/wiki/…
 
ohhhhhhhhhhhhhhhhhhhhh
please excuse me while I give myself a 10 minute timeout in the corner of the room
 
Last night I used std::unique_ptr to write a LinkedQueue in C++11.
Was interesting.
Today I'm going to learn how to write custom C++11 iterators.
 
2:16 PM
Anyway...
 
Hi, I 've got a question simple and easy but for MySQL so if someone knows please ping me, Which case should I use for naming rows?
 
@CodeNewbie its all right :)
 
@VeeeneX whatever, just be consistent
 
Ok
thx
 
personally I like all lowercase (underscore case), but to each his own
 
2:19 PM
Sometimes I feel like bounties are posted on questions that would normally be too localized and that suddenly makes the questions okay.
 
I just wanted to know if there are some patterns to use like you must use lowercase and so on
 
@NikiC passing "foo" to something that wants an integer is nonsense. But is passing 123 to a function expecting a string nonsense?
 
@ircmaxell We've talked about this in the past (in the context on methods on scalar types) and had differing opinions there. I think handling a number as a string is a sufficiently weird and rare operation that it should be denoted by an explicit cast.
 
@PeeHaa ... I currently haven't voted (I deleted my vote, unless I somehow screwed that up :D)
 
well then... I guess we disagree everywhere :-/
 
2:23 PM
:)
 
'noon
 
@NikiC ...eh. speak for yourself. I handle "numbers" semi often. bcadd returns strings, for example, even if the result would fit in a float.
 
we were referring to the reverse. Numbers as strings, rather than strings as numbers.
 
technically we've been talking about both, but yeah...
 
@NikiC Phone numbers. Zip codes in the US. Those are two fairly common use cases where a "number" is really a string.
 
2:30 PM
can anybody help me with this? stackoverflow.com/questions/25851143/…
 
@cspray yes, we are aware that numbers can be stored in strings
Not sure what we're arguing about here or if we're even arguing ^^
 
I'm definitely not arguing :P
I was just pointing out that "numbers as strings" is probably more common than at first thought
 
those aren't numbers though, they're just numeric strings. if you're not doing math on it, it's not a number.
 
and especially telephone numbers can't really be treated as numbers. Leading zeros and stuff like that ;)
 
Yes, and that's my point. They appear to be numbers and you can catch yourself in weird situations if you treat them as such.
 
2:33 PM
Which, I guess, reinforces the point that magically casting everything into everything else is not a good idea ;)
 
@NikiC but then having anything strict isn't a good idea, since what's to stop someone from simply doing foo((int) $phonenumber)
 
nothing stops a person from explicitly shooting themself in the face.
 
@ircmaxell That... doesn't make sense though. A phone number is a string of numeric characters, not a number.
 
Perhaps.
I've always been a fan of the fatal-on-dataloss approach, whereby, if a cast to and from doesn't yield the same value, then it's dataloss.
 
2:36 PM
@ircmaxell I think this is analogous to saying that throwing "undefined index" notices isn't a good idea because people will just use @ everywhere.
 
@derp no, but we can encourage them to do so by engineering solutions that encourage adding explicit casts to calls to prevent errors. or we can encourage them to not add explicit casts (which never fail) but instead error when there really is an error, not just when there's something that's close...
 
Could someone with Zend karma merge this into master for me? github.com/php/php-src/pull/808
 
"123" === (string)(int) "123" so that's fine; whereas "123foo" !== (string)(int) "123foo" thus fatal.
 
@NikiC honestly, I'm not 100% sure that raising undefined index notices is a good idea...
 
@LeviMorrison dunno how to merge github pr's ...
 
2:37 PM
@ircmaxell In that case, I don't think there is any point to continuing this discussion
 
@NikiC i can't say i'd argue with that statement. If i know $_POST['some field'] might not exist, i hate having to say isset($_POST['some field']) ? $_POST['some_field'] : null
 
@ircmaxell that simple ...
 
i'd prefer it just give me back a null
 
things will blow up if I do that ...
 
2:39 PM
without bitching
 
@NikiC I don't know. My thoughts on this have been changing as of late. I used to be of the camp "check every index every time". And that notices encouraged defensive programming. But now I'm not sure. I'm not sure if that just doesn't lead to bloat...
 
@cHao Better collection types that override offsetGet would be a solution here (if they could be shoe-horned into the platform provided collections like the supglobs)
 
@JoeWatkins huh?
 
@ircmaxell I think that's a problem that is very specific to $_GET and $_POST. It's a problem pretty much exclusively there and in all other places you want to know if you access something that doesn't exist. Which is why ?? may become a thing ^^
 
@DanLugg problem is, a collection type can't be passed to array_filter etc.
 
2:41 PM
@cHao And thus begins the cascading issue of "all the things".
 
so now you have to know whether your array is an array, or an ArrayAccess.
 
Traversable vs array, etc.
 
@cHao But spl\filter could handle it :D
 
@ircmaxell Nothing about it encourages adding explicit casts to prevent errors, it encourages being mindful of your data and not doing stupid shit with it. That some people will blindly misuse explicit casts is a thing I don't particularly care about. They were already writing crap code to begin with.
 
@NikiC even in other areas... If you have that much structure, why aren't you using an object instead?
 
2:42 PM
@ircmaxell like an object with integer properties?
:P
 
I think I done it ...
 
@NikiC Yup :-P
 
$foo->{'1'} // lol
 
@LeviMorrison sure, if you want to abandon the built-in array handling functions. but in order to make that decision, first you have to know that they won't work.
 
@cHao I've actually worked a fair but with functional functions that work on both arrays and Iterators. spl\filter would be a function that works on either type.
 
2:44 PM
personally, i'd like to be able to treat an object as an array if it implements ArrayAccess and Traversable. but eh.
@LeviMorrison i try to make my functions so they don't care. but doing so can complexify things and scare noobs :P
 
@NikiC well, for sparse arrays, what usage is a notice? It's a sparse array...
 
@cHao Right, but if it was in the core it would be doable :D
 
@ircmaxell like you having an off by one error? A null value will very likely get lost in the first operation you do on it
 
no, like having an array with key 0, 1, 4, 5, 12 set.
 
yes? what about it?
 
2:46 PM
it's not an off-by-one error...
 
you still somehow compute those keys
or indirect them or something
 
eih...
 
Given how out-of-bounds memory reads are a pretty big problem in languages that don't use bound checks, I honestly don't see how you can disagree
 
they are a big problem because they are unsafe
PHP array access out-of-bounds are not unsafe by very definition
that's one of the big things that PHP's array system brings. It's always safe
 
sure. the point was that it's a problem that turns up again and again and again. In PHP it would not leak your private keys, but it would still cause a bug
 
2:50 PM
would it cause a bug though?
 
likely
not every out of bounds access in C leads to a segfault, it may manifest in some other way
like recently had a case where an out of bounds read in string incrementing just prevented "a"++ from working properly, while running fine.
 
not the same
 
PHP is not C.
 
because in C, if you do a out-of-bounds read, you're reading a memory block, that's not part of the array. In PHP if you do a out-of-bounds read, you get back null.
and considering you can't distinguish between not set and null with isset (you'd need to use array_key_exists), why distinguish them at all by forcing a notice on one and not the other?
 
Okay, reflection naming question!
 
2:57 PM
@LeviMorrison 42
 
i am faceing a problem im magento 1.7 my site's front end is not working but admin panel working proprlly. i have tried many things seen from google but cant solve it plz help
 
I am introducing a new reflection class that represents a type declaration, such as a parameter type or return type.
 
are you sure you want to do that in the same rfc ?
 
@LeviMorrison ReflectionTypeHint
 
ReflectionType, ReflectionTypeDeclaration, and ReflectionTypeAnnotation; which of the three?
 
2:58 PM
don't you want to just get it exposed somehow and rfc improvements to reflection after ?
 
I absolutely will not call it a ReflectionTypeHint.
 
:-P
 
They are not hints, and never have been :D
 
sure they are
they are also not annotations, nor are they types, so ReflectionTypeDeclaration would be the only one left
 
ul Gahlot
any php developeravilable here?
i am faceing a problem im magento 1.7 my site's front end is not working but admin panel working proprlly. i have tried many things seen from google but cant solve it plz help
 

« first day (1431 days earlier)      last day (3531 days later) »