« first day (1013 days earlier)      last day (3949 days later) » 

10:00 AM
why to blow standard library that much
finally waiting for a function run_facebook();
 
Nah, do_what_i_want() ftw
I might not be writing facebook
 
lol
 
good mornings
 
10:12 AM
Buy some books. — Jimbo 3 mins ago
You are looking for a school or some other payed educational institute — PeeHaa 4 mins ago
hehe ^^
 
Cool, my array_product() patch is already working :)
 
@Jack the factory one?
 
factory?
 
Guys, if you needed to parse sql-alike language (only WHERE clause) what would you choose? (any programming language is allowed)
 
@zerkms PCRE :)
 
10:17 AM
@Jack I need a real AST after that :-)
 
Well, you didn't say that, did you ;-)
PCRE can do grammar rules though, isn't that enough?
 
@zerkms regex !
 
looks like today starts really cool
like it!
 
@Jack morning one
 
@Mr.Alien Hi
 
@Mr.Alien Nah .. I wanted to enhance array_product() with callback support.
 
Yes, and it's called Stack Overflow. (But seriously: the number of "I need a regex to do this" questions here has been rather overwhelming lately.) — Dan Rasmussen Jul 21 '11 at 2:37
 
oh ok..
@John hi.
Isn't this messy?
for ($i=1; $i<=3; $i++){
    $q.$i = $_POST["q$i"];
}
 
@Jack I doubt so
@Mr.Alien does it even work?
$q.$i isn't lvalue
 
@zerkms $q is a value declared, am concatenating $i to that
 
10:27 AM
and then you're assigning a variable to a string
?
 
@zerkms But $i = $_POST["q$i"] is appended to $q right?
Of course, nothing happens to $q.
 
yap
 
need to check precedence
 
I expect $q.$i to concatenate and than the value should be assigned
 
@Jack . has a higher precedence
@Mr.Alien to what?
 
10:29 AM
@zerkms Hmm, so ... parse error then?
 
@zerkms stackoverflow.com/a/17855363/1542290 let me know if that's wrong, I'll delete it
 
@Jack I think so. That's why I asked if it even work
@Mr.Alien it is
 
@zerkms Yeah, my in-head parser doesn't know for sure ;-)
 
@zerkms aa deleted, but can you explain me why it will fail?
 
@Jack
$a = 'a';
$b = 'b';
$c = 'c';

$a.$b = $c;

var_dump($a, $b, $c);
string(1) "a" string(1) "c" string(1) "c"
that's weird
 
10:30 AM
=O
 
Oh I see
. has higher precedence indeed
but it evaluates the second operand
 
So I was right?
 
which is $b = $c
@Mr.Alien nope
 
:(
 
@Mr.Alien What exactly are you doing there?
 
@Mr.Alien $q.$i = $_POST["q".$i]; ===> $i = $_POST["q".$i];
 
@Jack I concatenated the vars and was assigning the incremented string
@zerkms what about the $q? I thought of that but he had $q, so I concatenated to generate different vars
 
That 3% of IE7 traffic you have, yeah, that's you, testing your site in IE7 you muppet.
 
@Mr.Alien nothing with it
@Mr.Alien it's just not modified or used in this expression
you probably would like to know about {}
 
@zerkms hmmm
 
10:32 AM
@Mr.Alien The right answer is, use an array :)
 
${$a . $b} would do what you want but it's bad
 
can someone explain why my form is submission of <input type="file" name="file_upload" id="file_upload" /> is saying 'file_upload' => string 'balance.png' (length=11) in $_POST and null in $_FILE
 
@Jack I was just thinking why he even needs that, probably he has loads of $_POST with incremented indexes...
@zerkms {} looks bad
 
@iroegbu what about enctype?
@Mr.Alien that's why "The right answer is, use an array :)"
 
entype="multipart/form-data"
 
10:35 AM
is it a copy-paste?
if so - there is a typo
 
nope
where is the type please?
 
enCtype
 
thanks
 
@zerkms yea @Jack is right...
@zerkms thanks :) @Jack thanks :)
 
something is wrong with me this morning
 
10:37 AM
@Mr.Alien he is always right, listen to him :-)
 
@zerkms Sir yes sir :p
Reminds me of Vice City ^^^
 
@tereško this might interest you if you don't already know it: io9.com/…
 
First draft of array_product() with callback support :)
 
@Jack you must be soooooooooo impressed by big-boy development :-)
 
lolwut
 
10:41 AM
@Gordon looks promising
also , the song at the end kinda killed it
 
Just one question.. do I need to add blank variable? $output = ''pixelngrain 7 mins ago
 
@Jack we wouldn't need any of those if the way anonymous function are written wouldn't be so verbose
 
@Gordon Not sure what you mean by that?
 
