« first day (878 days earlier)      last day (4053 days later) » 

9:03 AM
@Jack schlitt.info/opensource/blog/0704_xpath.html
 
Mornings
 
@Gordon Of course, a real man reads straight from here :)
But thanks, it looks pretty helpful!
 
@andho This is the only thing I get when I just run a simple program to test ---> Fatal error: Cannot redeclare class phpmailerException in _ _ _ __ /phpmailer/class.phpmailer.php on line 2319
 
@Jack i used to link to the specs but found the tutorial more accessible for beginners
 
@DaveRandom mornign
 
9:12 AM
4
A: Regex to detect period before @ in email address

sputnickIf you want a real regex to validate an email and applies your special case, a good (RFC compliant) start is : (?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t] )+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?: \r\n)?[ \t])*)...

Hey, I know, let's just blast them with a regex and see what happens ;-)
Apparently 4 people validated the expression almost immediately and wept at its poetic beauty before realizing that it's not an actual answer lol
 
"Meaning well" is often the opposite of "good". ;)
 
@Jack Holy sh*t. I've seen that expr before, never actually pulled it apart to see what it does but it does have a degree of comedy value
Also it's presumably is a real syntax validator instead of one of the many hundreds that seem to think they need to validate the TLD against a known list.
 
@DaveRandom I was surprised to find out recently that FILTER_VALIDATE_EMAIL actually uses such a mother-of-all-expressions ... I'm not sure what to think of that.
 
@Jack What else were you expecting?
 
@DaveRandom My really anal email checkers do have that; it does MX checks.
@DaveRandom I was hoping for a nice piece of yacc code heh
@DaveRandom The comedic part of it is that you don't even need regex to know whether period comes before @ ;-)
 
9:18 AM
@Jack No, that's not the same thing, there's nothing wrong (kinda) with validating the MX, I'm talking about people who validate against a known static list of TLDs, and it never, ever contains .local, which means that a whole bunch of people trying to send internal email with exchange are screwed, plus if you run your own DNS servers you can just make TLDs up as you go along
@Jack If you are going to be fully spec compliant it makes it a lot easier though, since the local part is allowed to contain an @ in a quoted string ;-)
 
Why do so many people bother about validating mail addresses anyway?
 
mornings ;)
 
If somebody enters a wrong mail address...well...he doesn't get mails. Big deal. ;)
 
@TillHelgeHelwig Agreed, if you want to validate it so badly, just send a confirmation email
 
9:20 AM
@Jack Downvoted. If that is the answer (which it isn't) it is a dupe
@hakre mornign
 
@DaveRandom Exactly. The only reasonable thing to do I think.
 
@TillHelgeHelwig For me it's about reducing complaints really and it just depends on how sensitive that is.
 
@Jack A combination of a simple (!) syntax check and confirmation mail should cover most of those "why do I get no email???" issues. ;)
 
9:23 AM
@TillHelgeHelwig Oh, and deliveries cost money for us :)
 
@Jack Uhm...what? You pay for sent emails? How so?
 
@TillHelgeHelwig Because we use a service to perform delivery.
Wait, what? No mail()? That's right :)
 
@Jack Having a service deal with sending mails doesn't seem too odd to me. But paying on a delivery-by-delivery basis surely does. Good deal for the provider. :D
 
@TillHelgeHelwig How else would a mail delivery service charge you? :) a flat fee would be nice, but we don't send That much.
 
9:26 AM
@Jack When adding values to my database in phpAdmin, can i leave the function fields blank?
 
@Sebastian Yes ... no ... maybe ... I'm not sure what you mean :)
 
@Jack Yeah. I would expect a flat fee, because the provider has to pay for setting up the infrastructure...and that will always be available...even if no emails are being sent. So yes...I would expect them to route those costs to you including some profit margin.
 
Ha! Can some one help me with this? I don't even get why it happens.
4 hours ago, by Appu
@Jack @DaveRandom @all Hey, I get this error --> Fatal error: Cannot redeclare class phpmailerException Have seen 2-3 questions on this, but that answers didn't solve my problem. It is advised to use require_once but no luck in my case. Can some one please help me circumvent this error?
 
