« first day (814 days earlier)      last day (4125 days later) » 

5:00 PM
@hakre Also, your iterator's random picker is flawed... It'll never pick the first element...
wait... hrm...
 
@ircmaxell and that is awesome ... ... lol..
 
nevermind
it's still flawed...
 
@ircmaxell what do you mean?
 
@ircmaxell PHPPHP should output your name every time it runs. </just-trolling>
 
@igorw HAHAHA... Nice
 
5:02 PM
@igorw header("X-Powered-By: PHPPHP");
 
@hakre it looks biased. I wonder if it'd pass this statistical test: github.com/ircmaxell/PHP-PasswordLib/blob/master/test/Vectors/…
@igorw the -v output should at least
 
@ircmaxell it uses mt_rand inside. it will be at least as much biased as that thingy is.
 
@hakre mt_rand is unbiased. But that doesn't mean you aren't creating a biased system out of it...
 
@hakre It will be at least as biased ;) It's easy to make the distribution biased in the algorithm
 
@ircmaxell You mean because I use it count of iterator times?
@NikiC Yes, thx. Maybe I run that test.
 
5:09 PM
@NikiC @ircmaxell What I really need is try/finally with no catch, it's just for some cleanup if an exception occurs during a routine, but I want to let the exception bubble to the caller. And in the real code they are properly typed exceptions, which is another reason I want to do this - just catch (Exception $e), do the cleanup and re-throw the with the original type. Actually, in writing that I realise that makes no sense, the calling scope shouldn't care about the internal error.
 
actually, that's interesting, is that supported? try { foo(); } finally { $bar }
 
@ircmaxell obviously
 
@DaveRandom in that case, just rethrow the original throw $e
 
that's probably the most useful part of finally ^^
 
@NikiC Well, knowing PHP's parser, it's not a given... :-P
 
user1125394
in Java it's throwable interface
 
3 mins ago, by NullPointer
http://stackoverflow.com/questions/14160349/how-to-make-a-print-link-on-a-website-to-print-sql-table-data-export-to-pdf/14160401#14160401
question
 
user1125394
@DaveRandom there should be a function annotation @throws Exc...
 
@ircmaxell
 
@cyril That's docblock stuff though, that kind of info is not useful to the compiler (it already knows, it's the compiler)
 
5:20 PM
-16
Q: Rep Slimfast and Tag knowhow

amanaP lanaC A nalP A naM AMost people on these sites seem to think that rep is everything in this world. It is not. Wasn't the original reason for these sites to help people who did not want to pay for the other site? There must be a way for users (not using bounties) to shed some unwanted reputation onto people they ...

 
@NikiC he's not talking about weak refs. He's talking about providing PHP land inspection into Zvals...
 
@ircmaxell Will do thx
 
@NullPointer yes?
 
@ircmaxell Didn't sound like that to me
The class looks like that but the text below (which I only glanced over) sounded like weak ref
 
Well, I only looked at the class
 
5:23 PM
@ircmaxell could you tell me difference between sha512 and whirlpool ?
 
@NullPointer they are different algorithms
 
That's about the best way of summing up the difference :D
 
@ircmaxell ohhh..
ty...that is really short .. and that easy
 
Well, a vague question gets a vague answer
 
1
A: Rep Slimfast and Tag knowhow

hakreThere is (were) also hats. Just saying it does not get lost here.

 
5:30 PM
@crypticツ I think I'm going to have to steal your smiley. It is so cool
Sadly, "Pekka ✓" won't work.
I'd have claimed that the ✓ is to certify I'm a super cool guy
Like Calvin's genius certificate.
 
@Pekka nooooooo =o(
 
@crypticツ pretty please?
 
@hakre lol...
 
I'll take a slightly different one!
 
@NullPointer sorry but I could not resist ;)
 
5:32 PM
 
@Pekka is there any software to make like this ?
 
@NullPointer you mean to modify unicode characters? Nope, they're rendered using the user's fonts... you can just check out lists like this one: text-symbols.com/cool note that only text characters are accepted in a SO user name.
 
@Pekka ty its cool ...
@hakre he is legend rep-whore ... no one like to resist ...
 
@Pekka you could have ン and be a 1 eyed alien
 
@Leigh lol...
 
5:37 PM
@Leigh I may have to!
Or maybe I'll try to put my name together using script.
 
@ircmaxell what should I do? Create 100 values, check if if it's in the first half or in the second half and let this run X times then?
I've seen your tests are with binary values which I don't have so.
I do that now, let's see if I can port your test that way.
 