@Jack array_reduce($input, function(a, b) { /* calculate product of a with b*/}) is a mouthful. it would be nice if we had a more terse way of writing that. with less boilerplate code
 
Surely you could write anything in array_reduce().
Though, the functions are already there .. so I figured, what the heck :)
 
10:48 AM
mroignn
 
nginrom
@Gordon One potential advantage of array_product() is that once the intermediate result is zero, you can stop iterating.
 
Can't think of a much shorter way of writing anon functions though, unless you get down to CoffeeScript level ;-)
 
@Jack You said COFFEESCRIPT!
 
@Gordon C#-style... array_reduce($input, ($a, $b) => $a + $b);
 
10:56 AM
@salathe that would be an option, though I think I'd like curly braces around the a+b or the whole thing
 
@Gordon again in C# that would be array_reduce($input, ($a, $b) => { return $a + $b; })
 
yeah, that.
 
There's just extra sugar for the one-expression-in-lambda-body use.
 
I want to download files from server and I used cURL code from here. But the downloaded file is malformed and its size is 500 bytes.
Problem solved, path of file was wrong. :D
 
11:11 AM
That usually does give problems :p
 
@dragon112 Yeah, that thing to check come in my mind after I ask question here. :)
 
sure go ahead
 
@DaveRandom That's a big one
 
PLB
I get:
> phpSrc\configure.js(1827, 9) Microsoft JScript runtime error: 'length'
is null or not an object
While trying to build config.
 
11:24 AM
for...?
Also JS source code please
 
PLB
@DaveRandom One moment.
 
@rdlowrey $this… by reference? :o … good, will try.
 
PLB
And I am configuring VC 10 to create some php extension.
 
why would you need Volkov Commander for that ?
 
@PLB change line 1827 to } else if (value.length !== undefined && value.length === 0) {
That's a huge script and it's probably got loads more of that sort of thing in though
 
PLB
11:29 AM
Let me try.
 
I guess that function's expecting a string or an array, if it doesn't have a .length property I wonder what was passed instead :-S
 
@rdlowrey surely, we can disguise the static as a getStack()->db->do() — this is exactly the same effect. All these factories could be some static method of the class we want to instantiate for example etc.
 
PLB
@DaveRandom value was undefined itself.
 
PLB
I won't have good time. :(
 
11:31 AM
@PLB bad news. Good luck debugging that :-P
 
@Jimbo This is amazing!!!
 
A good place to start would be STDOUT.WriteLine(name) I guess
@PLB definitely VC10 and not later? The script only seems to know about <=10
 
@rdlowrey what is there the advantage? I think when I'd use save() and delete() it would be more if I would want to store data to a file etc. I don't like to disguise the real function. It should give a feeling of a database. I just want to handle the input dependent on the configuration.
 
@PLB what's that last line of output before the error?
 
PLB
@DaveRandom Yes, VC10.
 
11:41 AM
@PLB I'd be interested to see if you still get the error if you add VC_VERSIONS[1700] = 'MSVC11 (Visual C++ 2011)'; on line 51 and VC_VERSIONS_SHORT[1700] = 'VC11'; on line 59
 
PLB
@DaveRandom This is the first thing I've tried.
 
And whether it reaches line 2709 and what output that line produces
 
@rdlowrey I could abstract it away, but then I loose also the control over it. It's often my problem that the result is at the end somewhat disguised that I have problems to see what really happens (In case of debugging for example). I see the code should do this. okay. but sometimes there might a) be a little bug in the depth, one special combination does somehow not work well or b) I don't see from my input the problem, but the output help me to quickly recognize the problem.
 
PLB
Anyway, I've added checks for undefined variables but it's generated wrong config/headers, I guess.
I need to go setup step by step once more.
 
@rdlowrey All I wanted is here adding a well working possibility to accept different database engines. Reason: these functions are everywhere available, and if not, emulatable.
@rdlowrey btw. If you look at the rest of the code, there are only very few static calls
 
11:55 AM
Hey, why does this string interpolation not work?
var_dump("$this->ks->horizon");
It works only for one level, like $this->ks
 
surround it with {}
var_dump("{$this->ks->horizon}");
 
@RokKralj Why var_dump when you first put it in a string? why not just echo it ?
 
@RokKralj because "For anything more complex [than $square->width], you should use the complex syntax." See php.net/manual/en/language.types.string.php
 
@dragon112 just for representation purposes
 
Alright..
 
11:58 AM
@Gordon thanks, I sould have known that :)
 
Does anyone use the twitter api from seaofclouds?
 
MGE
Hello, I have a problem with this line (not always, its weird)
if (!empty($value['image'][1]['#text'])) echo $value['image'][1]['#text'];
PHP Fatal error: Cannot use string offset as an array
 
