« first day (873 days earlier)      last day (4075 days later) » 

1:00 PM
@dragon112 on the site: Ticket sales will start early March.
@Ocramius no idea
 
@ircmaxell But it is early march xD
 
@ircmaxell Will ask :) Sorry, just pinged you because you're a frequent-conferencer :P
 
@ircmaxell Do you think PHP is stable enough to run PHP in the background process? Everyone is saying PHP is a bad idea due to memory leak.. what your view?
It will run 24/7
It will involve a lot of socket and db
 
@dragon112 they announced the speakers 2 days ago... still didn't put them on the website, so they cannot sell any ticket without letting people know what is going on :P
 
:-D
 
1:01 PM
@I'll-Be-Back supervisord + reactphp
 
@Ocramius Got a point there... I'll be patient ^_
 
@I'll-Be-Back I've done it before... It's not without its challenges, but it's possible
 
where's @igorw when we need him to do advertisement? :)
 
@Ocramius they only notified the speakers, they didn't announce yet :-D
 
@ircmaxell sounds like it could work for hurricanes, too.
 
1:02 PM
@ircmaxell ah, yep :)
 
@Ocramius Hmm will look into supervisord + reactphp
 
ROTFL!
> At t=0, 40,000 people open fire. The AK-47 typically has a 30-round magazine and fires 10 shots per second. Within a third of a second, a quarter of a million bullets are in the air. Stray shots no doubt cause a lot of fatalities in the front of the crowd, but with a trained and disciplined group of shooters, the bulk of the shots could actually manage to hit the target.
> At t=1s, almost a million shots have been fired. The locomotive is sliding backward at about 100 m/s (220 mph). At t=2s, the locomotive’s backward acceleration slows down quite a bit. This is partly because it’s starting to get out of range of the shooters. But it’s also because the locomotive is traveling at nearly the speed of sound, and the bullets are having a harder and harder time catching up. When they do, they have so little relative velocity that they can’t accelerate it much more.
 
And I still need to find a photo of myself where I don't look like a frikking moron: facebook.com/…
 
@Ocramius reactphp for socket use?
 
1:04 PM
@I'll-Be-Back No, for the event loop
@I'll-Be-Back I'm also writing a bot that should run 24/7 (as an exercise)
 
@ircmaxell Where do you find this kind of stuff......
 
@dragon112 what-if
 
1:06 PM
I finished refactoring about 60% of that script
i added this comment for the next guy
/* Warning: this code is terrible. It is in dire need of improvement and DRY */
In hindsight i should have rewrote it
still, the filesize went from 350kB to 6kB
 
that's more than 60%...
 
I deleted large chunks
 
My favorite so far: what-if.xkcd.com/35
mainly because it tells a story of a nuclear powered potato gun...
> The official record for fastest manmade object is the Helios 2 probe, which reached about 70 km/s in a close swing around the Sun. But it’s possible the actual holder of that title is a two-ton metal manhole cover.
 
I didn't read after what-if.xkcd.com/2
thank you for reminding me that I need to waste more time :D
 
:D
Today I decided I'd do some work... but you guys...
 
1:11 PM
Thats one kickass hairdryer:D
@webarto Then go away, shoo, do some homework.
 
it eventually goes to 11
 
@Ihsan thanks rly nothing better than that? @Gordon @crypticツ @ircmaxell
 
@dragon112 Nah, too late now...
 
I love xkcd
 
@donotusetabtodigitthisnick don't randomly include people in your replies. It's not proper etiquette...
 
> Before it can burn its way through the floor, someone throws a water balloon under it. The burst of steam launches the box out the front door and onto the sidewalk. (Note: If you’re ever trapped with me in a burning building, and I suggest an idea for how we could escape the situation, it’s probably best to ignore me.)
 
@ircmaxell do you know how can use mb_split() without having a pattern?
 
without having a pattern?
 
@donotusetabtodigitthisnick
 
1:18 PM
i mean it requires pattern i do not have any pattern, i do not need it
@crypticツ )
 
@I'll-Be-Back it can be done, but there's a lot of things that you can do wrong :)
 
@webarto Well dont blame me, I told you to go. :D
 
/me walks away to take a shower and go to work...
 
@crypticツ but u used tab? :/
 
@ircmaxell looks like we'll both be talking about meta-circular evaluators ;-)
 
1:20 PM
@igorw Oh? what's your talk on?
 
Introduction to LISP
 
