<?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 on: Rump &#8211; Ruby Upload Metaweblog Post</title>
	<atom:link href="http://www.chipstips.com/?feed=rss2&#038;p=511" rel="self" type="application/rss+xml" />
	<link>http://www.chipstips.com/?p=511</link>
	<description>Contains coding, but not narcotic.</description>
	<lastBuildDate>Wed, 08 May 2013 02:26:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: apotheon</title>
		<link>http://www.chipstips.com/?p=511&#038;cpage=1#comment-107563</link>
		<dc:creator>apotheon</dc:creator>
		<pubDate>Mon, 21 Jun 2010 17:42:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.chipstips.com/?p=511#comment-107563</guid>
		<description><![CDATA[I prefer the `each` iterator over the `while` loop as well, generally.  I just find the added clarity of code for the loop overrides the benefits of the iterator for most cases when writing simple CLI filters.

I&#039;d be willing to use the implicit global where the specific technical benefits of the iterator+block approach helps code clarity and maintainability in other ways, though -- of course.]]></description>
		<content:encoded><![CDATA[<p>I prefer the `each` iterator over the `while` loop as well, generally.  I just find the added clarity of code for the loop overrides the benefits of the iterator for most cases when writing simple CLI filters.</p>
<p>I&#8217;d be willing to use the implicit global where the specific technical benefits of the iterator+block approach helps code clarity and maintainability in other ways, though &#8212; of course.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sterling Camden</title>
		<link>http://www.chipstips.com/?p=511&#038;cpage=1#comment-107562</link>
		<dc:creator>Sterling Camden</dc:creator>
		<pubDate>Mon, 21 Jun 2010 17:36:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.chipstips.com/?p=511#comment-107562</guid>
		<description><![CDATA[Hmm... it seems that Brian&#039;s Threaded Comments is busted with WordPress 3.0.  I guess I&#039;ll have to bite the bullet and convert to WordPress&#039; threaded comment support instead.]]></description>
		<content:encoded><![CDATA[<p>Hmm&#8230; it seems that Brian&#8217;s Threaded Comments is busted with WordPress 3.0.  I guess I&#8217;ll have to bite the bullet and convert to WordPress&#8217; threaded comment support instead.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sterling Camden</title>
		<link>http://www.chipstips.com/?p=511&#038;cpage=1#comment-107561</link>
		<dc:creator>Sterling Camden</dc:creator>
		<pubDate>Mon, 21 Jun 2010 17:35:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.chipstips.com/?p=511#comment-107561</guid>
		<description><![CDATA[In the testing I&#039;ve conducted, the two appear to behave exactly the same.  If input is directly from a console, there is no buffering of input between iterations.  If from a pipe, it seems that there is exactly one line of read-ahead in both cases.

I agree about the obscurely named global variables -- but I still prefer the &#039;each&#039; form only because it uses a code block, so the block has its own local scope -- any variables introduced therein will not persist thereafter.  It&#039;s more functional vs. imperative.  Admittedly more about style than substance.]]></description>
		<content:encoded><![CDATA[<p>In the testing I&#8217;ve conducted, the two appear to behave exactly the same.  If input is directly from a console, there is no buffering of input between iterations.  If from a pipe, it seems that there is exactly one line of read-ahead in both cases.</p>
<p>I agree about the obscurely named global variables &#8212; but I still prefer the &#8216;each&#8217; form only because it uses a code block, so the block has its own local scope &#8212; any variables introduced therein will not persist thereafter.  It&#8217;s more functional vs. imperative.  Admittedly more about style than substance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: apotheon</title>
		<link>http://www.chipstips.com/?p=511&#038;cpage=1#comment-107508</link>
		<dc:creator>apotheon</dc:creator>
		<pubDate>Sun, 20 Jun 2010 16:54:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.chipstips.com/?p=511#comment-107508</guid>
		<description><![CDATA[Do you know whether &lt;code&gt;$&lt;&lt;/code&gt; and &lt;code&gt;gets&lt;/code&gt; handle storage of input differently?  Judging by their descriptions, it seems like the former would necessarily load all input into memory at the same time, while the latter seems to only deal with one line at a time.  Judging by the way each of them behaves when sent the &lt;code&gt;each&lt;/code&gt; message, that seems to be borne out in practice.

I also find the &lt;code&gt;gets&lt;/code&gt; formulation a bit more readable, since it avoids the use of a cryptic global variable.  Couple that with the probably more scalable resource management of it, and I still think I&#039;d prefer the &lt;code&gt;while line = gets&lt;/code&gt; version.  If you have some good counterarguments, I&#039;d love to see them.]]></description>
		<content:encoded><![CDATA[<p>Do you know whether <code>$&lt;</code> and <code>gets</code> handle storage of input differently?  Judging by their descriptions, it seems like the former would necessarily load all input into memory at the same time, while the latter seems to only deal with one line at a time.  Judging by the way each of them behaves when sent the <code>each</code> message, that seems to be borne out in practice.</p>
<p>I also find the <code>gets</code> formulation a bit more readable, since it avoids the use of a cryptic global variable.  Couple that with the probably more scalable resource management of it, and I still think I&#8217;d prefer the <code>while line = gets</code> version.  If you have some good counterarguments, I&#8217;d love to see them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sterling Camden</title>
		<link>http://www.chipstips.com/?p=511&#038;cpage=1#comment-107473</link>
		<dc:creator>Sterling Camden</dc:creator>
		<pubDate>Sat, 19 Jun 2010 23:48:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.chipstips.com/?p=511#comment-107473</guid>
		<description><![CDATA[I tend to use &lt;code&gt;$&lt;.each&lt;/code&gt;, which has the same advantages.  But I wasn&#039;t sure it would work with optargs -- I should have tried it out, and perhaps I still will.]]></description>
		<content:encoded><![CDATA[<p>I tend to use <code>$&lt;.each</code>, which has the same advantages.  But I wasn&#8217;t sure it would work with optargs &#8212; I should have tried it out, and perhaps I still will.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Preview your Rump before posting it -- Chip&#039;s Tips for Developers</title>
		<link>http://www.chipstips.com/?p=511&#038;cpage=1#comment-107471</link>
		<dc:creator>Preview your Rump before posting it -- Chip&#039;s Tips for Developers</dc:creator>
		<pubDate>Sat, 19 Jun 2010 23:26:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.chipstips.com/?p=511#comment-107471</guid>
		<description><![CDATA[[...] after posting my previous entry, I realized that  rump needs a preview capability. Embedded code is hard to get right the first [...]]]></description>
		<content:encoded><![CDATA[<p>[...] after posting my previous entry, I realized that  rump needs a preview capability. Embedded code is hard to get right the first [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: apotheon</title>
		<link>http://www.chipstips.com/?p=511&#038;cpage=1#comment-107438</link>
		<dc:creator>apotheon</dc:creator>
		<pubDate>Sat, 19 Jun 2010 00:04:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.chipstips.com/?p=511#comment-107438</guid>
		<description><![CDATA[Nope, the Perl bit didn&#039;t format correctly.  It should have looked something like this (once again, hoping it formats correctly): &lt;code&gt;while &lt;&gt;&lt;/code&gt;]]></description>
		<content:encoded><![CDATA[<p>Nope, the Perl bit didn&#8217;t format correctly.  It should have looked something like this (once again, hoping it formats correctly): <code>while &lt;&gt;</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: apotheon</title>
		<link>http://www.chipstips.com/?p=511&#038;cpage=1#comment-107437</link>
		<dc:creator>apotheon</dc:creator>
		<pubDate>Sat, 19 Jun 2010 00:02:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.chipstips.com/?p=511#comment-107437</guid>
		<description><![CDATA[I find that I find a lot more opportunity to automate little bits of my life when using a Unix-like system than when using some thoroughly GUI-fied OS like MS Windows, so I understand the way you describe FreeBSD encouraging you to do more Ruby development quite well.  The same goes for Perl, and (I&#039;m sure) for anything else extremely well-suited to writing succinct filter programs.

Have you considered using a &lt;code&gt;while gets&lt;/code&gt; loop for handling input for filter-type programs?  It&#039;s the Ruby equivalent to Perl&#039;s &lt;code&gt;while &lt;/code&gt; (here&#039;s hoping that formats correctly):

&lt;code&gt;  while lines = gets
    # do stuff
end&lt;/code&gt;

That way, it automagically takes filenames as arguments (once you&#039;ve parsed everything else out of &lt;code&gt;ARGV&lt;/code&gt;), takes input piped to it, or opens an interactive STDIN filehandle, depending on what you do with the command and its arguments.  It&#039;s pretty handy.]]></description>
		<content:encoded><![CDATA[<p>I find that I find a lot more opportunity to automate little bits of my life when using a Unix-like system than when using some thoroughly GUI-fied OS like MS Windows, so I understand the way you describe FreeBSD encouraging you to do more Ruby development quite well.  The same goes for Perl, and (I&#8217;m sure) for anything else extremely well-suited to writing succinct filter programs.</p>
<p>Have you considered using a <code>while gets</code> loop for handling input for filter-type programs?  It&#8217;s the Ruby equivalent to Perl&#8217;s <code>while </code> (here&#8217;s hoping that formats correctly):</p>
<p><code>  while lines = gets<br />
    # do stuff<br />
end</code></p>
<p>That way, it automagically takes filenames as arguments (once you&#8217;ve parsed everything else out of <code>ARGV</code>), takes input piped to it, or opens an interactive STDIN filehandle, depending on what you do with the command and its arguments.  It&#8217;s pretty handy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sterling Camden</title>
		<link>http://www.chipstips.com/?p=511&#038;cpage=1#comment-107343</link>
		<dc:creator>Sterling Camden</dc:creator>
		<pubDate>Fri, 18 Jun 2010 04:01:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.chipstips.com/?p=511#comment-107343</guid>
		<description><![CDATA[Certainly yes since I started using FreeBSD -- Ruby just works very well with command-line oriented tasks and pipes, especially when you want to define a minimal EDSL.  Mercurial just works very nicely as a source code repository.  I&#039;m thinking of moving all my ChipsTips projects to it.  Thanks for introducing me to it!]]></description>
		<content:encoded><![CDATA[<p>Certainly yes since I started using FreeBSD &#8212; Ruby just works very well with command-line oriented tasks and pipes, especially when you want to define a minimal EDSL.  Mercurial just works very nicely as a source code repository.  I&#8217;m thinking of moving all my ChipsTips projects to it.  Thanks for introducing me to it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: apotheon</title>
		<link>http://www.chipstips.com/?p=511&#038;cpage=1#comment-107341</link>
		<dc:creator>apotheon</dc:creator>
		<pubDate>Fri, 18 Jun 2010 03:36:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.chipstips.com/?p=511#comment-107341</guid>
		<description><![CDATA[Is it just my imagination, or are you writing a lot more Ruby code since you&#039;ve started using Mercurial and FreeBSD?  There does appear to be a correlation, and I wonder whether there&#039;s any kind of causal link in there too.]]></description>
		<content:encoded><![CDATA[<p>Is it just my imagination, or are you writing a lot more Ruby code since you&#8217;ve started using Mercurial and FreeBSD?  There does appear to be a correlation, and I wonder whether there&#8217;s any kind of causal link in there too.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