MGE
I tried
but I can't solve
 
@MGE you do understand what causes the error, right?
 
MGE
12:09 PM
yes
 
so if you know the cause, make sure it doesn't happen. either by making sure you are passing what the code expects or by putting in an extra check.
 
MGE
i have to check if key exist
but I thought that it was done with !empty
 
@MGE array_key_exists()
 
@MGE empty checks if $value['image'][1]['#text'] is empty. but you don't get to the #text because $value['image'] is not an array but a string. that's why you get the error.
 
MGE
if (array_key_exists('image', $value)) { if (!empty($value['image'][1]['#text'])) echo $value['image'][1]['#text']; }
I have to check image key? or [1] and ['#text'] ¿?
$value['image'] is not an array? wtf
 
12:14 PM
there you go
 
MGE
if (is_array($value['name']) { if (!empty($value['image'][1]['#text'])) echo $value['image'][1]['#text']; }
better?
if (is_array($value)) { if (!empty($value['image'][1]['#text'])) echo $value['image'][1]['#text']; }
 
dump $value
 
they do different thigns, so...
 
Hello all
 
12:35 PM
@Mr.Alien ???
 
You know, I'm stumbling through that reddit about features in PHP 17.0 or whatever, and it's become apparent to me that alot of the most requested features bring a whole lot of nothing to the table.
 
@Bracketworks ASP.net developers asking for PHP features.
 
@Greg No, it's not even that.
Making <?php unnecessary in PHP only files. What the hell does that really do for anyone? It saves you 5 bytes that most people don't ever type (file templates, IDE, whatever)
 
What's the link to this reddit?
 
I chimed in; basically saying that people are having the tendency to bark about changing features we already have, when there are far more powerful features left unimplemented.
 
12:43 PM
I am... Number 4!
user image
3
 
quick, downvote him
 
@MadaraUchiha Get that filthy Ubuntu outta here!
;-)
 
@Bracketworks Let me guess, iOS?
 
@MadaraUchiha Not if my life depended on it.
 
iOS != desktop :S
 
12:45 PM
Nah, I was just playin anyway; I was thinking about running that mobile distro of Ubuntu on my droid.
 
Which way would be the most accurate to check for "visitors" a.k.a. bots outside of Europe... 1. Use GeoIP for country detection or 2. compare client time with the server time and see how many hours that differs and build a filter upon that... are there any more ways?
 
@YogeshSuthar Shat, check this out stackoverflow.com/help/badges/145/epic?userid=1542290
Got an EPIC badge finally muhahahaha :D
 
@Mr.Alien NO LIFE.
 
but you also need 4 notifications.
 
12:49 PM
@hakre Says the one with 80k+
Where's your 88,888?
 
@MadaraUchiha your rep is not 44444 anymore
 
@dragon112 Doesn't matter. Got SS :D
 
photoshopped.
 
When I look into your eyes, I see JPEG artifacts.  I can tell by the pixels that we're wrong for each other.
2
Obligatory.
 
I knew to take one before posting here because of scumbag steaves out here who would ruin it instantly.
@dragon112 No photoshop for Ubuntu, n00b
 
12:52 PM
 
@MadaraUchiha what about 444444 rep? :-P
 
@MadaraUchiha Wine.
 
@hakre nice fake :-)
 
@MadaraUchiha I didn't do it!
 
12:53 PM
@dragon112 Sure you didn't.
 
But... but....
 
@Chris wow, wasting votes because the voting system requires it. well, now that 's a good choice.
 
@dragon112 hahaha
@dragon112 that was un expected, I thought that they have a set a cron for this
and didn't knew I reached that mark
 
Gordon suspends @hakre for badge cheating
6
 
@Gordon I want my 44,444 back! I demand for 5 downvotes now!
Make it happen moderator!
 
12:56 PM
@Gordon hey, I just saw, the badge was awarded 12 hours ago, why it notified me just now? :-/
 
morning
 
@MadaraUchiha Should I help you?
@Orangepill Morning? You were chatting with me few hours back, it was midnight?
 
@Mr.Alien no 3am... time for work now :))
 
@Mr.Alien queues
 
@Gordon aaaa.. ok, thanks ;) and @Orangepill you kidding right?
 
1:00 PM
@Mr.Alien I wish
coffee please fix me
@Mr.Alien ... I meant it was 3am..i'ts 8 now
 
@Gordon LOL
 
@Gordon nice fake the second?
 
@Orangepill you are like me, I hardly sleep :p
 
@hakre ^
 
1:05 PM
@Gordon LOL where you picked the message from?
 
@Gordon now we should suspend mods for faking suspensions :-)
 
LOL ^^^
 
haha
Poor @hakre, first a repwhore, second a badge faker
4
 
@Gordon You now need to suspend yourself for photoshopping suspension messages.
7
 