create an array with 100 items 0 - 99
run the random on it 1000 times, and count the values < 49
if the result is far from 500, it's biased
 
@Pekka If you stick to hiragana/katakana you could do ヤミくくム I suppose
 
For those who want to grab a 100 bounty here is a fair offer: Provide an answer with at least some argument why this does not work / not exists: stackoverflow.com/questions/13975919/…
 
@Leigh oh, that's a great idea, thanks! I'll use that one in 30 days or on Meta. (I changed my name 5 minutes ago, check it out: stackoverflow.com/users/187606/pekka)
It says I'm a DUDE!
Or something like that.
 
5:44 PM
i want to have like that but it sucks
 
@NullPointer lol
 
and on the top it has meaning too...:P
 
The swastika is a nice touch
@Pekka You could give yourself a moderator diamond "Pekka ♦"
 
Or you could add a steaming pile of poo
 
Emoji are so very odd.
 
5:57 PM
Evening people
 
I am not an evening person and I take extreme offense at that! Timezone discrimination! Help! Help! I'm being oppressed!
 
@PeeHaa evening .. ♛
 
user1125394
useless unicode: ‽ = ?+!
 
@NullPointer I had those on pills once ;)
 
interrobang(‽) is the best
 
6:01 PM
@Sharlike ☠ and what is interrobang ?
 
@ircmaxell YEAH MAN
 
woops
 
@PeeHaa I always used to wish those stamps actually meant something
 
But not supported by my browser's character set :(
 
6:02 PM
@DaveRandom :D
 
@NullPointer That ‽
 
@crypticツ ok, I took a different one.
Pekka 웃, Tübingen, Germany
183k 31 280 488
 
@Pekka rep and badge looking more cool than 웃 .. :P
 
github.com/cv-pls/ff-cv-pls/blob/dev/updaterdf.php#L181 <-- that method represents an entire weekend that I will not get back just because Mozilla are incapable of documenting their own mechanism properly
And with that, me go home
laterz
 
6:10 PM
@Pekka Your next Meta name should be the word "Smiling" followed by a horrible machine translation of how "Pekka" is pronounced in Korean, to match what the horrible machine translation of "웃" gives us.
 
@DaveRandom laters :)
 
@Pekka I'm trying to find a checkmark one if you are still interested the closest I have found is ୰ either way these will only show if the encoding is supported by the browser. I use to have fun with these on Facebook until they caught on and blocked it where they would not allow the field to be submitted unless all chars came from same language. I expect SO will eventually do so too.
 
@Charles i thought these are just for fun ...
 
@NullPointer You don't take your fun seriously enough!
 
Victory!
I defeated them traits
 
6:15 PM
they are removed? YAY!
 
user895378
define('PHP', 42);
var_dump((PHP + $traits) < PHP); // bool(true)
 
HUH?
 
@Charles lol!
@crypticツ That's great, thanks! Yeah, SO may block them too one day. But as long as it's just a couple of users, they may not catch on to it. :)
 
user895378
Translation: traits make php less than php would otherwise be without them. And they do it in a convoluted way. I felt like a pointless statement of subtraction by addition accurately reflected the trait contribution.
 
so (new Foo)->bar() works, but $foo = new Foo(); (clone $foo)->bar(); not, right?
 
6:21 PM
I wish traits could be applied to instances at runtime. Because that would be awesome and it would make so many people so very upset.
2
 
@Charles Agree 100%
$foo = new Bar use FooTrait or $foo = new Bar with FooTrait
 
good morning/afternoon/evening/middleofthenight
 
@Charles Yes, make traits first class citizens. Scala has that, it's nicy nicy.
 
@ircmaxell Oh very yes.
 
PHP 5.5 should remove traits (:
 
6:24 PM
@hakre Let's start by making classes first-class citizens...
2
 
@ircmaxell Shove it all in ;)
PHP 5.5 should just skip a major number, so it is PHP 6.5. That will make some folks crazy.
 
The big problem is that if you use a trait to resolve an interface, PHP won't like instantiation time traits (as the interface won't be resolved until instantiation time, well after the error is raised)
 
You could just start a gist entitled "changes to PHP that should be made in order to drive people crazy"
2
 
@Lusitanian With the possibility to add an ordered list of people who would go mad most on the change.
 
@hakre Whoever has the most OCD like traits would be upset by the version numbering
How about adding first class support for static classes?
 
6:27 PM
@Lusitanian Start out with scalar typehinting, move to annotations, fix classes, fix traits... what's next?
 
@Lusitanian Inline assembler. I need that.
 
