<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>ThinkRuby</title>
  <link rel="alternate" type="text/html" href="http://www.thinkruby.org"/>
  <link rel="self" type="application/atom+xml" href="http://www.thinkruby.org/atom/feed"/>
  <id>http://www.thinkruby.org/atom/feed</id>
  <updated>2007-05-24T17:53:25-06:00</updated>
  <entry>
    <title>Aptana: the best IDE for RoR</title>
    <link rel="alternate" type="text/html" href="http://www.thinkruby.org/2008/06/53" />
    <id>http://www.thinkruby.org/2008/06/53</id>
    <published>2008-06-21T22:10:55-06:00</published>
    <updated>2008-06-21T22:13:55-06:00</updated>
    <author>
      <name>budsus</name>
    </author>
    <category term="Aptana" />
    <summary type="html"><![CDATA[<p>Hi all, I just want to share about an IDE that already replaced the RadRails for Ruby on Rails IDE, i.e. <a href="http://aptana.com">Aptana</a>. I use this new kind of IDE to create static HTML/XHTML, CSS, JavaScript, Ruby on Rails. This is a greate IDE. I think some of you already use this too. OK..we have to migrate to Aptana.. not RadRails again!</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>Hi all, I just want to share about an IDE that already replaced the RadRails for Ruby on Rails IDE, i.e. <a href="http://aptana.com">Aptana</a>. I use this new kind of IDE to create static HTML/XHTML, CSS, JavaScript, Ruby on Rails. This is a greate IDE. I think some of you already use this too. OK..we have to migrate to Aptana.. not RadRails again!</p>
    ]]></content>
  </entry>
  <entry>
    <title>Game Programming with Ruby</title>
    <link rel="alternate" type="text/html" href="http://www.thinkruby.org/2008/02/51" />
    <id>http://www.thinkruby.org/2008/02/51</id>
    <published>2008-02-22T19:20:05-07:00</published>
    <updated>2008-02-22T19:20:05-07:00</updated>
    <author>
      <name>budsus</name>
    </author>
    <category term="game" />
    <category term="ruby" />
    <summary type="html"><![CDATA[<p>Hi all, I really sorry 'cause I never write at this blog for very long time :D. I want to try to start it again with a small share information. This article is very interested me to figure out about how to programming it with Ruby. Sorry if this blog just like a bookmark.</p>
<p><a href="http://www.oreillynet.com/pub/a/ruby/2007/12/04/creating-games-in-ruby.html">Creating Games in Ruby</a></p>
<p>May be we can try to make ruby as our base language programming. </p>
    ]]></summary>
    <content type="html"><![CDATA[<p>Hi all, I really sorry 'cause I never write at this blog for very long time :D. I want to try to start it again with a small share information. This article is very interested me to figure out about how to programming it with Ruby. Sorry if this blog just like a bookmark.</p>
<p><a href="http://www.oreillynet.com/pub/a/ruby/2007/12/04/creating-games-in-ruby.html">Creating Games in Ruby</a></p>
<p>May be we can try to make ruby as our base language programming. </p>
    ]]></content>
  </entry>
  <entry>
    <title>Comet application with Rails</title>
    <link rel="alternate" type="text/html" href="http://www.thinkruby.org/2007/10/49" />
    <id>http://www.thinkruby.org/2007/10/49</id>
    <published>2007-10-31T02:20:36-06:00</published>
    <updated>2007-10-31T02:20:36-06:00</updated>
    <author>
      <name>yas</name>
    </author>
    <category term="rails commet ajax web2.0" />
    <summary type="html"><![CDATA[<p>Who knows the fanatastic technology called commet?<br />
Commet is the final weapon to our website much more interactive!!<br />
Of course, you know Lingr!! Very Amazing web service.<br />
Don't you want to develop the web site like Lingr with commet technology??<br />
Here is your fire starter :)<br />
At very first, we should install one plugin which is called "Shooting star!!"<br />
This plugin makes your rails application fly up to the star and your request to the web server directly reflects to the reader of your web application.<br />
OK, that's enough to enlight.<br />
Start the very small tutorial. This tutorial makes your appilcation commet :)</p>
<p><pre class="geshifilter"><ol><li style=""><div style="font-weight: normal;"><span style="color:#008000; font-style:italic;">#1: First of all, create your own project</span></div></li><li style=""><div style="font-weight: normal;">$ rails real_chat</div></li><li style=""><div style="font-weight: normal;"><span style="color:#008000; font-style:italic;">#2: Second, install the shooting star plugin with gem command</span></div></li><li style=""><div style="font-weight: normal;">$ gem install shooting_star</div></li><li style=""><div style="font-weight: normal;"><span style="color:#008000; font-style:italic;">#3: change the direction</span></div></li><li style=""><div style="font-weight: normal;">$ cd real_chat</div></li><li style=""><div style="font-weight: normal;"><span style="color:#008000; font-style:italic;">#4: initialize the shooting star, this command reacts nothing but don't worry :)</span></div></li><li style=""><div style="font-weight: normal;">$ shooting_star init</div></li><li style=""><div style="font-weight: normal;"><span style="color:#008000; font-style:italic;">#5: generate the bottom technology of commet with the generator given by shooting star</span></div></li><li style=""><div style="font-weight: normal;">$ ruby script/generate meteor</div></li><li style=""><div style="font-weight: normal;"><span style="color:#008000; font-style:italic;">#6: Also you can get the chat scaffold type the following command</span></div></li><li style=""><div style="font-weight: normal;">$ ruby script/generate chat</div></li><li style=""><div style="font-weight: normal;"><span style="color:#008000; font-style:italic;">#7: Launch your web server!!</span></div></li><li style=""><div style="font-weight: normal;">$ ruby script/server</div></li><li style=""><div style="font-weight: normal;"><span style="color:#008000; font-style:italic;">#8: Shooting star also needs to be launched</span></div></li><li style=""><div style="font-weight: normal;">$ shooting_star start</div></li></ol></pre></p>
<p>OK that's all, now time to call your buddy and try the application<br />
<a href="http://localhost:3000/chat" title="http://localhost:3000/chat">http://localhost:3000/chat</a> is your brand new comet application.<br />
there is no Ruby code... Agile!! Be agile!! Hahaha!!<br />
Time talk today's dinner dynamically with this application :)</p>
<p>I hope you enjoy the tutorial!!<br />
Thanks a lot :)</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>Who knows the fanatastic technology called commet?<br />
Commet is the final weapon to our website much more interactive!!<br />
Of course, you know Lingr!! Very Amazing web service.<br />
Don't you want to develop the web site like Lingr with commet technology??<br />
Here is your fire starter :)<br />
At very first, we should install one plugin which is called "Shooting star!!"<br />
This plugin makes your rails application fly up to the star and your request to the web server directly reflects to the reader of your web application.<br />
OK, that's enough to enlight.<br />
Start the very small tutorial. This tutorial makes your appilcation commet :)</p>
<p><pre class="geshifilter"><ol><li style=""><div style="font-weight: normal;"><span style="color:#008000; font-style:italic;">#1: First of all, create your own project</span></div></li><li style=""><div style="font-weight: normal;">$ rails real_chat</div></li><li style=""><div style="font-weight: normal;"><span style="color:#008000; font-style:italic;">#2: Second, install the shooting star plugin with gem command</span></div></li><li style=""><div style="font-weight: normal;">$ gem install shooting_star</div></li><li style=""><div style="font-weight: normal;"><span style="color:#008000; font-style:italic;">#3: change the direction</span></div></li><li style=""><div style="font-weight: normal;">$ cd real_chat</div></li><li style=""><div style="font-weight: normal;"><span style="color:#008000; font-style:italic;">#4: initialize the shooting star, this command reacts nothing but don't worry :)</span></div></li><li style=""><div style="font-weight: normal;">$ shooting_star init</div></li><li style=""><div style="font-weight: normal;"><span style="color:#008000; font-style:italic;">#5: generate the bottom technology of commet with the generator given by shooting star</span></div></li><li style=""><div style="font-weight: normal;">$ ruby script/generate meteor</div></li><li style=""><div style="font-weight: normal;"><span style="color:#008000; font-style:italic;">#6: Also you can get the chat scaffold type the following command</span></div></li><li style=""><div style="font-weight: normal;">$ ruby script/generate chat</div></li><li style=""><div style="font-weight: normal;"><span style="color:#008000; font-style:italic;">#7: Launch your web server!!</span></div></li><li style=""><div style="font-weight: normal;">$ ruby script/server</div></li><li style=""><div style="font-weight: normal;"><span style="color:#008000; font-style:italic;">#8: Shooting star also needs to be launched</span></div></li><li style=""><div style="font-weight: normal;">$ shooting_star start</div></li></ol></pre></p>
<p>OK that's all, now time to call your buddy and try the application<br />
<a href="http://localhost:3000/chat" title="http://localhost:3000/chat">http://localhost:3000/chat</a> is your brand new comet application.<br />
there is no Ruby code... Agile!! Be agile!! Hahaha!!<br />
Time talk today's dinner dynamically with this application :)</p>
<p>I hope you enjoy the tutorial!!<br />
Thanks a lot :)</p>
    ]]></content>
  </entry>
  <entry>
    <title>Ruby&#039;s method_missing</title>
    <link rel="alternate" type="text/html" href="http://www.thinkruby.org/2007/10/48" />
    <id>http://www.thinkruby.org/2007/10/48</id>
    <published>2007-10-23T01:41:57-06:00</published>
    <updated>2007-10-28T22:45:17-06:00</updated>
    <author>
      <name>zdk</name>
    </author>
    <category term="hash" />
    <category term="method_missing" />
    <category term="ruby" />
    <summary type="html"><![CDATA[<p>Normally,when ruby is not able to find the method,it usually raises<br />
"NoMethodError: undefined method "methodname"".That's what we always stuck,nothing special.<br />
Above all,because of Ruby is a kind of dynamic language,what it does exactly if it can't find the method is calling "method_missing" method and method_missing raises a NameError exception,what is the point? you're able to apply the method_missing method in your application and do something cool.When we use hash,we normally call hash["key"] or hash[:key].What if we would like to call it something like hash.key.And here is a bit tricky used of it.</p>
<p><pre class="geshifilter"><ol><li style=""><div style="font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">def</span> method_missing<span style="color:#006600; font-weight:bold;">&#40;</span> id, *args <span style="color:#006600; font-weight:bold;">&#41;</span></div></li><li style=""><div style="font-weight: normal;">      <span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#0000FF; font-weight:bold;">self</span><span style="color:#006600; font-weight:bold;">&#91;</span>id<span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#0000FF; font-weight:bold;">nil</span>?</div></li><li style=""><div style="font-weight: normal;">	      m = id.<span style="color:#9900CC;">to_s</span></div></li><li style=""><div style="font-weight: normal;">	      <span style="color:#9966CC; font-weight:bold;">if</span> /=$/ =~ m</div></li><li style=""><div style="font-weight: normal;">		<span style="color:#0000FF; font-weight:bold;">self</span><span style="color:#006600; font-weight:bold;">&#91;</span>m.<span style="color:#CC0066; font-weight:bold;">chomp</span>!<span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#006600; font-weight:bold;">&#40;</span>args.<span style="color:#9900CC;">length</span> &lt; <span style="color:#006666;">2</span> ? args<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span> : args<span style="color:#006600; font-weight:bold;">&#41;</span></div></li><li style=""><div style="font-weight: normal;">	      <span style="color:#9966CC; font-weight:bold;">else</span></div></li><li style=""><div style="font-weight: normal;">		<span style="color:#0000FF; font-weight:bold;">self</span><span style="color:#006600; font-weight:bold;">&#91;</span>m<span style="color:#006600; font-weight:bold;">&#93;</span></div></li><li style=""><div style="font-weight: normal;">	      <span style="color:#9966CC; font-weight:bold;">end</span></div></li><li style=""><div style="font-weight: normal;">      <span style="color:#9966CC; font-weight:bold;">else</span></div></li><li style=""><div style="font-weight: normal;">        <span style="color:#0000FF; font-weight:bold;">self</span><span style="color:#006600; font-weight:bold;">&#91;</span>id<span style="color:#006600; font-weight:bold;">&#93;</span></div></li><li style=""><div style="font-weight: normal;">      <span style="color:#9966CC; font-weight:bold;">end</span></div></li><li style=""><div style="font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">end</span></div></li><li style=""><div style="font-weight: normal;">h = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">&quot;foo&quot;</span> =&gt; <span style="color:#996600;">&quot;bar&quot;</span>,:blah =&gt; <span style="color:#996600;">&quot;thinkruby&quot;</span><span style="color:#006600; font-weight:bold;">&#125;</span></div></li><li style=""><div style="font-weight: normal;">h.<span style="color:#9900CC;">blah</span>  <span style="color:#008000; font-style:italic;"># =&gt; thinkruby</span></div></li><li style=""><div style="font-weight: normal;">h.<span style="color:#9900CC;">foo</span>   <span style="color:#008000; font-style:italic;"># =&gt; bar</span></div></li></ol></pre></p>
<p>It's not bad,right? </p>
    ]]></summary>
    <content type="html"><![CDATA[<p>Normally,when ruby is not able to find the method,it usually raises<br />
"NoMethodError: undefined method "methodname"".That's what we always stuck,nothing special.<br />
Above all,because of Ruby is a kind of dynamic language,what it does exactly if it can't find the method is calling "method_missing" method and method_missing raises a NameError exception,what is the point? you're able to apply the method_missing method in your application and do something cool.When we use hash,we normally call hash["key"] or hash[:key].What if we would like to call it something like hash.key.And here is a bit tricky used of it.</p>
<p><pre class="geshifilter"><ol><li style=""><div style="font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">def</span> method_missing<span style="color:#006600; font-weight:bold;">&#40;</span> id, *args <span style="color:#006600; font-weight:bold;">&#41;</span></div></li><li style=""><div style="font-weight: normal;">      <span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#0000FF; font-weight:bold;">self</span><span style="color:#006600; font-weight:bold;">&#91;</span>id<span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#0000FF; font-weight:bold;">nil</span>?</div></li><li style=""><div style="font-weight: normal;">	      m = id.<span style="color:#9900CC;">to_s</span></div></li><li style=""><div style="font-weight: normal;">	      <span style="color:#9966CC; font-weight:bold;">if</span> /=$/ =~ m</div></li><li style=""><div style="font-weight: normal;">		<span style="color:#0000FF; font-weight:bold;">self</span><span style="color:#006600; font-weight:bold;">&#91;</span>m.<span style="color:#CC0066; font-weight:bold;">chomp</span>!<span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#006600; font-weight:bold;">&#40;</span>args.<span style="color:#9900CC;">length</span> &lt; <span style="color:#006666;">2</span> ? args<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span> : args<span style="color:#006600; font-weight:bold;">&#41;</span></div></li><li style=""><div style="font-weight: normal;">	      <span style="color:#9966CC; font-weight:bold;">else</span></div></li><li style=""><div style="font-weight: normal;">		<span style="color:#0000FF; font-weight:bold;">self</span><span style="color:#006600; font-weight:bold;">&#91;</span>m<span style="color:#006600; font-weight:bold;">&#93;</span></div></li><li style=""><div style="font-weight: normal;">	      <span style="color:#9966CC; font-weight:bold;">end</span></div></li><li style=""><div style="font-weight: normal;">      <span style="color:#9966CC; font-weight:bold;">else</span></div></li><li style=""><div style="font-weight: normal;">        <span style="color:#0000FF; font-weight:bold;">self</span><span style="color:#006600; font-weight:bold;">&#91;</span>id<span style="color:#006600; font-weight:bold;">&#93;</span></div></li><li style=""><div style="font-weight: normal;">      <span style="color:#9966CC; font-weight:bold;">end</span></div></li><li style=""><div style="font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">end</span></div></li><li style=""><div style="font-weight: normal;">h = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">&quot;foo&quot;</span> =&gt; <span style="color:#996600;">&quot;bar&quot;</span>,:blah =&gt; <span style="color:#996600;">&quot;thinkruby&quot;</span><span style="color:#006600; font-weight:bold;">&#125;</span></div></li><li style=""><div style="font-weight: normal;">h.<span style="color:#9900CC;">blah</span>  <span style="color:#008000; font-style:italic;"># =&gt; thinkruby</span></div></li><li style=""><div style="font-weight: normal;">h.<span style="color:#9900CC;">foo</span>   <span style="color:#008000; font-style:italic;"># =&gt; bar</span></div></li></ol></pre></p>
<p>It's not bad,right? </p>
    ]]></content>
  </entry>
  <entry>
    <title>Handling second demensional array</title>
    <link rel="alternate" type="text/html" href="http://www.thinkruby.org/2007/10/47" />
    <id>http://www.thinkruby.org/2007/10/47</id>
    <published>2007-10-18T03:28:30-06:00</published>
    <updated>2007-10-18T03:28:30-06:00</updated>
    <author>
      <name>yas</name>
    </author>
    <category term="ruby tips" />
    <summary type="html"><![CDATA[<p>Hi all devils!!<br />
How are you.<br />
Yas is reactivated finally :)</p>
<p>Today I tried some tricky situation.</p>
<p>I needed to compact second dimensional array, which includes some id's and other elements.</p>
<p>Using id and detect the target elements and remove them.<br />
Oh my English is getting worse day by day...<br />
But I believe code talks everything instead of me :)<br />
Ok today's small piece of Ruby code is following</p>
<p><pre class="geshifilter"><ol><li style=""><div style="font-weight: normal;"><span style="color:#008000; font-style:italic;">#Compact the second demencional array</span></div></li><li style=""><div style="font-weight: normal;">arr = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span>,<span style="color:#996600;">&quot;miyake&quot;</span>,<span style="color:#996600;">&quot;password&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>,<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">1</span>,<span style="color:#996600;">&quot;miyake&quot;</span>,<span style="color:#996600;">&quot;hoge&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>,<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">2</span>,<span style="color:#996600;">&quot;hoge&quot;</span>,<span style="color:#996600;">&quot;hoge&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#93;</span></div></li><li style=""><div style="font-weight: normal;">@target = <span style="color:#006666;">0</span></div></li><li style=""><div style="font-weight: normal;">arr.<span style="color:#9900CC;">each</span> <span style="color:#006600; font-weight:bold;">&#123;</span>|a|</div></li><li style=""><div style="font-weight: normal;">  <span style="color:#9966CC; font-weight:bold;">if</span> a<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span> == @target</div></li><li style=""><div style="font-weight: normal;">    arr<span style="color:#006600; font-weight:bold;">&#91;</span>@target<span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF; font-weight:bold;">nil</span></div></li><li style=""><div style="font-weight: normal;">  <span style="color:#9966CC; font-weight:bold;">end</span></div></li><li style=""><div style="font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div></li><li style=""><div style="font-weight: normal;"><span style="color:#CC0066; font-weight:bold;">p</span> arr.<span style="color:#9900CC;">compact</span></div></li></ol></pre></p>
<p>Enjoy if you have some comment or any more great idea!!<br />
Please share with us! Thanks from Japan!</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>Hi all devils!!<br />
How are you.<br />
Yas is reactivated finally :)</p>
<p>Today I tried some tricky situation.</p>
<p>I needed to compact second dimensional array, which includes some id's and other elements.</p>
<p>Using id and detect the target elements and remove them.<br />
Oh my English is getting worse day by day...<br />
But I believe code talks everything instead of me :)<br />
Ok today's small piece of Ruby code is following</p>
<p><pre class="geshifilter"><ol><li style=""><div style="font-weight: normal;"><span style="color:#008000; font-style:italic;">#Compact the second demencional array</span></div></li><li style=""><div style="font-weight: normal;">arr = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span>,<span style="color:#996600;">&quot;miyake&quot;</span>,<span style="color:#996600;">&quot;password&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>,<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">1</span>,<span style="color:#996600;">&quot;miyake&quot;</span>,<span style="color:#996600;">&quot;hoge&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>,<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">2</span>,<span style="color:#996600;">&quot;hoge&quot;</span>,<span style="color:#996600;">&quot;hoge&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#93;</span></div></li><li style=""><div style="font-weight: normal;">@target = <span style="color:#006666;">0</span></div></li><li style=""><div style="font-weight: normal;">arr.<span style="color:#9900CC;">each</span> <span style="color:#006600; font-weight:bold;">&#123;</span>|a|</div></li><li style=""><div style="font-weight: normal;">  <span style="color:#9966CC; font-weight:bold;">if</span> a<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span> == @target</div></li><li style=""><div style="font-weight: normal;">    arr<span style="color:#006600; font-weight:bold;">&#91;</span>@target<span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF; font-weight:bold;">nil</span></div></li><li style=""><div style="font-weight: normal;">  <span style="color:#9966CC; font-weight:bold;">end</span></div></li><li style=""><div style="font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div></li><li style=""><div style="font-weight: normal;"><span style="color:#CC0066; font-weight:bold;">p</span> arr.<span style="color:#9900CC;">compact</span></div></li></ol></pre></p>
<p>Enjoy if you have some comment or any more great idea!!<br />
Please share with us! Thanks from Japan!</p>
    ]]></content>
  </entry>
  <entry>
    <title>Convert WMA to MP3</title>
    <link rel="alternate" type="text/html" href="http://www.thinkruby.org/2007/10/46" />
    <id>http://www.thinkruby.org/2007/10/46</id>
    <published>2007-10-16T00:34:15-06:00</published>
    <updated>2007-11-15T10:42:54-07:00</updated>
    <author>
      <name>zdk</name>
    </author>
    <category term="library" />
    <category term="r2mp3" />
    <category term="ruby" />
    <summary type="html"><![CDATA[<p>Mostly,we listen audio files in mp3 ,but sometime we have the audio in other formats.Then how to trancoding it to mp3?<br />
And again using powerful ruby library always help us.Like today I'd like to show you guys with<br />
<a href=http://rubyforge.org/projects/r2mp3/">R2mp3</a> library which intends to convert all audio files on the planet to mp3 with super simple Ruby code and currently support wma,m4a(aac),ra(rm).</p>
<p>Requirement software<br />
(on Ubuntu)<br />
$sudo apt-get install mplayer lame<br />
(on OS X)<br />
$sudo port install mplayer lame</p>
<p>Install the library<br />
$sudo gem install r2mp3<br />
or<br />
$svn checkout <a href="http://r2mp3.rubyforge.org/svn/trunk/" title="http://r2mp3.rubyforge.org/svn/trunk/">http://r2mp3.rubyforge.org/svn/trunk/</a> r2mp3</p>
<p>Start Coding</p>
<pre class="geshifilter"><ol><li style=""><div style="font-weight: normal;"><span style="color:#CC0066; font-weight:bold;">require</span> 'rubygems' <span style="color:#008000; font-style:italic;"># if install using gem</span></div></li><li style=""><div style="font-weight: normal;"><span style="color:#CC0066; font-weight:bold;">require</span> 'r2mp3'</div></li><li style=""><div style="font-weight: normal;">Converter.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>:convert=&gt;:wma,:file=&gt;<span style="color:#996600;">&quot;test.wma&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span>|f| f.<span style="color:#9900CC;">to_mp3</span> <span style="color:#006600; font-weight:bold;">&#125;</span></div></li></ol></pre></p>
<p>test.mp3 is already there.Thanks R2mp3.<br />
We don't need to download any fancy gui programs,do we? :)</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>Mostly,we listen audio files in mp3 ,but sometime we have the audio in other formats.Then how to trancoding it to mp3?<br />
And again using powerful ruby library always help us.Like today I'd like to show you guys with<br />
<a href=http://rubyforge.org/projects/r2mp3/">R2mp3</a> library which intends to convert all audio files on the planet to mp3 with super simple Ruby code and currently support wma,m4a(aac),ra(rm).</p>
<p>Requirement software<br />
(on Ubuntu)<br />
$sudo apt-get install mplayer lame<br />
(on OS X)<br />
$sudo port install mplayer lame</p>
<p>Install the library<br />
$sudo gem install r2mp3<br />
or<br />
$svn checkout <a href="http://r2mp3.rubyforge.org/svn/trunk/" title="http://r2mp3.rubyforge.org/svn/trunk/">http://r2mp3.rubyforge.org/svn/trunk/</a> r2mp3</p>
<p>Start Coding<br />
<pre class="geshifilter"><ol><li style=""><div style="font-weight: normal;"><span style="color:#CC0066; font-weight:bold;">require</span> 'rubygems' <span style="color:#008000; font-style:italic;"># if install using gem</span></div></li><li style=""><div style="font-weight: normal;"><span style="color:#CC0066; font-weight:bold;">require</span> 'r2mp3'</div></li><li style=""><div style="font-weight: normal;">Converter.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>:convert=&gt;:wma,:file=&gt;<span style="color:#996600;">&quot;test.wma&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span>|f| f.<span style="color:#9900CC;">to_mp3</span> <span style="color:#006600; font-weight:bold;">&#125;</span></div></li></ol></pre></p>
<p>test.mp3 is already there.Thanks R2mp3.<br />
We don't need to download any fancy gui programs,do we? :)</p>
    ]]></content>
  </entry>
  <entry>
    <title>Standard Library you must know</title>
    <link rel="alternate" type="text/html" href="http://www.thinkruby.org/2007/09/45" />
    <id>http://www.thinkruby.org/2007/09/45</id>
    <published>2007-09-27T00:45:34-06:00</published>
    <updated>2007-10-16T09:07:00-06:00</updated>
    <author>
      <name>zdk</name>
    </author>
    <category term="library" />
    <category term="ruby" />
    <category term="standard" />
    <summary type="html"><![CDATA[<p>Here are Ten libraries you must have in the box.</p>
<p>1. Zlib<br />
2. Digest::MD5<br />
3. StringIO<br />
4. Tempfile<br />
5. Readline<br />
6. Find<br />
7. YAML<br />
8. dbm<br />
9. Pathname<br />
10. OptionParser</p>
<p>Fully pointed out by <a href="http://beaver.net/slides/ruby/10-easy-pieces.html">[Doug Beaver]</a><br />
(It's a bit old article,but it's all great libs)</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>Here are Ten libraries you must have in the box.</p>
<p>1. Zlib<br />
2. Digest::MD5<br />
3. StringIO<br />
4. Tempfile<br />
5. Readline<br />
6. Find<br />
7. YAML<br />
8. dbm<br />
9. Pathname<br />
10. OptionParser</p>
<p>Fully pointed out by <a href="http://beaver.net/slides/ruby/10-easy-pieces.html">[Doug Beaver]</a><br />
(It's a bit old article,but it's all great libs)</p>
    ]]></content>
  </entry>
  <entry>
    <title>RailsConf Europe 2007 is over</title>
    <link rel="alternate" type="text/html" href="http://www.thinkruby.org/2007/09/44" />
    <id>http://www.thinkruby.org/2007/09/44</id>
    <published>2007-09-26T12:26:03-06:00</published>
    <updated>2007-09-26T12:26:03-06:00</updated>
    <author>
      <name>zdk</name>
    </author>
    <category term="railsconf" />
    <summary type="html"><![CDATA[<p>  King raja wakes me up,lol.Though no technical today :)<br />
One superb conference just finished.<br />
  <a href=http://conferences.oreillynet.com/railseurope/>RAILSCONF EUROPE 2007</a><br />
you guys could check all<a href="http://www.railsconfeurope.com/pub/w/61/presentations.html"> Presentations</a> out.<br />
those cool slides covering areas as wide as Ferret, REST, Adobe Flex, Amazon S3 and JRuby.<br />
while i'm looking forward to watching DHH keynote in downloadable format.(Streaming kills me T_T)<br />
anyone has?</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>  King raja wakes me up,lol.Though no technical today :)<br />
One superb conference just finished.<br />
  <a href=http://conferences.oreillynet.com/railseurope/>RAILSCONF EUROPE 2007</a><br />
