« first day (1274 days earlier)      last day (3673 days later) » 

3:00 PM
@AlmaDo Still not sufficiently interesting ^^ Though really, the problem is just that it's impossible to find the marginally interesting questions in all the other crap ...
 
-1
A: Multi processing a PHP script?

Joe WatkinsMulti-threading is certainly an option <?php class Fetcher extends Thread { public function __construct(Threaded $shared, $page) { $this->shared = $shared; $this->page = $page; } public function run() { $data = file_get_contents($this->page); if ($d...

:o
 
@NikiC hehe :p But hope it's not lame or stupid at least
yeah I agree that it's too hard to find interesting questions
 
@AlmaDo Nah, it isn't lame. But it's not "How do I efficiently convert a string to a floating point number" either, which would be a very interesting problem ;)
 
I'm near 20k - and I think I'll stop answering "just any" arbitrary questions after this (I mean usual questions which are not exact duplicates or "gimme da code")
@NikiC not sure what is so interesting - because we have (double) cast
 
@AlmaDo I mean the implementation of that cast ;)
 
3:04 PM
@NikiC we'll go to lxr and see what is it. Or use one of standard expression parsing methods (so go to wiki)
it's interesting, but... no real use-case :\
 
@AlmaDo If you go to lxr you'll find that the implementation is approximately three thousand lines of code
 
sad (:
 
And that is, as far as I'm aware, not the state of the art strtod algorithm
 
um.. ? I remember there are standard data structures for expressions
i.e. it won't be 3k lines :\
 
@AlmaDo standard data structures?
 
3:07 PM
yeah. polish notation e t.c.
so it may be used to parse numerics as well
or may be just "break-down" method, when we use connection diagram (not sure I know correct title, need to check)
in any case, parse one numeric is very standard problem. It has good solutions. And - quite easy solutions. Not 3k lines
 
@AlmaDo No...
 
proof?
 
Not if you try need precision
You want the closest floating point number the machine can represent
 
? elaborate please
 
@JoeWatkins Serial downvoter.
 
3:14 PM
@AlmaDo The "standard" floating point parsing algorithm (also what PHP uses) is David Gay's. Some basic info here: exploringbinary.com/how-strtod-works-and-sometimes-doesnt
Maybe that will give you an idea why it's a hard problem
 
@JoeWatkins Didn't know it's THAT easy, awesome.
 
There are various other algorithms building on that (usually with Gay's as a fallback for failure cases), like grisu3
 
@MehulMohan don't be lazy and ungrateful. You were given a solution - free help to your problem, if you want a fiddle make one. — Benjamin Gruenbaum 9 secs ago
 
@NikiC oh.. it seems we were talking about different problems. Approximation is a big difference
 
408 Request Time-out
Your browser didn't send a complete request in time.
Just got this on SO.
 
3:18 PM
^ your fault :p
 
:P
 
One time I got 504 on youtube. I've even made a screenshot
 
@TOOTSKI I dv'd the other answers because the questions is about multi-processing and is tagged multi-threading, the answers are about curl which has nothing to do with anything ...
 
@JoeWatkins Just wanted to say that others deserve downvotes consider they suggest curl_multi.
Consider Artax for async/parallel processing without threading. — TOOTSKI 7 mins ago
I know this guy, worked for same guy.
 
@TOOTSKI TOOTSKI?
 
3:22 PM
Refresh the chat :)
 
To deny access to file, in htaccess

<Files "log.txt">
Order Allow,Deny
Deny from all
</Files>

But this is for a specific file, isn't there a way to do it for all file types?
 
Still TOOTSKI for me
 
@JoeWatkins stupid question, I need to process 1M LoC (perhaps many times), would I gain "performance" with threading?
 
I would choose my words more carefully, artax does not allow parallel processing in the real sense, it is non blocking i/o ... parallel processing of several streams implies that the code that processes the content at several locations is executed in parallel, and it is not, they are only downloaded in parallel to be processed synchronously ...
 
@SecondRikudo Yeah, I'm TOOTSKI, I know this guy that answered the question I commented on ^^
 
3:23 PM
@TOOTSKI That... wasn't a sentence. Please rephrase
 
morning.
 
depends what you need to do with the lines ...
 
@JoeWatkins Couldn't be bothered really to explain (what you wrote), neither does curl_multi_*, just wanted to suggest that Artax is better than it.
@JoeWatkins Re-format them (syntax), it's PHP code.
It's not that much I figure... it will be fast anyways.
 
then you could thread the reformatting of files yeah, but not lines, because code ... but certainly, you can go as many times faster as you have cores almost exactly ...
 
Ah, so that's the point, great, awesome.
Other option would be to set up SVN hooks, so when server recieves commit, it re-formats the code, not sure if that's even possible.
We couldn't agree on coding styles, so basically decided we let the tool do the heavy lifting ^^
 
3:32 PM
In MVC structures, how do you start the session? Is it fine to have session_start(); in the main index file?
 
(new \Session($sessionConfig))->start();
It should be in bootstrap, and yes.
 
@AmalMurali, if you close vote, please share here too.
 
morngi
 
@TOOTSKI IMHO, it would be best to initialize session the first time you are actually creating an abstraction of session
 
3:40 PM
@JoeWatkins where's the problem? Compiles fine fore me from php 5.4 up?
 
Hello, I got problem x/
http://pastebin.com/8Qzmgnx1
Anyone got solution?
 
@bwoebi simple error message, it is not defined in his version ... git.php.net/?p=php-src.git;a=blob;f=Zend/…
 
Look at the requirements in: github.com/krakjoe/phpdbg/commit/…
 
wat ?
 
@tereško Yeah, I just wrote that for nothing because "MVC".
 
3:44 PM
did you discuss that with anyone ?
I don't remember you talking with me about changing the requirements like that ...
 
no?
 
@user3123545 MVC has nothing to do with where you initialize session
 
@JoeWatkins anyway… I thought to compile phpdbg in you use anyway the newest version of php-src in that branch?
 
reverse it please, the requirements for the rest of the software have not changed, you do not impose restrictions like that because of a single function ...
 
I don't see any point of using an old micro in the 5.4 branch?
 
3:47 PM
maybe that's the version he has in his stack, maybe that's the version he needs to debug ...
 
Why would a sensible person do that?
 
@JoeWatkins you always can upgrade a micro version without any changes usually…
But well… you can readd it and put an #if compiler directive there
 
that doesn't make sense if we're talking about debugging, if you find a bug in specific version in your code then it is that version you need to debug with ...
you're assuming he has one machine ... what if he has ten thousand machines running 5.4.9, no ruddy point in debugging anything but 5.4.9, at all ...
 
If you debug 5.4.22 you usually get the same result as if you were to debug 5.4.9 oO
 
3:51 PM
usually ?
 
1 min ago, by bwoebi
But well… you can readd it and put an #if compiler directive there
 
doesn't mean anything ...
 
@JoeWatkins yes, except critical fixes in a micro…
 
I'd rather you done it since I am in the middle of something else ...
 
@JoeWatkins related to phpdbg?
 
3:52 PM
yes, you know it is ...
 
but yes, I can
 
k thnx
 
@TOOTSKI Sure. I was having a flaky connection then, so I couldn't get here.
 
If Saturday is already like this, I can't imagine what Sunday would be like :P
 
4:00 PM
@JoeWatkins done
 
/me likes android's content provider and resolver idea.
How applicable is that for web? ^
 
user895378
That's why I'm killing it.
 
whoa
you have another secret room I wasn't told about :(
 
user895378
4:13 PM
@NikiC That's what replaced the dartlang room because we never talked about dartlang
 
user895378
@NikiC If you visited the dart room in the last month or two I think you would've seen the link to the new room :)
 
^^
 
Wait. Why am I seeing all the messages in green?
 
@AmalMurali Some extension or you need to visit a doctor. :p
 
why people so want to do stupid things
Why? You already have standard reference to element of array. It's .. key. Use just $array[$key] to reference desired $key. That's it. No sense in attempting re-define standard mechanism — Alma Do 6 hours ago
 
4:22 PM
@AlmaDo Because some people are simply f... stupid. :)
 
@JoeWatkins how do I pass command line args to a script I want to debug via phpdbg?
 
@bwoebi $argv[1] $argv[2] ...
 
already tried…
 
what's the prob ?
 
register a function to set argv
 
4:24 PM
program is using getopt()
which is independent of $argv
 
oh I dunno, someone reported some problem with getopt at some point, you had to jump through hoops ...
 
/get out of the box/
 
@JoeWatkins jup, got problem. $argv/$argc isn't a superglobal in phpdbg.
will fix.
 
PHP 5.6.0-dev (cli) (built: Apr 11 2014 19:25:21)
Noob question, does dev mean beta, or I compiled it wrong?
 
correct.
dev means non-stable generally.
 
4:31 PM
Thank you.
 
HHVM's generator support sucks balls
 
I hope they didn't implement their other features with the same quality...
 
@NikiC To be fair their impl was done first (though not public)
 
@LeviMorrison Doesn't change that is sucks balls
 
4:35 PM
Sure. I was just being fair ^^
 
$keys['quality'] :)
 
