« first day (983 days earlier)      last day (3981 days later) » 

9:01 PM
<a rel="platform" class="trigger" href="fetch/messenger/answer/12">Title of message #12</a>
@MadaraUchiha , for turning href into JS call
messenger model performs XRH fetch for "/answer/12"
 
@tereško Oh, like clicking <a href="example/place/42"> would call Example.place(42)?
 
actually no , i lied
it performs platform.fetch('/messenger/answer/12'), where platform is modal window manager
 
@ircmaxell I like it, but as they said in the mailing lists, it might actually create bad coding practices.
However, how people use the language isn't really the concern about adding new features, hence, I like it a lot.
@tereško I see
 
and .. <a href="update/messenger/respond/12" rel="platform" class="trigger answer-button"/> .. would update the opened window, replacing the "view message" dialog with "write answer" dialog (the "answer-button" class there is cosmetic)
 
@tereško why would you use a class for that?
 
9:08 PM
because i need some marker based on which i can recognize that the rel attribute will be important and expected
 
(I'm out of votes but have left a possible duplicate)
 
i am gluing this on top on a horrible codebase
 
@NikiC sorry, I'm having trouble with a HT issue
wondering if you can give a hand
 
You and your horrible codebases :P
 
@ircmaxell maybe :)
 
9:09 PM
@PeeHaa or was the objection about something else regarding that class ?
 