Nice!
PHP, Under the Hood
 
@igorw looking forward to see that :)
 
same here...
Larry Garfield (@crell) did an intro to functional for PHP devs at Sunshine, which was pretty good, but would love to see a real functional talk
 
1:22 PM
Frozen Android phones give up data secrets
Interesting :P
 
What if is really fascinating...
 
According to @psd, the British Government (no less) is deploying parts of RFC2324 /cc @masinter
For the lazy: rfc2324
 
@ircmaxell do one
 
@igorw hypertension control program?
 
@ircmaxell it never really occurred to me, but the lisp cond statement is actually pretty much the same thing as having a function with early-return "guard" ifs.
if you think of it that way as opposed to a switch statement, it makes a lot more sense. even if it's almost the same as switch (true).
 
1:27 PM
@gordon I don't know it well enough to do one yet... which is why I will be in @igorw's
 
since one tends to replace switches with polymorphism in OO, the cond initially felt wrong to me. but if you think about it in a different way it all lines up and the universe stays intact.
 
@ircmaxell you didnt know enough about the php core a year ago either. that didnt stop you from finding out though ;)
 
Yes, agree. But I haven't spent the time to learn it yet. It's on my list...
 
@ircmaxell thats what I meant with do one. take the time. find out. put in talk :)
 
1:31 PM
Which is why I am happy I can see @igorw talk on it. It may be that it sparks my knowledge. I understand the principles, but it hasn't clicked yet...
 
Anonymous
Why does this stackoverflow.com/questions/15272605/… happen to me ;((
 
Anonymous
I spotted the error first, 4 other people spotted my answer :))
 
@PHPNooB their answers are better than your question-reply
 
@PHPNooB Or they were reading the post while you already answered and answered later without reading your post.
 
Anonymous
@dragon112 has a point. It was ok for the first one, but third and fourth o.0
 
1:47 PM
@Ocramius Have you tried RabbitMQ?
I think this is alternative to ReactPHP?
 
@I'll-Be-Back yeah, but the PHP lib to communicate with it segfaults continously
@I'll-Be-Back they're different things...
 
Oh
I'll give ReactPHP a shot.
There is other one called ZeroMQ
 
@I'll-Be-Back those are message queues... it's a different thing
 
Exactly how bad of an idea is this....
 
1:49 PM
public function __call($method, $args) {
$session = $this->getSession();

if(method_exists($session, $method)){
return $session->$method($args);
}
else {
return $this->$method($args);
}
}
Ignoring the fact that if it goes into the else, there's an infinite loop...
I'm thinking of doing this to avoid a $this->getSession() call in every test method and then using $session->... for example
 
@PHPNooB because your answer doesn't answer the problem
 
Anonymous
@ircmaxell yea, i realized that now.
 
Anonymous
Noob mistake :)
 
rather than jumping to the conclusion that people are out to get you, or that you're being mistreated, why not step back and think if perhaps there was another reason...
 
Anonymous
Mostly you are right, but here it goes both ways
 
2:01 PM
there may be cases where it goes the other way, but those are extreme exceptions
and I'm out, off to work, later
 
Anonymous
Ok, later Mr. Master :)
 
@PHPNooB Slow readers? :p
 
Has anyone ever efficiently extended method_exist to include classes which extend from the class specified and so on up the chain?
 
@AdamLynch what's the use case?
 
2:08 PM
@Ocramius Nevermind, just sorted it
public function __call($method, $args) {
$session = $this->getSession();

if(is_callable(array($session, $method))){
return $session->$method($args);
}
else {
trigger_error("Call to undefined method {$method} in ".get_class($this), E_USER_ERROR);
}
}
is_callable does what I want
 
@igorw the HTCPCP protocol sounds amazing ;) any early implementation?
 
@kaᵠ I don't think I've seen any implementations of it. must include physical coffee pot of course.
 
Does anyone knows in which moment Symfony 2 session is saved to disk?
 
@I'll-Be-Back ZMQ is a network messaging library, RabbitMQ is a message queue/broker, react is a PHP library for doing non-blocking I/O. each has a specific purpose, and depending on your use case they can be combined/composed. for example, react has an integration with ZMQ and an implementation of the STOMP protocol which can be used to talk to RabbitMQ.
@JurisVaiders can you make that question more specific and explain what you actually want to do or know?
 
@AdamLynch I did something similar recently, let me see if I can find it.
 
