<?xml version="1.0"?>
<rss version="2.0">
<channel>
  <title>Weiqi Gao&#039;s Observations - jruby tag</title>
  <link>http://www.weiqigao.com/blog/tags/jruby/</link>
  <description>Sharing My Experience...</description>
  <language>en</language>
  <copyright>Weiqi Gao</copyright>
  <lastBuildDate>Fri, 11 May 2012 12:48:36 GMT</lastBuildDate>
  <generator>Pebble (http://pebble.sourceforge.net)</generator>
  <docs>http://backend.userland.com/rss</docs>
  
  <image>
    <url>http://pebble.sourceforge.net/common/images/powered-by-pebble.gif</url>
    <title>Weiqi Gao&#039;s Observations</title>
    <link>http://www.weiqigao.com/blog/</link>
  </image>
  
  
  <item>
    <title>Your jirb, groovysh and clj Commands Doesn&#039;t Work In Cygwin</title>
    <link>http://www.weiqigao.com/blog/2008/04/08/your_jirb_groovysh_and_clj_commands_doesnt_work_in_cygwin.html</link>
    
      
        <description>
          &lt;p&gt;This is another one of those &lt;em&gt;making things work in Cygwin&lt;/em&gt; posts.  You can safely skip this post if you are not married to &lt;a href= &#034;http://cygwin.com/&#034; &gt;Cygwin&lt;/a&gt;, or have not followed my &lt;a href= &#034;http://www.weiqigao.com/blog/2006/08/14/ten_steps_to_higher_cygwin_productivity.html&#034; &gt;Ten Steps To Higher Cygwin Productivity&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The issue this time is with a little library called &lt;a href= &#034;http://jline.sourceforge.net/&#034; &gt;JLine&lt;/a&gt;, which is a BSD licensed library that brings GNU readline style command line editing to Java.  I first learned about it through the &lt;a href= &#034;http://clojure.org/reference/getting_started.html&#034; &gt;Clo&lt;i&gt;j&lt;/i&gt;ure&lt;/a&gt; programming language (a LISP with immutable variables and software transactional memory (STM)).&lt;/p&gt;

&lt;p&gt;And of course, it doesn&#039;t work in my Cygwin xterm window.  A little Googling landed me at &lt;a href= &#034;http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1822900&amp;group_id=64033&amp;atid=506056&#034; &gt;JLine issue-1822900&lt;/a&gt;.  A little looking around in the JLine source and some experiments later, I had a partial workaround, which I added as a comment to the issue.&lt;/p&gt;

&lt;p&gt;While doing the Google search, I also noticed that both Groovy and JRuby use JLine to some extend (in jirb and groovysh).  Sure enough, the same issue showed up in the Groovy JIRA as &lt;a href= &#034;http://jira.codehaus.org/browse/GROOVY-2584&#034; &gt; 	 GROOVY-2584&lt;/a&gt;, to which I added the workaround.&lt;/p&gt;

&lt;p&gt;A fresh download of the just released JRuby 1.1 showed the same symptom.  The JLine workaround can be applied directly to the &lt;tt&gt;jruby&lt;/tt&gt; script, which, thankfully, does contain infrastructure for Cygwin support.&lt;/p&gt;

&lt;p&gt;There are other issues with JLine on a Cygwin xterm.  But the workaround at least makes the repls workable.&lt;/p&gt;

&lt;p&gt;The part that makes me uncomfortable is that I don&#039;t see how this workaround can be incorporated into a patch for JLine.  In that regard, I concede Cygwin is a somewhat hacky platform.  (Jonathan and Adam, if you are still reading...)&lt;/p&gt;
        </description>
      
      
    
    
    
    <comments>http://www.weiqigao.com/blog/2008/04/08/your_jirb_groovysh_and_clj_commands_doesnt_work_in_cygwin.html#comments</comments>
    <guid isPermaLink="true">http://www.weiqigao.com/blog/2008/04/08/your_jirb_groovysh_and_clj_commands_doesnt_work_in_cygwin.html</guid>
    <pubDate>Tue, 08 Apr 2008 13:28:08 GMT</pubDate>
  </item>
  
  </channel>
</rss>