@Appu The error is pretty clear on what's wrong
 
@Jack I found the answer thanks anyways
 
9:31 AM
HSIOT
 
PLB
@Appu Either use namespaces or rename exception.
 
@TillHelgeHelwig The relative charge reduces as we send more actually; I'm pretty glad we don't have a flat fee.
 
@PeeHaa Yeah. It might be clear for php proficients. But I couldn't get rid of that. What I am doing is I just try to utilize the mailing capabilities of our running website for my android app.
 
morning
 
@PLB It is the exception that is caused in the phpmailer class.
23 mins ago, by Appu
@andho This is the only thing I get when I just run a simple program to test ---> Fatal error: Cannot redeclare class phpmailerException in _ _ _ __ /phpmailer/class.phpmailer.php on line 2319
 
PLB
9:33 AM
@Jack What's the advantage of using provider?
 
@Appu Have you defined your own class called phpmailerException ?
 
PLB
@Appu There are only two possibilities. First, you include script twice (but as you've mentioned you use require_once). Second, you have your own phpmailerException somewhere in your script.
 
@DaveRandom No.
 
+1, although... @user1518659 FYI: preg_quote() is a bit of a carpet-bomb approach to the escaping here. The only characters that need to be escaped in a character class are ^\]- and the delimiter, a caret only needs to be escaped if it is the first character in the set and a hyphen only if failure to do so would indicate a character range. However, what has been done above will still work fine, and I think this is probably the best approach from a readability and maintainability perspective. — DaveRandom 4 mins ago
 
@Appu Well in that case somewhere there is a require or include that should be a *_once. Or (preferably) find the thing that's causing it to be called twice and remove one of them, the *_once variants are relatively expensive.
 
9:37 AM
@DaveRandom Hmm, you missed escaping / itself, and even then it doesn't match properly :)
 
@Jack too anal? I was kinda dubious about posting that
 
@Appu You are including tyhe class multiple times
 
@Jack and the delimiter
 
@DaveRandom Still not working ... I'm trying to find out why now.
@DaveRandom Oh, it's the darn backslash
 
@Jack lol, that does get messy as well because you end up with 4 of the damn things just to get a single literal into PCRE
 
9:39 AM
/[^~!@#$%\^&*()_+=\\\\}\]{[:;\'"\/>.<,\d\sA-Za-z-]/
Lovely :)
 
The quoted string unrolled loop, sexy as it is, always displeases me in PHP because of that
 
@Appu search your source code with this regex: /include ?(/
 
I wish it had regex literals
 
@DaveRandom Let's write an RFC for that =D
Now that pcre is always bundled and all
 
@Jack If I was being really anal I would say '/[^~!@#$%^&*()+=\\\\}\]{[:;\'"\/>.<,\d\s\w-]/'. But I wouldn't do that to you. tbh the whole thing is kinda horrid looking, but at least it's more obvious than the hex sequences.
 
9:42 AM
@DaveRandom The hex sequences are beautiful!
 
@Jack Yes, I'm sure that'll go down well. Which is annoying really, there's not really a good reason not to but everyone will just shout "PHP != Perl" and/or "PHP != Javascript" and that will be the end of it :-(
 
@DaveRandom Oh I forgot! The a-z0-9_ -> \w replacement :)
 
@Jack Oh fail, I left \d in :S
 
9:44 AM
hehehe
 
@DaveRandom I have a doubt. When I referred about *_once, I understood that it would check whether the class/file has been included already. If it's not, then only it includes. Correct me if I am wrong.
 
The "E" in "PCRE" probably doesn't stand for "Easy" :)
 
Then why it arises problems?
 
@Jack The P stands for peanuts though
@Appu Either you are including the class somewhere multiple times or as @DaveRandom said you have a class with that name yourself
Just dump a stack trace in the file that is bitching and you will have your answer
 