@igorw Nevermind I just figured it out after asking the question :) Thanks anyway
 
quack quack
;-)
 
@igorw Oh cool stuff! I am going to develop a Asterisk Manager server which required a lot of communication between Asterisk server and also clients via ajax response.
 
...
foreach($this->options as $key=>$value) {
$method_name = "set" . str_replace("_", "", $key);
if (method_exists($this->task_dm, $method_name)) {
$this->task_dm->$method_name($value);
}
}
...
Is the route I went. (thanks to ircmaxwell).
 
2:22 PM
@JurisVaiders It can be. You can specify it. I've never done it but I know you can
 
Swap my $options for your $session
 
@Pheagey not exactly
I've done what you've done before with a JSON translator I've built
but I want to check if the method exists in $session
or in what $session extends
or what that extends
and so on
 
O, ok.
my mistake
 
np
what I'm doing is if a method is called on a class ($this actually) and it doesn't exist
then it check if $session->$method is callable
and if it is, call it
if not, throw the error
 
Gotcha.
 
2:34 PM
@Pheagey What was your use case for your code?
 
anyone here know how to integrate paypal payment gateway into your website??
The purchase page is php
 
@AdamLynch trigger_error...
 
@ircmaxell what should I use?
 
nah, I just can't stand the error system. I much prefer exceptions
@Pheagey I hope you indented, and just forgot to check "fixed-font" when pasting here ;-)
 
@ircmaxell Well, I can throw an exception I guess
 
2:47 PM
@AdamLynch I had a data model setting data in a controller where the DM did not know the if a given getter/setter method existed in the CTL
@ircmaxell The waaa?
 
but what happens now is similar to what happens if the method didn't exist
@Pheagey ah ok
 
morning
 
@Pheagey I hope you indented your code ;-)
@NikiC Good morning, how are you?
 
@ircmaxell O, yes, just did not paste correctly.
I ~!hate!~ people who dont indent...
 
wrong indentation is even worse
 
2:51 PM
@Pheagey figured that was the case
 
Oh god, don't get me started on indentation and Netbeans
Some people insist on turning off "turn tabs to spaces" option - this royally screws with my lovely pretty code
 
Anybody has a decent regexp pattern to validate emailaddresses?
Hey @ThiefMaster is here
How do you JS guys validate an emailaddress?
 
Hey @PeeHaa, what about this: stackoverflow.com/questions/46155/…
I have that saved, have used it before
 
2 messages moved from The closing room
 
3:05 PM
@ThiefMaster tab-based indentation especially ^^
@ircmaxell good enough. you?
 
For email address validation, it's always the question to what degree you want to follow the standards. Things like ip based addresses are valid according to the specification, but you may very well not want to accept them
 
@NikiC Good
doing some data analysis on website traffic to show that most people are morons and will believe any consipiracy theory that they want...
 
@Jasper I like PHP's regex
 
@Jasper standards are standards for a reason. You don't get to pick what you want to accept and what not. That's not how standards work. Accept any standards complient address...
 
3:23 PM
@ircmaxell I agree it's how standards should work for the most part. When there are problems with the standard, though, there may be good reasons not to follow it completely. Also, it's not how all standards do work, which in this case means that people using ip-based addresses don't expect them to work everywhere.
 
user895378
It doesn't matter if a standard is garbage. You still have to implement it.
 
@ircmaxell Tell that to PHP-FIG. :)
 
@salathe what FIG puts out are not standards ;-)
 
user895378
@salathe When @ircmaxell says "standards", I think any reasonable person should think IETF ... not FIG.
 
What do we call classes that map to database tables?
like : github.com/soroushatarod/KidneyOrm/blob/master/views/Course.php the class Course has a responding table in databases named as: Course
 
3:25 PM
@meWantToLearn "entity classes"?
 
@ircmaxell Pish. A rose is a rose...
 
so are these classes called Mappers
entity
 
a "mapper" would be the thingie that loads and saves this object to the db
if it loads and saves itself, it's more an active record
 
<p><?php echo $check; ?></p> or echo '<p>'. $check . '</p>';
 
Anonymous
3:33 PM
hmm...
 
@crypticツ How did that answer get 10 upvotes?
 
@Jasper apparantly a lot of people have parse errors =oP otherwise I dunno
 
@Jasper more puzzling, how did the question get 7 upvotes?
 
@Jasper It must be a really good answer... or uhh..
 
