<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>transfixed but not dead! &#187; python</title>
	<atom:link href="http://transfixedbutnotdead.com/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://transfixedbutnotdead.com</link>
	<description>my ramblings on life, work &#38; anything left in-between</description>
	<lastBuildDate>Fri, 03 Feb 2012 16:03:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='transfixedbutnotdead.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/0a317653027efb1ab2bf8adde3dcb067?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>transfixed but not dead! &#187; python</title>
		<link>http://transfixedbutnotdead.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://transfixedbutnotdead.com/osd.xml" title="transfixed but not dead!" />
	<atom:link rel='hub' href='http://transfixedbutnotdead.com/?pushpress=hub'/>
		<item>
		<title>Famous Perl programmers</title>
		<link>http://transfixedbutnotdead.com/2010/04/29/famous-perl-programmers/</link>
		<comments>http://transfixedbutnotdead.com/2010/04/29/famous-perl-programmers/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 13:53:00 +0000</pubDate>
		<dc:creator>draegtun</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://transfixedbutnotdead.com/?p=937</guid>
		<description><![CDATA[subtitle: That you probably didn&#8217;t know were (Perl programmers) My definition of famous: They have a Wikipedia entry Ward Cunningham Early pioneer of Extreme Programming and inventor of the Wiki (both the name and the implementation, which was and still is in Perl) Dan Bricklin Co-inventor of the first PC spreadsheet program (VisiCalc) and creator [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&amp;blog=351142&amp;post=937&amp;subd=draegtun&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong><em>subtitle</em>:  That you probably didn&#8217;t know were (Perl programmers)</strong></p>
<p><em>My definition of famous: </em> They have a Wikipedia entry <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<ul>
<li>
<p><a href="http://en.wikipedia.org/wiki/Ward_Cunningham">Ward Cunningham </a></p>
<p>Early pioneer of Extreme Programming and inventor of the Wiki (both the <a href="http://en.wikipedia.org/wiki/Wiki">name</a> and the <a href="http://en.wikipedia.org/wiki/WikiWikiWeb">implementation</a>, which was and still is in Perl)</li>
<li>
<p><a href="http://en.wikipedia.org/wiki/Dan_Bricklin">Dan Bricklin</a></p>
<p>Co-inventor of the first PC spreadsheet program (VisiCalc) and creator of <a href="http://en.wikipedia.org/wiki/WikiCalc">wikiCalc</a>, an online spreadsheet written in Perl (though I believe Bricklin has written a Javascript version as well).
</li>
<li>
<p><a href="http://en.wikipedia.org/wiki/John_Graham-Cumming">John Graham-Cumming</a></p>
<p>Inventor of <a href="http://en.wikipedia.org/wiki/POPFile">POPFile</a>, a pioneering bayesian spam filtering program <a href="http://getpopfile.org/docs/faq:whyperl">written in Perl</a>
</li>
<p>Its amazing what one can find out by listening to tech podcasts!  (more on this in a future blog post).</p>
<p>Lets wrap up with two more famous programmers you probably have heard of but perhaps didn&#8217;t know that they did (and possible occasionally still do!) use Perl:</p>
<ul>
<li>
<p><a href="http://en.wikipedia.org/wiki/John_Resig">John Resig</a></p>
<p>Creator in chief of <a href="http://en.wikipedia.org/wiki/JQuery">jQuery</a>, Javascript programmer and <a href="http://search.cpan.org/~jeresig/">JERESIG</a> on CPAN</p>
<li>
<p><a href="http://en.wikipedia.org/wiki/Cal_Henderson">Cal Henderson</a></p>
<p>Was the driving force behind Flickr, PHP Programmer and  <a href="http://search.cpan.org/~iamcal/">IAMCAL</a> on CPAN.
</li>
</ul>
<p>Been meaning to namedrop Cal Henderson because it provides me with the opportunity to point you to his brilliant tongue in cheek DjangoCon 2008 Keynote &#8220;Why I Hate Django&#8221; <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   </p>
<p>Embedded YouTube video follows (also here is the <a href="http://www.youtube.com/watch?v=i6Fr65PFqfk">link</a>)</p>
<span style="text-align:center; display: block;"><a href="http://transfixedbutnotdead.com/2010/04/29/famous-perl-programmers/"><img src="http://img.youtube.com/vi/i6Fr65PFqfk/2.jpg" alt="" /></a></span>
<p>Hats off to the Pythonista&#8217;s for showing excellent sense of humour with the keynotes wonderful mickey taking!</p>
<p>/I3az/</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/draegtun.wordpress.com/937/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/draegtun.wordpress.com/937/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/draegtun.wordpress.com/937/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/draegtun.wordpress.com/937/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/draegtun.wordpress.com/937/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/draegtun.wordpress.com/937/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/draegtun.wordpress.com/937/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/draegtun.wordpress.com/937/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/draegtun.wordpress.com/937/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/draegtun.wordpress.com/937/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/draegtun.wordpress.com/937/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/draegtun.wordpress.com/937/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/draegtun.wordpress.com/937/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/draegtun.wordpress.com/937/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&amp;blog=351142&amp;post=937&amp;subd=draegtun&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://transfixedbutnotdead.com/2010/04/29/famous-perl-programmers/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/29cb106071d163d703484e63839d89cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">draegtun</media:title>
		</media:content>
	</item>
		<item>
		<title>Between thought and expression</title>
		<link>http://transfixedbutnotdead.com/2009/11/21/between-thought-and-expression/</link>
		<comments>http://transfixedbutnotdead.com/2009/11/21/between-thought-and-expression/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 10:38:42 +0000</pubDate>
		<dc:creator>draegtun</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[clojure]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://transfixedbutnotdead.com/?p=690</guid>
		<description><![CDATA[Comparing computer languages can usually be interesting, sometimes informative, often amusing and in lots of cases just damn annoying! Still this recent Hacker News post about Python vs Clojure did catch my eye. Despite the fact the author of the blog post had pulled the Python code from answers to Project Euler the pythonista&#8217;s quite [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&amp;blog=351142&amp;post=690&amp;subd=draegtun&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Comparing computer languages can usually be interesting, sometimes informative, often amusing and in lots of cases just damn annoying!</p>
<p>Still this recent <a href="http://news.ycombinator.com/item?id=881642">Hacker News post</a> about <a href="http://www.bestinclass.dk/index.php/2009/10/python-vs-clojure-evolving/">Python vs Clojure</a> did catch my eye</a>.</p>
<p>Despite the fact the author of the blog post had pulled the Python code from <a href="http://pyeuler.wikidot.com/problems-1-10">answers</a> to <a href="http://projecteuler.net">Project Euler</a> the pythonista&#8217;s quite correctly cried foul because it wasn&#8217;t well written idiomatic python example and so was an unfair comparison.</p>
<p>There&#8217;s a lot of code out there posted on those intertubes over the years.  However languages and practises evolve but unfortunately intertube posts can remain set in stone!  Perl is often weighed down by its past history on the intertubes.  One good way forward is just to produce more Modern Perl posts.</p>
<p>Anyway i digress, so moving on lets take a look at the <a href="http://projecteuler.net/index.php?section=problems&amp;id=4">Euler 4 &#8211; Finding Palindroms</a>.  This was the Clojure example that was put forward in the blog post:</p>
<p><pre class="brush: plain;">
(reduce max
    (filter #(let [s (str %)]
               (= (seq s) (reverse s)))
            (for [x (range 100 1000)
                  y (range 100 1000)]
              (* x y))))
</pre></p>
<p>Now in reply to this a <a href="http://blog.hackers-cafe.net/2009/10/re-python-vs-clojure.html">much more idiomatic python example</a> was provided:</p>
<p><pre class="brush: python;">
print max(s for s in (x * y 
    for x in range(111, 1000) 
    for y in range(x, 1000))
    if list(str(s)) == list(reversed(str(s))))
</pre></p>
<p>This uses Python&#8217;s list comprehension.  Definitely a very powerful construct.  However i do find i get lost very quickly when trying to follow long nested comprehension&#8217;s <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>In this same Python post there is also mention of a <a href="http://twitter.com/yukihiro_matz/status/4901341641">twitter post</a> by <a href="http://en.wikipedia.org/wiki/Yukihiro_Matsumoto">Yukihiro Matz</a>, the creator of Ruby.   Matz provided the following Ruby example:</p>
<p><pre class="brush: ruby;">
p [*100..1000].product([*100..1000]).map{|x,y| x*y}.select{|s|s=s.to_s; s==s.reverse}.max
</pre></p>
<p>Despite being formatted for twitter (ie. one line) i found it easy to follow through the logic.</p>
<p>Ruby &amp; Python are not the only languages that can produce an elegant solution!  So not to be out done here is a Perl example.  In fact its the exact same code repeated three times but formatted differently: </p>
<p><pre class="brush: perl;">
use Modern::Perl;
use List::Util q(max);

# twitter one liner
say max grep { $_ eq reverse $_ } map { my $x = $_; map { $x * $_ } 100..1000 } 100..1000;


# again in lispy style format
say 
  max 
    grep { $_ eq reverse $_ } 
      map {
        my $x = $_;
        map { $x * $_ } 100..1000;
      } 100..1000;

# and finally in my preferred more perlish alignment
say max 
    grep { $_ eq reverse $_ } 
    map {
        my $x = $_;
        map { $x * $_ } 100..1000;
    } 100..1000;
</pre></p>
<p>The perl code speaks for itself.. its wonderfully clear and succinct.  Also its fast, each version runs in under a second on my machine!</p>
<p>/I3az/</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/draegtun.wordpress.com/690/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/draegtun.wordpress.com/690/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/draegtun.wordpress.com/690/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/draegtun.wordpress.com/690/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/draegtun.wordpress.com/690/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/draegtun.wordpress.com/690/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/draegtun.wordpress.com/690/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/draegtun.wordpress.com/690/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/draegtun.wordpress.com/690/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/draegtun.wordpress.com/690/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/draegtun.wordpress.com/690/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/draegtun.wordpress.com/690/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/draegtun.wordpress.com/690/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/draegtun.wordpress.com/690/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&amp;blog=351142&amp;post=690&amp;subd=draegtun&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://transfixedbutnotdead.com/2009/11/21/between-thought-and-expression/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/29cb106071d163d703484e63839d89cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">draegtun</media:title>
		</media:content>
	</item>
		<item>
		<title>Freshmeat Perl figures rebuttal.</title>
		<link>http://transfixedbutnotdead.com/2009/01/07/freshmeat-perl-figures-rebuttal/</link>
		<comments>http://transfixedbutnotdead.com/2009/01/07/freshmeat-perl-figures-rebuttal/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 14:32:39 +0000</pubDate>
		<dc:creator>draegtun</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[freshmeat]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://draegtun.wordpress.com/?p=136</guid>
		<description><![CDATA[I&#8217;ve been in a &#8220;discussion&#8221; with David N. Welton blog post about Freshmeat figures. Unfortunately the blogs comments have now been turned off ;-( The wider Perl community also stumbled across this &#8220;discussion&#8221;. Perhaps the positive outcome of this will be more seamless updating mechanism from CPAN to services like Freshmeat? http://use.perl.org/~TeeJay/journal/38175 http://use.perl.org/~chromatic/journal/38168 This is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&amp;blog=351142&amp;post=136&amp;subd=draegtun&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been in a &#8220;discussion&#8221; with <a href="http://journal.dedasys.com/2008/12/07/python-surpasses-perl">David N. Welton blog post</a> about Freshmeat figures.</p>
<p>Unfortunately the blogs comments have now been turned off ;-(</p>
<p>The wider Perl community also stumbled across this &#8220;discussion&#8221;.  Perhaps the positive outcome of this will be more seamless updating mechanism from CPAN to services like Freshmeat?</p>
<ul>
<li><a href="http://use.perl.org/~TeeJay/journal/38175">http://use.perl.org/~TeeJay/journal/38175</a>
<li><a href="http://use.perl.org/~chromatic/journal/38168">http://use.perl.org/~chromatic/journal/38168</a>
</ul>
<p>This is what would have been my last reply on that blog post&#8230;.</p>
<blockquote><p>
@david.</p>
<p>I&#8217;m not sure why you think this should &#8220;upset me&#8221;?  My &#8220;beef&#8221; as always been with u miss using/representing the Freshmeat data.  The same would apply to other programming languages as well its just that the Perl one stands out like a sore thumb <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>U still haven&#8217;t accepted that its incorrect to use Freshmeat data out of context.  Because its a Nonprobability sample then statements like &#8220;why would it be different to Python, Lua or *&#8221; just don&#8217;t hold water I&#8217;m afraid.</p>
<p>I&#8217;ll give u a question which may help u understand what is happening&#8230;.  &#8220;when did Perl &#8216;start to coast&#8217; on Freshmeat?&#8221;.</p>
<p>Your analysis has been limited to just 2007 &amp; 2008 data so your &#8220;assumption&#8221; is that its just happened.    Have a look on archive.org and you see the figures for Perl haven&#8217;t changed much on Freshmeat for many years! (Perl currently shows 3808&#8230;  back in Apr 2006 it was 3619&#8230; thats just a 5% increase).</p>
<p>CPAN on the other hand shows 14923 as at today &amp; 9813 back in Apr 2006. Thats a 52% increase.   </p>
<p>So why isn&#8217;t Freshmeat showing that?   I&#8217;m not going to make assumptions to why this is so but it does clearly demonstrate that Freshmeat Perl figures are no longer representative of what goes on in Perl world.</p>
<p>/I3az/
</p></blockquote>
<p>Update: </p>
<ul>
<li>I&#8217;ve corrected David&#8217;s name.  I apologise most sincerely for misspelling his surname and using wrong middle initial.   <a href="http://journal.dedasys.com/2009/01/08/angry-perl-users">ref</a>
<li>And I also apologise to <a href="http://isbndb.com/d/book/developing_management_skills_a13.html">David A Whetton</a> whose name I mistakenly used.  Fortunately I&#8217;ve yet to see an &#8220;Angry Perl Users&#8221;  reply from Mr Whett[o|e]n <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/draegtun.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/draegtun.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/draegtun.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/draegtun.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/draegtun.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/draegtun.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/draegtun.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/draegtun.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/draegtun.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/draegtun.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/draegtun.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/draegtun.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/draegtun.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/draegtun.wordpress.com/136/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=transfixedbutnotdead.com&amp;blog=351142&amp;post=136&amp;subd=draegtun&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://transfixedbutnotdead.com/2009/01/07/freshmeat-perl-figures-rebuttal/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/29cb106071d163d703484e63839d89cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">draegtun</media:title>
		</media:content>
	</item>
	</channel>
</rss>