@AmalMurali nope, black
 
@AmalMurali and a better chat font also...
 
@CSᵠ: Yours or mine?
 
4:37 PM
@AmalMurali yours
 
new entries in chat are normally shortly green… and then fade to black… maybe your fade doesn't work^^
 
Yep, refreshing fixed it. Turns out I had '&highlight=true'. lol
 
LOL
 
Phew. My eyes...
What do you guys use for screenshots? Print Scrn -> <image editor> -> upload here? Or is there a browser extension that does all this? Or maybe something like ScreenCloud?
 
seen screencast.com at some ppl
 
4:51 PM
@AmalMurali For website screenshots or in general? For broswers there is FireShot, and for genera, Jing or Hyperdesktop or something else.
Wanted to make my own thingy for screenshots... in VB6.
 
@TOOTSKI: Was asking in general. I'm unix and I used to have Screencloud but that's a bit buggy :/
 
Quick google search: shutter-project.org
It's PITA you can't run some programs natively on Linux.
 
Can I use array_slice to get N elements before a given offset?
 
@AmalMurali Just do like -2?
 
I thought array_slice($array, $offset, -$n); would work, but it seems it doesn't. The manual says:
> If length is given and is negative then the sequence will stop that many elements from the end of the array.
I have no idea what that means. o.O
"stop" that many elements? uh
 
