« first day (1587 days earlier)      last day (3358 days later) » 

user895378
12:00 AM
@NikiC Should Generator::getReturn() throw if Generator::valid() is true? (like Generator::rewind() does if iteration has already started)
 
I have a question
I'mm thinking about the best way to implement an error handler
 
user895378
Also, should we consider a read-only property, Generator::$returnValue instead of Generator::getReturn()? /cc @bwoebi
 
@rdlowrey good question
@rdlowrey no. avoid magic when avoidable ^^
 
user895378
hehe okay
 
@rdlowrey no.
 
12:02 AM
The problem is that when an excpetion happens I still want to generate the Response ( with back trace and the like )
So my options are
 
Should I reserve resource as well?
 
@rdlowrey I think that yes, it should throw
 
@rdlowrey I'd say yes.
 
user895378
This was my conclusion as well.
 
on a caught exception generate a backtrace response directly and just print it
which kind of sucks
 
user895378
12:02 AM
You don't want to get back null and assume the generator iteration completed.
 
calling it before it has actually returned makes little sense and is likely a bug
 
route it to a specific internal exception controller
which feels like a hack
 
@rdlowrey yup.
 
Or generate a Response in the error handler and then substitute it for the controller response
which I'm also not 100% behind
how do you guys handle this?
 
user895378
@Dracony It's kind of a difficult question really. It depends a lot on where code might throw. I don't have much input for you at the moment :/
 
12:06 AM
Well where would you catch it?
I used to catch it before calling the router
 
@bwoebi Months of discussion and still feels rushed to me :)
 
@LeviMorrison we can have years of discussion… but at some point we're just going in circles. We alraedy went enough in circles…
 
@bwoebi I still think it is rushed for PHP 7. You don't have to agree, obviously.
 
Oh, I think it's rushed too. But I don't think it's too rushed to make it fail. especially as it's a major now, ideal time for introducing it.
 
If we reserve the types no reason it can't go into 7.1
Just as good, imo.
If they aren't reserved we would have to wait for at least PHP 8 and that would probably make people very, very unhappy.
 
12:17 AM
@LeviMorrison Yes, I think that's reasonable.
 
@LeviMorrison I think we'd even be able to introduce it in php 7.1 without reserving… it's just class names anyway…
 
@bwoebi It's a BC break and I personally would like to be more strict about any BC break in minors.
And regardless of what I think I know there are others who feel REALLY STRONGLY about BC breaks in minors.
Would probably make a stink about it.
I know what you mean, though.
If you are using any of those names for classes, interfaces, or traits you are asking for trouble.
 
yeah…
 
@bwoebi I don't think so. Reserving is the right way of doing that.
 
Well, Drupal uses String... In a namespace, but still.
 
user895378
12:21 AM
@ircmaxell IIRC you joked earlier today about throwing a bogus exception into a generator to "stop" it. Well it turns out this is actually a thing in Python -- GeneratorExitException ... gross.
 
@kelunik I'm not saying it's a bad thing to reserve. I just say that it'd even work without reserving.
 
@rdlowrey python uses exceptions for everything
 
user895378
exception abuse :(
 
@FlorianMargaine I thought that were Javas task?
 
Nope. Python is even worse. That said, exceptions are cheap in python. But still...
 
12:23 AM
@bwoebi Only NullPointerException and ConcurrentModificationException. :-)
 
Should I be happy to not have touched Py, ever?
 
Nope. It's pretty good.
 
user1105787
I'm thinking of switching over to Django from Symfony for a project, except I haven't worked in Python very often. Anyone who has worked with both frameworks know of any good tutorials to ease into it besides the one on Django Doc?
 
@bwoebi Can you proofread this? wiki.php.net/rfc/reserve_more_types_in_php_7
/cc everyone in room
 
@LeviMorrison maybe drop the aliases from that list?
after all, even ircmaxell's rfc doesn't use them anymore
 