you guys could check all<a href="http://www.railsconfeurope.com/pub/w/61/presentations.html"> Presentations</a> out.<br />
those cool slides covering areas as wide as Ferret, REST, Adobe Flex, Amazon S3 and JRuby.<br />
while i'm looking forward to watching DHH keynote in downloadable format.(Streaming kills me T_T)<br />
anyone has?</p>
    ]]></content>
  </entry>
  <entry>
    <title>Ruby for Symbian S60 3rd Edition</title>
    <link rel="alternate" type="text/html" href="http://www.thinkruby.org/2007/08/43" />
    <id>http://www.thinkruby.org/2007/08/43</id>
    <published>2007-08-04T22:57:34-06:00</published>
    <updated>2007-08-04T23:00:46-06:00</updated>
    <author>
      <name>budsus</name>
    </author>
    <category term="Ruby for Symbian" />
    <summary type="html"><![CDATA[<p>I have upload the Ruby Intepreter for Symbian S60 3rd Edition. You can download from this <a href="http://www.thinkruby.org/files/S60RubySigned1.0.2.sis">link</a>, and install it on your Symbian s60 3rd phone cell. There are some limitation features that you can not find in this version. For example, after I tried this intepreter on my N73, I could not pass a parameter when run a script that receive a parameter. Once again, please refer to the <a href="http://developer.symbian.com/main/tools/opensrc/ruby/index.jsp">official Ruby for Symbian</a> site.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>I have upload the Ruby Intepreter for Symbian S60 3rd Edition. You can download from this <a href="http://www.thinkruby.org/files/S60RubySigned1.0.2.sis">link</a>, and install it on your Symbian s60 3rd phone cell. There are some limitation features that you can not find in this version. For example, after I tried this intepreter on my N73, I could not pass a parameter when run a script that receive a parameter. Once again, please refer to the <a href="http://developer.symbian.com/main/tools/opensrc/ruby/index.jsp">official Ruby for Symbian</a> site.</p>
    ]]></content>
  </entry>
  <entry>
    <title>DRECOM Award on Rails 1,000,000 Japanese Yen</title>
    <link rel="alternate" type="text/html" href="http://www.thinkruby.org/2007/07/42" />
    <id>http://www.thinkruby.org/2007/07/42</id>
    <published>2007-07-09T08:54:51-06:00</published>
    <updated>2007-07-09T08:54:51-06:00</updated>
    <author>
      <name>zdk</name>
    </author>
    <category term="award" />
    <category term="rails" />
    <summary type="html"><![CDATA[<p>"Web application using Ruby on Rails (not limeted for PC, web application for mobile is also welcome.)<br />
If Ruby on Rails is used for building a web service, there's no limitation to use other softwares and modules."<br />
<img src="http://farm2.static.flickr.com/1012/761902356_191ef70133_o.png" width="191" height="188" alt="DRECOM_award" /><br />
The competition starts from July 2 to Sep 25.<br />
the first price a new application is 1,000,000 Japanese Yen (about8,300US$) &amp; extra prize are sponsored by DRECOM (I think most guys here ever visited DRECOM ^^).</p>
<p>Check out more detail <a href="http://rails.drecom.jp/event_outline">[here]</a></p>
<p>GOOD LUCK!!</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>"Web application using Ruby on Rails (not limeted for PC, web application for mobile is also welcome.)<br />
If Ruby on Rails is used for building a web service, there's no limitation to use other softwares and modules."<br />
<img src="http://farm2.static.flickr.com/1012/761902356_191ef70133_o.png" width="191" height="188" alt="DRECOM_award" /><br />
The competition starts from July 2 to Sep 25.<br />
the first price a new application is 1,000,000 Japanese Yen (about8,300US$) &amp; extra prize are sponsored by DRECOM (I think most guys here ever visited DRECOM ^^).</p>
<p>Check out more detail <a href="http://rails.drecom.jp/event_outline">[here]</a></p>
<p>GOOD LUCK!!</p>
    ]]></content>
  </entry>
  <entry>
    <title>Ruby bindings for Qt4</title>
    <link rel="alternate" type="text/html" href="http://www.thinkruby.org/2007/07/41" />
    <id>http://www.thinkruby.org/2007/07/41</id>
    <published>2007-07-08T09:57:37-06:00</published>
    <updated>2007-07-08T10:00:08-06:00</updated>
    <author>
      <name>zdk</name>
    </author>
    <category term="gui" />
    <category term="qt4" />
    <category term="ruby" />
    <summary type="html"><![CDATA[<p>   This is just another "Hello World" blog (not in-depth one) about well-known GUI library,so called "Qt".You probably take a look at Trolltech's <a href="http://doc.trolltech.com/4.2/how-to-learn-qt.html">[How to Learn Qt]</a> tutorial.<br />
[Keep in mind that like most documents about Qt, it is very C++ oriented.]<br />
   And I use Qt4 for this example.<br />
This example shows how to create Ruby program with Ruby bindings for Qt4<br />
The underlying code is where you are able to start</p>
<pre class="geshifilter"><ol><li style=""><div style="font-weight: normal;"><span style="color:#CC0066; font-weight:bold;">require</span> 'Qt'</div></li><li style=""><div style="font-weight: normal;">app = Qt::Application.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>ARGV<span style="color:#006600; font-weight:bold;">&#41;</span></div></li><li style=""><div style="font-weight: normal;">window = Qt::Widget.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div></li><li style=""><div style="font-weight: normal;">hello = Qt::PushButton.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>'Hello!,Qt'+Qt::qVersion,window<span style="color:#006600; font-weight:bold;">&#41;</span></div></li><li style=""><div style="font-weight: normal;">quit = Qt::PushButton.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>'Quit', window<span style="color:#006600; font-weight:bold;">&#41;</span></div></li><li style=""><div style="font-weight: normal;">quit.<span style="color:#9900CC;">setGeometry</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">10</span>, <span style="color:#006666;">40</span>, <span style="color:#006666;">80</span>, <span style="color:#006666;">40</span><span style="color:#006600; font-weight:bold;">&#41;</span></div></li><li style=""><div style="font-weight: normal;">Qt::Object.<span style="color:#9900CC;">connect</span><span style="color:#006600; font-weight:bold;">&#40;</span>quit, SIGNAL<span style="color:#006600; font-weight:bold;">&#40;</span>'clicked<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>'<span style="color:#006600; font-weight:bold;">&#41;</span>, app, SLOT<span style="color:#006600; font-weight:bold;">&#40;</span>'quit<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>'<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div></li><li style=""><div style="font-weight: normal;">window.<span style="color:#9900CC;">show</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div></li><li style=""><div style="font-weight: normal;">app.<span style="color:#CC0066; font-weight:bold;">exec</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div></li></ol></pre></p>
<p>you will see something like this:<br />
<img src="http://farm2.static.flickr.com/1382/753985229_ad95a68267_o.png" width="426" height="186" alt="RQt" /></p>
    ]]></summary>
    <content type="html"><![CDATA[<p>   This is just another "Hello World" blog (not in-depth one) about well-known GUI library,so called "Qt".You probably take a look at Trolltech's <a href="http://doc.trolltech.com/4.2/how-to-learn-qt.html">[How to Learn Qt]</a> tutorial.<br />
[Keep in mind that like most documents about Qt, it is very C++ oriented.]<br />
   And I use Qt4 for this example.<br />
This example shows how to create Ruby program with Ruby bindings for Qt4<br />
The underlying code is where you are able to start<br />
<pre class="geshifilter"><ol><li style=""><div style="font-weight: normal;"><span style="color:#CC0066; font-weight:bold;">require</span> 'Qt'</div></li><li style=""><div style="font-weight: normal;">app = Qt::Application.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>ARGV<span style="color:#006600; font-weight:bold;">&#41;</span></div></li><li style=""><div style="font-weight: normal;">window = Qt::Widget.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div></li><li style=""><div style="font-weight: normal;">hello = Qt::PushButton.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>'Hello!,Qt'+Qt::qVersion,window<span style="color:#006600; font-weight:bold;">&#41;</span></div></li><li style=""><div style="font-weight: normal;">quit = Qt::PushButton.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>'Quit', window<span style="color:#006600; font-weight:bold;">&#41;</span></div></li><li style=""><div style="font-weight: normal;">quit.<span style="color:#9900CC;">setGeometry</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">10</span>, <span style="color:#006666;">40</span>, <span style="color:#006666;">80</span>, <span style="color:#006666;">40</span><span style="color:#006600; font-weight:bold;">&#41;</span></div></li><li style=""><div style="font-weight: normal;">Qt::Object.<span style="color:#9900CC;">connect</span><span style="color:#006600; font-weight:bold;">&#40;</span>quit, SIGNAL<span style="color:#006600; font-weight:bold;">&#40;</span>'clicked<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>'<span style="color:#006600; font-weight:bold;">&#41;</span>, app, SLOT<span style="color:#006600; font-weight:bold;">&#40;</span>'quit<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>'<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div></li><li style=""><div style="font-weight: normal;">window.<span style="color:#9900CC;">show</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div></li><li style=""><div style="font-weight: normal;">app.<span style="color:#CC0066; font-weight:bold;">exec</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div></li></ol></pre></p>
<p>you will see something like this:<br />
<img src="http://farm2.static.flickr.com/1382/753985229_ad95a68267_o.png" width="426" height="186" alt="RQt" /></p>
    ]]></content>
  </entry>
  <entry>
    <title>Installing Ruby on Mac OS X with MacPorts</title>
    <link rel="alternate" type="text/html" href="http://www.thinkruby.org/2007/07/39" />
    <id>http://www.thinkruby.org/2007/07/39</id>
    <published>2007-07-02T12:01:14-06:00</published>
    <updated>2007-07-02T12:08:21-06:00</updated>
    <author>
      <name>keng</name>
    </author>
    <category term="mac" />
    <category term="macports" />
    <category term="ruby" />
    <summary type="html"><![CDATA[<p>Since I'm switched to be a Mac user, some of you guys may try the eye-candy and fully animated effect GUI before, well, but the coolest thing about Mac OS X is it's an UNIX, yes UNIX.<br />
Somebody may know the great command of Linux, apt-get, and have a great experiences with this set of command, <code class="geshifilter">apt-get install PACKAGE_NAME</code>. Well, Thanks to open source software community who brought the <a href="http://www.macports.org/">MacPorts</a> to the world.<br />
Just a few clicks of eh.. let say.. left click and wait a few minute of package installation, then you can use <code class="geshifilter">port install PACKAGE</code> to install any open source software package (more info <a href="http://trac.macosforge.org/projects/macports/wiki/UsingMacPortsQuickStart">here</a>). Before I'm go so far, you just type (you may need to put your password to complete installation)</p>
<pre class="geshifilter"><li>gohan:~ keng$ sudo port install ruby</li><li>Password:</li><li>---&gt;  Fetching ruby</li><li>---&gt;  Attempting to fetch ruby-1.8.6.tar.gz from &lt;a href=&quot;http://www.ibiblio.org/pub/languages/ruby/1.8&quot; title=&quot;http://www.ibiblio.org/pub/languages/ruby/1.8&quot;&gt;http://www.ibiblio.org/pub/languages/ruby/1.8&lt;/a&gt;</li><li>---&gt;  Verifying checksum(s) for ruby</li><li>---&gt;  Extracting ruby</li><li>---&gt;  Applying patches to ruby</li><li>---&gt;  Configuring ruby</li><li>---&gt;  Building ruby with target all</li><li>---&gt;  Staging ruby into destroot</li><li>---&gt;  Installing ruby 1.8.6_0</li><li>---&gt;  Activating ruby 1.8.6_0</li><li>---&gt;  Cleaning ruby</li></pre><p>and wait for a bit while, then boom, you get you ruby installed on you mac box.<br />
To verify you ruby installation just try..</p>
<pre class="geshifilter"><li>gohan:~ keng$ ruby -v</li><li>ruby 1.8.6 (2007-03-13 patchlevel 0) [powerpc-darwin8.10.0]</li></pre><p>Yeah, that's all :D.<br />
PS. I'm not an apple fanboy, and I hate Steve Jobs sometimes. But I still loving it because of MacPorts :D.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>Since I'm switched to be a Mac user, some of you guys may try the eye-candy and fully animated effect GUI before, well, but the coolest thing about Mac OS X is it's an UNIX, yes UNIX.</p>
<p>Somebody may know the great command of Linux, apt-get, and have a great experiences with this set of command, <code class="geshifilter">apt-get install PACKAGE_NAME</code>. Well, Thanks to open source software community who brought the <a href="http://www.macports.org/">MacPorts</a> to the world.</p>
<p>Just a few clicks of eh.. let say.. left click and wait a few minute of package installation, then you can use <code class="geshifilter">port install PACKAGE</code> to install any open source software package (more info <a href="http://trac.macosforge.org/projects/macports/wiki/UsingMacPortsQuickStart">here</a>). Before I'm go so far, you just type (you may need to put your password to complete installation)<br />
<pre class="geshifilter"><ol><li style=""><div style="font-weight: normal;">gohan:~ keng$ sudo port install ruby</div></li><li style=""><div style="font-weight: normal;">Password:</div></li><li style=""><div style="font-weight: normal;">---&gt;  Fetching ruby</div></li><li style=""><div style="font-weight: normal;">---&gt;  Attempting to fetch ruby-1.8.6.tar.gz from &lt;a href=&quot;http://www.ibiblio.org/pub/languages/ruby/1.8&quot; title=&quot;http://www.ibiblio.org/pub/languages/ruby/1.8&quot;&gt;http://www.ibiblio.org/pub/languages/ruby/1.8&lt;/a&gt;</div></li><li style=""><div style="font-weight: normal;">---&gt;  Verifying checksum(s) for ruby</div></li><li style=""><div style="font-weight: normal;">---&gt;  Extracting ruby</div></li><li style=""><div style="font-weight: normal;">---&gt;  Applying patches to ruby</div></li><li style=""><div style="font-weight: normal;">---&gt;  Configuring ruby</div></li><li style=""><div style="font-weight: normal;">---&gt;  Building ruby with target all</div></li><li style=""><div style="font-weight: normal;">---&gt;  Staging ruby into destroot</div></li><li style=""><div style="font-weight: normal;">---&gt;  Installing ruby 1.8.6_0</div></li><li style=""><div style="font-weight: normal;">---&gt;  Activating ruby 1.8.6_0</div></li><li style=""><div style="font-weight: normal;">---&gt;  Cleaning ruby</div></li></ol></pre></p>
<p>and wait for a bit while, then boom, you get you ruby installed on you mac box.</p>
<p>To verify you ruby installation just try..<br />
<pre class="geshifilter"><ol><li style=""><div style="font-weight: normal;">gohan:~ keng$ ruby -v</div></li><li style=""><div style="font-weight: normal;">ruby 1.8.6 (2007-03-13 patchlevel 0) [powerpc-darwin8.10.0]</div></li></ol></pre></p>
<p>Yeah, that's all :D.</p>
<p>PS. I'm not an apple fanboy, and I hate Steve Jobs sometimes. But I still loving it because of MacPorts :D.</p>
    ]]></content>
  </entry>
  <entry>
    <title>Ruby&#039;s lexer </title>
    <link rel="alternate" type="text/html" href="http://www.thinkruby.org/2007/06/38" />
    <id>http://www.thinkruby.org/2007/06/38</id>
    <published>2007-06-09T08:19:06-06:00</published>
    <updated>2007-07-02T23:05:50-06:00</updated>
    <author>
      <name>zdk</name>
    </author>
    <category term="lexical" />
    <category term="ruby" />
    <summary type="html"><![CDATA[<p>I just find out something like this:</p>
<pre class="geshifilter"><ol><li style=""><div style="font-weight: normal;">a = <span style="color:#006666;">2</span>.71828_18284_59045_23536</div></li><li style=""><div style="font-weight: normal;"><span style="color:#CC0066; font-weight:bold;">p</span> a</div></li><li style=""><div style="font-weight: normal;">b = 1_000_000</div></li><li style=""><div style="font-weight: normal;"><span style="color:#CC0066; font-weight:bold;">p</span> b</div></li><li style=""><div style="font-weight: normal;">c = 0xa</div></li><li style=""><div style="font-weight: normal;"><span style="color:#CC0066; font-weight:bold;">p</span> c</div></li></ol></pre><p>
Result:</p>
<pre class="geshifilter"><ol><li style=""><div style="font-weight: normal;"><span style="color: #cc66cc;">2.71828182845905</span></div></li><li style=""><div style="font-weight: normal;"><span style="color: #cc66cc;">1000000</span></div></li><li style=""><div style="font-weight: normal;"><span style="color: #cc66cc;">10</span></div></li></ol></pre></p>
<p>it's just what the Ruby lexer works.<br />
it's such a funny stuff that I should look out - -'</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>I just find out something like this:<br />
<pre class="geshifilter"><ol><li style=""><div style="font-weight: normal;">a = <span style="color:#006666;">2</span>.71828_18284_59045_23536</div></li><li style=""><div style="font-weight: normal;"><span style="color:#CC0066; font-weight:bold;">p</span> a</div></li><li style=""><div style="font-weight: normal;">b = 1_000_000</div></li><li style=""><div style="font-weight: normal;"><span style="color:#CC0066; font-weight:bold;">p</span> b</div></li><li style=""><div style="font-weight: normal;">c = 0xa</div></li><li style=""><div style="font-weight: normal;"><span style="color:#CC0066; font-weight:bold;">p</span> c</div></li></ol></pre><br />
Result:<br />
<pre class="geshifilter"><ol><li style=""><div style="font-weight: normal;"><span style="color: #cc66cc;">2.71828182845905</span></div></li><li style=""><div style="font-weight: normal;"><span style="color: #cc66cc;">1000000</span></div></li><li style=""><div style="font-weight: normal;"><span style="color: #cc66cc;">10</span></div></li></ol></pre></p>
<p>it's just what the Ruby lexer works.<br />
it's such a funny stuff that I should look out - -'</p>
    ]]></content>
  </entry>
  <entry>
    <title>XRuby:Just another way on JVM</title>
    <link rel="alternate" type="text/html" href="http://www.thinkruby.org/2007/06/37" />
    <id>http://www.thinkruby.org/2007/06/37</id>
    <published>2007-06-06T20:30:51-06:00</published>
    <updated>2007-06-06T20:30:51-06:00</updated>
    <author>
      <name>zdk</name>
    </author>
    <category term="jvm" />
    <category term="ruby" />
    <category term="xruby" />
    <summary type="html"><![CDATA[<p>The current stable version of <a href="http://code.google.com/p/xruby/">XRuby</a> is 0.2.0, released on May 15, 2007.<br />
XRuby is the first Ruby to Java compiler which compiles Ruby source code (.rb) to Java bytecode (.class) and this is a different approach to JRuby, which aims to work just as the Ruby interpreter.<br />
*And in most benchmark tests, XRuby is much faster than Ruby 1.8.5.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>The current stable version of <a href="http://code.google.com/p/xruby/">XRuby</a> is 0.2.0, released on May 15, 2007.<br />
XRuby is the first Ruby to Java compiler which compiles Ruby source code (.rb) to Java bytecode (.class) and this is a different approach to JRuby, which aims to work just as the Ruby interpreter.<br />
*And in most benchmark tests, XRuby is much faster than Ruby 1.8.5.</p>
    ]]></content>
  </entry>
  <entry>
    <title>Vim 7</title>
    <link rel="alternate" type="text/html" href="http://www.thinkruby.org/2007/05/35" />
    <id>http://www.thinkruby.org/2007/05/35</id>
    <published>2007-05-24T17:52:44-06:00</published>
    <updated>2007-05-24T17:53:25-06:00</updated>
    <author>
      <name>kuro</name>
    </author>
    <category term="vim omnifunc vim-ruby rails.vim" />
    <summary type="html"><![CDATA[<p>I like vi. I can use it very quickly and lightly.<br />
Vim is powerful and quick, so I like vim very much.<br />
When I write Ruby code, I use Vim.<br />
Vim has many functions to support writing codes such as completions and<br />
"omnifunc".</p>
<p>Newest version of Vim is 7, so let's try Vim 7.</p>
<p>If you are Windows user, you can get it follows; <a href="http://www.kaoriya.net/#VIM70" title="http://www.kaoriya.net/#VIM70">http://www.kaoriya.net/#VIM70</a></p>
<p>Linux or BSD user can use package system such as apt, yum or ports.</p>
<p>Yes, I use Mac OS X! I installed Vim 7 from MacPorts.<br />
<a href="http://www.macports.org/" title="http://www.macports.org/">http://www.macports.org/</a><br />
MacPorts have many useful Unix applications and utils.</p>
<p>When you finish, please type "vim foo.rb".<br />
You can edit "foo.rb" in Ruby mode; auto indent, coloring, and more.</p>
<p>When you define useful method "bar", you may write "obj.bar" everywhere in "foo.rb" . You can type "b" and Ctrl + p and vim will complete "ar" instead you write full spelling "bar".</p>
<p>You can install "vim-ruby" from rubygems. Please install now.</p>
<p>"omnifunc" is new function of Vim 7.<br />
"omnifunc" and "rails.vim" will help writing Rails code.<br />
You can get it follows; <a href="http://www.vim.org/scripts/script.php?script_id=1567" title="http://www.vim.org/scripts/script.php?script_id=1567">http://www.vim.org/scripts/script.php?script_id=1567</a></p>
    ]]></summary>
    <content type="html"><![CDATA[<p>I like vi. I can use it very quickly and lightly.<br />
Vim is powerful and quick, so I like vim very much.<br />
When I write Ruby code, I use Vim.<br />
Vim has many functions to support writing codes such as completions and<br />
"omnifunc".</p>
<p>Newest version of Vim is 7, so let's try Vim 7.</p>
<p>If you are Windows user, you can get it follows; <a href="http://www.kaoriya.net/#VIM70" title="http://www.kaoriya.net/#VIM70">http://www.kaoriya.net/#VIM70</a></p>
<p>Linux or BSD user can use package system such as apt, yum or ports.</p>
<p>Yes, I use Mac OS X! I installed Vim 7 from MacPorts.<br />
<a href="http://www.macports.org/" title="http://www.macports.org/">http://www.macports.org/</a><br />
MacPorts have many useful Unix applications and utils.</p>
<p>When you finish, please type "vim foo.rb".<br />
You can edit "foo.rb" in Ruby mode; auto indent, coloring, and more.</p>
<p>When you define useful method "bar", you may write "obj.bar" everywhere in "foo.rb" . You can type "b" and Ctrl + p and vim will complete "ar" instead you write full spelling "bar".</p>
<p>You can install "vim-ruby" from rubygems. Please install now.</p>
<p>"omnifunc" is new function of Vim 7.<br />
"omnifunc" and "rails.vim" will help writing Rails code.<br />
You can get it follows; <a href="http://www.vim.org/scripts/script.php?script_id=1567" title="http://www.vim.org/scripts/script.php?script_id=1567">http://www.vim.org/scripts/script.php?script_id=1567</a></p>
    ]]></content>
  </entry>
</feed>