4:58 PM
Ah, then it doesn't respect the offset.
It just goes from the end in that case, it seems.
Wait, try it. Shouldn't be like that.
Maybe in case the offset is NULL.
Weeeeeird.
 
print_r( array_slice(range(1, 10), 3, -2) );
 
$offset = 5;
$length = -3 * -1;
$array = array_slice($array, $offset - $length, $length);
 
I'd expect this to return [3, 4], but this is what it returns instead:
Array
(
    [0] => 4
    [1] => 5
    [2] => 6
    [3] => 7
    [4] => 8
)
 
I'd use this.
@AmalMurali Should be 2 and 3, no? eval.in/135804
 
5:27 PM
no warez plz
 
@Gordon Why not?
 
Under what number can I find it? :P
 
4 and 15
 
I thought SO used the DMCA model?
 
5:33 PM
I had to google what does warez mean..
 
@PeeHaa they do
 
strange word :p
 
Where was the link leading?
 
@AmalMurali torrent site
 
Oh, that movie.
 
5:34 PM
@Gordon Doesn't that mean it's only removed when they receive a notice in practice?
I remember a meta post on that topic once
 
@PeeHaa sure, but how is a torrent to a movie related to programming?
 
It's not, but that's not what you said ;-)
 
Then, how is any of this programming related? ;)
 
if about "relation" .. I have bad news, @Gordon. We discuss here at best 1% that is related to programming :p
 
Aaaaaand I cannot find the post :D
@AlmaDo Neh I think this room does much better than 1%
 
5:36 PM
@AlmaDo It's noticeably worse on Friday and Saturday ^^
 
but illegal things shouldn't be publushed. in that I agree :p
 
@AlmaDo not true. the room is on topic most of the time
 
hehe. that's figure of speech
 
What do you mean? Saturday?
 
^ crap
 
5:37 PM
@AmalMurali yes. especially that. but you should not post it on saturday.
 
@AlmaDo: DONT TELL THEM! D:
 
lol
 
lololo
 
How come common sense posted such a generous post here
 
@Gordon: What do you mean? I don't understand. It's Saturday :P
 
5:39 PM
@AmalMurali Friday may only be posted on Friday
 
I didn't post Friday. Check the message again ;)
 
cheater
 
@AmalMurali History doesn't lie.
 
Politics does.
inb4 rebecca publishes albums named sunday, monday and rest of the weekdays
@Mr.Alien: That CW post?
 
@AmalMurali the one which is starred in the room.. -->
 
5:43 PM
@SecondRikudo unless I edit it ;)
 
@Gordon You can't fool me! You can only hide History! Never alter it!
 
@Mr.Alien: I can only see the one by DaveRandom. Link please?
Nvm, found it.
 
If I have VBulletin forums software running on same server, and on my portal I use session_regenerate_id, will it affect the forums too as in change the session id?
 