Ow shit. Did I miss the @hakra :(
 
1:10 PM
@DaveRandom that's a genuine suspension message :)
 
Damn it, now I'm going get suspended for accusing mods of photoshopping suspension messages
5
 
@PeeHaa Yes you did
 
:'(
2
 
@Danack I linked that this morning already ;)
 
1 message moved to bin
moved as dupe
 
1:13 PM
bah.
 
:)
Seriously. If those fucking idiots in Cupertino still haven't fixed their damn site tomorrow I'm going to freak out
 
@DaveRandom too much effort. But I am tempted to suspend you for claiming Shakespeare said borrow when he said lend ;)
 
@Gordon Power abuse!!!! :p
 
@DaveRandom it's not "borrow me you ears". That sounds way too much like Boromirs ears anyway.
 
E_TOO_MUCH_ABUSE _OF_POWER
 
1:15 PM
@PeeHaa Your face:
 
@dragon112 that's a valid ban reason on literature.SE :P
 
in that case, go ahaid
 
@Jimbo Actually by now it is more like: t0.gstatic.com/…
 
http://stackoverflow.com/q/12550851/1723893
 
@PeeHaa lmao
 
1:17 PM
 
@Gordon Yes but you don't call the lend() method on the ears, that makes no sense. From the context of Mark Antony, he was borrowing them. If the method was called lend() you'd have to pass an argument because you would be lending something to the ears.
 
@Gordon That reminds me. I have a very nice remix of that somewhere. Going to put the volume on 11 in my car on the way home
 
@PeeHaa spinal tap those speakers :)
 
:D
 
@Gordon You know that was exactly what I was looking for, heard it when I was a kid, but couldn't find it by searching "freak out" in youtube. Thought it might've been in this song for a sec
 
1:21 PM
@Gordon I found an error in your fake.
@Gordon There still is 80408 reputation in grey on the top of the right column.
 
@bwoebi right, but I don't care. It was good enough for the laughs ;)
 
yo
 
@Gordon bah ;-P
 
@Jimbo cant watch that. GEMA'd
 
GEMA?
 
1:26 PM
@Jimbo that's what we have in Germany to make us more similar to China
2
 
@Ocramius @Gordon That sucks! alt
 
@Jimbo GEMA'd
 
@Jimbo 75% of YouTube is n/a in our country
 
Whaaaaat
I had no idea Germany was that strict :/
yourfreevpn.com ftw
 
1:27 PM
@Jimbo that's why I have a TOR server node when I'm home
 
@Gordon Use Hola Unblocker (Google Chrome Extension)
 
@ircmaxell haha .. xD
 
It's the best:p
 
comments disabled on deleted / locked posts
 
1:32 PM
@ircmaxell then undelete it?
 
http://stackoverflow.com/questions/17859289/please-decoding-this-for-me
 
that would be irresponsible
 
@ircmaxell I don't know… I don't have the 10k … don't see the question.
 
@NullPoiиteя Reopening
No just kidding
 
1:39 PM
:-D
 
@NullPoiиteя wtf… comments… 1-17 oO
 
@Mr.Alien hi
 
@bwoebi trust me i haven't edited :D
 
@NullPoiиteя I believe you^^
 
Encode it for me Pleaseee... — user2618881 27 secs ago
lol ..some people dont understand sarcasm :D
night guys ....
 
Anonymous
1:49 PM
Guys, is it possible for one class to extend to classes at once?
 
Anonymous
I am stuck in a project, where I really need that
 
@Simon_eQ In C++ yes. And you never want to do that.
Always prefer composition over inheritance.
 
Anonymous
@Danack Its not complex project. It is very simple, and any problem arising is unlikely. So, I dont know what composition is ... yet. But, should I use traits to get around of this problem
 
@Simon_eQ If it is very simple then composition should be a piece of cake
 
"It is very simple, and any problem arising is unlikely." Multiple class inheritance is almost never simple. And no, traits are probably not the answer.
 
Anonymous
1:56 PM
thanks, I found this also
 
Anonymous
32
Q: Can I extend a class using more than 1 class in PHP?

LOGIC9If I have several classes with functions that I need but want to store separately for organisation, can I extend a class to have both? i.e. class a extends b extends c edit: I know how to extend classes one at a time, but I'm looking for a method to instantly extend a class using multiple base ...

 
Anonymous
I dont know what to make of kt. But, I'll check out the wiki page now
 
That question and answer is exactly how not to do it.
 
@Simon_eQ or depending on the use case Facade or Decorator pattern might be appropriate.
 
@Simon_eQ Actually you could implement the composition using traits in PHP, it's still slightly more magic that just writing the forwarding functions yourself.
 

« first day (1013 days earlier)      last day (3949 days later) »