<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="https://mg.to" xmlns:dc="https://purl.org/dc/elements/1.1/">
<channel>
 <title>mg.to - Ruby - Comments</title>
 <link>https://mg.to/topics/programming/ruby</link>
 <description>Comments for &quot;Ruby&quot;</description>
 <language>en</language>
<item>
 <title>Great work</title>
 <link>https://mg.to/2008/04/04/mapping-votes-resources#comment-6056</link>
 <description>&lt;p&gt;Great work on the election maps. Have you seen this?&lt;/p&gt;

&lt;p&gt;https://www.electoral-vote.com/&lt;/p&gt;

&lt;p&gt;They&amp;#8217;re showing an electoral college map of the U.S., which I think will be of intense interest to people now that the primaries are over. Their polling data is available as CSV file downloads, updated daily. It would be neat to see it on Google maps.&lt;/p&gt;</description>
 <pubDate>Fri, 20 Jun 2008 08:47:04 +0000</pubDate>
 <dc:creator>Sheldon Rampton</dc:creator>
 <guid isPermaLink="false">comment 6056 at https://mg.to</guid>
</item>
<item>
 <title>Awesome!</title>
 <link>https://mg.to/2008/04/04/mapping-votes-resources#comment-5723</link>
 <description>&lt;p&gt;Hi, just watched your talk on youtube and would like to thank you for sharing the great work and experience. The resources are very useful!&lt;/p&gt;

&lt;p&gt;ps: the Array.prototype.join.call trick was cool :)&lt;/p&gt;</description>
 <pubDate>Thu, 24 Apr 2008 02:55:28 +0000</pubDate>
 <dc:creator>Pedro Teixeira</dc:creator>
 <guid isPermaLink="false">comment 5723 at https://mg.to</guid>
</item>
<item>
 <title>Election Maps</title>
 <link>https://mg.to/2008/04/04/mapping-votes-resources#comment-5722</link>
 <description>&lt;p&gt;Your maps are AWESOME! Keep up the great work! :) &lt;/p&gt;</description>
 <pubDate>Wed, 23 Apr 2008 07:28:37 +0000</pubDate>
 <dc:creator>random_anonymous</dc:creator>
 <guid isPermaLink="false">comment 5722 at https://mg.to</guid>
</item>
<item>
 <title>Building Win32 guitest</title>
 <link>https://mg.to/2004/08/09/ruby-iterators-and-c-callback-functions#comment-4453</link>
 <description>&lt;p&gt;Building win32 guitest in May of 2007 is non-trivial.  I posted a recipie at &lt;a href=&quot;https://www.kleinfelter.com/build-ruby-guitest-win32&quot;&gt;https://www.kleinfelter.com/build-ruby-guitest-win32&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Fri, 25 May 2007 01:28:58 +0000</pubDate>
 <dc:creator>Visitor</dc:creator>
 <guid isPermaLink="false">comment 4453 at https://mg.to</guid>
</item>
<item>
 <title>  Well, yield in ruby surely don&#039;t equal to function</title>
 <link>https://mg.to/2004/08/03/iterator-cpr#comment-11</link>
 <description>&lt;p&gt;Well, yield in ruby surely don&amp;#8217;t equal to function
in javascript or delegate in C#.
  block in ruby is a closure, which means it use the
current context where it&amp;#8217;s in, it means sth like this:&lt;/p&gt;

&lt;p&gt;def fun1
  fun2
end
def fun2
  fun3 {
    return &amp;#8220;hello1&amp;#8221;;
  }&lt;/p&gt;

&lt;p&gt;fun3 {
    return &amp;#8220;hello2&amp;#8221;;
  }&lt;/p&gt;

&lt;p&gt;end
def fun3
  yield
end
result = fun1&lt;/p&gt;

&lt;p&gt;puts result #&amp;#8212;&amp;gt;&amp;#8221;hello1&amp;#8221;&lt;/p&gt;

&lt;h6&gt;###################################3&lt;/h6&gt;

&lt;p&gt;the first block in fun2 will just return &amp;#8220;hello1&amp;#8221;
to the caller fun1, and skip the second block invocation,
but with function pointer or delegate, you sure can&amp;#8217;t do this,
with return keyword in function pointer or delegate, you just
return to where you call the function pointer or delegate.&lt;/p&gt;

&lt;p&gt;That&amp;#8217;s the differnce between them.
the block can decide whether it should return some value
to uplevel but function pointer or delegate can&amp;#8217;t&lt;/p&gt;</description>
 <pubDate>Tue, 10 May 2005 19:33:42 +0000</pubDate>
 <dc:creator>femto</dc:creator>
 <guid isPermaLink="false">comment 11 at https://mg.to</guid>
</item>
<item>
 <title>Hi Frank! :-) Yep, I&#039;m stuck with Ruby forever, I guess.</title>
 <link>https://mg.to/2004/08/09/ruby-iterators-and-c-callback-functions#comment-20</link>
 <description>&lt;p&gt;Hi Frank! :-) Yep, I&amp;#8217;m stuck with Ruby forever, I guess.&lt;/p&gt;

&lt;p&gt;Anyone who wonders what the heck Frank is talking about, here is &lt;a href=&quot;https://www.cooper.com/alan/father_of_vb.html&quot;&gt;the full story&lt;/a&gt;.&lt;/p&gt;</description>
 <pubDate>Wed, 01 Sep 2004 21:45:04 +0000</pubDate>
 <dc:creator>Michael Geary</dc:creator>
 <guid isPermaLink="false">comment 20 at https://mg.to</guid>