Looks more like a job for a data attr?
 
        if (!EG(protocol_cache)) {
                EG(protocol_cache) = (HashTable*) malloc(sizeof(HashTable));
                zend_hash_init(EG(protocol_cache), 10, NULL, protocol_cache_dtor, 1);
        }

        if (zend_hash_find(EG(protocol_cache), instance_ce->name, instance_ce->name_length, (void *) &cache_bucket) == FAILURE) {
                cache_bucket = (HashTable*) malloc(sizeof(HashTable));
                zend_hash_init(cache_bucket, 10, NULL, NULL, 1);
                zend_hash_add(EG(protocol_cache), instance_ce->name, instance_ce->name_length, &cache_bucket, sizeof(void 
 
@PeeHaa the doctype is HTML1.0 Transitional
 
/me pretends he's been here the entire time
 
@tereško hmmmmm nice...
:P
DAVE!
 
9:11 PM
i work with what i have
 
giving me a segfault on the second run, the cache_bucket looks fubar
 
also, that class describes behavior not data
same way as you would have <div class="dropdown" ..
 
@ircmaxell Passing &cache_bucket to both find and add makes no sense
 
Yeah. But there is a reason you cannot change the behaviour of like target using a class
 
find has one more level of indirection than add, they can't both be right ;)
 
9:13 PM
Ahhhh
 
Ooh, they've just changed the voting types over
Hey Dave! Where've you been?
 
@salathe How do I delete an idea or at least prevent it from showing up on the ideas list? Some of them are Won't Fix.
 
@ircmaxell btw, when passing to find you should do a cast to (void **) rather than (void *) [by convention]. That also shows the fact it has more indirection ;)
 
@PeeHaa what do you mean by "you cannot change behavior" ?
 
@NikiC
 
9:14 PM
wow that offtopic list is uber crappy
 
i change the class and behavior changes
 
Yeah. But using a class for that looks odd
 
@PeeHaa What did I miss?
 
@DaveRandom Let me think. For how long have you been gone again? 6 months or so?
 
as i see it: class describes the group of elements
 
9:15 PM
:-P
 
Where have you been?
 
@PeeHaa Only like a week and a half
 
a france right?
 
@PeeHaa La France!
a France? There's more than one?
 
Now getting a HT inconsistent
(gdb) print *ht
$1 = {nTableSize = 16, nTableMask = 0, nNumOfElements = 0, nNextFreeElement = 0, pInternalPointer = 0x0, pListHead = 0x0, pListTail = 0x7ffff7ebe1a8, arBuckets = 0x41, pDestructor = 0x3022b8ef08 <main_arena+136>,
  persistent = 8 '\b', nApplyCount = 239 '\357', bApplyProtection = 184 '\270', inconsistent = 48}
 
9:18 PM
@tereško Yes. I agree with that. In my head it is just for s sudden purpose
 
@ircmaxell what's the new code?
 
@DaveRandom meant to say. aaaah right france
 
        zend_bool result = 1;
        HashTable *cache_bucket = NULL;
        zend_bool *cache_result = NULL;

        if (!EG(protocol_cache)) {
                EG(protocol_cache) = (HashTable*) malloc(sizeof(HashTable));
                zend_hash_init(EG(protocol_cache), 10, NULL, protocol_cache_dtor, 1);
        }

        if (zend_hash_find(EG(protocol_cache), instance_ce->name, instance_ce->name_length, (void **) &cache_bucket) == FAILURE) {
                cache_bucket = (HashTable*) malloc(sizeof(HashTable));
 
And... sobered up yet? @DaveRandom
Is this thing really suppose to look like this shit
 
@PeeHaa Not really. Actually got back last night but then had to sleep (just drove ~1200 miles in 2 days) and have spent a considerable amount of today in the pub for a mates birthday
 
user895378
9:20 PM
@PeeHaa needs moar whitespace.
 
@ircmaxell That still makes no sense
 
which part?
 
user895378
@DaveRandom Welcome back!
 
I ain't going to try to read that. Let me just use unclear as of now :P
 
I have a bunch of cheap booze/cigs if anyone wants any
Ow wait, you all live in countries where you can already buy those :-(
@rdlowrey tnx :-)
 
9:21 PM
:P
 
Going to France tomorrow to see my Dad - cidre ftw
 
@Danack you are french?
 
@ircmaxell If I interpret your intentions correctly, what you want is a &cache_bucket for the add call and a &cache_bucket_dest for the find call (where HashTable **cache_bucket_dest)
 
With these two I can live I think:
> Questions concerning problems with code you've written must describe the specific problem and include valid code to reproduce it. See SSCCE.org for guidance.
> Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work. See also: Stack Overflow question checklist
 
@cheesemacfly nope English. My Dad retired to Normandy to pickup chicks :p
 
9:23 PM
@ircmaxell If you pass just cache_bucket to the add call the hashtable will contain the first your bytes of your HT... ;)
 
> Hey there, would you like to enable our new repository design?
 
posted on June 25, 2013 by Evert Pot

Looks like the next iteration of OS/X will still again not ship with a recent PHP version. The reported version appears to be: PHP 5.3.23 with Suhosin-Patch (cli) (built: May 22 2013 00:00:34) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies While it's a version from March this year, PHP 5.4 was already released before the release of the las

 
ahh, I see your point
 
@Danack Lol, first time I hear someone going to Normandy for this reason!
 
Would I? Thoughts anyone?
 
9:24 PM
@DaveRandom I did it and it is ok
Only took me a day to get used to
The previous design change made go crazy for at least a week
 
I have to say I'm generally not a fan of the rhs sidebar but I'll give it a chance
 
@NikiC working, thanks!!!
 
glad to help :)
 
With caching:
Interface in 0.48255300521851 seconds, 4.8255300521851E-7 seconds per run
Protocol in 0.47772598266602 seconds, 4.7772598266602E-7 seconds per run
interface Foo {
        public function foo();
}

class Bar {
        public function foo() {}
}

class Baz implements Foo {
        public function foo() {}
}

function benchmark($func, $times, $arg) {
        $s = microtime(true);
        for ($i = 0; $i < $times; $i++) {
                $func($arg);
        }
        $e = microtime(true);
        return $e - $s;
}
$times = 1000000;
$interface = benchmark(function(Foo $foo) {}, $times, new Baz);
echo "Interface in $interface seconds, " . ($interface / $times) . " seconds per run\n";
 
what is with the instant mass upvoting? stackoverflow.com/questions/17308010/changing-each-to-for
 
@PeeHaa I ask you if I miss anything important and you fail to tell me 5.5.0 is released?? Shame on you!
:-P
 
new close tool changes are live here
 
@DaveRandom btw 5.5 is released :)
 
9:54 PM
Someone just remind me how ::class is in the slightest bit useful for anything again?
 
@DaveRandom I was actually curious about the same thing
 
@DaveRandom I don't think it is . . .
5.5 is a bad release in some regards.
DateTime crap is just awful.
But we got generators and opcache and fixed support for non-scalar keys in iterators.
 
@LeviMorrison and password_*
and mysql_*
 
Yes, those too.
 
9:56 PM
And 5.3 :)
 
@LeviMorrison I'm not sure if I like non-scalar keys at the moment. It implies you can use vectors as keys in data structures, which (as I understand it) you still can't (cleanly)
 
@DaveRandom Oh I can in my own data structures. What's the point?
Think about it, the most common case is in a Map<key, value>
Let's say I have a Map<Request, List<Response>>, what should the key be if it isn't a Response Request?
 
Oh I'm not saying the concept isn't useful, it's just that none of the native data structures provided by PHP let you use vectors as keys, so there's a guaranteed transparency issue when you use them. It's not a massive problem, but I know that when the key is a vector, there's some userland/extension logic that I can't see making it work
 
Jay Hanlon on June 25, 2013

It pains me when I hear people say that our sites are unfriendly, or that we chase new users away. But it’s a hard problem, because our highest priority has always been the quality of content on our sites.  And it still is. We can’t lower our standards. We won’t.