@hakre in PHP code...
 
Wait, are we talking about driving internals crazy, or just driving people crazy?
 
people
 
@Charles Eh, people, though I admit that internals (with a focus on lester, after reading some of his comments) might be interesting
 
6:28 PM
@ircmaxell yes to be run on the vm. ;)
 
Internals already are crazy.
That's a key requirement to becoming an internal, no?
 
How about first class support for .phpop files which allow you to just write PHP scripts in opcodes?
 
'cause if we want to drive people crazy, we should just make sure XHP gets pushed live.
 
Thinking about adding a RFC for 5.5 to remove traits... #wantsToWatchTheWordBurn
4
 
@Charles that is so cool. I want it. I want it now.
 
6:30 PM
@Pekka웃 Well it certainly explains @ircmaxell, I'm sure that he wouldn't be doing PHPPHP if he wasn't participating on internals!
 
@Charles that's quite interesting, but it was created by an EVILLL company
burn it with fire.
 
@Pekka웃 There's a funny saying: If you're in IT, you're either new, or you're crazy. And I've been doing this for a while...
 
Heh!
 
I said that in a job interview... Realized I was about to call the people nuts, and went for it anyway
 
Did you get that job?
 
6:31 PM
I got the job, and it turned out they were nuts. But that's another story for another day :-)
 
Haha
 
@Lusitanian Yeah, they're more evil than we might think. On one hand, they're producing cool things like HipHop... on the other hand, they've unintentionally convinced mere mortals that HipHop might be a thing that might help them. Oh, that and their privacy idiocy.
 
@Charles HipHop has an incredibly narrow use case "BUT OMG FB USES IT MUST BE GOOD"
 
@Neal Didn't I see that on meta earlier?
Where the guy expressly asked for a reopen so that he could self-answer?
@Lusitanian Bingo.
 
6:32 PM
If you're not nuts, you're doomed. So what do you prefer? Sheds some light on those who think they are nuts, those who don't think they are nuts and those who think they are doomed and those who don't think they are doomed.
 
@hakre and I'm just too lazy to parse what you just said (:
 
for the record, I tried to get hiphop to compile, what a PITA...
 
@ircmaxell Thus the only reason we don't see more mortals trying it out, I fear/hope.
 
@Charles It's very specific in the environment it requires, etc, so I think that's correct
 
That and I just keep linking people to that thing Rasmus did at Digg that demonstrated the same performance gains for Wordpress with some simple profiling. Silly people...
 
6:34 PM
@Charles wordpress? begone from this place.
 
@hakre Looking at your RandomIterator now
@hakre can i make some suggestion and improvement ?
 
@Lusitanian Wordpress and Rasmus. What a delightful combo, right? talks.php.net/show/digg if you haven't seen it.
 
@Baba sure, feedback always welcome.
I need to run some tests, @ircmaxell suggested and I think tests are fine, but my meal went between me and my tests.
 
@Charles seen it linked but never actually looked through it
 
@hakre Just added a comment
 
6:38 PM
@Lusitanian It's an interesting read, especially the inclued graphs. At least I think they were from inclued. Yeah, totally on page 12.
 
@hakre can you also remove that comment by nutriy
 
@Baba just did, first time I had comment spam on gists.
 
@hakre ah, another thing that would drive people crazy, "RecursiveRecursiveRecursiveIteratorIteratorIterator"
 
@hakre lol :)
 
@Charles interest piqued, taking a look
 
6:39 PM
@Charles still not constructive and not a question.
 
@ircmaxell Nah. But I figured out how to do the trait compatibility checks for accessors. Works more or less now
 
@Neal "How do I debug this" is not inherently nonconstructive. It's not a very well-formed question, but at least give him the chance to self-answer.
 
@hakre i think we should start a project on Iterators ... add all possible missing Iterators , SortableIterator , CSVIterators , ReverseIterator etc. What do you think ?
 
@Baba Only if you promise to write an IteratorIterator.
Semantic satiation (also semantic saturation) is a psychological phenomenon in which repetition causes a word or phrase to temporarily lose meaning for the listener, who then processes the speech as repeated meaningless sounds. History and Research The phrase "semantic satiation" was coined by Leon Jakobovits James in his doctoral dissertation at McGill University, Montreal, Canada awarded in 1962. Prior to that, the expression "verbal satiation" had been used along with terms that express the idea of mental fatigue. The dissertation listed many of the names others had used for the phen...
 
@Charles it already exists
 
6:42 PM
@Lusitanian Yes, I sometimes need one that is continuing to iterate on the iterator it got from iteration. IteratorAppendIterator
 
