<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for tadhg.com</title>
	<atom:link href="http://tadhg.com/wp/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://tadhg.com/wp</link>
	<description>Wherein some things Tadhg are discussed</description>
	<lastBuildDate>Wed, 10 Mar 2010 02:28:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Pensecola Christian College Regulations by Melissa</title>
		<link>http://tadhg.com/wp/2009/04/27/pensecola-christian-college-regulations/comment-page-1/#comment-20328</link>
		<dc:creator>Melissa</dc:creator>
		<pubDate>Wed, 10 Mar 2010 02:28:40 +0000</pubDate>
		<guid isPermaLink="false">http://tadhg.com/wp/?p=1627#comment-20328</guid>
		<description>*cellphones</description>
		<content:encoded><![CDATA[<p>*cellphones</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Pensecola Christian College Regulations by Melissa</title>
		<link>http://tadhg.com/wp/2009/04/27/pensecola-christian-college-regulations/comment-page-1/#comment-20327</link>
		<dc:creator>Melissa</dc:creator>
		<pubDate>Wed, 10 Mar 2010 02:28:12 +0000</pubDate>
		<guid isPermaLink="false">http://tadhg.com/wp/?p=1627#comment-20327</guid>
		<description>I have a question. What rules apply to married students? I am not enrolled there yet. I heard that you are allowed phones on campus. My cousin goes there and she said that you can use your cellphones during certain parts of the day.</description>
		<content:encoded><![CDATA[<p>I have a question. What rules apply to married students? I am not enrolled there yet. I heard that you are allowed phones on campus. My cousin goes there and she said that you can use your cellphones during certain parts of the day.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on First Post With Vim by Seth Milliken</title>
		<link>http://tadhg.com/wp/2010/02/14/first-post-with-vim/comment-page-1/#comment-20321</link>
		<dc:creator>Seth Milliken</dc:creator>
		<pubDate>Tue, 09 Mar 2010 21:24:17 +0000</pubDate>
		<guid isPermaLink="false">http://tadhg.com/wp/?p=2682#comment-20321</guid>
		<description>First comment! With vim via vimperator. I know you&#039;ve been into Chrome lately, but FireFox + vimperator + Ctrl-I in a form field to give you a vim buffer to edit its contents is pretty nice.</description>
		<content:encoded><![CDATA[<p>First comment! With vim via vimperator. I know you&#8217;ve been into Chrome lately, but FireFox + vimperator + Ctrl-I in a form field to give you a vim buffer to edit its contents is pretty nice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on “Let’s Enhance” by Graham</title>
		<link>http://tadhg.com/wp/2010/03/07/lets-enhance/comment-page-1/#comment-20284</link>
		<dc:creator>Graham</dc:creator>
		<pubDate>Mon, 08 Mar 2010 20:58:31 +0000</pubDate>
		<guid isPermaLink="false">http://tadhg.com/wp/?p=2738#comment-20284</guid>
		<description>You&#039;re absolutely right, Tadhg.

Steve, what you&#039;re saying about calling in help from neighbouring frames is theoretically quite interesting - indeed it&#039;s very similar to how mpeg compression works - and Kev it&#039;s true that sometimes the characters are using technology from the future. But frequently what we&#039;re watching is meant to be contemporary and that&#039;s the problem. 

The fuckers seize upon one frame and immediately leap into this fantasy world in which benign rows of differently coloured dots have magical properties. No, they are not just rows! Behind each row is another row and then another - and if you pivot left or right there are countless more rows. That&#039;s really the most charitable explanation for the ridiculous visual revelations that occur...

It&#039;s not just that it&#039;s impossible in real life. It&#039;s that everyone knows it&#039;s impossible by now. Maybe twenty years ago a scene like this, served up to us once, wouldn&#039;t have been a problem for our mass suspension of disbelief. But nowadays, so many of us deal directly in the currency of megapixels and image enhancement. A shocking number of us know it&#039;s bullshit. Yet they are still incorporating these moments into cheap drama. 

What really galls me is that it&#039;s not even being done out of necessity or practicality - the familiar moment is being written into telescripts and screenplays because writers think it makes for a dramatic moment!

There a lot of things you can say about it but I think Tadhg describes it best as &quot;lazy writing&quot;.</description>
		<content:encoded><![CDATA[<p>You&#8217;re absolutely right, Tadhg.</p>
<p>Steve, what you&#8217;re saying about calling in help from neighbouring frames is theoretically quite interesting &#8211; indeed it&#8217;s very similar to how mpeg compression works &#8211; and Kev it&#8217;s true that sometimes the characters are using technology from the future. But frequently what we&#8217;re watching is meant to be contemporary and that&#8217;s the problem. </p>
<p>The fuckers seize upon one frame and immediately leap into this fantasy world in which benign rows of differently coloured dots have magical properties. No, they are not just rows! Behind each row is another row and then another &#8211; and if you pivot left or right there are countless more rows. That&#8217;s really the most charitable explanation for the ridiculous visual revelations that occur&#8230;</p>
<p>It&#8217;s not just that it&#8217;s impossible in real life. It&#8217;s that everyone knows it&#8217;s impossible by now. Maybe twenty years ago a scene like this, served up to us once, wouldn&#8217;t have been a problem for our mass suspension of disbelief. But nowadays, so many of us deal directly in the currency of megapixels and image enhancement. A shocking number of us know it&#8217;s bullshit. Yet they are still incorporating these moments into cheap drama. </p>
<p>What really galls me is that it&#8217;s not even being done out of necessity or practicality &#8211; the familiar moment is being written into telescripts and screenplays because writers think it makes for a dramatic moment!</p>
<p>There a lot of things you can say about it but I think Tadhg describes it best as &#8220;lazy writing&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Future of Tabletop Games? D&amp;D on the Microsoft Surface by Kevin Teljeur</title>
		<link>http://tadhg.com/wp/2010/02/26/the-future-of-tabletop-games-dd-on-the-microsoft-surface/comment-page-1/#comment-20265</link>
		<dc:creator>Kevin Teljeur</dc:creator>
		<pubDate>Mon, 08 Mar 2010 11:15:44 +0000</pubDate>
		<guid isPermaLink="false">http://tadhg.com/wp/?p=2717#comment-20265</guid>
		<description>That&#039;s just reminded me of something; one of the two issues of &#039;Stardate&#039; (Star Trek-orientated role-playing games magazine) which sits in my recycling bin had an article which has always stuck in my mind, about the &#039;Parrot on the shoulder&#039; situation; where the captain asks the other player something, the player asks the games master, the games master responds to the player, the player tells the captain, and so on. It could get tedious and particularly in Star Trek. However, they suggested a &#039;cue card/information card&#039; approach, where the games master tells the player a response number, or hands a card with the response to the player, and the player can make of it what they will.

I&#039;ve always thought that this would be great in all sorts of situations, particularly with hidden knowledge, or generally in games for information. Image that with, say, iPads (Or any similar &#039;pad/slate&#039; device)? The information could be updated continuously throughout the game,but without interfering with the actual playing experience. I think the technology is there, similar to the Surface table, but for a more intimate role-playing experience.</description>
		<content:encoded><![CDATA[<p>That&#8217;s just reminded me of something; one of the two issues of &#8216;Stardate&#8217; (Star Trek-orientated role-playing games magazine) which sits in my recycling bin had an article which has always stuck in my mind, about the &#8216;Parrot on the shoulder&#8217; situation; where the captain asks the other player something, the player asks the games master, the games master responds to the player, the player tells the captain, and so on. It could get tedious and particularly in Star Trek. However, they suggested a &#8216;cue card/information card&#8217; approach, where the games master tells the player a response number, or hands a card with the response to the player, and the player can make of it what they will.</p>
<p>I&#8217;ve always thought that this would be great in all sorts of situations, particularly with hidden knowledge, or generally in games for information. Image that with, say, iPads (Or any similar &#8216;pad/slate&#8217; device)? The information could be updated continuously throughout the game,but without interfering with the actual playing experience. I think the technology is there, similar to the Surface table, but for a more intimate role-playing experience.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on “Let’s Enhance” by Kevin Teljeur</title>
		<link>http://tadhg.com/wp/2010/03/07/lets-enhance/comment-page-1/#comment-20263</link>
		<dc:creator>Kevin Teljeur</dc:creator>
		<pubDate>Mon, 08 Mar 2010 11:04:14 +0000</pubDate>
		<guid isPermaLink="false">http://tadhg.com/wp/?p=2738#comment-20263</guid>
		<description>That &#039;Clients From hell&#039; site is amusing. I&#039;ve heard so much of it myself. And sometimes, just sometimes, I&#039;ve delivered (the trick is to humour the ask, gently lower the expectations to below what you can deliver, and then surpass the new, lowered expectation. Professional design is about 10% actual design, and 90% dealing with the client.).

I thought about this image enhancement thing too, having been a graphic designer and Photoshop specialist in the past, and of course every time I see this happen in a series or movie I shout at the TV, because I know that you can&#039;t get out more than you put in. You can, by and large, only cleverly remove stuff.

But the Bladerunner scene you&#039;re referring to is different, because the technology is extrapolating unseen images from reflected light, etc - in other words, it&#039;s suggesting that there are ways to build what&#039;s in the image into something more. I actually like the idea very much, and I&#039;m sure it will be possibly in the future; it&#039;s at least creative and not very overblown. Similarly, Star Trek and Battlestar Galactica... Well, in the first, anything goes, and the latter, I seem to remember that it was still more believable than an average episode of CSI, especially considering that they&#039;re battling clones and robots and jumping between star systems. CSI really takes the biscuit but we all know that. I&#039;ve always wondered what people in forensics and medical professionals think of that.</description>
		<content:encoded><![CDATA[<p>That &#8216;Clients From hell&#8217; site is amusing. I&#8217;ve heard so much of it myself. And sometimes, just sometimes, I&#8217;ve delivered (the trick is to humour the ask, gently lower the expectations to below what you can deliver, and then surpass the new, lowered expectation. Professional design is about 10% actual design, and 90% dealing with the client.).</p>
<p>I thought about this image enhancement thing too, having been a graphic designer and Photoshop specialist in the past, and of course every time I see this happen in a series or movie I shout at the TV, because I know that you can&#8217;t get out more than you put in. You can, by and large, only cleverly remove stuff.</p>
<p>But the Bladerunner scene you&#8217;re referring to is different, because the technology is extrapolating unseen images from reflected light, etc &#8211; in other words, it&#8217;s suggesting that there are ways to build what&#8217;s in the image into something more. I actually like the idea very much, and I&#8217;m sure it will be possibly in the future; it&#8217;s at least creative and not very overblown. Similarly, Star Trek and Battlestar Galactica&#8230; Well, in the first, anything goes, and the latter, I seem to remember that it was still more believable than an average episode of CSI, especially considering that they&#8217;re battling clones and robots and jumping between star systems. CSI really takes the biscuit but we all know that. I&#8217;ve always wondered what people in forensics and medical professionals think of that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on “Let’s Enhance” by Steve Casey</title>
		<link>http://tadhg.com/wp/2010/03/07/lets-enhance/comment-page-1/#comment-20261</link>
		<dc:creator>Steve Casey</dc:creator>
		<pubDate>Mon, 08 Mar 2010 10:17:08 +0000</pubDate>
		<guid isPermaLink="false">http://tadhg.com/wp/?p=2738#comment-20261</guid>
		<description>In principle you&#039;re right - you can&#039;t get more info out than was put in.  However, almost every example does talk about enhancing a still from video footage.  Now that&#039;s not so far fetched.  A still only represents 1/25th (ish) of the information per second on-screen.  You, in theory, could take the other 24 frames and work on mining information from them to contribute to the still image.

It&#039;s probably not in the scope of today&#039;s technology, though look what amateurs can do by combining multiple images/video to create celestial photography from smaller scopes.

On the other hand, the Blade Runner one was outlandish, though sci-fi gets a free pass on IMHO.</description>
		<content:encoded><![CDATA[<p>In principle you&#8217;re right &#8211; you can&#8217;t get more info out than was put in.  However, almost every example does talk about enhancing a still from video footage.  Now that&#8217;s not so far fetched.  A still only represents 1/25th (ish) of the information per second on-screen.  You, in theory, could take the other 24 frames and work on mining information from them to contribute to the still image.</p>
<p>It&#8217;s probably not in the scope of today&#8217;s technology, though look what amateurs can do by combining multiple images/video to create celestial photography from smaller scopes.</p>
<p>On the other hand, the Blade Runner one was outlandish, though sci-fi gets a free pass on IMHO.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Vim: the Killer Instinct of Text Editors by Tadhg</title>
		<link>http://tadhg.com/wp/2010/03/04/vim-the-killer-instinct-of-text-editors/comment-page-1/#comment-20114</link>
		<dc:creator>Tadhg</dc:creator>
		<pubDate>Fri, 05 Mar 2010 09:32:14 +0000</pubDate>
		<guid isPermaLink="false">http://tadhg.com/wp/?p=2731#comment-20114</guid>
		<description>Barak: “start writing plugins”? I mentioned that my adoption path was different from most people’s—more or less the first thing I did was write plugins. I wrote plugins before ever using Vim as a daily editor; the same goes for color schemes and other personalization stuff. I also wrote my own syntax file for reStructuredText, because I didn&#039;t like the one that was out there.

I use BufExplorer most, and a bunch of Python editing aids, probably followed by sessionman.vim, and then NERDTree and snipMate to a significantly lesser extent. Oh, and Bclose.

I kind of always knew I&#039;d move to Vim eventually. I just needed the time to devote to switching over, really. (Although if I&#039;d moved before I wrote all my jEdit macros, the switch to Vim would have been significantly easier...).</description>
		<content:encoded><![CDATA[<p>Barak: “start writing plugins”? I mentioned that my adoption path was different from most people’s—more or less the first thing I did was write plugins. I wrote plugins before ever using Vim as a daily editor; the same goes for color schemes and other personalization stuff. I also wrote my own syntax file for reStructuredText, because I didn&#8217;t like the one that was out there.</p>
<p>I use BufExplorer most, and a bunch of Python editing aids, probably followed by sessionman.vim, and then NERDTree and snipMate to a significantly lesser extent. Oh, and Bclose.</p>
<p>I kind of always knew I&#8217;d move to Vim eventually. I just needed the time to devote to switching over, really. (Although if I&#8217;d moved before I wrote all my jEdit macros, the switch to Vim would have been significantly easier&#8230;).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Vim: the Killer Instinct of Text Editors by Barak</title>
		<link>http://tadhg.com/wp/2010/03/04/vim-the-killer-instinct-of-text-editors/comment-page-1/#comment-20110</link>
		<dc:creator>Barak</dc:creator>
		<pubDate>Fri, 05 Mar 2010 09:23:39 +0000</pubDate>
		<guid isPermaLink="false">http://tadhg.com/wp/?p=2731#comment-20110</guid>
		<description>I&#039;m glad you&#039;ve come to the correct editor :) I seem to recall evangelizing Vim previously...

Now when you start writing vimscripts and personal colorschemes and so on, post more, because the best tools come of necessity.

Now get into plugins; I personally use TabBar, vcscommand and all the cscope bindings day-to-day.

Welcome to the brotherhood. 
:wq</description>
		<content:encoded><![CDATA[<p>I&#8217;m glad you&#8217;ve come to the correct editor :) I seem to recall evangelizing Vim previously&#8230;</p>
<p>Now when you start writing vimscripts and personal colorschemes and so on, post more, because the best tools come of necessity.</p>
<p>Now get into plugins; I personally use TabBar, vcscommand and all the cscope bindings day-to-day.</p>
<p>Welcome to the brotherhood.<br />
:wq</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Nethack in all its Glory by Niall O'Higgins</title>
		<link>http://tadhg.com/wp/2010/03/02/nethack-in-all-its-glory/comment-page-1/#comment-20045</link>
		<dc:creator>Niall O'Higgins</dc:creator>
		<pubDate>Thu, 04 Mar 2010 04:31:46 +0000</pubDate>
		<guid isPermaLink="false">http://tadhg.com/wp/?p=2728#comment-20045</guid>
		<description>While Roguelikes such as Nethack, and the Angband variants [ http://www.thangorodrim.net/ ] have an impressive number of devotees after all these years, what I found truly amazing is the fanatical development of Dwarf Fortress [http://en.wikipedia.org/wiki/Dwarf_Fortress].

The Wikipedia article doesn&#039;t quite do it justice, something like this: http://afteractionreporter.com/2009/03/13/why-play-dwarf-fortress-heres-why/ does</description>
		<content:encoded><![CDATA[<p>While Roguelikes such as Nethack, and the Angband variants [ <a href="http://www.thangorodrim.net/" rel="nofollow">http://www.thangorodrim.net/</a> ] have an impressive number of devotees after all these years, what I found truly amazing is the fanatical development of Dwarf Fortress [http://en.wikipedia.org/wiki/Dwarf_Fortress].</p>
<p>The Wikipedia article doesn&#8217;t quite do it justice, something like this: <a href="http://afteractionreporter.com/2009/03/13/why-play-dwarf-fortress-heres-why/" rel="nofollow">http://afteractionreporter.com/2009/03/13/why-play-dwarf-fortress-heres-why/</a> does</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Nethack in all its Glory by Tadhg</title>
		<link>http://tadhg.com/wp/2010/03/02/nethack-in-all-its-glory/comment-page-1/#comment-20034</link>
		<dc:creator>Tadhg</dc:creator>
		<pubDate>Wed, 03 Mar 2010 18:58:38 +0000</pubDate>
		<guid isPermaLink="false">http://tadhg.com/wp/?p=2728#comment-20034</guid>
		<description>I was thinking about the &lt;cite&gt;Nethack&lt;/cite&gt;/vi comparison, as I recently switched to Vim, when I wrote the post—I already had a post in mind comparing Vim to games, but it’s about Vim as the text editor equivalent of &lt;a href=&quot;http://en.wikipedia.org/wiki/Killer_Instinct#Gameplay&quot; rel=&quot;nofollow&quot;&gt;&lt;cite&gt;Killer Instinct&lt;/cite&gt;&lt;/a&gt;...</description>
		<content:encoded><![CDATA[<p>I was thinking about the <cite>Nethack</cite>/vi comparison, as I recently switched to Vim, when I wrote the post—I already had a post in mind comparing Vim to games, but it’s about Vim as the text editor equivalent of <a href="http://en.wikipedia.org/wiki/Killer_Instinct#Gameplay" rel="nofollow"><cite>Killer Instinct</cite></a>&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on “Salsa, the serve looks like salsa” by Graham</title>
		<link>http://tadhg.com/wp/2010/02/12/salsa-the-serve-looks-like-salsa/comment-page-1/#comment-20033</link>
		<dc:creator>Graham</dc:creator>
		<pubDate>Wed, 03 Mar 2010 18:53:20 +0000</pubDate>
		<guid isPermaLink="false">http://tadhg.com/wp/?p=2679#comment-20033</guid>
		<description>Knew I should have been a sports commentator</description>
		<content:encoded><![CDATA[<p>Knew I should have been a sports commentator</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Nethack in all its Glory by gever</title>
		<link>http://tadhg.com/wp/2010/03/02/nethack-in-all-its-glory/comment-page-1/#comment-20032</link>
		<dc:creator>gever</dc:creator>
		<pubDate>Wed, 03 Mar 2010 18:52:41 +0000</pubDate>
		<guid isPermaLink="false">http://tadhg.com/wp/?p=2728#comment-20032</guid>
		<description>I&#039;ve played Nethack (and it&#039;s predecessor, Rogue) off and on for the last 20(!) years. One of the things that drew me to it was the Vi-like approach to the keyboard and the sorts of meta-strategy conversations I would have in the hallways with other players at the office. Like Vi, Nethack is the game to last a lifetime - there&#039;s always something to learn, some new way to think about it, and some undiscovered feature waiting to reveal itself.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve played Nethack (and it&#8217;s predecessor, Rogue) off and on for the last 20(!) years. One of the things that drew me to it was the Vi-like approach to the keyboard and the sorts of meta-strategy conversations I would have in the hallways with other players at the office. Like Vi, Nethack is the game to last a lifetime &#8211; there&#8217;s always something to learn, some new way to think about it, and some undiscovered feature waiting to reveal itself.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Little More Functional Programming by Barak</title>
		<link>http://tadhg.com/wp/2010/02/25/a-little-more-functional-programming/comment-page-1/#comment-19859</link>
		<dc:creator>Barak</dc:creator>
		<pubDate>Fri, 26 Feb 2010 10:56:55 +0000</pubDate>
		<guid isPermaLink="false">http://tadhg.com/wp/?p=2712#comment-19859</guid>
		<description>So I didn&#039;t like the Scheme implementation last time -- your reduce observation is great, however, and leads me to improve it to this:
&lt;pre&gt;
;whee, Scheme comments start with semicolons
;See findlongestrepeater above, adapted for Scheme
(define (longest-rep str)
  (let ((x (string-&gt;list str)))
    ;foldl is python&#039;s reduce. it&#039;s a functional language staple.
    (foldl compare-blocks &#039;() (contig-blocks x))))

(define (compare-blocks prev cur)
  (if (&gt; (length prev) (length cur)) prev cur))


;Recursive rewrite, python in comments
;def contig-blocks(l):
(define (contig-blocks l)
  ;if l[1:] == []:
  (if (null? (cdr l))
      ;return [l]
      (list l)
  ;else:
      ;r = contig-blocks(l[1:])
      (let ((r (contig-blocks (cdr l))))
      ;if l[0] == r[0][0]:
        (if (eq? (car l) (caar r))
          ;return [[l[0]] + r[0]] + r[1:]
            (cons (cons (car l) (car r)) (cdr r))
      ;else:
          ;return [l[0]] + r
            (cons (list (car l)) r)
            ))))
&lt;/pre&gt;
Note that I don&#039;t wholly agree with your rule for not using assignment operators. As I use it above, it&#039;s merely a shorthand. Anywhere I use &quot;r&quot; as a variable, it could be replaced by the recursive call. And that&#039;s what makes it functional -- literally, in the mathematical sense of having one and only one returned value for the same input -- time and state invariant, and zero side-effects.</description>
		<content:encoded><![CDATA[<p>So I didn&#8217;t like the Scheme implementation last time &#8212; your reduce observation is great, however, and leads me to improve it to this:</p>
<pre>
;whee, Scheme comments start with semicolons
;See findlongestrepeater above, adapted for Scheme
(define (longest-rep str)
  (let ((x (string-&gt;list str)))
    ;foldl is python's reduce. it's a functional language staple.
    (foldl compare-blocks '() (contig-blocks x))))

(define (compare-blocks prev cur)
  (if (&gt; (length prev) (length cur)) prev cur))

;Recursive rewrite, python in comments
;def contig-blocks(l):
(define (contig-blocks l)
  ;if l[1:] == []:
  (if (null? (cdr l))
      ;return [l]
      (list l)
  ;else:
      ;r = contig-blocks(l[1:])
      (let ((r (contig-blocks (cdr l))))
      ;if l[0] == r[0][0]:
        (if (eq? (car l) (caar r))
          ;return [[l[0]] + r[0]] + r[1:]
            (cons (cons (car l) (car r)) (cdr r))
      ;else:
          ;return [l[0]] + r
            (cons (list (car l)) r)
            ))))
</pre>
<p>Note that I don&#8217;t wholly agree with your rule for not using assignment operators. As I use it above, it&#8217;s merely a shorthand. Anywhere I use &#8220;r&#8221; as a variable, it could be replaced by the recursive call. And that&#8217;s what makes it functional &#8212; literally, in the mathematical sense of having one and only one returned value for the same input &#8212; time and state invariant, and zero side-effects.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Minor Foray into Functional Programming by Tadhg</title>
		<link>http://tadhg.com/wp/2010/02/23/minor-foray-into-functional-programming/comment-page-1/#comment-19855</link>
		<dc:creator>Tadhg</dc:creator>
		<pubDate>Fri, 26 Feb 2010 09:50:14 +0000</pubDate>
		<guid isPermaLink="false">http://tadhg.com/wp/?p=2709#comment-19855</guid>
		<description>Niall: thanks for that link, it looks like the information there is excellent. I&#039;ve barely scratched the surface of the (CC-licensed) &lt;a href=&quot;http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-4.html#%_toc_start&quot; rel=&quot;nofollow&quot;&gt;textbook&lt;/a&gt; for it and it looks great. Is it going to make me determined to learn Scheme?

Barak: that looks both interesting and weird... presumably because I don&#039;t have LISP experience. I did expect it to come in significantly shorter than the Python, although I know you said you avoided syntactic sugar.

Dhananjay Nene: Thanks for that suggestion, making a function out of finding contiguous blocks and then comparing them definitely seems like the right way to approach it. I wrote &lt;a href=&quot;http://tadhg.com/wp/2010/02/25/a-little-more-functional-programming/&quot; title=&quot;A Little More Functional Programming&quot; rel=&quot;nofollow&quot;&gt;a post about trying to find a way to do that without using the assignment operator&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Niall: thanks for that link, it looks like the information there is excellent. I&#8217;ve barely scratched the surface of the (CC-licensed) <a href="http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-4.html#%_toc_start" rel="nofollow">textbook</a> for it and it looks great. Is it going to make me determined to learn Scheme?</p>
<p>Barak: that looks both interesting and weird&#8230; presumably because I don&#8217;t have LISP experience. I did expect it to come in significantly shorter than the Python, although I know you said you avoided syntactic sugar.</p>
<p>Dhananjay Nene: Thanks for that suggestion, making a function out of finding contiguous blocks and then comparing them definitely seems like the right way to approach it. I wrote <a href="http://tadhg.com/wp/2010/02/25/a-little-more-functional-programming/" title="A Little More Functional Programming" rel="nofollow">a post about trying to find a way to do that without using the assignment operator</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Minor Foray into Functional Programming by Dhananjay Nene</title>
		<link>http://tadhg.com/wp/2010/02/23/minor-foray-into-functional-programming/comment-page-1/#comment-19788</link>
		<dc:creator>Dhananjay Nene</dc:creator>
		<pubDate>Wed, 24 Feb 2010 06:59:31 +0000</pubDate>
		<guid isPermaLink="false">http://tadhg.com/wp/?p=2709#comment-19788</guid>
		<description>Use this one instead
&lt;code&gt;
strng = &#039;aasdkjfbbbbdfjdslfaaaaaaasdlkfjcccc&#039;
def contiguous_blocks(strng):
    curr = [strng[0]]
    for c in strng[1:] :
        if c in curr :
            curr.append(c)
        else :
            yield &quot;&quot;.join(curr)
            curr = [c]
    yield &quot;&quot;.join(curr)

def longest(curr, other) :
    if len(curr) &gt; len(other) :
        return curr
    else :
        return other
    
print reduce(longest,contiguous_blocks(strng),&quot;&quot;)
&lt;/code&gt;
Note: String FP rules would prefer curr = curr + [c] instead of curr.append(c)</description>
		<content:encoded><![CDATA[<p>Use this one instead<br />
<code><br />
strng = 'aasdkjfbbbbdfjdslfaaaaaaasdlkfjcccc'<br />
def contiguous_blocks(strng):<br />
    curr = [strng[0]]<br />
    for c in strng[1:] :<br />
        if c in curr :<br />
            curr.append(c)<br />
        else :<br />
            yield "".join(curr)<br />
            curr = [c]<br />
    yield "".join(curr)</p>
<p>def longest(curr, other) :<br />
    if len(curr) &gt; len(other) :<br />
        return curr<br />
    else :<br />
        return other</p>
<p>print reduce(longest,contiguous_blocks(strng),"")<br />
</code><br />
Note: String FP rules would prefer curr = curr + [c] instead of curr.append(c)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Minor Foray into Functional Programming by Dhananjay Nene</title>
		<link>http://tadhg.com/wp/2010/02/23/minor-foray-into-functional-programming/comment-page-1/#comment-19786</link>
		<dc:creator>Dhananjay Nene</dc:creator>
		<pubDate>Wed, 24 Feb 2010 05:57:55 +0000</pubDate>
		<guid isPermaLink="false">http://tadhg.com/wp/?p=2709#comment-19786</guid>
		<description>You may want to evaluate this option (not sure if the indentation will get preserved)
&lt;pre&gt;
strng = &#039;aasdkjfbbbbdfjdslfaaaaaaasdlkfjcccc&#039;
def contiguous(strng):
    curr = strng[0]
    for c in strng[1:] :
        if c in curr :
            curr = &quot;&quot;.join((curr,c)) 
        else :
            yield curr
            curr = c
    yield curr
     
print reduce(lambda curr, other : curr if len(curr) &gt; len(other) else other,contiguous(strng),&quot;&quot;)
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>You may want to evaluate this option (not sure if the indentation will get preserved)</p>
<pre>
strng = 'aasdkjfbbbbdfjdslfaaaaaaasdlkfjcccc'
def contiguous(strng):
    curr = strng[0]
    for c in strng[1:] :
        if c in curr :
            curr = "".join((curr,c))
        else :
            yield curr
            curr = c
    yield curr

print reduce(lambda curr, other : curr if len(curr) &gt; len(other) else other,contiguous(strng),"")
</pre>
]]></content:encoded>
	</item>
</channel>
</rss>