12:34 AM
@NikiC This is a quite recent change then.
 
@LeviMorrison it is
 
If we reserve bool and not boolean I think that can only be a source of confusion.
Allowing class Boolean {} would be a bad idea.
(in my opinion)
 
hm yeah, it might make sense to reserve them, but forbid their usage
 
user1105787
"The vote will be a simple “yes” or “no”: do you vote in favor of reserving these type names?"

As far as grammar, the colon needs to go in the quotation ex: "yes" or "no:"
 
@DavidEugenePeterson that's a bastardization of grammar
Programmers just can't write something like that ;)
 
12:37 AM
Anyway. I will think about this as I walk home. I don't know if I'll get around to putting PHP 4 constructor stuff to a vote tonight either.
After tonight I should be a bit less busy for a day or two; can hopefully get that done then.
 
@LeviMorrison what needs to be done to start voting on it?
 
@NikiC Just normal RFC review stuff.
Clarify grammar, review the consistency of error messages.
If you want I give you permission to do the once-over and put it to vote.
My only request: make it open for a longer window than 7 days.
Maybe the 27th?
 
@LeviMorrison looks good to me :-)
 
user1105787
@NikiC Very true, if English was a coding language, I don't think any of us would program in it. The syntax is too clumsy and the naming sequences are inconsistent.
 
@LeviMorrison nah, I'll leave it to you :P
 
12:45 AM
@LeviMorrison Does that include in namespaced names? foo\integer
 
@Danack yes, definitely.
 
That will annoy significantly more than the top level names would.
 
Should probably be clarified in the proposal
 
user1105787
@NikiC Just double checked, my bad. Colon goes outside the quotation in this instance.
 
in php namespaces don't really help from a "reserved stuff" perspective
@DavidEugenePeterson But iirc you put a colon inside parens :/
 
user1105787
1:06 AM
@NikiC Only if it applies to the quotation itself according to Owl. Colons and semicolons are different than periods and question marks.
 
There's going to be people out there who have 'done the right thing' by using those names only in a namespace. It will be worth listing why it's not possible for them to continue to do so, even if only to cutoff their anger.
 
@Danack If you could hijack primitives in any language I'd be pretty pissed at its designers.
(unless it's explicitly an integral part of the language somehow. HEY! YOU CAN REDEFINE OUR STRING TYPE BROS! HAVE FUN)
 
Was just yelled at by Francois for proposing something "to get it to vote before any competing proposal can be ready"
 
user895378
Everyone operates under the same time constraints.
 
btw who is Francois? Not heard the name until recently and now ten emails a day...
 
1:17 AM
@ircmaxell I think it's kind of hasty for anyone to get a scalar types proposal through before March 15th. I think you are already aware of this opinion :)
 
I am trying to figure out how to reply. Will wait until tomorrow, but I have one hell of a reply in mind.
 
I would really prefer if we all just reserved the types in 7.0 and refocus on something for PHP 7.1.
 
@LeviMorrison honestly I don't care if it targets 7 pr 7.next. That's up to a RM to decide
However, I don't think we should have to hold discussion and/or voting for a phantom implementation that has had years to be made.
This is not a new rfc or concept.
 
Also, is Sara going to go forward with her proposal still? I've been busy and cannot possibly read all the Internals email right now.
 
Hell, this is the 5th version I have personally worked on.
No, she said here she was told not to by zeev.
 
1:20 AM
On what grounds?
 
They were working on it
 
And was that a public email/message from Zeev?
 
I can't express how much that pisses me off.
No. She said it in this room
Sec, let me switch to my laptop
 
@ircmaxell Some things take 100 versions to get right :)
 
@LeviMorrison sure. I'm glad none of my priors made it in
8 hours ago, by Sara
In other news, Ze'ev and François have not-so-politely asked me to not put 0.4 forward since they have something they believe they have consensus on.
 
