|
Nuns and Regexes Do Not Mix
Last post 03-28-2008 11:12 by alexg. 28 replies.
-
03-27-2008 1:44
|
|
-
Corona688


- Joined on 12-14-2006
- Posts 16
|
Nuns and Regexes Do Not Mix
We run an old text game built on an ancient and mysterious codebase. It occasionally does strange things for reasons that've been lost to the mists of time. Sometimes it refused to create new characters. It loathed certain names with a passion, like 'Counterlock', and nothing would explain why. No error message, nothing at all, just abject silence and a failed system call. This happened extremely rarely, fortunately, but really bunged the system up good when it did. We'd have to dig in and delete the offensive objects before the application system could resume normal operation. When it broke down on Pandamonium, I got mad. I dove into the source itself and added trace statements through every step of the process. Finally I stumbled into a function that appeared to be checking for, hmm..... jerks? previously banned players, perhaps? This is what printf revealed: The offending function has been replaced with a stub that always returns zero, and we can at long last name characters 'damn', 'fuck', and 'shit' if we well and truly want to.
|
|
-
-
Morbii


- Joined on 10-21-2006
- Posts 115
|
Re: Nuns and Regexes Do Not Mix
Is "." what you meant to say?
Anyway, my guess was that your program was the spelling police because "Pandamonium" is not a word.
|
|
-
-
Mithious


- Joined on 03-19-2008
- Posts 2
|
Re: Nuns and Regexes Do Not Mix
Use a different browser, you can't see the image in IE6
|
|
-
-
Nelle


- Joined on 11-08-2007
- graz.at.earth.milkyway.universe
- Posts 186
|
Re: Nuns and Regexes Do Not Mix
I think CorUscaNT would fail too ...
|
|
-
-
bobday


- Joined on 04-04-2005
- Notbugville
- Posts 175
|
Re: Nuns and Regexes Do Not Mix
sucks if you want to be an assassin
|
|
-
-
TDC


- Joined on 02-10-2006
- Posts 133
|
Re: Nuns and Regexes Do Not Mix
bobday: sucks if you want to be an buttbuttin
Indeed.
|
|
-
-
mallard


- Joined on 12-22-2005
- Posts 144
|
Re: Nuns and Regexes Do Not Mix
Judging by the removal of repeated letters (*b*u*t*h*e*a*d*, *c*u*n*y*) it seems that whoever wrote this was expecting the '*' to only match the same letter repeated (so as to match things like daaaaaaaaaaaaaaaaamn), which isn't too much of a WTF if they wern't used to this regex syntax. The fact that they obviously didn't test very well is the real problem (probably only tested to make sure it would match what they wanted, which it does, but forgot to test that it doesn't match what they don't want it to).
|
|
-
-
-
belgariontheking


- Joined on 08-20-2007
- Cincinnati, OH, USA
- Posts 1,146
|
Re: Nuns and Regexes Do Not Mix
rbowes:
Guess the programmer had something against the City University of New York
This user has retired from TDWTF Forums, citing complete incompetence on the part of the moderators. Please continue to spam the addresses below.
PLEASE SPAM: jtobin@ohioinstituteofhealthcareers.edu jtobin@ohiobusinesscollege.edu
|
|
-
-
cconroy


- Joined on 08-18-2005
- NJ, USA
- Posts 349
|
Re: Nuns and Regexes Do Not Mix
And just think, if you had spelled "pandemonium" correctly you never would have found the bug.
What Would Brian Boitano Do?
|
|
-
-
Morbii


- Joined on 10-21-2006
- Posts 115
|
Re: Nuns and Regexes Do Not Mix
Mithious:
Use a different browser, you can't see the image in IE6
Not using IE6, but I guess that's yet another wtf in this thread.
|
|
-
-
medialint


- Joined on 12-17-2007
- San Francisco
- Posts 342
|
Re: Nuns and Regexes Do Not Mix
Mithious:Use a different browser, you can't see the image in IE6
Well what do you know ...
There are three kinds of people: those who make things happen, those who watch things happen and those who wonder what happened.
|
|
-
-
AbbydonKrafts


- Joined on 11-21-2006
- Carrollton, GA, USA
- Posts 1,022
|
Re: Nuns and Regexes Do Not Mix
Mithious:Use a different browser, you can't see the image in IE6
I was thinking about it, and the only thing I could think of is that it might have something to do with the encoding. For instance, I forgot that IE6 doesn't recognize the alpha channel correctly. I created a theme for my blog and only tested it in Opera (I know, I know). It looked great to me. However, when my wife viewed it in IE6 (I don't know why she won't use something else), the areas that were supposed to be transparent on the little icons showed up as black. Months later, I have yet to swap them out for GIFs.
Join us at #TDWTF on irc.slashnet.org !
|
|
-
-
elias


