Well, Plone NYC user group meetings are always an interesting and fun time where smart people get together and are generally depressed that we are Web 4.0 or whatever while everyone else lags behind. However there are a couple of occasions where we end up having what seems to be retarded fun, you know; Doing shit that seems smart to us but seems fucking futile to everyone else until they realize we just made their language 5x faster or something. Finally a fucking challenge. This is one of those occasions where the goal is to pit the Perl regular expression engine against Python's. Calm down.. calm down I know what you are thinking.
The rules are this, me, Christopher Warner (python, yeeeeeeeaaaah) vs. Milosz Tanski (perl, booooooooo) 5 regular expressions a piece. We'll use a laptop, the language and version have to be used for the total of the 5 regexes so one cannot use Python 2.4 and then switch to Python 3k. It's either Python 3k all the way or 2.4, 2.5, 2.6 2.7 same for Perl. We'll run each regex a couple of times to get it cached and primed for the 1,000 iteration run. We'll use the standard time utility to time each regular expression. The goal is to get your opponent basically stuck at a higher time; the highest time LOSES we aren't doing avg's here. So you get 5 chances to force your opponent to a higher time. Each regex is run to 1,000 iterations; can python beat perl? Obviously i'm the underdog because lets face it Perl has a more mature regular expression engine and is simply more expressive a language. That doesn't matter to me though because at the end of the day we are talking about speed and not expressiveness. Contestants cannot talk to Python core developers or Perl core developers and no patches can be used or submitted to Python/Perl core for use in any version in order to win. None of our respective companies can sponsor this so New York Media is wholly uninvolved. Meaning I can't be at work trying to figure out the ultimate slow down regex for Perl.
The winner receives dinner on the other persons tab. Should I win (which is highly likely because I don't like losing) my dinner will be a steak, medium well with a glass of soy-milk (maybe french fries with this mayo/mustard mix and ketchup for condiment). I will probably eat it in slow motion and take pictures with an attractive female not wearing a bra for added affect. Also if i win I will probably declare Perl DEAD as a language for good. Meaning that PERL IS DEAD to me; or at least until Perl 6 comes out, like.. you know... sometime in the 21st century. Remember I said all of this.
If I lose, I will buy dinner and force myself to write something in Perl 6 and declare Perl OO to be modestly decent. That last bit will be a blatant lie but I will do it and go on record saying it not under duress or any sort of immediate threat to my life. Remember I said all of this.
This is a statement to competition; if you want to help me or provide suggestions feel free. We are all already aware this is totally random and subjective so please don't provide arguments as to why this maybe a dumb fucking idea and we should be concentrating on doc or something.. Thanks; that said, Python for the motherfucking win!
Python VS. Perl Regular expression engines
Well, Plone NYC user group meetings are always an interesting and fun time where smart people get together and are generally depressed that we are Web 4.0 or whatever while everyone else lags behind. However there are a couple of occasions where we end up having what seems to be retarded fun, you know; Doing shit that seems smart to us but seems fucking futile to everyone else until they realize we just made their language 5x faster or something. Finally a fucking challenge. This is one of those occasions where the goal is to pit the Perl regular expression engine against Python's. Calm down.. calm down I know what you are thinking.
The rules are this, me, Christopher Warner (python, yeeeeeeeaaaah) vs. Milosz Tanski (perl, booooooooo) 5 regular expressions a piece. We'll use a laptop, the language and version have to be used for the total of the 5 regexes so one cannot use Python 2.4 and then switch to Python 3k. It's either Python 3k all the way or 2.4, 2.5, 2.6 2.7 same for Perl. We'll run each regex a couple of times to get it cached and primed for the 1,000 iteration run. We'll use the standard time utility to time each regular expression. The goal is to get your opponent basically stuck at a higher time; the highest time LOSES we aren't doing avg's here. So you get 5 chances to force your opponent to a higher time. Each regex is run to 1,000 iterations; can python beat perl? Obviously i'm the underdog because lets face it Perl has a more mature regular expression engine and is simply more expressive a language. That doesn't matter to me though because at the end of the day we are talking about speed and not expressiveness. Contestants cannot talk to Python core developers or Perl core developers and no patches can be used or submitted to Python/Perl core for use in any version in order to win. None of our respective companies can sponsor this so New York Media is wholly uninvolved. Meaning I can't be at work trying to figure out the ultimate slow down regex for Perl.
The winner receives dinner on the other persons tab. Should I win (which is highly likely because I don't like losing) my dinner will be a steak, medium well with a glass of soy-milk (maybe french fries with this mayo/mustard mix and ketchup for condiment). I will probably eat it in slow motion and take pictures with an attractive female not wearing a bra for added affect. Also if i win I will probably declare Perl DEAD as a language for good. Meaning that PERL IS DEAD to me; or at least until Perl 6 comes out, like.. you know... sometime in the 21st century. Remember I said all of this.
If I lose, I will buy dinner and force myself to write something in Perl 6 and declare Perl OO to be modestly decent. That last bit will be a blatant lie but I will do it and go on record saying it not under duress or any sort of immediate threat to my life. Remember I said all of this.
This is a statement to competition; if you want to help me or provide suggestions feel free. We are all already aware this is totally random and subjective so please don't provide arguments as to why this maybe a dumb fucking idea and we should be concentrating on doc or something.. Thanks; that said, Python for the motherfucking win!
Related Posts:
About Christopher Warner
No description. Please complete your profile.