9:48 AM
@Appu That's correct, but because it's an exception I would guess the include statement is inside the phpmailer lib itself, it may not be a direct line you wrote.
 
Hi php kings & queen.. I need a php dev for part time in chennai,India.. anyone is looking for part time meet me in chat.stackoverflow.com/rooms/8818/tamil-mobile-app-developers Room
 
tbh I've always found phpmailer kind of odd and clunky, swiftmailer ftw
 
Chennai? That's too damn far away!
Actually, not that far for me ;-) few hours away hehe
 
@Jack Where r u from?
 
@Jack It's not exactly walking distance though...
 
9:50 AM
@DaveRandom Depends on whether I can walk in the plane ;-)
 
@PeeHaa Yeah. I understood that. But my doubt was even if we include it would check for that whether it's been already included and then it decides, but I don't find good reason for the re-declaration error.
 
@VishnuPrasath The great city state of Singapore =D
 
@DaveRandom Hmmm...
 
Wow.. enjoy man
 
2 mins ago, by PeeHaa
Just dump a stack trace in the file that is bitching and you will have your answer
 
9:51 AM
Will check it.
 
Okay.
 
the reason for a re-declaration error in PHP is always a re-declaration.
 
@VishnuPrasath Hey! that is somewhat not far for me. But I am kinda new to PHP ;)
 
@Appu I have to say I kinda don't understand why you would be getting that error, even if there isn't a *_once it should be checking whether the class exists before it tries to include it again. Needs moar spl_autoload_register()
 
9:52 AM
I wonder if the US had that error before as well .. "Cannot redeclare war"
 
You can use reflection to find out from which file the (existing) class definition is from.
 
@Jack They spent a long time developing work arounds to ignore that error
 
@hakre Good old debug_backtrace() FTW!
 
@Appu hw many month exp ?
 
@VishnuPrasath What do you pay /h?
 
9:55 AM
200 Rupees per hour
@PeeHaa
 
@VishnuPrasath Have you checked out careers.stackoverflow.com?
 
@VishnuPrasath My fee (and of most people in here) start at somewhere aroung 8500
 
:Fun Fact: 200 Indian Rupee equals 2.83 Euro
 
@hakre Lol.. But here it's okay. :D
 
9:58 AM
What you are looking for is not a real developer, but somebody from rent-acoder.com or elance.com
 
@PeeHaa The rent-acoder domain name really bugs my OCD tendancies
 
:-)
 
@Appu You're probably more likely to find someone in the right geographic area here, the regulars in this room are almost exclusively from Europe and 'Murica.
 
@DaveRandom Okay. But I am not the one who is offering that requirement.
 
10:04 AM
BTW @DaveRandom are you online tonight? I have some idea which I want to pitch (in private) to find out whether it is OMFGBBQWTF that's uselsss / totally stupid / meh / useful / $$$$$
 
@PeeHaa Yeh should be about after The Boy has been sorted out. I am (!) going to get some god damn work done on cv-pls tonight, I have been trying for the last 3 days to get stuff done and I keep getting distracted :-(
 
@PeeHaa The question is superfluous :P
 
@webarto Whether he's online or whether my idea is the best thing since sliced bread? ;)
 
10:14 AM
If anyone has a minute, can they please try and break this: codepad.viper-7.com/ekSHqP - I'm sure there are edge cases it won't work with but I can't find them. Particularly @Jack, I know you love regex so much :-P
 
@DaveRandom Oh yes, I adore =p
 
my wife killed the joe
 
@DaveRandom Looks kosher to me, well done :) does it take care of comments though?
 
@Jack I actually wrote the bulk of it ages ago and found it yesterday when I was looking at that SIP question, just improved it this morning because I realised it didn't handle empty headers correctly
@Jack Comments in headers?
Not even aware of such things :S
 
@DaveRandom Oh goodness yes ... in between parentheses.
> Comments can be included in some HTTP header fields by surrounding the comment text with parentheses.
Not sure if anyone has ever seen one in the wild though.
 