1:23 AM
Completely forgot about this. Mental TODO, review: github.com/php/php-src/pull/947
 
I'm going to sleep before I reply to Fracnois's email, otherwise I'll say something overly bad.
 
you in EU at the moment?
or just an early night :)
 
user895378
"Don't press send" is a strategy I'm trying to employ more often myself.
 
user895378
If you still feel the same upon re-reading your response the next day then you're probably safe to send it :)
 
I do that a lot, but usually I still feel the same but have thought more about the trouble it will get me in to hit send
 
1:29 AM
@ircmaxell I'm glad this upset you :)
 
@Leigh I'm not going to bed yet
 
ohh, just meant "sleep on it", gotcha. I'm going to bed :) night
 
user895378
lol something funny on the wiki RFC page ...
 
user895378
If you view the "how to" it says this:
 
user895378
1:32 AM
> 1. Log into the wiki with your wiki account.
> 2. Navigate to a URL like https://wiki.php.net/RFC/my_RFC (use your feature name in the URL).
> 3. Push the “Create this page” button, fill out the supplied template and save.
 
what's funny?
 
user895378
If you actually navigate to wiki.php.net/RFC/my_RFC there is already an RFC there.
 
LOL
 
user895378
And if you had to guess which person authored it ... only one guess ...
 
user895378
No need to do it here. But it's ... not surprising.
 
1:33 AM
didn't have to guess, saw it for my self
@LeviMorrison before I heard that, I was just filling time by working on the patch. Now I'm determined...
THIS IS IT. THIS IS THE BEST GIF. http://t.co/P8WiOBGisT
 
user895378
Room ownership is really nice when you want to view deleted messages.
 
@rdlowrey ;-)
and I didn't say what I would do if that happens.
I know precisely what it would be...
 
Quick question, tangentially related to PHP.

The symfony2 coding standard says:

Naming Conventions¶
...
Use underscores for option names and parameter names;
...

i get what an option name is, but what is a parameter name in this context?

Method names/arguments are specified camel case, but if you google PHP parameters you end up with a bunch of stuff that references method arguments
 
user895378
@Ross Not sure. It sounds contradictory to me. A "parameter" sounds unequivocally like a function/method parameter.
 
1:45 AM
@Ross I would interpret parameter as a thing you pass to a function
 
@Ross Symfony uses arrays (or 'bags') to pass stuff around quite a lot. I think possibly in the context they're using 'parameter name' is a synonym for option name where it's used in an array.
 
Ahh
yes, that would make sense
$myArray = ['parameter_name' => 'value']
so a parameter in that context is an array key
 
I guess.
 
Still, the wording is confusing and inconsistent with the Reflection API with ->getParameters() etc
 
yup
 
1:48 AM
I just couldn't handle the cognitive dissonance! I'll ask Ryan if it's worth making that bit clearer
 
@Ross ow wait - also for config parameters. symfony.com/doc/current/components/dependency_injection/…
 
Oh yes!
That also makes sense, the YAML keys. I'm yet to see camel case in YAML!
Ok, I can relax now. Thanks!
 
Holds telescope up to eye-patch I see no camelCase Yaml.
 
ha
Everyone enjoys trolling JavaScript for it's weirdness but everyone has something. Here's Java http://t.co/SszNlbefLP
 
user895378
@Danack le param sac?
 
1:59 AM
@rdlowrey sac de param, n'est pas?
 
user895378
peut'etre ... je parle seulement un peu de francais.
 
user895378
^ I can never remember how "maybe" is supposed to be spelled there.
 
if anyone wants to get me a gift for my birthday: saq.com/page/en/saqcom/scotch-single-malt/…
 
user895378
And I have no idea how to make a circumflex accent over the e, so ... #dealwithit
 
2:00 AM
:-P
 
My Dad is living in Normandy, so every now and then I got over and remember how bad I am at French.
 
user895378
I had forgotten how long it takes to write a coherent rfc ...
 
