<?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/"
	>

<channel>
	<title>TikiRobot! &#187; ruby</title>
	<atom:link href="http://www.tikirobot.net/wp/tag/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tikirobot.net/wp</link>
	<description>Mai Tais and Blinky Lights, Ahoy!</description>
	<lastBuildDate>Wed, 01 Feb 2012 22:14:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Ruby 1.9 gains block-level scope</title>
		<link>http://www.tikirobot.net/wp/2008/02/23/ruby-19-gains-block-level-scope/</link>
		<comments>http://www.tikirobot.net/wp/2008/02/23/ruby-19-gains-block-level-scope/#comments</comments>
		<pubDate>Sat, 23 Feb 2008 23:06:35 +0000</pubDate>
		<dc:creator>rajbot</dc:creator>
				<category><![CDATA[all talk]]></category>
		<category><![CDATA[BlockScope]]></category>
		<category><![CDATA[cupcake]]></category>
		<category><![CDATA[Matz]]></category>
		<category><![CDATA[no code]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.tikirobot.net/wp/2008/02/23/ruby-19-gains-block-level-scope/</guid>
		<description><![CDATA[I was watching this Google TechTalk that Yukihiro Matsumoto gave on Ruby and learned that Ruby 1.9 had block-level scope.. cool! Apparently, block scope is some sort of thing with me: Javascript get block-level scope Mars and Venus, coding together forever]]></description>
			<content:encoded><![CDATA[<p>I was watching <a href="http://youtube.com/watch?v=oEkJvvGEtB4">this Google TechTalk that Yukihiro Matsumoto gave on Ruby</a> and learned that Ruby 1.9 had block-level scope.. cool!<br />
<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/oEkJvvGEtB4&#038;rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/oEkJvvGEtB4&#038;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p>
<p>Apparently, block scope is some sort of thing with me:<br />
<UL>
<li> <a href="http://www.tikirobot.net/wp/2006/08/03/javascript-gets-block-level-scope/">Javascript get block-level scope</a>
<li> <a href="http://www.tikirobot.net/wp/2006/03/26/mars-and-venus-coding-together-forever/">Mars and Venus, coding together forever</a></UL></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tikirobot.net/wp/2008/02/23/ruby-19-gains-block-level-scope/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby is SERIOUS BUSINESS!</title>
		<link>http://www.tikirobot.net/wp/2007/11/15/ruby-is-serious-business/</link>
		<comments>http://www.tikirobot.net/wp/2007/11/15/ruby-is-serious-business/#comments</comments>
		<pubDate>Fri, 16 Nov 2007 06:36:37 +0000</pubDate>
		<dc:creator>rajbot</dc:creator>
				<category><![CDATA[all talk]]></category>
		<category><![CDATA[no code]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[WhyTheLuckyStiff]]></category>

		<guid isPermaLink="false">http://www.tikirobot.net/wp/2007/11/15/ruby-is-serious-business/</guid>
		<description><![CDATA[Tim Bray is MAD that RubyConf was on a weekend. _why agrees: People, Ruby isn’t a game. It isn’t a hobby. It’s certainly not a very good food source and it’s not an article of clothing. You can’t just put Ruby in the wash with a load of whites. Nice try, but no. No. Jeez, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.tbray.org/ongoing/When/200x/2007/11/12/Bad-Ruby">Tim Bray is MAD</a> that RubyConf was on a weekend. <a href="http://hackety.org/2007/11/14/rubyIsMoney.html">_why agrees</a>:</p>
<blockquote><p>People, Ruby isn’t a game. It isn’t a hobby. It’s certainly not a very good food source and it’s not an article of clothing. You can’t just put Ruby in the wash with a load of whites. Nice try, but no. No. Jeez, grow a brain. Ruby isn’t a tambourine you can bang loudly in my ear. I’m trying to use my iPhone here, guy.</p>
<p>And Ruby is not some bachelor’s party with a foxy lady in a sherlock holmes hat. Hardly: Ruby is all dads. Put a petticoat on, woman. Pop those balloons. We’re all getting paid here and we’re all having kids here. Get with the program.</p>
<p>Ruby is serious business. Real business and totally bankable. Fact: You cannot do it late at night. The office is closed during those hours. You should be in bed like all the other dads. Now, have a nightcap and go put your PJs on, we’ve got to wake up early tomorrow, it’s pancake day.</p></blockquote>
<p>I love <a href="http://www.tikirobot.net/wp/2007/06/19/why-the-lucky-stiff/">why</a>. <a href="http://hackety.org/2007/11/14/rubyIsMoney.html">Read the whole thing</a>, it&#8217;s spot on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tikirobot.net/wp/2007/11/15/ruby-is-serious-business/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shoes, a Tiny Toolkit for Making Web-like Desktop Apps</title>
		<link>http://www.tikirobot.net/wp/2007/08/17/shoes-a-tiny-toolkit-for-making-web-like-desktop-apps/</link>
		<comments>http://www.tikirobot.net/wp/2007/08/17/shoes-a-tiny-toolkit-for-making-web-like-desktop-apps/#comments</comments>
		<pubDate>Fri, 17 Aug 2007 23:25:40 +0000</pubDate>
		<dc:creator>rajbot</dc:creator>
				<category><![CDATA[osx]]></category>
		<category><![CDATA[code code]]></category>
		<category><![CDATA[neat]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[WhyTheLuckyStiff]]></category>

		<guid isPermaLink="false">http://www.tikirobot.net/wp/2007/08/17/shoes-a-tiny-toolkit-for-making-web-like-desktop-apps/</guid>
		<description><![CDATA[Shoes is a new project by the infamous why: Shoes is a very informal GUI toolkit. It&#8217;s for making regular old windowing apps. It&#8217;s a blend of my favorite things from the Web, some Ruby style, and a sprinkling of cross-platform widgets. (More in the README.) Check out the book reader tutorial on Hackety.org simple [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.whytheluckystiff.net/shoes/">Shoes</a> is a new project by the infamous <a href="http://www.tikirobot.net/wp/2007/06/19/why-the-lucky-stiff/">why</a>:</p>
<blockquote><p>Shoes is a very informal GUI toolkit. It&#8217;s for making regular old windowing apps. It&#8217;s a blend of my favorite things from the Web, some Ruby style, and a sprinkling of cross-platform widgets. (More in the <a href="http://code.whytheluckystiff.net/shoes/browser/trunk/README.txt">README</a>.)</p></blockquote>
<p><a href="http://hackety.org/2007/08/17/hypershoes.html">Check out the book reader tutorial on Hackety.org</a></p>
<p>simple screenshots:<br />
<img src="http://www.tikirobot.net/wp/wp-content/uploads/2007/08/s1.png" height="172" width="272"><img src="http://www.tikirobot.net/wp/wp-content/uploads/2007/08/s2.png" height="195" width="271"></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tikirobot.net/wp/2007/08/17/shoes-a-tiny-toolkit-for-making-web-like-desktop-apps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Why??? The Lucky Stiff!</title>
		<link>http://www.tikirobot.net/wp/2007/06/19/why-the-lucky-stiff/</link>
		<comments>http://www.tikirobot.net/wp/2007/06/19/why-the-lucky-stiff/#comments</comments>
		<pubDate>Wed, 20 Jun 2007 06:59:56 +0000</pubDate>
		<dc:creator>rajbot</dc:creator>
				<category><![CDATA[inspiration]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[why are we here?]]></category>
		<category><![CDATA[WhyTheLuckyStiff]]></category>

		<guid isPermaLink="false">http://www.tikirobot.net/wp/2007/06/19/why-the-lucky-stiff/</guid>
		<description><![CDATA[why is an interesting animal. He&#8217;s a hacker who works on open source projects, including the amazing Hackety Hack, a tool for teaching programming to kids. He wrote the Poignant Guide to Ruby, he draws comics, he plays in a band, he posts funny pictures. He can make code look pretty, even javascript. Just who [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.tikirobot.net/wp/wp-content/uploads/2007/06/why.png" height="252" width="231" align="right"><a href="http://whytheluckystiff.net/">why</a> is an <a href="http://www.poignantguide.net/ruby/chapter-7.html">interesting animal</a>. He&#8217;s a <a href="http://hackety.org/">hacker</a> who works on <a href="http://code.whytheluckystiff.net/">open source projects</a>, including the amazing <a href="http://hacketyhack.net/">Hackety Hack</a>, a tool for teaching programming to kids. He wrote the <a href="http://www.poignantguide.net/ruby/">Poignant Guide to Ruby</a>, he <a href="http://whytheluckystiff.net/comics/">draws comics</a>, he <a href="http://www.archive.org/details/whytheluckystiff2006-06-23.railsconf_chicago">plays in a band</a>, he <a href="http://whytheluckystiff.net/quiet/">posts funny pictures</a>. He can <a href="http://redhanded.hobix.com/inspect/streamCopyYoutubeRevverEtc.html">make code look pretty</a>, even <a href="http://redhanded.hobix.com/cult/ahaNoticeTheExpandoWhichPrecludes.html">javascript</a>. Just who is this why? He&#8217;s got his own <a href="http://en.wikipedia.org/wiki/Why_the_lucky_stiff">wiki page</a>, which provides no answers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tikirobot.net/wp/2007/06/19/why-the-lucky-stiff/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Example Scripts: REST web services and system calls</title>
		<link>http://www.tikirobot.net/wp/2007/03/18/example-scripts-rest-web-services-and-system-calls/</link>
		<comments>http://www.tikirobot.net/wp/2007/03/18/example-scripts-rest-web-services-and-system-calls/#comments</comments>
		<pubDate>Sun, 18 Mar 2007 09:35:02 +0000</pubDate>
		<dc:creator>rajbot</dc:creator>
				<category><![CDATA[code code]]></category>
		<category><![CDATA[example scripts]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.tikirobot.net/wp/2007/03/18/example-scripts-rest-web-services-and-system-calls/</guid>
		<description><![CDATA[I&#8217;ve been translating all the new perl and php scripts I write into Python and Ruby in order to learn more about those two languages. I checked some more example scripts into SourceForge, which might be useful for others who know one of these languages and want to learn a new one. These scripts are [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been translating all the new perl and php scripts I write into Python and Ruby in order to learn more about those two languages. I checked some more example scripts into SourceForge, which might be useful for others who know one of these languages and want to learn a new one.</p>
<p>These scripts are available in perl, php, python, and ruby:<br />
<UL>
<li> <a href="http://tikitasks.svn.sourceforge.net/viewvc/tikitasks/ExampleScripts/RESTWebService/">How to query a REST web api</a> using HTTP GET and parsing the XML response.
<li> <a href="http://tikitasks.svn.sourceforge.net/viewvc/tikitasks/ExampleScripts/SystemCall/">How to make a system call</a> and read the return value.<br />
</UL><br />
The REST Web Service PHP and Perl scripts don&#8217;t work in Mac OS X, because OS X doesn&#8217;t ship with Perl&#8217;s XML::Simple or PHP&#8217;s simplexml. More surprisingly, OS X doesn&#8217;t ship with Perl&#8217;s <a href="http://search.cpan.org/~gaas/libwww-perl-5.805/lib/LWP.pm">LWP module</a>.</p>
<p>I&#8217;m starting to like Ruby more every day. It would be nice if Ruby and Python had a XML::Simple equivalent in their standard distributions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tikirobot.net/wp/2007/03/18/example-scripts-rest-web-services-and-system-calls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Example scripts: directory listing in perl, php, python, and ruby</title>
		<link>http://www.tikirobot.net/wp/2007/03/15/example-scripts-directory-listing-in-perl-php-python-and-ruby/</link>
		<comments>http://www.tikirobot.net/wp/2007/03/15/example-scripts-directory-listing-in-perl-php-python-and-ruby/#comments</comments>
		<pubDate>Thu, 15 Mar 2007 08:36:17 +0000</pubDate>
		<dc:creator>rajbot</dc:creator>
				<category><![CDATA[code code]]></category>
		<category><![CDATA[example scripts]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.tikirobot.net/wp/2007/03/15/example-scripts-directory-listing-in-perl-php-python-and-ruby/</guid>
		<description><![CDATA[I remember when I fell in love with Perl. It was the summer of 1995, and peliom and I had just met, and were working at the Lab. Postscript hacking using MacPerl on OS 8. It was beautiful. That was more than ten years ago, and even though I&#8217;ve remained a Perl hacker the whole [...]]]></description>
			<content:encoded><![CDATA[<p>I remember when I fell in love with Perl. It was the summer of 1995, and peliom and I had just met, and were working at the Lab. Postscript hacking using MacPerl on OS 8. It was beautiful. </p>
<p>That was more than ten years ago, and even though I&#8217;ve remained a Perl hacker the whole time, I see massive amounts of development happening on Python and Ruby, and the Perl community seems to be slowing down (what&#8217;s up with Perl 6 anyway?), so, despite the lack of block-level scope, I think it might finally be time to move on.</p>
<p>I don&#8217;t know enough about either Python or Ruby to figure out which to learn, so I&#8217;ll learn them both, and deal with choosing one later. Along the way I&#8217;ll post some example scripts. Anyone else making the jump from Perl or PHP to something modern might find these useful. Here is the first example: printing out a directory listing using readdir and glob in your favorite scripting language:</p>
<p><span id="more-967"></span></p>
<p>[perl]<br />
<OL>
<li>!/usr/bin/perl<br />
</OL>use strict;<br />
use warnings;</p>
<p>my $dir = &#8216;/&#8217;;</p>
<p><OL>
<li> Use readdir
<li>_______________________________________________________________________________<br />
</OL>print &#8220;Directory listing in perl of $dir using readdir\n&#8221;;<br />
opendir(HANDLE, $dir) or die &#8220;Cannot opendir $dir: $!&#8221;;<br />
foreach my $file (readdir(HANDLE)) {<br />
    print &#8220;\t$file\n&#8221;;<br />
}<br />
closedir(HANDLE);</p>
<p><OL>
<li> Use globbing
<li>_______________________________________________________________________________<br />
</OL>print &#8220;Directory listing in perl of $dir using globbing\n&#8221;;<br />
foreach my $file (glob(&#8220;/*&#8221;)) {<br />
    print &#8220;\t$file\n&#8221;;<br />
}<br />
[/perl]</p>
<p>[python]<br />
<OL>
<li>!/usr/bin/python<br />
</OL><br />
import os<br />
import dircache<br />
import glob</p>
<p>dir = &#8220;/&#8221;</p>
<p><OL>
<li> Use os.listdir
<li>_______________________________________________________________________________<br />
</OL>print &#8220;Directory listing in python of &#8221; + dir + &#8221; using os.listdir&#8221;<br />
files = os.listdir(dir)<br />
for file in files:<br />
    print &#8220;\t&#8221; + file</p>
<p><OL>
<li> Use dircache
<li>_______________________________________________________________________________<br />
</OL>print &#8220;Directory listing in python of &#8221;  + dir + &#8221; using dircache&#8221;<br />
files = dircache.listdir(dir)<br />
for file in files:<br />
    print &#8220;\t&#8221; + file</p>
<p><OL>
<li> Use glob
<li>_______________________________________________________________________________<br />
</OL>print &#8220;Directory listing in python of &#8221;  + dir + &#8221; using glob&#8221;<br />
files = glob.glob(&#8220;/*&#8221;)<br />
for file in files:<br />
    print &#8220;\t&#8221; + file<br />
[/python]</p>
<p>[ruby]<br />
<OL>
<li>!/usr/bin/ruby<br />
</OL><br />
dir = &#8220;/&#8221;</p>
<p><OL>
<li> Use foreach
<li>_______________________________________________________________________________<br />
</OL>print &#8220;Directory listing in ruby of #{dir} using Dir.foreach\n&#8221;<br />
Dir.foreach(dir) {|file| print &#8220;\t#{file}\n&#8221; }</p>
<p><OL>
<li> Use glob
<li>_______________________________________________________________________________<br />
</OL>print &#8220;Directory listing in ruby of #{dir} using Dir.glob\n&#8221;<br />
files = Dir.glob(&#8220;/*&#8221;)<br />
files.each do |file| print &#8220;\t#{file}\n&#8221; end<br />
[/ruby]</p>
<p>These scripts, as well as a PHP version, are checked in <a href="http://tikitasks.svn.sourceforge.net/viewvc/tikitasks/ExampleScripts/DirectoryListing/">at SourceForge</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tikirobot.net/wp/2007/03/15/example-scripts-directory-listing-in-perl-php-python-and-ruby/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Pair Programming</title>
		<link>http://www.tikirobot.net/wp/2007/02/21/pair-programming/</link>
		<comments>http://www.tikirobot.net/wp/2007/02/21/pair-programming/#comments</comments>
		<pubDate>Thu, 22 Feb 2007 02:57:27 +0000</pubDate>
		<dc:creator>may</dc:creator>
				<category><![CDATA[bobslobster]]></category>
		<category><![CDATA[all talk]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[ninja]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.tikirobot.net/wp/2007/02/21/pair-programming/</guid>
		<description><![CDATA[I never understood what pair programming was until now. Glad someone drew a picture for me. (found on Pivotal blabs).]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.pivotalsf.com/articles/2007/02/09/my-pair-the-be-whiskered"><img id="image901" src="http://www.tikirobot.net/wp/wp-content/uploads/2007/02/dav.jpg" alt="dav.jpg" /></a><br />
I never understood what pair programming was until now.  Glad someone drew a picture for me. (found on <a href="http://blog.pivotalsf.com/articles/2007/02/09/my-pair-the-be-whiskered">Pivotal blabs</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tikirobot.net/wp/2007/02/21/pair-programming/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Lie Down on the Tracks</title>
		<link>http://www.tikirobot.net/wp/2006/09/24/lie-down-on-the-tracks/</link>
		<comments>http://www.tikirobot.net/wp/2006/09/24/lie-down-on-the-tracks/#comments</comments>
		<pubDate>Sun, 24 Sep 2006 23:50:18 +0000</pubDate>
		<dc:creator>peliom</dc:creator>
				<category><![CDATA[code code]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[tiki lifestyle]]></category>

		<guid isPermaLink="false">http://www.tikirobot.net/wp/2006/09/24/lie-down-on-the-tracks/</guid>
		<description><![CDATA[Today I&#8217;m learning what this Ruby on Rails thingy is all about. As you can see from the screencasts, it&#8217;s a web development environment optimized for Hackers on Speed. But I&#8217;m thinking I might be able to crank out a page or two. Apparently textmate is required equipment. I think my CGI.pm days are over [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rubyonrails.org/"><img align="left" src="http://www.tikirobot.net/wp/wp-content/uploads/2006/09/rails1.png"></a></p>
<p>
Today I&#8217;m learning what this <a href="http://www.rubyonrails.org">Ruby on Rails</a> thingy is all about.  As you can see from the <a href="http://www.rubyonrails.org/screencasts">screencasts</a>, it&#8217;s a web development environment optimized for <a href="http://www.37signals.com/">Hackers on Speed</a>.  But I&#8217;m thinking I might be able to crank out a page or two.  Apparently <a href="http://www.macromates.com">textmate</a> is required equipment.</p>
<p>
I think my <a href="http://search.cpan.org/dist/CGI.pm/">CGI.pm</a> days are over :-(</p>
<p>
<a href="http://www.rubyonrails.org/">Link</a> to <a href="http://www.rubyonrails.org/">Ruby on Rails</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tikirobot.net/wp/2006/09/24/lie-down-on-the-tracks/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