But we have been working hard to make our sites more welcoming, reminding users that feedback can be clear and nice, and helping new users learn the ropes before they get frustrated.  And, as of today, we’ve completely overhauled closing. …

 
It's not a biggie, I freely admit I'm being a bit picky
 
10:01 PM
(it might have been posted yesterday already and i missed it because of the solstice festival)
 
user895378
lol ... first time this has ever happened to me. I just got a fatal error from xdebug.max_nesting_level = 100 from legitimate code that would have eventually finished. Guess it's time to up that limit.
 
user895378
@DaveRandom FWIW I have a lot of places where I iterate over SplObjectStorage in which the non-scalar foreach keys are quite useful.
 
user895378
foreach ($splObjectStorage as $obj => $data) {
 
user895378
vs.
 
user895378
foreach ($splObjectStorage as $obj) {
    $data = $splObjectStorage->offsetGet($obj);
}
 
user895378
10:10 PM
I have to go the second route in a lot of pre-5.5 code.
 
@rdlowrey Are you planning to use any 5.5-only features in Aerys?
 
user895378
@DaveRandom not at the moment. I'm gonna keep that at 5.4
 
... well .. there is no hot water today
on a different note - yield seems like something that could be useful, but the rest seem somewhat limited
 
user895378
Yes, generators are great. And the password lib should help a lot of people. I don't care too much about anything else.
 
@rdlowrey not even built in opcache?
 
10:15 PM
I really like the built in opcache
 
user895378
I don't get much use out of opcache, personally. I don't use PHP in such a way as to make opcache useful to me.
 
user895378
CLI FTW.
 
@rdlowrey ?
 
@PeeHaa that was covered under "somewhat limited"
 
user895378
I use long-running CLI process for which the opcache provides no tangible benefit.
 
10:17 PM
@rdlowrey Ah right. Full sentences please
:D
 
user895378
Not committed or pushed yet, but I've just finished testing dead-simple multipart form POSTing with Artax:
 
user895378
$body = new FormBody;
$body->setField('field1', 'val1');
$body->setFileField('file1', __DIR__ . '/test/fixture/lorem.txt');
$body->setFileField('file2', __DIR__ . '/test/fixture/answer.txt');

$client = new Client;
$request = (new Request)->setBody($body)->setUri('http://httpbin.org/post')->setMethod('POST');
 
user895378
And that streams the files, of course. Buffering files wouldn't help anyone.
 
Anyone can point to why Pub/Sub pattern is not widely used used in PHP (unless maybe something of Wordpess hooks nature), like it is in JavaScript for example, and if there are any popular pubsub implementations that I have missed.
 
@rdlowrey noice
 
user895378
10:22 PM
@PeeHaa thanks -- I've spent the last few days working out all the kinks for that. It can be tricky allowing for things like HTTP/1.0 servers where you can't chunk the request.
 
@DenisPshenov what is "pub/sub pattern" ?
publisher-subscriber ?
are you talking about observer pattern ?
 
user895378
@DenisPshenov Usually you see a variation in the form of the Mediator pattern in PHP.
 
What is Pub/Sub pattern? Is that some Java made-up name?
 
user895378
But generally, due to PHP's normal use cases (handling a single web request and usually not for long running processes) there hasn't been as much exploration into event-based patterns.
 
yeah, the new off-topic close reasons are a relief. can't wait to try it.
 
10:25 PM
@tereško The name comes from RSS and PubSubHubBub...
 
no more comment writing until the finger hurts, just close-voting and done.
 
Yes the observer patter, but people coming from JS would simply call it publisher subscriber
 
It's just event driven stuff.
 
user895378
@tereško publish-subscribe ... it's just a blanket term -- it's a lot like the observer pattern.
 
@tereško english
 
10:26 PM
I've been pondering writing my own pseudo-framework that works entirely on events and uses Gearman and whatever to do background events, but I lack sufficient round tuits.
 
part of me wants to respond here, and the other part of me says fuck no: reddit.com/r/PHP/comments/1h20m2/php_rfc_protocol_type_hinting/…
 
user895378
@Charles I'm doing something like that now. I've got an implementation that works without any extensions that looks like this:
 
@DenisPshenov javascript application "lives" from the time when you open tab, till you close it. PHP application usually "lives" from time when server receives request, till it sends the response
 
user895378
$dispatcher->call($onResultCallback, $onErrorCallback, 'strlen', 'zanzibar');
 
user895378
^ Delegates to a pool of worker processes.
 
user895378
10:28 PM
I plan to use the same interface to provide gearman and pthreads backends. So much to do ... so few hours in the day.
 
which çlose reason would you choose?
 
"unclear what you are asking" , a.k.a.: not a real question
 
rand()
 
user895378
@ircmaxell Don't do it! You just got back on reddit! :)
 
I find that with pub/sub you could quite easily write loosely coupled code without having to resort to mediator pattern in most cases, and frankly a little surprised by the lack of this movement in PHP. Thanks for the answers anyway.
 
10:30 PM
@ircmaxell facepalm
 
also, according to new "close reasons": fix-my-code, debug-my-code and write-my-homework questions are "off topic"
 
I think I'll choose this one:
> Questions concerning problems with code you've written must describe the specific problem and include valid code to reproduce it. See SSCCE.org for guidance.
@tereško yeah, that's a great clarification in my eyes.
 
@rdlowrey I like it. Keep up the good, but rare, work. Sigh.
 
@tereško What is that, a screencap for ants?
 
user895378
10:34 PM
@Charles A real screencap would have to be at least ... three times as big!
 
i wanted to show the whole view , instead of just the top of the fascinating popup
 
@tereško Dunno about Opera, but other browsers have extensions that take screencaps of the whole page for you.
 
also , it just happens that i uninstalled the screencap extensions 2 hours ago =/
 
Aha!
@rdlowrey One fine day, I'm going to sit down and watch all of Zoolander. I've only ever seen it in frequently interrupted bits and pieces...
 
@Charles Is there some way to talk to you privately? Some email address maybe?
 
user895378
10:41 PM
@Charles it's one of my favorites :)
 
@cspray Take the email address in the job posting and replace jobs@ with ccapps@.
 
@Charles Great. Thank you.
 
BTW, said job posting will soon be updated to suggest that we may be looking for folks that do 100% telecommute, for the right candidate. Have I mentioned that we need LAMP devs?
7
 
> > This change allows for using a Class as the protocol, so you could

> But class isn't a protocol (only). If you say you've got PDO object, you
> expect it to be PDO object with all that docs say PDO object does, not
> only functions with names that looks like ones PDO object would have. I
> don't see what could I do with object all I know about is that it has
> method "query". Who knows what that "query" method might do?

Why?

Why do you expect it to be the POD object? I can decorate it and change all the behavior I want and still satisfy the type hint:
 
POD object like pod person ?
btw I think maybe a PHPunit example of your rfc may help people see that it's safe to use?
 
10:53 PM
@hakre Personally I think the question could reasonably fall under the category of "a specific programming problem", but if you really think it is off-topic, you can always vote to close it. But as long as the question is open, I don't see how there is anything wrong with me providing an answer. — James Holderness 17 mins ago
 
11:07 PM
@Charles I'd seriously apply for the job in ~8 years.
I'm going to keep my current one at least that long :]
^ Yay iPad!
 
yay html5!
oh wait, the HTML is a lie
 
@LeviMorrison i should be called "uPaid"
 
PHP5.4 <3
 
should we assume that you are into older things, @SteveMuster ?
 
@tereško i updated from 5.3 to 5.4 about 3 days ago
 
11:15 PM
@SteveMuster congrats :)
the new PHP versions are awesome
 
