<?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: The Building Blocks of Ruby</title>
	<atom:link href="http://yehudakatz.com/2010/02/07/the-building-blocks-of-ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://yehudakatz.com/2010/02/07/the-building-blocks-of-ruby/</link>
	<description>Random Geek-Related Thoughts</description>
	<lastBuildDate>Sat, 20 Apr 2013 07:23:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Kyle Rose</title>
		<link>http://yehudakatz.com/2010/02/07/the-building-blocks-of-ruby/comment-page-1/#comment-25954</link>
		<dc:creator>Kyle Rose</dc:creator>
		<pubDate>Wed, 02 Jan 2013 17:56:10 +0000</pubDate>
		<guid isPermaLink="false">http://yehudakatz.com/?p=429#comment-25954</guid>
		<description><![CDATA[Wouldn&#039;t this example actually blow away the file by opening it for writing and then result in some kind of IO error when you try to subsequently read from a file opened for write?]]></description>
		<content:encoded><![CDATA[<p>Wouldn&#8217;t this example actually blow away the file by opening it for writing and then result in some kind of IO error when you try to subsequently read from a file opened for write?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Rochkind</title>
		<link>http://yehudakatz.com/2010/02/07/the-building-blocks-of-ruby/comment-page-1/#comment-25242</link>
		<dc:creator>Jonathan Rochkind</dc:creator>
		<pubDate>Fri, 13 Apr 2012 18:24:47 +0000</pubDate>
		<guid isPermaLink="false">http://yehudakatz.com/?p=429#comment-25242</guid>
		<description><![CDATA[In your `raise Return new` would it be better to use ruby throw/catch instead of raise/rescue?

There&#039;s an aesthetic argument that exceptions should be used for exceptional circumstances, not flow control; the little-used throw/catch are for flow control if you need that kind of flow control. There&#039;s also apparently a performance argument, in at least some ruby interpreters (like, apparently jruby especially) raise/rescue are ridiculously expensive, and throw/catch are not.  (The expense doesn&#039;t matter that much when you&#039;re using them for actual exceptional conditions, but when used for flow control, such that they&#039;re going to be called all the time, possibly in an &#039;inner loop&#039;...)

People come to wycats for good best practices (rightfully!), so I am surprised to see raise/rescue recommended for non-exceptional flow control.]]></description>
		<content:encoded><![CDATA[<p>In your `raise Return new` would it be better to use ruby throw/catch instead of raise/rescue?</p>
<p>There&#8217;s an aesthetic argument that exceptions should be used for exceptional circumstances, not flow control; the little-used throw/catch are for flow control if you need that kind of flow control. There&#8217;s also apparently a performance argument, in at least some ruby interpreters (like, apparently jruby especially) raise/rescue are ridiculously expensive, and throw/catch are not.  (The expense doesn&#8217;t matter that much when you&#8217;re using them for actual exceptional conditions, but when used for flow control, such that they&#8217;re going to be called all the time, possibly in an &#8216;inner loop&#8217;&#8230;)</p>
<p>People come to wycats for good best practices (rightfully!), so I am surprised to see raise/rescue recommended for non-exceptional flow control.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Diego</title>
		<link>http://yehudakatz.com/2010/02/07/the-building-blocks-of-ruby/comment-page-1/#comment-22641</link>
		<dc:creator>Diego</dc:creator>
		<pubDate>Sun, 24 Apr 2011 10:16:10 +0000</pubDate>
		<guid isPermaLink="false">http://yehudakatz.com/?p=429#comment-22641</guid>
		<description><![CDATA[I am a Java Developer and I have decided to learn Ruby/Rails to increase my productivity :)
I am really amazed about the power of Ruby and I think it will take quite some time and practice to get me acquainted with it.
Thanks for your article, I will use it as a reference when I will start encountering strange bugs (I hope I will not need it that much :) ).
BTW, I have just written an article on my blog about the features of Ruby: http://a-developer-life.blogspot.com/2011/04/programming-in-ruby-features-you-must.html#more]]></description>
		<content:encoded><![CDATA[<p>I am a Java Developer and I have decided to learn Ruby/Rails to increase my productivity :)<br />
I am really amazed about the power of Ruby and I think it will take quite some time and practice to get me acquainted with it.<br />
Thanks for your article, I will use it as a reference when I will start encountering strange bugs (I hope I will not need it that much :) ).<br />
BTW, I have just written an article on my blog about the features of Ruby: <a href="http://a-developer-life.blogspot.com/2011/04/programming-in-ruby-features-you-must.html#more" rel="nofollow">http://a-developer-life.blogspot.com/2011/04/programming-in-ruby-features-you-must.html#more</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Prescod</title>
		<link>http://yehudakatz.com/2010/02/07/the-building-blocks-of-ruby/comment-page-1/#comment-20873</link>
		<dc:creator>Paul Prescod</dc:creator>
		<pubDate>Tue, 21 Sep 2010 18:35:33 +0000</pubDate>
		<guid isPermaLink="false">http://yehudakatz.com/?p=429#comment-20873</guid>
		<description><![CDATA[As mentioned above, you&#039;ve misrepresented Python&#039;s equivalent feature. The contextmanager allows you to turn any function into something that takes a block, similar to Ruby. It is one extra line of code to turn a function into a contextmanager, which seems pretty &quot;lightweight&quot; to me.]]></description>
		<content:encoded><![CDATA[<p>As mentioned above, you&#8217;ve misrepresented Python&#8217;s equivalent feature. The contextmanager allows you to turn any function into something that takes a block, similar to Ruby. It is one extra line of code to turn a function into a contextmanager, which seems pretty &#8220;lightweight&#8221; to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomasz Wegrzanowski</title>
		<link>http://yehudakatz.com/2010/02/07/the-building-blocks-of-ruby/comment-page-1/#comment-18413</link>
		<dc:creator>Tomasz Wegrzanowski</dc:creator>
		<pubDate>Thu, 18 Feb 2010 21:14:53 +0000</pubDate>
		<guid isPermaLink="false">http://yehudakatz.com/?p=429#comment-18413</guid>
		<description><![CDATA[Here&#039;s a really old blog post - http://t-a-w.blogspot.com/2007/05/syntactic-tradeoffs-in-functional.html

The point of Ruby blocks is that even in highly functional languages which don&#039;t have special syntax for 1-lambda case, virtually all (99.3% in the sample) of functions take 0 or 1 lambda. 2+ lambda functions almost never happen.

Optimizing syntax for the most common case is a huge win.]]></description>
		<content:encoded><![CDATA[<p>Here&#8217;s a really old blog post &#8211; <a href="http://t-a-w.blogspot.com/2007/05/syntactic-tradeoffs-in-functional.html" rel="nofollow">http://t-a-w.blogspot.com/2007/05/syntactic-tradeoffs-in-functional.html</a></p>
<p>The point of Ruby blocks is that even in highly functional languages which don&#8217;t have special syntax for 1-lambda case, virtually all (99.3% in the sample) of functions take 0 or 1 lambda. 2+ lambda functions almost never happen.</p>
<p>Optimizing syntax for the most common case is a huge win.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ari</title>
		<link>http://yehudakatz.com/2010/02/07/the-building-blocks-of-ruby/comment-page-1/#comment-18381</link>
		<dc:creator>ari</dc:creator>
		<pubDate>Mon, 15 Feb 2010 19:28:34 +0000</pubDate>
		<guid isPermaLink="false">http://yehudakatz.com/?p=429#comment-18381</guid>
		<description><![CDATA[yehuda, 

Ever played with Rebol ? 

I used to use Ruby (with fox/fx library) . I tried Rebol in December 2009, it looks cooler than Ruby. I like their philosophy too, &quot;let&#039;s do it in 1Mb not in 200 Mb&quot; , and they fight against software complexity and bloatware

view layout [ label &quot; type your name&quot;  field   button &quot;click&quot; ] 

gives you a screen with a label , an empty field and a button to click. 

how many lines of code does it take to do that in Java, .Net or Ruby?


its full environment is under 1 Mb.  amazing isn&#039;t it? Compare that to Ruby&#039;s environment.]]></description>
		<content:encoded><![CDATA[<p>yehuda, </p>
<p>Ever played with Rebol ? </p>
<p>I used to use Ruby (with fox/fx library) . I tried Rebol in December 2009, it looks cooler than Ruby. I like their philosophy too, &#8220;let&#8217;s do it in 1Mb not in 200 Mb&#8221; , and they fight against software complexity and bloatware</p>
<p>view layout [ label " type your name"  field   button "click" ] </p>
<p>gives you a screen with a label , an empty field and a button to click. </p>
<p>how many lines of code does it take to do that in Java, .Net or Ruby?</p>
<p>its full environment is under 1 Mb.  amazing isn&#8217;t it? Compare that to Ruby&#8217;s environment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chris</title>
		<link>http://yehudakatz.com/2010/02/07/the-building-blocks-of-ruby/comment-page-1/#comment-18379</link>
		<dc:creator>chris</dc:creator>
		<pubDate>Mon, 15 Feb 2010 19:03:32 +0000</pubDate>
		<guid isPermaLink="false">http://yehudakatz.com/?p=429#comment-18379</guid>
		<description><![CDATA[the biggest weakness about Ruby is it is interpreted.

how does someone protect his intellectual property (i.e code) if you are writing commercial applications (for the sake of discussion, let&#039;s pretend a &quot;word&quot; application )  with it?  you need to supply the code as part of your application deployment to your client,  don&#039;t you ?  

now don&#039;t come to us saying we need to encrypt and decrypt and install in a temp folder while running, this is too slow of an approach, and is still open to be broken into even by a junior level person. 

your thoughts ?]]></description>
		<content:encoded><![CDATA[<p>the biggest weakness about Ruby is it is interpreted.</p>
<p>how does someone protect his intellectual property (i.e code) if you are writing commercial applications (for the sake of discussion, let&#8217;s pretend a &#8220;word&#8221; application )  with it?  you need to supply the code as part of your application deployment to your client,  don&#8217;t you ?  </p>
<p>now don&#8217;t come to us saying we need to encrypt and decrypt and install in a temp folder while running, this is too slow of an approach, and is still open to be broken into even by a junior level person. </p>
<p>your thoughts ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rit Li</title>
		<link>http://yehudakatz.com/2010/02/07/the-building-blocks-of-ruby/comment-page-1/#comment-18303</link>
		<dc:creator>Rit Li</dc:creator>
		<pubDate>Wed, 10 Feb 2010 21:00:15 +0000</pubDate>
		<guid isPermaLink="false">http://yehudakatz.com/?p=429#comment-18303</guid>
		<description><![CDATA[Loving ruby&#039;s blocks. Thanks for the article.

For &quot;Rails vs Django&quot;, there are three things Rails is the winner:

1) Convention over Configuration. 
Django does not have whole lot configuration, just one settings.py file. So Django is a framework with &quot;Easy Configuration,&quot; not &quot;Convention over Configuration.&quot;

2) REST
Rails really embraces REST. The seven-action controller is awesome. Django doesn&#039;t have restful resource/route built-in. Once you go REST, you won&#039;t go back.

3) The Rails Eco System
There are Rails plugins for everything. Plus, there are commercial support, books, blogs, screencasts and hostings for Rails. Django really lacks behind.]]></description>
		<content:encoded><![CDATA[<p>Loving ruby&#8217;s blocks. Thanks for the article.</p>
<p>For &#8220;Rails vs Django&#8221;, there are three things Rails is the winner:</p>
<p>1) Convention over Configuration.<br />
Django does not have whole lot configuration, just one settings.py file. So Django is a framework with &#8220;Easy Configuration,&#8221; not &#8220;Convention over Configuration.&#8221;</p>
<p>2) REST<br />
Rails really embraces REST. The seven-action controller is awesome. Django doesn&#8217;t have restful resource/route built-in. Once you go REST, you won&#8217;t go back.</p>
<p>3) The Rails Eco System<br />
There are Rails plugins for everything. Plus, there are commercial support, books, blogs, screencasts and hostings for Rails. Django really lacks behind.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Arcieri</title>
		<link>http://yehudakatz.com/2010/02/07/the-building-blocks-of-ruby/comment-page-1/#comment-18240</link>
		<dc:creator>Tony Arcieri</dc:creator>
		<pubDate>Mon, 08 Feb 2010 18:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://yehudakatz.com/?p=429#comment-18240</guid>
		<description><![CDATA[Great article... I always wanted to write something like this myself about blocks but you&#039;ve done a way better job than I could&#039;ve.  The points about Java needing a &quot;synchronized&quot; keyword to do something any Rubyist can accomplish with blocks (passed to their own methods) is a really powerful example of what Ruby affords you that other languages don&#039;t, especially when the syntax is practically identical.]]></description>
		<content:encoded><![CDATA[<p>Great article&#8230; I always wanted to write something like this myself about blocks but you&#8217;ve done a way better job than I could&#8217;ve.  The points about Java needing a &#8220;synchronized&#8221; keyword to do something any Rubyist can accomplish with blocks (passed to their own methods) is a really powerful example of what Ruby affords you that other languages don&#8217;t, especially when the syntax is practically identical.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guoliang Cao</title>
		<link>http://yehudakatz.com/2010/02/07/the-building-blocks-of-ruby/comment-page-1/#comment-18237</link>
		<dc:creator>Guoliang Cao</dc:creator>
		<pubDate>Mon, 08 Feb 2010 14:40:34 +0000</pubDate>
		<guid isPermaLink="false">http://yehudakatz.com/?p=429#comment-18237</guid>
		<description><![CDATA[Thank you for the great writeup.

Most rubyists(I guess many of your readers are) are much more familiar with features that exist in Ruby 1.8 than 1.9. Maybe you can show some great usage of new features in 1.9 too?]]></description>
		<content:encoded><![CDATA[<p>Thank you for the great writeup.</p>
<p>Most rubyists(I guess many of your readers are) are much more familiar with features that exist in Ruby 1.8 than 1.9. Maybe you can show some great usage of new features in 1.9 too?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