10:24 AM
> Comments are only allowed in fields containing "comment" as part of their field value definition.
 
can you list me some other bad words please?
 
^^ that means this routine doesn't care about it
 
in english, i'm not english
 
it's job is just to split headers into fields and values, not to interpret the values
But I was not aware of their existence, I shall have to poke @rdlowrey on that subject, see what he does about them
 
Actually, I'm not sure what it even means.
 
PLB
class Test {
public function __construct(){}
static function main() {
try {
}catch(Exception $»e) {
$_ex_ = ($»e instanceof HException) ? $»e->e : $»e;
if(($ex = $_ex_) instanceof Exception){
} else throw $»e;;
}
}
function __toString() { return 'Test'; }
}

Weird exception handling.
 
can someone extend it ?
 
@TillHelgeHelwig u awsome, but why they so strange?
"4r5e" for example
 
@donotusetabtodigitthisnick because you cannot prevent bad words
 
10:29 AM
@Gordon most used for sure )
 
@Jack I'm struggling to find a header field that has a comment token in its ABNF, I wonder if it's just their to allow it for for custom fields?
 
that is my intent
 
Oh, Server: allows them actually
 
I think I have started to make anti-fans here on SO lol ;-) I sometimes see dv's on my highest scoring answers ... yes! finally some recognition!
@DaveRandom Ahh ... oh ofcourse :)
 
10:31 AM
@donotusetabtodigitthisnick can your filter detect this: Аrse (make sure to copy and paste it)
 
@DaveRandom The question is whether you could have (bla bla\r\nbla bla) as the Server header.
I suppose it's possible.
 
@Gordon nope and what is it?
 
@donotusetabtodigitthisnick it's a kyrillic A instead of a Latin A
 
my intent is to not show english most used bad words, cause they are the only one italians,frenchs knows as well
@Gordon also we have moderation tools
 
@donotusetabtodigitthisnick is Analyse a bad word because it contains Anal?
 
10:34 AM
so np, just to made a clean up before to flag them or close
@Gordon nope just " Anal "
 
@donotusetabtodigitthisnick and are cocks penisses or roosters?
 
@Gordon Why are you even talking to the little people? :)
 
@Gordon nope , penis, cock, cocks
@Jack you are smallest of the smallest, wtf you want from me?
 
@donotusetabtodigitthisnick but cock is a perfectly fine word for roosters
 
i'm not talking with you
@Gordon i know, did you catched i just want a list of most used then you can easly write fu.ck
instead of fuck
 
10:35 AM
@Jack No, the comment token doesn't allow HWS, it's a CTEXT which is <any TEXT excluding "(" and ")">, and a TEXT is <any OCTET except CTLs, but including LWS>, and \r\n are both CTLs
 
@donotusetabtodigitthisnick actually you can remove all symbols and do the check for those words
 
@donotusetabtodigitthisnick but why do that effort? just leave it to real people to flag posts.
 
@andho sorry didn't catched you at all...
@Gordon better more filters then less i think ...
most used , go to the basket immediately
 
@donotusetabtodigitthisnick you can remove things like "." from the post and then do the filter. So for example if the message contains "blah blah fu.ck blah" then it will be changed to "blah blah fuck blah" because you removed everything like .,:;-. Then you do the filter and you will find that it contains "fuck"
 
PLB
@donotusetabtodigitthisnick Even if you dedicate your whole life to writing "bad words filter" you won't get it.
 
10:39 AM
@andho right! i'll doing somenthing like this , so a new array for example (.,-[])({} etc ..)
;)
 
then you can add a levenshtein distance check with the bad words for each of the remaining words
 
@PLB i do it also cause i'll be able to re-use this everytime i will need
are you jealous ? ) lol i'm joking
@andho well yep too right
 
@andho that will give even more false positives
 
@DaveRandom Okay, that's settled then :)
 
@Gordon that's why I add the levenshtein ;)
 
PLB
10:41 AM
@donotusetabtodigitthisnick Okay, go on writing. Good luck.
 
Reading RFCs ftw!
 