- Joined on 02-05-2008
- Posts 3
|
Re: Nuns and Regexes Do Not Mix
Apparently this is it:

|
|
-
-
belgariontheking


- Joined on 08-20-2007
- Cincinnati, OH, USA
- Posts 1,146
|
Re: Nuns and Regexes Do Not Mix
elias:<absolutely nothing of consequence>
umm ... what were you trying to say when you said nothing there?
This user has retired from TDWTF Forums, citing complete incompetence on the part of the moderators. Please continue to spam the addresses below.
PLEASE SPAM: jtobin@ohioinstituteofhealthcareers.edu jtobin@ohiobusinesscollege.edu
|
|
-
-
elias


- Joined on 02-05-2008
- Posts 3
|
Re: Nuns and Regexes Do Not Mix
I think the problem with the original post is this:
<img src="http://img81.imageshack.us/img81/6797/pandamoniumew6.png" alt="" align="" border="" height="" hspace="" width="" />
Edit: I was posting the image so that it would display in IE.
|
|
-
-
AbbydonKrafts


- Joined on 11-21-2006
- Carrollton, GA, USA
- Posts 1,022
|
Re: Nuns and Regexes Do Not Mix
elias:I think the problem with the original post is this
Oh yeah. That probably did it. Opera, as well as many other browsers, obviously ignore empty attributes, but IE6 interprets that to equal zero. I guess IE7 learned null != 0 != string.Empty
Join us at #TDWTF on irc.slashnet.org !
|
|
-
-
-
elias


- Joined on 02-05-2008
- Posts 3
|
Re: Nuns and Regexes Do Not Mix
AbbydonKrafts:Oh yeah. That probably did it. Opera, as well as many other browsers, obviously ignore empty attributes, but IE6 interprets that to equal zero. I guess IE7 learned null != 0 != string.Empty
I still can't see it on IE7...
|
|
-
-
-
Maciej


- Joined on 07-30-2007
- Posts 29
|
Re: Nuns and Regexes Do Not Mix
Guys, "Pandamonium" is probably a pun on "Panda". This certainly wouldn't be the first time I've seen someone use it for that purpose. Let's not jump to conclusions before accusing people of not knowing how to spell.
|
|
-
-
MasterPlanSoftware


- Joined on 11-10-2006
- Posts 20
|
Re: Nuns and Regexes Do Not Mix
Maciej:"Pandamonium" is probably a pun on "Panda" Thanks Dr. Obvious.
Yes, I have been banned. Thanks to all for a good time.
Tired of incompetent moderation? Wondering where all the clever discussion went? Try irc.slashnet.org #TDWTFMafia. We don't ban or kick and everyone is welcome.*
*Stupid people will be mocked mercilessly and encouraged to commit suicide, however.
|
|
-
-
bstorer


- Joined on 02-01-2007
- Alexandria, VA
- Posts 1,972
|
Re: Nuns and Regexes Do Not Mix
Maciej:Guys, "Pandamonium" is probably a pun on "Panda". This certainly wouldn't be the first time I've seen someone use it for that purpose. Let's not jump to conclusions before accusing people of not knowing how to spell. That word should be spelled A-L-W-A-Y-S.
|
|
-
-
PSWorx


- Joined on 04-28-2006
- Posts 689
|
Re: Nuns and Regexes Do Not Mix
cconroy:And just think, if you had spelled "pandemonium" correctly you never would have found the bug. MasterPlanSoftware: Maciej:"Pandamonium" is probably a pun on "Panda"
Thanks for your contribution, Maciej. But remember to use the quote function next time, so we know what you're talking about.
Fixed that for you.
|
|
-
-
MasterPlanSoftware


- Joined on 11-10-2006
- Posts 20
|
Re: Nuns and Regexes Do Not Mix
PSWorx:Fixed that for you. Actually no. There was no clarification needed. I knew what he was talking about. Pointing out the obvious is not a contribution.
Yes, I have been banned. Thanks to all for a good time.
Tired of incompetent moderation? Wondering where all the clever discussion went? Try irc.slashnet.org #TDWTFMafia. We don't ban or kick and everyone is welcome.*
*Stupid people will be mocked mercilessly and encouraged to commit suicide, however.
|
|
-
-
cconroy


- Joined on 08-18-2005
- NJ, USA
- Posts 349
|
Re: Nuns and Regexes Do Not Mix
bstorer: Maciej:Guys, "Pandamonium" is probably a pun on "Panda". This certainly wouldn't be the first time I've seen someone use it for that purpose. Let's not jump to conclusions before accusing people of not knowing how to spell. That word should be spelled A-L-W-A-Y-S. As in, people ALWAYS spell words correctly on the internet? Seriously, "panda"monium? Oh, I'm busting a gut over tha | | |
|