@rdlowrey yeah, which is why we shouldn't be putting more barriers in front of contributors
#first-world-problems
 
2:44 AM
-3
Q: How to remove(not unset) key-value pairs from an associative array which contains null value in them in an optimum & efficient way?

PHPLoverI've an associative array titled $post_data as follows. The actual array is very large for your reference I'm just putting below two elements of it : Array ( [0] => Array ( [feed_id] => 1331 [app_id] => 0 [privacy] => 0 [privacy_comment] =

 
3:29 AM
^ is a duplicate
 
3:56 AM
@Narf ehr, nope? :P
@FlorianMargaine oh great another anti golang post. yes, the syntax is boring... so what
 
 
1 hour later…
5:08 AM
Is there anyone to help out ..!
http://stackoverflow.com/questions/28581702/how-to-get-data-from-both-tables-in-manytomany-relationship/28581805?noredirect=1#comment45487594_28581805
 
5:37 AM
hello
 
 
1 hour later…
6:38 AM
morning
 
6:58 AM
Morning!
 
7:28 AM
Hello Guys I have doubt in php
7
I want to include my script in other website.
Can i find that website domain name?
@Alexander : Can you help me?
@RichardA : Can you help me?
 
Hello, I'm having an issue with my Homestead installation. When I try to run homestead up it keeps timing out on connecting to SSH. How do I fix it? I'm running OS X 10.10.2, Vagrant 1.6.5 and VirtualBox 3.10.22. Logs and Homestead.yaml can be found here: pastebin.com/2BcdAiNv
@Pradeep What do you mean?
 
7:47 AM
mornin
 
8:08 AM
moin
 
moin
 
moin
 
I hate when people in my country consider php developers as front-end developers as well...
Every time they ask me: you do html/css as well, right? I want to send them to hell. :-)
3
 
8:31 AM
@Leri well. I deveop in PHP. But occasionally, I have to know mongo, SQL/MySQL, Solr, redis, AMQP/RabbitMQ, docker .. and.. so on. css isn't so bad, I think (:
 
@AlmaDo no, he's completely right
knowing backend technologies is ok, but css/html is for frontenders
 
is there a point of setting up RAID5 (for HDDs, not SSDs) on home system ?
 
either that, either the position should be named as a full-stack dev
 
@Leri PHP developers are treated as "full stack developers", because .. well ... most of us are
 
@NikiC ping
 
@tereško I just have a raid 1 nas (comes with a dropbox-ish app for folder syncing). ssd on the laptop where I don't mind if I lose the data.
 
morning
 
morning :) any doctrine specialists online here?
(or at least familiar with it ;-))
 
> Don't ask to ask a question.
 
too early for the specialists, @Ocramius is still sleeping
=P
 
8:55 AM
too bad :/
Well the question is a bit complex and I asked it already on SO but nobody can help so far
 
@TiMESPLiNTER tomorrow you will be able to put a bounty on it: 100-200 would do just fine
 
@AlmaDo Those are back-end things and yes, I have to and know that. But I am not front-end developer. If I put my time to become one I would not be as good as I am at what I do. :-)
 
@tereško Yes, I'll do that.
 
@tereško No offense but all the "full stack developers" I have seen are bad either on front-end, either on back-end. There was one exception in my life but that guy was always missing deadlines (and by missing I mean finishing after 1-2 month).
I don't blame him. There's a reason why those things got separated. ^
 
9:06 AM
true
but the important part is that most of PHP developers (who are actually somewhat good at what they do) understand both frontend and server management
of course, you pay for it my having to spend more time
 
@tereško we can and even should fix stuff on frontend, but not build it from the ground up
 
moin all
 
if I need something really advanced (something you cannot make by slapping two jquery plugins together), I actually prefer to make it myself from ground up
 
Why when you/your company can hire someone who can do it while you continue writing logic?
 
maybe you have different type of frontend devs, @SergeyTelshevsky , but ours are kinda at the level of "jquery programmes"
 
