« first day (881 days earlier)      last day (4067 days later) » 

9:00 PM
Now lesson two: noises. Noises are a major embarrassment source. Even words like "tits", "winkle" and "vibraphone" cannot rival the embarrassment potential of sounds. Listen to this if you can: <embarrasing noise> How do you rate your embarrassment response?
A: High.
B: Hello!
C: Good Evening.
 
@webarto realtimewebscale.com is available
just pointing that out
 
@MadaraUchiha OOOOOLD
 
@MadaraUchiha old news is old
 
Yeah, well, I'm in the middle of nowhere on cellphone wifi tether connection. So sue me.
 
9:02 PM
@MadaraUchiha WAY old
 
@MadaraUchiha good morning. A week has passed since.
 
@Eugene 3 days by my count
 
@MadaraUchiha Indeed and I like it. Namespace improvements are the major reason for upgrade, imo. The updated UI is nice on my retina display as well.
 
jeebs, tons of commits
Net profit per employee: Facebook: $11,470 Microsoft: $164,500 Google: $199,300 Yahoo!: $337,200 Apple: $573,400
 
@ircmaxell interesting
 
9:09 PM
That tells a lot on how much they actually invest =_=
 
@ircmaxell I think that mainly says that Facebook isn't in a particularly revenue-generating state yet ;)
They probably have yet to figure out how to best turn their userbase into a money printing machine
 
exactly
 
exactly
they never will
 
@rdlowrey Done. We'll see if I like it in a few months :]
 
hey
 
user895378
9:18 PM
@LeviMorrison cool!
 
@rdlowrey Still need to convert the existing iterators to implement Iterable, though.
 
without executing it: What does the following code output?
while(true) {
   echo '.';
} while(false);
 
@hakre ................................................................................‌​...........
 
user895378
@LeviMorrison You mean Iterator? (I call it Iterable all the time)
 
user895378
or Traversable?
 
9:20 PM
@NikiC I should have said that NikiC is not allowed to take part ;)
 
@rdlowrey No, I meant Iterable.
I'm adding yet another item to the terms :]
 
user895378
I see :)
 
"We should ban the people who downvoted the question! downvoting without a reaosn is a crime!"
 
Renaming is an option, of course.
 
-16
Q: Blur everything behind a fixed DIV

Tyler LanganHow would I blur everything behind a fixed HTML DIV? For example, if I had a navigation menu that was permanently on top of the screen, how could I make it a little transparent and blur everything behind it?

 
9:20 PM
@hakre Nobody wants me to take quizzes :(
 
It was -4 before he promptly posted it on meta
 
@NikiC yes because you know what that does and why ;)
but you have won!
congrats! :)
class IterableIterator extends IteratorIterator implements Countable
{
    public function __construct($iterable) {

        if (is_array($iterable)) {
            $iterator = new ArrayIterator($iterable);
        } elseif ($iterable instanceof Traversable) {
            $iterator = $iterable;
        } elseif (is_object($iterable)) {
            $iterator = new ArrayObject($iterable);
        } else {
            throw new InvalidArgumentException('Not an Array, Traversable or Object.');
        }
 
@hakre Just learned about: iterator_count.
Nice.
 
yes you can use it to consume the whole iterator quickly ;)
oh and this code needs an update for PHP 5.5 then :/ urgsi murgsi
 
Why does this need an update for 5.5?
 
9:24 PM
@LeviMorrison because generators can be iterated, too.
 
@hakre I think they get caught in instanceof Traversable
That's my understanding, anyway.
 
wtf
Hmm... the coverage issue I'm experiencing is because of the trailing newline in the classes =_=
 
@LeviMorrison yes, you are right: Traversable
 
@Ocramius You mean in your IDE? Or the actual xdebug/code coverage tools?
 
@LeviMorrison so far the ide. lemme check with html report
 
9:29 PM
@Ocramius In PhpStorm I don't always get full reported coverage (it will say things like 98%) but the html report is correct at 100%.
This might be the issue.
 
wut
@LeviMorrison you're actually right.. what the...
 
I've been meaning to report it but since I haven't really isolated it I haven't.
 
now I feel stupid
:D
 
@rdlowrey And of course, the code has 100% test coverage and my guarantee of no bugs. Anything you think is a bug is a feature because I have 100% test coverage.
 
lohl
 
9:32 PM
This is irrefutable logic.
 
these test coverage fetishists.
 
@LeviMorrison thanks for appendAll <3
 
yeah, I'm totally paralyzed by that logic. now staring onto the screen with mouth wide open.
 
@LeviMorrison are you adding it to the others as well?
 
@igorw Probably, but not yet.
 
9:33 PM
@LeviMorrison nah, something always slips through
 
I'm still not sold I took the best option.
@Ocramius It's a feature then :]
 
@hakre my precioussssssssssssssssssss
 
@igorw Just pushed a minor cleanup update, btw.
@rdlowrey I might use a trait; help me see the light if I'm wrong.
That's open to anyone else, btw.
 
Kittens?
 
I have this interface:
interface Iterable extends CountableIterator {