@AmalMurali you have small monitor I think ....
 
@SecondRikudo true but when I hide it, it does lie already
 
5:51 PM
@Gordon Ah, right. Sorry, meant to post a trailer anyways.
 
@TOOTSKI: Oh lol. I wonder what happened to "I do not chat". :P
 
@AmalMurali Who said that? :P
 
Y.CS
 
Chatting here is my life.
Ah, didn't see that.
 
It was in his profile description before.
 
5:55 PM
I don't judge, I just call people names.
I can't believe that Thunderbird is the email client. " "
 
Hey, @TOOTSKI :D
 
:D
Gotta cleanup github.
I don't like GitHub, call me whatever you want.
Bitbucket FTW
Github is all like, shit, you can have gazillion public repositories, but if you want one private, that'll cost you $84 a year.
 
@TOOTSKI bitbucket has an horrible interface
 
I wish there was something that had GitHub's UI + BitBucket's features
 
It's different, and somethings are horrible indeed, but it serves the purpose.
 
5:58 PM
@TOOTSKI i have bb for private and gh for anything else
 
But I don't use GH/BB much anyway. Probably because I don't have much useful stuff to share :P
 
@Gordon Basically everyone is using BB for private and they don't benefit from that I suppose.
If I delete a repository I contributed to, will GH "ruin" my stats?
 
52
Q: Reference - What does this regex mean?

HamZaWhat is this? This is a collection of common Q&A. This is also a Community Wiki, so everyone is invited to participate in maintaining it. Why is this? regex is suffering from give me ze code type of questions and poor answers with no explanation. This reference is meant to provide links to qua...

@Gordon: Any idea why this question is locked?
 
@AmalMurali Probably to prevent crap :)
 
6:04 PM
So no more answers are added.
Hmmm, mail+something@example.com are not routed to my inbox, is there something special I should set for it to work?
 
@TOOTSKI Get a mailserver which handles it :)
 
@PeeHaa: So the voting lock on the question is just a side effect?
 
It's companies, I registered another github account, I'll just change mail if I can :P
 
@TOOTSKI A plus sign in an emailaddress is perfectly fine AFAIK
 
Sure, sure
Yeah, it should got to mail inbox.
 
6:07 PM
No it should not
It should go to the mailbox of mail+something
 
Of course, if it's configured like that.
 
:-)
 
:)
 
hi guys
What can you say about Laravel? Why is it so popular i don't understand. I am working with yii, when i glanced at laravel i didn't see anything extraordinary.
 
lol @SecondRikudo
@devnull: Welcome to the php tag! Where some users answer the exact same closable questions over and over and over and over again! — Second Rikudo Apr 8 at 18:52
 
6:14 PM
@PeeHaa Hehe, old news :D
 
:D
 
That was a bit harsh, don't you think? He's not the only one who does that :P
 
we did it again? :p
 
@Alex There is no reason it is popular other than omg wow I am clueless about design but everyone is using it so it must be awesome sauce
FWs work like that. All of them
 
Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe. :p
 
6:16 PM
@Alex it is a horrible framework, which spent a lot of coin in marketing on reddit and currently the main destination of clueless developers, who have been escaping codeigniter, when it got discontinued
 
Power went out, felt like savage for a moment.
I've used my super powers to clear those stars.
@Alex Both are crap.
 
@AmalMurali it says why
 
@TOOTSKI So what is the best one?
 
lulz
 
You should be smart enough not to ask that question, such doesn't exist.
 
6:21 PM
 
Awesomeeeee.
 
It's beautiful!
 
Some see noise, but we see art.
 
@PeeHaa I think I will save this and use later to mess with some of my coworkers
 
@TOOTSKI then don't say it's all crap, it's not so smart as well
 
6:23 PM
@Alex Not all, those two, Laravel and Yii. They lie about how good they are.
 
@tereško :D
 
@Alex but they are crap. And Yii is one of the worst offenders.
 
Ok, it's long.
@tereško Thank you.
 
besides, never ask for "best framework", because, while each if them has numerous flaws, they also have usecases for which they are better suited compared to others
 
anyway thanks for some usefull opinions, not for crap :)
 
6:26 PM
Yeah, what else can one say, when you ask "what's the best".
 
.. some people would have asked "why you think X is crap"
oh, well, have a good life
 
43
Q: To swap or not to swap, from CodeIgniter to Laravel?

w0rldartSo after working for a while with CI, I can say that it's a great framework that always helped me get the job done. Now, as I read https://www.pyrocms.com/blog/2012/11/foundations-for-our-future and agreed with what they said, I asked my self: Should I swap frameworks? From CodeIgniter to Larave...