@ircmaxell Curses!
 
and I use it more often than you'd think
 
@ircmaxell Pfah, misleadingly named.
 
@Charles but a highly useful class
 
6:43 PM
Oh, I can see how it's useful.
Just haven't needed the magic.
 
And it's full of FUBAR code
 
@Charles ehhhh
 
IteratorIterator is what makes iterators halfways bearable
 
@ircmaxell can you please review foreach as well?
 
6:44 PM
@Charles IteratorIterator already exists .....
 
IteratorIterator enables you to cast classes :-D
 
See, the whole joke was about needing to iterate over the new Iterator classes, but the fact that it exists broke everything. *sniff*
 
IteratorIterator is the root of all magic ;)
 
@Charles how about IteratorIteratorIterator
 
@Lusitanian RecursiveCallbackFilterIterator is enough for me :)
 
6:46 PM
@hakre ??? what do you think ?
 
@NikiC RealCachingRecursiveCallbackFilterIterator maybe?
 
@Lusitanian I'm just reminded of this now.
 
@LeviMorrison lol
 
@Charles LOL
 
6:47 PM
Just s/chicken/iterator/ig and call it good. The last iterator joke will have been made.
 
@Charles lol
 
@LeviMorrison new RecursiveIteratorIterator(new RecursiveCachingIterator(new RecursiveCallbackFilterIterator(new RecursiveDirectoryIterator(__DIR__))));
 
rep cap over one answer
I'd call it a very good day on Meta Stack Overflow :D
 
@NullPointer how am I supposed to @-you with that meta name!?
 
@NikiC I extend that class daily, yes.
 
6:50 PM
Might be the wrong place to ask, but has anyone here used the google maps api?
 
@hakre You should see a doctor about that Iterator-addiction of yours :P
 
@ircmaxell I thought it would be longer. You sure you aren't missing an Iterator somewhere?
 
@NikiC Yes, told me I got iteratoritis.
 
@Charles this is awesome, thanks for sharing
 
@igorw Glad to share!
 
6:51 PM
@LeviMorrison Oh, we can make it longer
 
@ircmaxell Fatal error: Uncaught exception 'UnexpectedValueException' with message 'RecursiveDirectoryIterator::__construct
 
$it = new AppendIterator;
$it->append(new IteratorIterator(new CachingIterator(new NoRewindIterator(new RecursiveIteratorIterator(new RecursiveCallbackFilterIterator(new RecursiveDirectoryIterator(__DIR__)))))));
$it->append(new IteratorIterator(new CachingIterator(new NoRewindIterator(new RecursiveIteratorIterator(new RecursiveCallbackFilterIterator(new RecursiveDirectoryIterator(__DIR__)))))));
 
user1125394
(super) DI
 
@ircmaxell Fatal error: Uncaught exception 'InvalidArgumentException' with message 'RecursiveCallbackFilterIterator::__construct() expects exactly 2 parameters , 1 given' in
 
I'm afraid I still haven't quite wrapped my head around iterators.
 
6:55 PM
@Baba it's a joke...
 
in soviet russia, iterator wraps around YOU!
 
@ircmaxell I made it work :)
 
I know the Iterator interface is supposed to give objects the ability to be iterated upon (using foreach, for example)
 
@MadaraUchiha I think I should do a video about them...
 
@ircmaxell I think you should.
 
6:57 PM
$it = new AppendIterator;
$it->append(new IteratorIterator(new CachingIterator(new NoRewindIterator(new RecursiveIteratorIterator(new RecursiveCallbackFilterIterator(new RecursiveDirectoryIterator(__DIR__),function($v){return $v;}))))));
$it->append(new IteratorIterator(new CachingIterator(new NoRewindIterator(new RecursiveIteratorIterator(new RecursiveCallbackFilterIterator(new RecursiveDirectoryIterator(__DIR__),function($v){return $v;}))))));
 
any Iterator Experts here? i need help urgenlty
3
 
@webarto +1
 
@webarto: you know better than to ask that question ;-)
 
@ircmaxell gist.github.com/… :P who else but @hakre :D
 
6:59 PM
@igorw There is a video to it: vimeo.com/13768954
 
@webarto :-P
 
@hakre cool! where did you get this from?
 
You know I did quite some Wordpress development in the past.
 
@hakre s/Rasums/Rasmus ... you are lousy SEO/SERP/Google/Yahoo/Bing Expert :P
 
Apfelmus ;)
 
