<?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>Sarah Mei &#187; japanese</title>
	<atom:link href="http://www.sarahmei.com/blog/tag/japanese/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sarahmei.com/blog</link>
	<description></description>
	<lastBuildDate>Sun, 22 Jan 2012 20:16:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Speak Ruby in Japanese</title>
		<link>http://www.sarahmei.com/blog/2010/09/04/speak-ruby-in-japanese/</link>
		<comments>http://www.sarahmei.com/blog/2010/09/04/speak-ruby-in-japanese/#comments</comments>
		<pubDate>Sat, 04 Sep 2010 21:59:32 +0000</pubDate>
		<dc:creator>sarahmei</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[japan]]></category>
		<category><![CDATA[japanese]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[pairprogramming]]></category>
		<category><![CDATA[rubykaigi]]></category>

		<guid isPermaLink="false">http://www.sarahmei.com/blog/?p=678</guid>
		<description><![CDATA[I&#8217;ve studied Japanese on and off for more than ten years &#8211; mostly &#8220;off.&#8221; I took a year of language when I was in college, but since then it&#8217;s just been periodic classes at Soko Gakuen in San Francisco. I managed to pass the JLPT level 3 a few years ago, so in Japan last [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve studied Japanese on and off for more than ten years &#8211; mostly &#8220;off.&#8221; I took a year of language when I was in college, but since then it&#8217;s just been periodic classes at <a href="http://sokogakuen.org/" target="_blank">Soko Gakuen</a> in San Francisco.</p>
<p>I managed to pass the JLPT level 3 a few years ago, so in Japan last month, I was decent at ordering food and navigating the subway. But I quickly discovered that I couldn&#8217;t really talk to another programmer. None of my classes even taught me how to say &#8220;programmer,&#8221; let alone &#8220;code,&#8221; &#8220;object,&#8221; &#8220;method,&#8221; &#8220;development environment&#8221;&#8230;<span id="more-678"></span></p>
<div id="attachment_726" class="wp-caption alignleft" style="width: 310px"><a href="http://www.sarahmei.com/blog/wp-content/uploads/2010/09/pair-programming-1.jpg"><img class="size-medium wp-image-726" title="pair-programming-1" src="http://www.sarahmei.com/blog/wp-content/uploads/2010/09/pair-programming-1-300x223.jpg" alt="" width="300" height="223" /></a><p class="wp-caption-text">@sarahmei, @t_wada, @sakuro (photo by Lee Lundrigan)</p></div>
<p>Dictionaries would normally be my next recourse, but it&#8217;s pretty hard to look this stuff up. As in the US, programmer culture in Japan has its own slang. But I had a chance to pair with some Japanese devs at the Pair Programming Cultural Exchange that <a href="http://twitter.com/t_wada" target="_blank">@t_wada</a> and I ran at RubyKaigi (see left), so I picked up a little bit. And since I&#8217;ve been back, I&#8217;ve been translating technical articles for fun. (What else would you do on a 12-hour flight?)</p>
<p>As a result, a lot of this list comes from my notes. I also added words I found in <a href="http://twitter.com/#search?q=rubykaigi" target="_blank">the RubyKaigi Twitter stream</a>, <a href="http://www.ultrasaurus.com/sarahblog/2009/12/japanese-geek-speak/">Sarah Allen&#8217;s blog</a>, and <a href="http://www.mightyverse.com/phrase_lists/pair-programing" target="_blank">Mightyverse&#8217;s pair programming phrases</a>, among other locations. Any errors are, of course, my own.</p>
<p>The list is short &#8211; there are many more things I&#8217;d like to know how to say. And I guessed at the right katakana for some of the loan words. So: <strong>please send additions and corrections</strong>[<a href="#thanks">*</a>], kkthx! I&#8217;ll add anything vaguely technical to the list.</p>
<p>I hope it provokes more cross-language Ruby discussion.</p>
<table border="0">
<tbody>
<tr>
<th>English</th>
<th>Kanji</th>
<th>Kana</th>
<th>Romaji</th>
</tr>
<tr>
<td>block</td>
<td></td>
<td>ブロック</td>
<td>burokku</td>
</tr>
<tr>
<td>blog</td>
<td></td>
<td>ブログ</td>
<td>burogu</td>
</tr>
<tr>
<td>cache</td>
<td></td>
<td>キャッシュ</td>
<td>kyasshu</td>
</tr>
<tr>
<td>character</td>
<td>文字</td>
<td>もじ</td>
<td>moji</td>
</tr>
<tr>
<td>code</td>
<td></td>
<td>コード</td>
<td>koudo</td>
</tr>
<tr>
<td>core library</td>
<td></td>
<td>コアライブラリ</td>
<td>koa raiburari</td>
</tr>
<tr>
<td>developer</td>
<td>開発者</td>
<td>かいはつしゃ</td>
<td>kaihatsusha</td>
</tr>
<tr>
<td>development</td>
<td>開発</td>
<td>かいはつ</td>
<td>kaihatsu</td>
</tr>
<tr>
<td>development environment</td>
<td>開発環境</td>
<td>かいはつかんきょう</td>
<td>kaihatsu kankyou</td>
</tr>
<tr>
<td>diary (often used in place of blog)</td>
<td>日記</td>
<td>にっき</td>
<td>nikki</td>
</tr>
<tr>
<td>digit</td>
<td>数字</td>
<td>すうじ</td>
<td>suuji</td>
</tr>
<tr>
<td>dot (as in foo.bar)</td>
<td></td>
<td>ドット</td>
<td>dotto</td>
</tr>
<tr>
<td>expected failure (of a test)</td>
<td>予想通りの失敗</td>
<td>よそうどおりのしっぱい</td>
<td>yosoudoori no shippai</td>
</tr>
<tr>
<td>feature</td>
<td>機能</td>
<td>きのう</td>
<td>kinou</td>
</tr>
<tr>
<td>flexible</td>
<td>柔軟</td>
<td>じゅうなん</td>
<td>juunan</td>
</tr>
<tr>
<td>full-width (as in character)</td>
<td>全角</td>
<td>ぜんかく</td>
<td>zenkaku</td>
</tr>
<tr>
<td>global (as in variable)</td>
<td></td>
<td>グローバル</td>
<td>guroubaru</td>
</tr>
<tr>
<td>hashrocket</td>
<td></td>
<td>ハッシュロ ケット</td>
<td>hasshuroketto</td>
</tr>
<tr>
<td>implementation</td>
<td>実装</td>
<td>じっそう</td>
<td>jissou</td>
</tr>
<tr>
<td>internal structure</td>
<td>内部構造</td>
<td>ないぶこうぞう</td>
<td>naibu kouzou</td>
</tr>
<tr>
<td>latest</td>
<td>最新</td>
<td>さいしん</td>
<td>saishin</td>
</tr>
<tr>
<td>method (on an object)</td>
<td></td>
<td>メソッド</td>
<td>mesoddo</td>
</tr>
<tr>
<td>modification</td>
<td>変更</td>
<td>へんこう</td>
<td>henkou</td>
</tr>
<tr>
<td>multibyte (as in character)</td>
<td>多バイト</td>
<td>たバイト</td>
<td>tabaito</td>
</tr>
<tr>
<td>multibyte (as in character)</td>
<td></td>
<td>マルチバイト</td>
<td>maruchibaito</td>
</tr>
<tr>
<td>object</td>
<td></td>
<td>オブジェクト</td>
<td>obujekuto</td>
</tr>
<tr>
<td>plugin</td>
<td></td>
<td>プラグイン</td>
<td>puraguin</td>
</tr>
<tr>
<td>programmer</td>
<td></td>
<td>プローグラーマ</td>
<td>purouguraama</td>
</tr>
<tr>
<td>refactoring</td>
<td></td>
<td>リファクタリング</td>
<td>rifakutaringu</td>
</tr>
<tr>
<td>refactoring</td>
<td>改善</td>
<td>かいぜん</td>
<td>kaizen</td>
</tr>
<tr>
<td>runtime</td>
<td></td>
<td>ランタイム</td>
<td>rantaimu</td>
</tr>
<tr>
<td>spec</td>
<td></td>
<td>スペック</td>
<td>supekku</td>
</tr>
<tr>
<td>statement</td>
<td></td>
<td>ステートメント</td>
<td>suteetomento</td>
</tr>
<tr>
<td>string</td>
<td>文字列</td>
<td>もじれつ</td>
<td>mojiretsu</td>
</tr>
<tr>
<td>test</td>
<td></td>
<td>テスト</td>
<td>tesuto</td>
</tr>
<tr>
<td>test framework</td>
<td></td>
<td>テストフレームワーク</td>
<td>tesuto fureemuwaaku</td>
</tr>
<tr>
<td>threadsafe</td>
<td></td>
<td>スレッドセーフ</td>
<td>sureddoseefu</td>
</tr>
<tr>
<td>tool</td>
<td></td>
<td>ツール</td>
<td>tsuuru</td>
</tr>
<tr>
<td>tutorial</td>
<td></td>
<td>チュートリアル</td>
<td>chuutoriaru</td>
</tr>
<tr>
<td>ugly (as in code)</td>
<td>かっこ悪い</td>
<td>かっこわるい</td>
<td>kakko warui</td>
</tr>
<tr>
<td>usage</td>
<td>使い</td>
<td>つかい</td>
<td>tsukai</td>
</tr>
<tr>
<td>variable</td>
<td>変数</td>
<td>へんすう</td>
<td>hensuu</td>
</tr>
</tbody>
</table>
<p><a name="thanks">[*]</a> ありがとう:</p>
<ul>
<li><a href="http://twitter.com/threedaymonk" target="_blank">@threedaymonk</a> for a correction to multibyte digit.</li>
<li>Nobuyoshi Nakada for corrections to variable and multibyte character/digit, and addition of full-width character/digit.</li>
<li><a href="http://twitter.com/boblet" target="_blank">@boblet</a> and <a href="http://karmag.dreamwidth.org/" target="_blank">karmag</a> for a correction to development environment.
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sarahmei.com/blog/2010/09/04/speak-ruby-in-japanese/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Travails with readline</title>
		<link>http://www.sarahmei.com/blog/2010/01/08/travails-with-readlin/</link>
		<comments>http://www.sarahmei.com/blog/2010/01/08/travails-with-readlin/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 03:59:05 +0000</pubDate>
		<dc:creator>sarahmei</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[irb]]></category>
		<category><![CDATA[japanese]]></category>
		<category><![CDATA[readline]]></category>
		<category><![CDATA[rtranslate]]></category>

		<guid isPermaLink="false">http://www.sarahmei.com/blog/?p=239</guid>
		<description><![CDATA[Applies to: Ruby 1.8.7, compiled from source, on OS X 10.6 (Snow Leopard). I&#8217;ve been working on a side project that deals with Japanese text in Ruby. I installed rtranslate, a gem that gives me programmatic access to Google Translate. I wanted to try it out in irb. >> require 'rtranslate' => true So far [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Applies to:</strong> Ruby 1.8.7, compiled from source, on OS X 10.6 (Snow Leopard).</p>
<p>I&#8217;ve been working on a side project that deals with Japanese text in Ruby. I installed <a href="http://github.com/sishen/rtranslate">rtranslate</a>, a gem that gives me programmatic access to Google Translate. I wanted to try it out in irb.</p>
<p><code>>> require 'rtranslate'<br />
=> true</code></p>
<p>So far so good.<br />
<code><br />
>> Translate.t("<br />
</code><br />
Here&#8217;s where I started to run into problems. I changed the input mode to Japanese and tried to enter はい (hai). All I got was beeping &#8211; irb wouldn&#8217;t let me enter any Japanese characters at all. I tried pasting from somewhere else &#8211; also a no go. </p>
<p>Long story short: by default, Ruby links against <a href="http://thrysoee.dk/editline/">editline</a> instead of GNU <a href="http://tiswww.case.edu/php/chet/readline/rltop.html">readline</a>, and editline doesn&#8217;t support multi-byte characters. If I started irb with the &#8211;noreadline option, it worked fine, but then none of the arrow keys worked. Highly annoying. </p>
<p>I read five different articles [<a href="http://www.jorgebernal.info/development/fixing-snow-leopard-ruby-readline">1</a>] [<a href="http://blogs.law.harvard.edu/hoanga/2009/09/08/getting-ruby-191p243-to-work-on-os-x-1058-with-japanese-input-support-on-irb/">2</a>] [<a href="http://wonko.com/post/how-to-compile-ruby-191">3</a>] [<a href="http://henrik.nyh.se/2008/03/irb-readline">4</a>] [<a href="http://www.michaelhamrah.com/blog/index.php/2009/12/getting-ruby-1-9-readline-rails-and-mysql-all-running-on-snow-leopard/">5</a>] that fixed variants of the problem; none of the solutions worked fully for me. My machine is running Snow Leopard, and I had installed Ruby 1.8.7 from source following the <a href="http://hivelogic.com/articles/compiling-ruby-rubygems-and-rails-on-snow-leopard/">Hivelogic directions</a>. So if you&#8217;re in the same boat, here&#8217;s how you get multi-byte input working:</p>
<p>1. Install GNU readline.</p>
<p><code>cd ~/src<br />
curl -O ftp://ftp.gnu.org/gnu/readline/readline-6.0.tar.gz<br />
tar xzvf readline-6.0.tar.gz<br />
cd readline-6.0<br />
./configure --prefix=/usr/local<br />
make<br />
sudo make install<br />
</code></p>
<p>The &#8211;prefix in the configure line is crucial.</p>
<p>2. Recompile Ruby, pointing at the new readline. I still had the Ruby source directory in ~/src from when I compiled it the first time (this is a relatively new laptop). If you don&#8217;t, you can just download it again.</p>
<p><code>cd ~/src<br />
curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p174.tar.gz<br />
tar xzvf ruby-1.8.7-p174.tar.gz<br />
cd ruby-1.8.7-p174<br />
make clean<br />
autoconf<br />
./configure --enable-shared --with-readline-dir=/usr/local<br />
make<br />
sudo make install<br />
</code></p>
<p>3. My profile had gotten out of whack, so I had to add this line (again) to ~/.bash_profile:</p>
<p><code>export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH<br />
</code></p>
<p>Now I can enter multi-byte characters into irb, or copy them in from elsewhere. Now I can get on with what I was actually going to do. <img src='http://www.sarahmei.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><code>>> require "rtranslate"<br />
=> true<br />
>> Translate.t("はい", "JAPANESE", "ENGLISH")<br />
=> "Yes"<br />
</code> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.sarahmei.com/blog/2010/01/08/travails-with-readlin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