@PLB ) thanks
 
@andho it's still a waste of time and cpu cycles if you ask me
 
@andho Shot, I'm pretty funking sure that levenshtein won't help
 
it depends on how hard you don't like bad words
if he was a priest he will spend all the cpu cycles on filtering bad words and such
@Gordon @DaveRandom
 
10:46 AM
If he was a priest he wouldn't have any spare CPU cycles, what with all the pictures of young boys and all
 
@donotusetabtodigitthisnick "you are not intelligent enough to understand that this will not work" <-- no bad words, still an insult. you are basically just making people go creative with their language use. they will bypass your filter.
 
It's true, people will just swap clbuttic insults for things your pbuttr won't be able to detect
 
@DaveRandom @Gordon DID YOU UNDERSTOOD I AGREE WITH YOU?????????
)
 
@donotusetabtodigitthisnick i didnt flag it
 
10:52 AM
I just wanted to say clbuttic and pbuttr
 
lol ) for example these are words italians can't understand
 
@DaveRandom the penis mightier than the sword
 
)))
anyway dudes thanks a lot
 
@donotusetabtodigitthisnick most italians usually don't understand any english anyway :)
 
@Ocramius problem for english is they can understand italian at 20% while italians understand english at 60% )
 
10:54 AM
@donotusetabtodigitthisnick They aren't real words, it's taking the piss out of people who use search and replace to sanitise words, where ass and arse are replaced with butt (classic, parser)
@Gordon I know mine is.
 
Hi all.
 
> This evidence that the surface ice and undersurface ocean are in intimate contact comes in a series of steps, which I outline below. But first, you need to understand Europa. It’s an iceball 3120 kilometers (1940 miles) across, about a quarter the size of Earth, roughly the same size as our Moon.
feel free to be confused :)
 
Europa, the big ice ball wandering around jupiter...
 
@Ihsan true
 
11:06 AM
Yo
@Dave Y U PING ME WHEN I'M NOT HERE?!
 
@Gordon some people think there is life there...
There may be ... sorry.
 