    /**
     * @param callable $callback
     */
    function each(callable $callback);

    /**
     * @param callable $f
     * @return bool
     */
    function every(callable $f);

    /**
     * @param callable $map
     * @return Iterable
     */
    function map(callable $map);

    /**
     * @param callable $filter
     * @return Iterable
     */
    function where(callable $filter);

    /**
     * @param callable $compare
     * @return bool
I've created a wrapper Iterable that takes anything that's an Iterator and converts it.
So if I have a map and want to use the lovely features, I currently have to do this:
(new IteratorIterable($map->getIterator()))->each() . . .
Which is quite nasty.
While all of my iterators could extend IteratorIterable, that's not really valid. So the thought is to use a trait and abstract all of the stuff horizontally.
 
9:48 PM
@LeviMorrison or just make a function and have all the methods use the function.
 
I think I want to revist my design a bit, anyway.
 
I need a massive refactor, but: jsfiddle.net/ELDUd
 
$map->getIterator()->getIterable()->each() . . .
as PHP's iterators pass calls down, this could work.
 
@hakre I'm thinking I can do: $map->each() . . .
I just have to come up with a good name for the interface.
 
@LeviMorrison Why not (new Iterable($iterator))->map($callback); ?
why should it be an interface...?
hang on, I answered my own question. nevermind
 
9:58 PM
@LeviMorrison that might work.
 
@ircmaxell Because I'd never do (new Iterable($map->getIterator))->map($callback). I'd just write a foreach loop at that point :]
 
@LeviMorrison No, meaning provide that logic in a separate class, so it can be shared
but it can't be shared, because that defeats the purpose of map (that it can run at a lower abstraction level than the iterator)
 
Yep.
But I think I can have the interface apply at both levels, just working out details.
And then I have to name things. What a problem!
 
yeah, you can have an IteratorIteratable... That's I got it...
which is really just an Adapter from Iterator to Iterable
 
Yeah, but I never liked putting 'Adapter' into a name.
 
10:01 PM
and I wouldn't suggest it
IteratorIteratable. seems close enough
IteratorToIteratable?
anyway, I'm off, later
 
:] Good night!
 
good night.
 
is there a way to do a negative tag search on SO? Like currently to search by tag you put [tagname] but I want to do a negative search so it excludes a specific tag.
 
10:25 PM
@crypticツ When you look at what happens when you search for a tag...looks just as if you had left the brackets out of the search. So + and - should work. I just tried [php] -[jquery] and it seems to be working as intended.
Oh no. Correction. It makes a difference. Still seems to work though. ;)
 
@TillHelgeHelwig they need to update the advanced search info, it's undocumented =o(
or unintended =oP
 
@crypticツ It's sort of documented here...but not really comprehensive.
It's really weird what the search does though.
When you search for [php] -[jquery] you end up with /tagged/php+-jquery. When you mix keywords and tags like regular expression -[php] you end up with a "normal" full text search.
 
10:44 PM
@TillHelgeHelwig The API docs even explicitly say that it's undocumented
> q - a free form text parameter, will match all question properties based on an undocumented algorithm.
 
I love undocumented complexity. ;)
 
@Ocramius hey, once again. Quick Q. If I have a table with session records and table with customers, where table for sessions is referencing table with customers and old sessions may stay and new may be created with same customers. Would that mean, that sessions have Many-To-One relation ship?
 
@Eugene yup. Suggestion: don't use the ORM for sessions - it's a bloodshed
:D
 
@Ocramius what do you mean? ORM is only a mediator in this case.
 
@Eugene is it php sessions?
 
10:53 PM
@Ocramius yes, but I handle them myself
 
ah, ok
 
data.stackexchange.com/stackoverflow/query/103473/… is there a legitimate reason why the first/second persons on the list have 125 accounts?
 
0
A: PHP XML Expat parser: how to read only part of the XML document?

hakreAs suggested in a comment earlier, you can alternatively use the XMLReaderDocs. The XMLReader extension is an XML Pull parser. The reader acts as a cursor going forward on the document stream and stopping at each node on the way. It is a class (with the same name: XMLReader) which can open ...

 
I'm thinking they are using a fake email like example@example.com, but I thought SO makes you confirm email.
 
^ some more iterators ;)
 
@crypticツ maybe they are using a temporary mail service like guerrillamail.com ?
 
11:15 PM
@HamZaDzCyberDeV meta.stackoverflow.com/questions/70362/… just found this post
Googled the hash and the first link was to it =oP
 
I see ...
 
mailto@gmail.com 5698d4707354e0b9e4ba6f22a0be84d8
 
posted on March 15, 2013 by Christopher Jones

Zend have contributed their Zend Optimizer+ opcode cache to PHP - thanks Zend!!! "The Zend Optimizer+ provides faster PHP execution through opcode caching and optimization." The new "opcache" can be seen as substitute for the venerable APC cache, the maintenance of which had become an issue. Note: although opcache is now readily available, there is currently nothing preventing you from us

 
11:58 PM
yojo
 

« first day (881 days earlier)      last day (4067 days later) »