2 more?
@Gordon use the force!
(don't ban me, please, please, OH GOD PLEASE)
 
@TOOTSKI no, 4
 
Ah, one 1 it is then.
 
crap, I broke my pear install once again :/
 
6:29 PM
You can quit developing PHP now. :P
 
maybe that's the sign to stop using phpunit from pear
 
English question:
 
/me switched to composer about 2 month ago
 
Do you freeload from someone? on someone, or any other word?
 
with :D
 
6:32 PM
:D lol
 
What's freeload? Don't make me guess...
 
Live with someone, eat their food and take up space without paying or helping
 
Parasite?
 
off
 
off
Two times.
off of
 
6:33 PM
:)
 
@tereško About to do that today.
I need to get some sleep first, dropping words and letters.
 
@PeeHaa I try to go every friday to the mosque. Never seen that before lol
 
@ircmaxell Thaaaaaaaaanks, I needed a break from pr0n :)
 
6:37 PM
@HamZa :D
 
Where you at @HamZa? Sweden?
 
@TOOTSKI The Netherlands!
 
Ah, right! Do they allow mosques? :P
 
@TOOTSKI Classic :D
 
6:38 PM
POISON WHAAAAAAAA
 
:P
 
ahahaha
hardly :P
 
YEAHAHAHHAAAAAAA
BOOOOOOO BAAAAAA
OK, I'll lower the dosage, I promise.
 
btw @PeeHaa ik heb ook zo'n "jurkje" :P
 
I used to hate ezan (adhān), but when they tortured me with 15 mins of bells, sort of liked it.
 
6:40 PM
@HamZa hehehehehe :-)
 
now using phpunit via phar
phpstorm was even so nice to download it for me ^^
 
@TOOTSKI I actually miss it. Here in the netherlands they don't allow it, at least I haven't heard it at all ...
 
@NikiC That's also FTW.
Anyone applied for OS license at PhpStorm website?
 
so, after I do one more pear release, I'll immediately delete all the pear stain from my computer...
 
@TOOTSKI Yes we @lusi did
 
6:42 PM
I haven't got reply yet, tho.
 
We got a license. Not sure how long it took
 
oh 100euro ...
I'm actually considering buying this kit iprototype.nl/products/kits/starterkit
 
@HamZa That looks like a fun kit!
 
@HamZa Here they are pretty near (church on left, mosque on right), and they compete who will be louder :D
 
6:46 PM
@TOOTSKI wow at the compete part ...
lol
 
Even tho city was shelled 4 years, no one touch that objects 'cause they are historical and priceless. @hamza
 
"shelled" = ?
.... sad
 
@TOOTSKI That's how I see every country east from zermany :P
 
You mean, east from west germany? :P
 
hehehehehehe :D
 
6:50 PM
It's called Soviet style :D
 
ehehehe
 
Truth be told, most of buildings in e.g. Wien look the same (except not bombed)... made for workers. And prices are ridiculous.
 
Go to review -> filter on "port" -> ? -> enjoy!
 
Here's a story, I was a kid, played in the car, so I turned the radio on and didn't turned it off, it drained the battery, the next day we needed to leave with car, car didn't start, few minutes later this happened on the route, I'm lucky bastard :D
Cocainum Cowboys downloaded, yay.
 
@TOOTSKI you were destined to not die at that moment
 
6:55 PM
I finished watching all three released seasons of Sherlock. Feeling an emptiness -_-
 
I refer to that state as "void"
 
I read somewhere, if they like find CP (child pr0n) on your 'puter (as in you've opened websites, images got cached), you're not going to have a good time... isn't that possible with planting IMG that opens the website (requests it)?
So basically, you can make someone search for "child pornography" via Facebook.
And they said to me, it's not a security issue.
 
CSRF
 
> I appreciate the report as it's a clever trick, but this isn't a behavior we plan on changing. The Activity Log is similar to a browser history - it's intended to be a record of your activity, and even if a site tricked a user into visiting a particular page, we still want to surface the action to the user in their log. The record is only shown to the user and not anyone else.
 
Finished it! I've wasted the whole day on that!!
 
6:59 PM
> The record is only shown to the user and not anyone else.
Except us (Facebook) and NSA.
@vascowhite Hahaha! Congrats.
 
It's one of those simple games that keeps you hooked :)
 

« first day (1274 days earlier)      last day (3673 days later) »