9:11 AM
@tereško if you're good at it - ok, but when you're on a project with at team of at least 5-6 members, then it's a waste of time
@tereško yeah, and it's hard to find a good one in LV
 
@tereško They are not front-end developers. Hire new ones. :-)
 
there is strict border between front end and back end.
if u define it well,
 
depends on the project
 
no there is
 
well .. we have 3 frontend devs, and only one of them has the vaguest clue what "closure" is .. and only because I have been beating it into his head
 
9:14 AM
we have no frontend devs
 
outsourcing ?
 
nope, just horrible frontends :P
 
lol
 
made by myself
bootstrap and jquery ftw
 
ok, to be honest, my issue is not "frontend devs"
only "javascript" part of the frontend
 
9:15 AM
jquery okay... but bootstrap Oo
 
@MarcelBurkhard Ending up with the megamess. :D
 
^ this
 
if it's a large app, separate backend/frontend, provide backend api and don't do their job
 
quick&dirty
 
like ajax javascript is still backend, but animations, border width and idea of functionalities - front
 
9:16 AM
@animaacija wrooong
 
@TiMESPLiNTER what exactly is "OK" about jquery? Is it the shitty architecture? Plugins that never work beyond simplest examples? Or is it the tight coupling to the HTML which it favors?
 
@tereško I let front do all its animation and I don't care code quality there. I just should be able to call them from javascript that communicates to my back end
 
@SergeyTelshevsky stop talking to the tiny-avatar people
 
@SergeyTelshevsky back end should tie together to basic javascript needed. Just as ment, and nothing scalable
 
@tereško explain that term please :)
@animaacija no.
 
9:19 AM
I never said jQuery is ok
 
ehh..
 
@tereško Never had any problems with jquery (except width calculation of objects)... but I'm not a jquery hardcore user so... can't speak for those ;)
 
but I use it anyway
the analogy would be PHPUnit, I love it and don't use it
 
so what's your alternative @tereško?
 
@SergeyTelshevsky when you put someone annoying or dumb in the ignore list, the UI make his/her avatar smaller
 
9:20 AM
@animaacija php should provide an api, javascript should have a client for that api, that should be not tied by any way
 
@TiMESPLiNTER specialized libraries (like for animation or XHR) and native code
 
well ok. Back end developer could also just give txt file to designer(front) with description of requests and responces
 
@tereško I see, there has to be shared and publicly available ignore list :)
@animaacija that's the proper way to do it. called manual/documentation
 
I'm a fan of native code but not in frontend with so many different browsers @tereško
 
when asked for help reply with RTFM, or WTFM yourself
 
9:24 AM
hi
 