</item>
<item>
 <title>Just can&#039;t get away from that</title>
 <link>https://mg.to/2004/08/09/ruby-iterators-and-c-callback-functions#comment-19</link>
 <description>&lt;p&gt;Just can&amp;#8217;t get away from that Ruby code, eh, Mike?&lt;/p&gt;</description>
 <pubDate>Tue, 17 Aug 2004 23:33:41 +0000</pubDate>
 <dc:creator>Frank</dc:creator>
 <guid isPermaLink="false">comment 19 at https://mg.to</guid>
</item>
<item>
 <title>Of course, smalltalk does it best with [arg|body] representing a</title>
 <link>https://mg.to/2004/08/06/more-iterators#comment-15</link>
 <description>&lt;p&gt;Of course, smalltalk does it best with [arg|body] representing anonymous functions.  No other language does it better.&lt;/p&gt;</description>
 <pubDate>Thu, 12 Aug 2004 10:14:01 +0000</pubDate>
 <dc:creator>Anon</dc:creator>
 <guid isPermaLink="false">comment 15 at https://mg.to</guid>
</item>
<item>
 <title>Elton, your trackback had an invalid URL:</title>
 <link>https://mg.to/2004/08/03/iterator-cpr#comment-10</link>
 <description>&lt;p&gt;Elton, your trackback had an invalid URL:&lt;/p&gt;

&lt;p&gt;https://arachnid/Blogs/ewells/archive/2004/08/09/435.aspx&lt;/p&gt;

&lt;p&gt;Want to try again?&lt;/p&gt;</description>
 <pubDate>Tue, 10 Aug 2004 01:34:40 +0000</pubDate>
 <dc:creator>Michael Geary</dc:creator>
 <guid isPermaLink="false">comment 10 at https://mg.to</guid>
</item>
<item>
 <title>Elton, your trackback had an invalid URL:</title>
 <link>https://mg.to/2004/08/06/more-iterators#comment-14</link>
 <description>&lt;p&gt;Elton, your trackback had an invalid URL:&lt;/p&gt;

&lt;p&gt;https://arachnid/Blogs/ewells/archive/2004/08/09/435.aspx&lt;/p&gt;

&lt;p&gt;Want to try again?&lt;/p&gt;</description>
 <pubDate>Tue, 10 Aug 2004 01:32:25 +0000</pubDate>
 <dc:creator>Michael Geary</dc:creator>
 <guid isPermaLink="false">comment 14 at https://mg.to</guid>
</item>
<item>
 <title>Exploring C# 2.0 iterators
</title>
 <link>https://mg.to/2004/08/06/more-iterators#comment-13</link>
 <description>&lt;p&gt;&lt;strong&gt;Exploring C# 2.0 iterators&lt;/strong&gt;
&lt;/p&gt;</description>
 <pubDate>Mon, 09 Aug 2004 21:20:02 +0000</pubDate>
 <dc:creator>Elton Wells</dc:creator>
 <guid isPermaLink="false">comment 13 at https://mg.to</guid>
</item>
<item>
 <title>Exploring C# 2.0 iterators
</title>
 <link>https://mg.to/2004/08/03/iterator-cpr#comment-9</link>
 <description>&lt;p&gt;&lt;strong&gt;Exploring C# 2.0 iterators&lt;/strong&gt;
&lt;/p&gt;</description>
 <pubDate>Mon, 09 Aug 2004 21:20:01 +0000</pubDate>
 <dc:creator>Elton Wells</dc:creator>
 <guid isPermaLink="false">comment 9 at https://mg.to</guid>
</item>
<item>
 <title>I&#039;m a Ruby fan too
</title>
 <link>https://mg.to/2004/08/06/more-iterators#comment-12</link>
 <description>&lt;p&gt;&lt;strong&gt;I&amp;#8217;m a Ruby fan too&lt;/strong&gt;&lt;/p&gt;</description>
 <pubDate>Fri, 06 Aug 2004 01:08:23 +0000</pubDate>
 <dc:creator>Another Tired Idea</dc:creator>
 <guid isPermaLink="false">comment 12 at https://mg.to</guid>
</item>
<item>
 <title>argh. sorry about this. it doesn&#039;t seem to like unescaped &amp;lt;s.</title>
 <link>https://mg.to/2004/08/03/iterator-cpr#comment-8</link>
 <description>&lt;p&gt;argh. sorry about this. it doesn&amp;#8217;t seem to like unescaped &amp;lt;s&amp;#8230;
and again, this time without the huge, and now utterly redundant comment:
&lt;code&gt;
using System;
class C {
    public static void MyIterator(Action yield) {
        Console.WriteLine(&quot;Before First&quot;);
        yield(&quot;First&quot;);
        Console.WriteLine(&quot;After First&quot;);
        for(int i = 0; i &amp;lt; 3; i++)
                    yield(i.ToString());
        Console.WriteLine(&quot;Before Last&quot;);
        yield(&quot;Last&quot;);
        Console.WriteLine(&quot;After Last&quot;);
    }
    public static void Main() {
        MyIterator(delegate(string s) {
            Console.WriteLine(s);
        });
    }
}
&lt;/code&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 03 Aug 2004 12:52:17 +0000</pubDate>
 <dc:creator>mike roome</dc:creator>
 <guid isPermaLink="false">comment 8 at https://mg.to</guid>
</item>
<item>
 <title>damnit. my code got mangled...</title>
 <link>https://mg.to/2004/08/03/iterator-cpr#comment-7</link>
 <description>&lt;p&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 03 Aug 2004 12:48:58 +0000</pubDate>
 <dc:creator>mike roome</dc:creator>
 <guid isPermaLink="false">comment 7 at https://mg.to</guid>
</item>
</channel>
</rss>