7:01 PM
Help .... why is my result empty
$it = new AppendIterator;
$it->append(new IteratorIterator(new CachingIterator(new NoRewindIterator(new RecursiveIteratorIterator(new RecursiveCallbackFilterIterator(new RecursiveDirectoryIterator(__DIR__),function($v){return $v;}))))));
$it->append(new IteratorIterator(new CachingIterator(new NoRewindIterator(new RecursiveIteratorIterator(new RecursiveCallbackFilterIterator(new RecursiveDirectoryIterator(__DIR__),function($v){return $v;}))))));
$it2 = new AppendIterator;
$it2->append(new IteratorIterator(new CachingIterator(new NoRewindIterator(new RecursiveIteratorIterator(new RecursiveCa
:)
 
@webarto My SEO expertise is with typos in mind. Long tail strategy.
 
:momentofsilence:
 
@hakre oh, inclusion of the current date on the slides confused me
I thought this was new stuff :)
 
@ircmaxell "remove traits"??? went crazy?
 
@ircmaxell You are clearly not cool and hip since you don't like traits :P
 
user1125394
php.net/manual/en/language.oop5.traits.php never used them, but seems ugly
 
It's funny, we actually know shit, and when we talk shit, people think we don't know shit, and just bullshit...
 
user1125394
the use makes confusion with namespaces
 
7:21 PM
@webarto People who think they know everything annoy those of us who do. :p
 
user1125394
hmm nice costume :p
 
user1125394
 
Daaaamn, that mod flag.
Okay, the C# room is weird
 
When loading an object, is it best to have a DB mapper get the information and create and return an object. With saving is it best to send the DB mapper the object to save, or tell the object to save and then have the object send it's information to the mapper?
 
@JosephDuffy Telling the object to save itself means that the object must be aware of and must manipulate the data persistence layer. That's a violation of the SRP, if you care about such things (and you should, probably);
Therefore, you should pass the object to the mapper, which should then extract data from the object to save.
 
7:36 PM
@Charles Yeh, that sounds the best approach, thanks! What about loading? I'm guessing the same (tell the mapper to return the object)
 
user1125394
$status = $mapper->save($obj); $obj = $mapper->fetch(['id'=>'baz']);
 
@JosephDuffy Yeah, exactly.
 
@ircmaxell In my experience the #php #traits work well and are great, as I said before it all depends on who and how it is used.
in reply to
@AlejoSimon I have yet to see a single example that isn't akin to eval abuse... http://blog.ircmaxell.com/2011/07/are-traits-new-eval.html
 
@Charles @cyril Thank you! :)
 
7:51 PM
If, for example, I have a table with name and age columns for some people, and I want to know the names for all people aged 10, 23 and 61, I'd have to run 3 separate queries right?
 
@ircmaxell I haven't used traits before, what's so bad about them?
 
@Sharlike click on the link from @ircmaxell's tweet?
 
who is moderator her ?
 
Ah, yes. That would've been smart
 
@igorw: can I ask for your opinion / review of a script I'm going to shoot tonight? github.com/ircmaxell/programming-with-anthony/blob/master/Draft/…
@goodmood there are many of us
 
7:54 PM
@ircmaxell ok , i think there is little racist moderators ,
 
@goodmood Oh?
 
he closed his question just because his name is abdul
@ircmaxell and his question is very nice with what he expect and so on , and its very important his question
 
@goodmood what makes you think that?
@goodmood No, the question is boarderline at best. I'd have closed it as well. "How do I do it" questions are not encouraged on SO (at least in this community)
 
Hi all
 
if you still think something went wrong: chat.meta.stackoverflow.com/rooms/89/tavern-on-the-meta
 
7:57 PM
so @hakre, what did you end up doing yesterday?
 
user895378
If only I could get back all the time I've wasted trying to work out complex design problems in my head only to fail miserably and resort to good old fashioned pen and paper diagramming ...
 
@ircmaxell because i dont see anything wrong with his question , he asked , gave his table with data and what he expect , and everything is clear
 
@rdlowrey that's why I never am more than 6 feet from my computer to a white-board
 
@goodmood what the hell?
 
27
A: The line between a person asking a genuine question and not doing research

ircmaxellMy stance on this issue is simple. To understand it, let's look at the question you linked and break it down: Is it possible to implement a multidimensional array of checkboxes? This is how the question starts off. A simple yes or no question. A simple Is it possible question. To me this says ...

 
user895378
7:59 PM
@ircmaxell I really need to get a whiteboard. Of course, it's also fun to flip through old notepads and remember what you were puzzling over :)
 

« first day (814 days earlier)      last day (4125 days later) »