hello , is there a way (a PHP function ) to transform a one dimensional array into a two dimensional one, array("this/is/a/url","this/is/another/one") => array(array("this",'"is","a","url"),array() .....) ?
 
@TiMESPLiNTER a lot has changed since IE6 days. Yes, there are minor differences, but I find it that these days (if you have sensible targets for browser requirements) the cross-browser issues are minor
 
when you stop separating stuff, be it in the scope of backend, frontend or the whole project, you end up with a bunch on unmaintainable garbage
 
is it good to use CDN?
 
yes you're right @tereško IF you have sensible targets for browser requirements ;-)
 
9:26 AM
@Joseph php -r '$x = array("this/is/a/url","this/is/another/one"); var_dump(array_map(function ($e) { return explode("/", $e);}, $x));'
 
i have got the job interview test
it is like creating the interface for uploading large xlsx file about 65,000 records
and uploading to database
i have uploaded the xlsx
now to prase this big file cannot find the good way
 
not helping you on the job interview
 
any suggestion ?
 
that's cheating imo
 
thats research
 
9:29 AM
@Joseph array_merge(array of keys, array of values)
 
lol
PHPEXECEL tried but file is too big
 
file is too big??
increase memory
 
i did
file is like 14 mb
my server has only 256mb ram
 
@FaizRasool Separation ftw.
 
i did tried PHPEXCEL, simple EXCEL
i'm thinking to create server side solution to convert xlsx to csv
 
9:32 AM
@SergeyTelshevsky Thank you
 
then upload using file command in mysql
 
posted on February 19, 2015 by kbironneau

/* by Attakinsky */

 
@FaizRasool seems you can read it in chunks: stackoverflow.com/questions/4666746/…
 
@MarcelBurkhard i tried that one but the issue is again it take long time to convert
like for 65,000 record it took like ages
the other solution i'm looking into is github.com/box/spout
If you have to stick with XLSX, check out Spout. It's an open-source library that can read and write XLSX files and was optimized for scale.

Reading the 240000+ rows will take about 1-2 minutes and require less than 10MB of memory!
some people said
 
hello guys, is there any way to prevent users using servcices like hidemyip to visit my website
i have already prevented users by banning TOR browser
 
9:39 AM
@FaizRasool looks promising
Requirements

PHP version 5.4.0 or higher
PHP extension php_zip enabled
PHP extension php_xmlreader enabled
PHP extension php_simplexml enabled
 
i have whm base vps
this is not a problem
 
let me go ahead and try
in 2 days this interface building is quite hard
these people are crazzzzzzzzy
 
@ShubhamNishad As far as I know, not easily. You could find an existing database (or create one) of IP addresses (a blacklist) used by such services, but the list is ever changing and you'll likely never get all the services.
 
hmm, so it's like there is no way to stop abusers and spammers from visiting my website :(
 
9:46 AM
@SergeyTelshevsky can this be taken another step further in order to have the resulting two dimensional array look like this ? array ( array ("1","this/is/a/url","url" ),array("2","this/is/another/one","one") ... ) where the first element is the index(line number), the second is the complete path and the third is the file ?
 
@ShubhamNishad nope. what problems are you having that you are considering this?
 
Few people are harassing my users by flooding the chat room with porn website links, pictures. No matter how many times I ban them, they can change ip within minutes and also use private browsing feature of browser to break ban
My website is purely based on "no registration needed" philosophy. So it looks like there is no way i can stop them
 
@Joseph yes, but that's something you should do yourself
 
@ShubhamNishad Welcome to the Internet. Now you know why every website requires you to create an account just to post a comment
 
@tereško you left that LV dev skype chat?
 
9:50 AM
accidentally
I think my phone's skype did something wrong
 
I may invite you
 
cool
that would be nice
 
done
amount of laravel and stupid questions makes me want to leave :(
 
^^
@ShubhamNishad you could force every visitor to register before using your site and validate the email adress
 
@SergeyTelshevsky heh .. the reason why I try to stick around is: "local gossip" and getting some feel for local environment
 
9:54 AM
@tereško that's why I decided to stay :)
 
but nobody likes making an account for every site
 
@MarcelBurkhard, I do that on my other website where is very similar to facebook.
 
@SergeyTelshevsky At least you can watch as these people use Laravel with amusement
 
but some people feel lazy and they don't want registration system
 
I have spent way too much time in international online communities to have a objective sense of what/how ordinary developers think
 
9:57 AM
yeah same...
 
@SergeyTelshevsky i will, but can you just point out to me how to get the index from the callback function ? var_dump(array_map(function ($e) { return array("THE INDEX ???",$e,basename($e));}, $x));
 
@tereško I've been in here < 3 years (and php < 3 years) and I'm continually thankful that I was shown the light
 
@Jimbo I learned one thing the last few months - most of the Laravel / CI / Fuel / etc. users ask questions about the framework, like "what function to use to do xxx" or "why function f() doesn't do xxx" and never go through the code itself, only documentation or ask questions on forums/so.
 
yup
that's how they think
 

« first day (1587 days earlier)      last day (3358 days later) »