3:36 PM
@iroegbu I'd be more worried if it was favorited 7 times =oP
 
smh
 
I'm Afraid Bankers Really Do Earn Their Bonuses http://s.hbr.org/Zik8di
 
user895378
YOU JUST GOT SNOOKIE'd
 
user895378
(inside joke)
 
@rdlowrey i googled snookie and all I got was the some gal I dont know
 
3:40 PM
By tom nook?
 
user895378
@Gordon Start here and read down the next 10 lines or so.
 
@rdlowrey make a transcript bookmark for it :D
 
user895378
@Gordon I have no idea how to do these things.
 

You just got snookie'd!

11 hours ago, 3 minutes total – 11 messages, 3 users, 0 stars

Bookmarked 13 secs ago by Gordon

 
user895378
huzzah! Decisive close-voting by excessively tanned people!
 
3:46 PM
1 message moved to bin
 
@Gordon hmm... is that kind of interruption unwanted here? (just asking)
 
user895378
Probably depends on context ...
 
I still didn't get the context (nor the chat transcript), so it may well be :) nvm
 
@Ocramius nah, was just too big. no worries.
 
kk :)
 
user895378
3:49 PM
I find the real key is to post your nonsense between 2200-2359 GMT -500 when there are no mods slinking about to export it to the bin :)
 
Q: "What if you strapped C4 to a boomerang? Could this be an effective weapon, or would it be as stupid as it sounds?"
A: "Aerodynamics aside, I’m curious what tactical advantage you’re expecting to gain by having the high explosive fly back at you if it misses the target."
I lol'd there
 
> A major advantage of C4 is that it can easily be molded into any desired shape. C4 can be pressed into gaps, cracks, holes and voids in buildings, bridges, equipment or machinery. Similarly, it can easily be inserted into empty shaped charge cases of the type used by military engineers.
> C4 is very stable and insensitive to most physical shocks. C4 cannot be detonated by a gunshot or by dropping it onto a hard surface. It does not explode when set on fire[3] or exposed to microwave radiation.[4] Detonation can only be initiated by a combination of extreme heat and a shockwave, such as when a detonator inserted into it is fired.
@dragon112 So it does make sense to have it come back to you when your initial throw didnt hit the target so you can throw it again.
 
@Gordon Coudl this help reduce the US military budget?
 
@Pheagey I dont know. In any case, I would not strap the C4 to a boomerang but mold the C4 as a boomerang.
 
that would make more sense.
 
3:57 PM
@Gordon What if you don't catch it and it hits you in the face..? Correction: hits you in the detenator.
 
What if the enemy catches it and then uses it on you?
 
@crypticツ with no detonator?
 
@crypticツ No problem, you have the detonator
 
@dragon112 C4 boomerangs are only issued to Elite Wallabee Units (sister chapter to the Navy Seals) so that wont happen
 
remote detonator right?
 
3:58 PM
@crypticツ yup
 
@Gordon What if the enemy catches it and throws it back and hits your detonator in your pocket?
 
@dragon112 hmm. Collateral damage
 
you guys are on crack :)
 
> The deadliest weapon in the world is a Wallabee and his boomerang. It is your killer instinct which must be harnessed if you expect to survive in combat. Your boomerang is only a tool. It is a hard heart that kills. - Gunnery Sergeant Hartman
 
Predator had the best boomerang
 
4:04 PM
@crypticツ yes, all this, yes.
 
in AVP2 it cut the girl in half
 
:/
AVP series...
 
@Pheagey don't watch them, they are a disappointment =o(
I'm sure there is a parody
 
@Pheagey damn straight!
 
@crypticツ by the rules of the internet. yes.
 
4:06 PM
@crypticツ That's the general feeling I get from people.
 
ok I officially have zero votes, now to see if that bug pops up and gives me an extra vote
 
> Today, you people are no longer repwhores. Today, you are cv-ringers. You're part of a brotherhood. From now on until the day you die, wherever you are, every cv-ringer is your brother. Most of you will go to the PHP tag. Some of you will not come back. But always remember this: cv-ringers die. That's what we're here for. But the cv-ring lives forever. And that means YOU live forever.
10
 
Can I flag that?
:P
 
@Ocramius no, but you may star it :D
 
@Gordon you may want to find a better term than "cv-ringer" ^^
 
4:12 PM
@NikiC but we ring with every question! we tackle it. bring it down. It's very fitting imagery ;)
 