@MadaraUchiha Y U PING ME WHEN I'M NOT HERE?!
:-P
(although, now I am here, so technically you didn't)
 
You started it
 
I'm telling my mummy on you
 
Not if I get there first!
How are you all?
@Gordon, today's the moment of truth!
 
11:09 AM
@Gordon They are kind creatures which continuously say "well thanks for the fish" to each other ( while they eat each other ) :D
@Gordon what is the pros of being a moderator? I see a lot of cons...
 
@MadaraUchiha Oh, you know, alive.
 
Alive's good
 
@Ihsan ill tell you once i am
@MadaraUchiha i dont put my hope up too high to prevent me from being too disappointed
 
@Ishan moderators have a high responsibility standard
 
:D You will become Flash @Gordon , give up php and go on with as3...
 
11:14 AM
In smaller sites, they lead the community, performing actions that the community cannot, and help developing the site.
On Stack Overflow however, their role is slightly different. They almost exclusively dealing with flags
 
@Gordon Based in the primaries, if you don't make it you will be the first runner-up
 
@Dave the premieres often don't reflect the elections result with great accuracy
 
@MadaraUchiha well that is a part of the cons I thought. Time ... The ultimate resource a human has.
 
@Ihsan nah, dead technology is dead
 
:D
@Gordon This is war! :D
 
11:17 AM
@Ihsan no. it's a fact ;)
 
@Ihsan you're outnumbered and outmatched don't start a war you cannot finish.
 
I use to think as3 apart from flash.
 
5 votes for stupid question stackoverflow.com/questions/15359566
 
as3 is a better and behaving javascript...
 
What say ? :p
 
11:21 AM
@Ihsan well, from that perspective. but then again, who uses AS3 for anything on the web? outside flash?
 
@Gordon any way I can sand you a swf around here?
@Gordon never mind,
I wrote a 3D frame work, a universal translator, its language, and in its language I wrote a compiler which compiles my work, it is for in house use... I am happy with it.
 
@Feeds Return to sender
 
I also flagged one of those questions for moderator attention.
 
@hakre Same here
 
@hakre that zippy question took 9 votes omg...
 
11:25 AM
@Feeds I wonder how some folks invent blog-topics.
 
Wtf @Feeds
 
@Ihsan actually 11
 
Kill the fluent interface with fire!
RAWR!
 
@hakre I did the same.
 
@Ocramius hi! Could you tell, is there some sort ready-to-go reuirement set for composer to use Doctrine 2.x and what version of Doctrine is better at the moment?
 
11:26 AM
@Eugene current stable is 2.3.*
 
@hakre So it is not just a stupid question... It is a common stupid question
 
1 message moved to bin because content was false and author did not follow martinfowler.com/bliki/CommandQuerySeparation.html
 
Why is user is unlinkable in stackoverflow.com/questions/15359818 ?
Does he has deactivated his account ? :p
 
@Rikesh or he never registered in the first place
 
@Gordon Yeh that's a bunch of crap.
 
11:30 AM
Lol @ the article
 
@brandonsavage eih! what about http://martinfowler.com/bliki/CommandQuerySeparation.html
let's see if he has an answer
 
Did I just get rickrolled or was it my imagination?
 
the argument about returning from a setter for unit-testing is hilarious btw
@Ocramius your imagination jedihandwave
 
@brandonsavage you don't consider that returning early (with no return value) is a good practice, and fluid interface is too error prone
Let me sing you the song of my return clone $this;
 
11:40 AM
@Gordon I am really fed up with gurus.... For instance java gurus. "We have reflection, but dont (use it)" And this is heavily stupid. Always return something from setter (and give it to your girlfriend? ) What for?
 
@Ihsan DIC containers use a lot of reflection O_o JPA too
you probably wouldn't want to use it in your application specific code
 
Well, Life is a heck... Java is a stubborn camel. I sometimes make it jump over the pit...
@Ocriamus reflection is good... But setters should always return something is stupid.
 
@Ihsan indeed. As I said, it's error prone too. You can forget to return once and you got a fatal, and you can clone the returned value and introduce even more WTFs :)
 
Take a look at php: You can use oo, or go on modular for gods sake we do not have line number addressed programming on it. Anyway you can hack it.
 
@Ihsan hacking around it is up to libraries that abstract the hack imo :\
 
11:47 AM
Good morning
 
Yes, a setter is a setter, and a setter does not need to return anything (Paolo Coelho)
 
A rose is a rose ....
may be not paolo... But I have memory failures...
 
WTH I just read?
 
ROTFL. Sorry I caused so much confusion...
 
11:50 AM
@Ihsan poor Coelho :P
 
@Ocramius: Is DCOM-96 this draft? tools.ietf.org/html/draft-brown-dcom-v1-spec-01
 
hang on, I'll tell you when it loads =_=
DCOM-96 is the proxies I worked on :\
 
@Ocramius yes just reading your presentation.
I wonder if it is that DCOM back from windows times.
 
lol
nope, DCOM is our Jira project short name for Doctrine\Common :)
 
okay, because I wondered a little when entering DCOM-96 into google.
 
11:54 AM
@Ocriamus if there is a language with infrastructure like vm or interpreter, I think it should be 1) consistent 2)flexible . Js is not consistent, Java is not flexible, but php is ok. And I like its proxy interface the magic functions....
 
@Ihsan I personally think they're a real pain to work with, but yeah, some things would be forcefully handled in the precompiler otherwise
 
@Ocriamus I built an object architecture both on as3 and php which enables publishing relevant data (with the rule: by that data you can rebuild the object back) for serializing etc... Via proxy and reflection...
@Ocriamus as Doctor Who would say php and as3 proxies are handy-dandy thingys
:D
 
@Ihsan that seems like the abstraction I was talking of above. Why wouldn't you be able to do that in java?
 
Have you ever looked at the ugliness called Java proxy object?
 

« first day (878 days earlier)      last day (4053 days later) »