@hakre yes of course
 
11:34 PM
@CarrieKendall I want to be able to detect if a link a user has submitted is dead by checking for a 404 response header. Wondering if there are any other methods to check for dead links? I know a soft 404 which does not send a 404 header will be more overhead to check for by having to do a heuristic check on the pages contents looking for common terms used on 404 pages.
 
14
Q: How do I check for valid (not dead) links programatically using PHP?

GloryFishGiven a list of urls, I would like to check that each url: Returns a 200 OK status code Returns a response within X amount of time The end goal is a system that is capable of flagging urls as potentially broken so that an administrator can review them. The script will be written in PHP and w...

 
@SteveMuster I know, that is what I said I would already be doing. basically instead of checking for 200 response checking for 404 because I want to allow 500 errors etc in case remote server is temporarily having issues and not to prematurely mark link as broken.
 
@crypticツ $retval = curl_getinfo($ch, CURLINFO_HTTP_CODE) == 404; ?
 
@SteveMuster my question is not how to check for a 404 return. I know how to do that, I am more than capable of doing it. I am wanting to know if there are other methods to check for broken links other than the return code.
 
@crypticツ Mhh good question. I only know how to do it with curl (the link above) or for NGINX try_files $uri = 404;
 
@crypticツ You could look for stock (e.g. Apache) error pages that ship as default with web server software. But the short answer is no, HTTP applications are supposed to indicate error states with the response code, when stupid devs start doing stupid things (as we all know they regularly do) you have to build elaborate logic if you want to try and detect it programatically.
 
aaaah what do we close typo or syntax error questions as now?
 
The thing about looking for stock error pages is that if one of those gets served, chances are it will also be served with the appropriate response code
 

« first day (983 days earlier)      last day (3981 days later) »