@Gordon It just doesn't have the right sound to it
 
@NikiC: nice job on internals
 
@ircmaxell ?
One Ring to close them all
3
 
4:28 PM
@Gordon I'm going to go form my own cv-ring and it's going to be a sisterhood and every cv-ringer will be my sister.
you're not invited =oP
 
@crypticツ that's quite sexist, don't you think?
 
@crypticツ would it help if I declare you a brother h.c.?
 
lol sure
 
then I hereby declare you so
 
@igorw let's make up some blogpost on it and scream for the scandal
 
4:34 PM
everyone hug and welcome brother h.c. kyra "@crypticツ" D.
 
call me Big Brother, I'll be watching those questions O_O
 
:)
 
@NikiC to the ZO+ thread
 
Does anybody know why this code does completely different things on different online php services? 3v4l.org/6Ufma ideone.com/KocpNp codepad.viper-7.com/AuOn50
code:
<?php

eval('?>HI<?php');

echo "bla";

?>
 
> We already covered that. An opcode cache doesn't affect the language
itself. There is no new syntax and no BC issues. Much like a performance
improvement patch that has no effect on the language syntax doesn't need
2/3. Whether it is "major" or not, doesn't matter per the established
voting process. You can't both be a stickler for the details of this
process and then ignore them when they become inconvenient for you.
 
4:42 PM
@Jasper you just broke the internet
 
i'm trying to understand why this give me an Parse error
<?php
	try{
		$pdo = new PDO('mysql:host-localhost;dbname=test','test1','');
	}catch(PDOException $e){
		$output = 'Unable to connect to the database server';
		include 'output.html.php';
		exit();
	}
?>
any idea?
 
@igorw but he didnt google for google on google. So how can that be?
 
@Happyninja I do not get a parse error on PHP 5.4 from that. are you running it on PHP 4.x by any chance?
 
@Jasper the first and last are actually the same
 
@Happyninja are you running that on 4.4?
 
4:44 PM
@NikiC The first writes the php opening tag to the output, whereas the second (properly, I would say) does not
 
@Jasper dude HTML
 
Does anyone know if there's a php-soap 5.3.18-1 extension around for el6? x86_64
I need the rpm if possible!
 
writing <?php is correct for PHP with short_open_tags=0, because <?php is not a valid opening tag, so it's just plain text
 
Puzzle: Given a string contains only one type of character (e.g. 111111 or aaa), write a regex that matches only the strings whose length is a square number
 
@NikiC it's not?
 
4:48 PM
@ircmaxell no, it's not
 
@Jasper likely because some of them include it as a file, and others try to eval it...
 
<?php is, <?php is not ;)
 
what difference am I missing (the trailing space?)
 
@ircmaxell yes
 
Ahhh
I wasn't sure if a string had higher precidence...
 
4:49 PM
@NikiC Good point. I suppose the html comment is just viper's doing in ensuring people don't break the site
 
@ircmaxell 5.4.6
 
<?php

$b = '?>foo<?php ';

var_dump($b);
@Happyninja what parse error?
 
Sid
er..
 
@NikiC Thanks, that solves it. Turns out that if I add the space, all three do the same.
 
Sid
guys, how do you prevent direct access of a certain file
?
let's say "pics.zip"
 
4:53 PM
@ircmaxell damn i found it.. the include file didn't had the proper closure...
 
;-)
 
Sid
it must be able to download only if a certain cookie exists
is this possible via .htaccess?
 
anyone read any of amazon.com/Roger-S.-Pressman/e/B000APFW2Q? I just read an IEEE article claiming the SE books to be "classic texts in the field".
 
I haven't.
Come to think of it, I haven't heard anyone, industry or professor, even mention them.
 
> For almost three decades, Roger Pressman's Software Engineering: A Practitioner's Approach has been the world's leading textbook in software engineering. The new seventh edition represents a major restructuring and update of previous editions, solidifying the book's position as the most comprehensive guide to this important subject.
 
4:58 PM
Well, maybe I should read it.
. . . except it's too expensive for something I don't have recommendations for.
 
> Sobering but true: it's impossible to thoroughly test an IT system of any real size. Roger S. Pressman pointed out in his book Software Engineering, one of the classic texts in the field, that "exhaustive testing presents certain logistical problems... - from the IEEE article
 
The reviews do not look promising.
 

« first day (873 days earlier)      last day (4075 days later) »