<?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>数奇な因子</title>
	<atom:link href="http://www.numericalfactor.org/wp/feed" rel="self" type="application/rss+xml" />
	<link>http://www.numericalfactor.org/wp</link>
	<description>Numerical Factor</description>
	<lastBuildDate>Mon, 04 Jan 2010 15:13:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>2010</title>
		<link>http://www.numericalfactor.org/wp/archives/312</link>
		<comments>http://www.numericalfactor.org/wp/archives/312#comments</comments>
		<pubDate>Mon, 04 Jan 2010 14:49:39 +0000</pubDate>
		<dc:creator>line</dc:creator>
				<category><![CDATA[daily life]]></category>
		<category><![CDATA[pc]]></category>
		<category><![CDATA[university]]></category>

		<guid isPermaLink="false">http://www.numericalfactor.org/wp/?p=312</guid>
		<description><![CDATA[いつのまにか 2010 年を迎えてしまいました．明けましておめでとうございます．

昨年は論文・サークルと忙しい時期が一ヶ月おきに数回連なっていて，ここは放りっぱなしでした．学生のうちにコミケには行ってみたかったけ]]></description>
			<content:encoded><![CDATA[<p>いつのまにか 2010 年を迎えてしまいました．明けましておめでとうございます．</p>

<p>昨年は論文・サークルと忙しい時期が一ヶ月おきに数回連なっていて，ここは放りっぱなしでした．学生のうちにコミケには行ってみたかったけど，結局…．今は修論 phase の真っ最中です．</p>

<p>そして新年を迎えた途端に，自宅 PC が壊れてしまったようです（勘弁して！）．スイッチ入れても BIOS 画面すら見えない．グラフィクスカード外しても不可．たぶん HDD は生きているので，データは大丈夫なはず．
研究関係は普段から研究室のノート PC を使ってるので論文書きには困ってませんが，家で困ることが．</p>

<p>会社から出された，内定者向けの課題ができない．</p>

<p>上述のノート PC でもやれないので，早急に PC を用意しないと死ぬる…．ということがあり，PC を組む機運が高まってきました．多分 Atom+ION で．</p>
]]></content:encoded>
			<wfw:commentRss>http://www.numericalfactor.org/wp/archives/312/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>イーサネットケーブル修理</title>
		<link>http://www.numericalfactor.org/wp/archives/304</link>
		<comments>http://www.numericalfactor.org/wp/archives/304#comments</comments>
		<pubDate>Sun, 11 Jan 2009 09:38:46 +0000</pubDate>
		<dc:creator>line</dc:creator>
				<category><![CDATA[misc]]></category>

		<guid isPermaLink="false">http://www.numericalfactor.org/wp/?p=304</guid>
		<description><![CDATA[この歳にして初のイーサネットケーブルいじり．

修理といっても実際のところは壊れた端子の交換だけ．
T568B という規格だか仕様のようだ．

親が工具を持っていたので，借りてさくっと圧着．
]]></description>
			<content:encoded><![CDATA[<p>この歳にして初のイーサネットケーブルいじり．</p>

<p>修理といっても実際のところは壊れた端子の交換だけ．
<a href="http://ja.wikipedia.org/wiki/TIA/EIA-568-B">T568B</a> という規格だか仕様のようだ．</p>

<p>親が工具を持っていたので，借りてさくっと圧着．</p>
]]></content:encoded>
			<wfw:commentRss>http://www.numericalfactor.org/wp/archives/304/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rejected</title>
		<link>http://www.numericalfactor.org/wp/archives/302</link>
		<comments>http://www.numericalfactor.org/wp/archives/302#comments</comments>
		<pubDate>Mon, 01 Dec 2008 16:29:49 +0000</pubDate>
		<dc:creator>line</dc:creator>
				<category><![CDATA[science]]></category>
		<category><![CDATA[university]]></category>

		<guid isPermaLink="false">http://www.numericalfactor.org/wp/?p=302</guid>
		<description><![CDATA[前に書いた論文がRejectedとの知らせ．がっくり．

査読報告書には，
まさにこの分野の人っぽい査読者からは割と建設的な話が書いてあった．
参考になる++．そして自分の無知さを知る．いとありがたし．

ただし査読に関 [...]]]></description>
			<content:encoded><![CDATA[<p>前に書いた論文がRejectedとの知らせ．がっくり．</p>

<p>査読報告書には，
まさにこの分野の人っぽい査読者からは割と建設的な話が書いてあった．
参考になる++．そして自分の無知さを知る．いとありがたし．</p>

<p>ただし査読に関わった他の人はちょっと離れた分野の人っぽく，
（こちらにしてみれば）そんなこと言われても…的な事を理由にして不採用だった．</p>

<p>せっかくまとめたし，も少し何か考えようという話になり，
とりあえずreviseを掛けて別のとこに出してみることになりそう．</p>

<p>論文通すのって簡単じゃないですね．</p>
]]></content:encoded>
			<wfw:commentRss>http://www.numericalfactor.org/wp/archives/302/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>初めてのRuby（続き）</title>
		<link>http://www.numericalfactor.org/wp/archives/295</link>
		<comments>http://www.numericalfactor.org/wp/archives/295#comments</comments>
		<pubDate>Sun, 19 Oct 2008 15:16:16 +0000</pubDate>
		<dc:creator>line</dc:creator>
				<category><![CDATA[book]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.numericalfactor.org/wp/?p=295</guid>
		<description><![CDATA[「初めてのRuby」の残りを読んで，新たに知ったことなど．

ヒアドキュメント．Stringの%メソッドを合わせることで，
長い文字列もすっきり．
今まで何と無駄で読みにくいコードを書いていたのかと．

変数が保持するも [...]]]></description>
			<content:encoded><![CDATA[<p>「初めてのRuby」の残りを読んで，新たに知ったことなど．</p>

<p>ヒアドキュメント．<code>String</code>の%メソッドを合わせることで，
長い文字列もすっきり．
今まで何と無駄で読みにくいコードを書いていたのかと．</p>

<p>変数が保持するものは，オブジェクトへの参照．ラベル付け．
どこからも参照されなくなるとGCのときに回収される?</p>

<p><code>nil/false</code>は偽であること，
変数は大体初期値が<code>nil</code>であること，
論理演算子が真偽値ではなくオペランドを返すことを利用して，
次のような初期化イディオムが使える．</p>

<pre><code>  @instance_var ||= some_value
</code></pre>

<p><code>if/for/while/case</code>は値を返す制御文なので制御式と呼ばれる．
ていうか値を返すのか．</p>

<pre><code>some_var = if some_cond then
  value
else
  another_value
end
</code></pre>

<p><code>case</code>制御式のために<code>case</code>比較演算子<code>===</code>がある．</p>

<p><code>catch/throw</code>でネストしたループを脱出．
自分はたまに再帰で構文解析とかやるとC++の例外でほぼ同じような事を…．</p>

<p>コードブロックをオブジェクトとして扱う．
確かにイテレータメソッドは幾度も使って慣れてきたけど，
<code>Proc</code>でコード片をオブジェクトにして渡し，
あとで使うなどということを意識してやったことはなかった．</p>

<p><code>attr_accessor</code>メソッドで属性定義が簡単にできる．
以下のように書くと，<code>Student</code>クラスに<code>name/student_id</code>の
getterとsetterが自動で定義される．</p>

<pre><code>class Student
  attr_accessor :name, :student_id

  def to_s
    "#{@name}, \##{@student_id}"
  end
end

student = Student.new
student.name = "line"
student.student_id = "1234cs567"
puts student    #=&gt; line, #1234cs567
</code></pre>

<p>特異メソッド，特異クラス，メタクラスの関係がまだ把握できていない．
ここでいう「特異」は&#8221;singleton&#8221;と訳すと知った． singularかと思ってました．</p>
]]></content:encoded>
			<wfw:commentRss>http://www.numericalfactor.org/wp/archives/295/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>初めてのRuby</title>
		<link>http://www.numericalfactor.org/wp/archives/278</link>
		<comments>http://www.numericalfactor.org/wp/archives/278#comments</comments>
		<pubDate>Wed, 08 Oct 2008 15:39:11 +0000</pubDate>
		<dc:creator>line</dc:creator>
				<category><![CDATA[book]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.numericalfactor.org/wp/?p=278</guid>
		<description><![CDATA[<p>すみませんがサーバでエラーが起こりました。このページを再読込してください</p>論文書いてる間は我慢してたので，早速買ってみた．

4873113679,caption

今まで書いた自分のコードが如何に冗長かということが分かる．
Rubyを使うならRubyらしく考える…というのが必要でした．

配 [...]]]></description>
			<content:encoded><![CDATA[<p>すみませんがサーバでエラーが起こりました。このページを再読込してください</p><p>論文書いてる間は我慢してたので，早速買ってみた．</p>

<p><amazon>4873113679,caption</amazon></p>

<p>今まで書いた自分のコードが如何に冗長かということが分かる．
Rubyを使うならRubyらしく考える…というのが必要でした．</p>

<p>配列はオブジェクトへの参照を並べたコンテナ…という言葉から色々と分かった気がする．
参照を持ってるだけなら<a href="http://www.ruby-lang.org/ja/man/html/trap_Array.html">そういう動作</a>になるわけだよ．</p>

<p>イテレータと言うと，C++に慣れた自分は</p>

<pre><code>for (vector&lt;int&gt;::iterator ite = array.begin();
     ite != array.end(); ++it) {
  cout &lt;&lt; *ite &lt;&lt; endl;
}
</code></pre>

<p>でいうところの <var>ite</var> を想像するのだけど，
Rubyではブロック引数をとる<strong>メソッド</strong>がイテレータ．
何が違うのかと思い<a href="http://ja.wikipedia.org/wiki/%E3%82%A4%E3%83%86%E3%83%AC%E3%83%BC%E3%82%BF">Wikipediaを見た</a>ら，
<q>イテレータには内部イテレータと外部イテレータの区分がある</q>とのこと．なるほど．</p>

<p>Stringには%メソッドがあるのでsprintfは要らないようだ．</p>

<p>シンボルのことをinternされた文字列のようなものと言っていたけど，
まずinternが分からない自分涙目．</p>

<p>途中まで読んで，気になったのはこんなところか．知らないことがたくさんあるなぁ．</p>
]]></content:encoded>
			<wfw:commentRss>http://www.numericalfactor.org/wp/archives/278/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>投稿</title>
		<link>http://www.numericalfactor.org/wp/archives/274</link>
		<comments>http://www.numericalfactor.org/wp/archives/274#comments</comments>
		<pubDate>Sat, 04 Oct 2008 15:02:17 +0000</pubDate>
		<dc:creator>line</dc:creator>
				<category><![CDATA[university]]></category>

		<guid isPermaLink="false">http://www.numericalfactor.org/wp/?p=274</guid>
		<description><![CDATA[論文出した．ここ一ヶ月はこれに掛かりきりだった．

しばらくは堅い文章書きたくない…．
]]></description>
			<content:encoded><![CDATA[<p>論文出した．ここ一ヶ月はこれに掛かりきりだった．</p>

<p>しばらくは堅い文章書きたくない…．</p>
]]></content:encoded>
			<wfw:commentRss>http://www.numericalfactor.org/wp/archives/274/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>最近気になること</title>
		<link>http://www.numericalfactor.org/wp/archives/271</link>
		<comments>http://www.numericalfactor.org/wp/archives/271#comments</comments>
		<pubDate>Fri, 19 Sep 2008 16:56:37 +0000</pubDate>
		<dc:creator>line</dc:creator>
				<category><![CDATA[book]]></category>

		<guid isPermaLink="false">http://www.numericalfactor.org/wp/?p=271</guid>
		<description><![CDATA[森博嗣の小説に関して．もうすぐ執筆活動を止めると聞いたので．


女王シリーズの3作目は出るのか
スカイクロラシリーズの文庫は単色の表紙に戻るのかどうか
Gシリーズ/Xシリーズは完結するのか(目薬α〜は読んでない)]]></description>
			<content:encoded><![CDATA[<p>森博嗣の小説に関して．もうすぐ執筆活動を止めると聞いたので．</p>

<ul>
<li>女王シリーズの3作目は出るのか</li>
<li>スカイクロラシリーズの文庫は単色の表紙に戻るのかどうか</li>
<li>Gシリーズ/Xシリーズは完結するのか(目薬α〜は読んでない)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.numericalfactor.org/wp/archives/271/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>すぱこん</title>
		<link>http://www.numericalfactor.org/wp/archives/268</link>
		<comments>http://www.numericalfactor.org/wp/archives/268#comments</comments>
		<pubDate>Wed, 20 Aug 2008 13:42:17 +0000</pubDate>
		<dc:creator>line</dc:creator>
				<category><![CDATA[university]]></category>

		<guid isPermaLink="false">http://www.numericalfactor.org/wp/?p=268</guid>
		<description><![CDATA[SR11000とHA8000を見ることができた．

HAはルータにもっさぁーとケーブルが刺さってて，さすがにデカいクラスタだ…という感じ．床下もケーブルが大量に這い回っていた．
SRは見た目綺麗．ノードの動作状況を示すL [...]]]></description>
			<content:encoded><![CDATA[<p>SR11000とHA8000を見ることができた．</p>

<p>HAはルータにもっさぁーとケーブルが刺さってて，さすがにデカいクラスタだ…という感じ．床下もケーブルが大量に這い回っていた．
SRは見た目綺麗．ノードの動作状況を示すLEDが見れた．既に3年動いてるだけあって(?)だいたい点灯している．</p>

<p>そしてどちらの部屋も寒かった．</p>
]]></content:encoded>
			<wfw:commentRss>http://www.numericalfactor.org/wp/archives/268/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>セッション+リバースプロクシで悩んだ</title>
		<link>http://www.numericalfactor.org/wp/archives/267</link>
		<comments>http://www.numericalfactor.org/wp/archives/267#comments</comments>
		<pubDate>Sun, 20 Jul 2008 17:44:32 +0000</pubDate>
		<dc:creator>line</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.numericalfactor.org/wp/?p=267</guid>
		<description><![CDATA[Apache モジュール mod_proxy を使ってリバースプロクシを掛けているwebサーバとの間で，cgiからセッション情報をやり取りしたかったのだけど，さっぱりうまくいかず，なぜかクッキーファイルが量産されていた… [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://httpd.apache.org/docs/2.2/ja/mod/mod_proxy.html">Apache モジュール mod_proxy</a> を使ってリバースプロクシを掛けているwebサーバとの間で，cgiからセッション情報をやり取りしたかったのだけど，さっぱりうまくいかず，なぜかクッキーファイルが量産されていた…つまり常に新しいセッションが作られていた．</p>

<p>答えは，クライアントが見ている（と思っている）サーバと実際にcgiが動いているサーバが違うとかそんな理由で，サーバ側とクライアント側でクッキーのドメインとかパスが食い違っていたせいと思われます．
というわけで，ProxyPass/ProxyPassReverseディレクティブだけでなく，以下の二つも設定してやり（上のリンク先参照），双方の齟齬を埋めてやらないといけないのでした．</p>

<pre><code>ProxyPassReverseCookieDomain internal-domain public-domain
ProxyPassReverseCookiePath internal-path public-path
</code></pre>

<p>これでおk．一仕事終えたので，寝よう．</p>
]]></content:encoded>
			<wfw:commentRss>http://www.numericalfactor.org/wp/archives/267/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ICFP08が始まる</title>
		<link>http://www.numericalfactor.org/wp/archives/266</link>
		<comments>http://www.numericalfactor.org/wp/archives/266#comments</comments>
		<pubDate>Fri, 11 Jul 2008 13:23:46 +0000</pubDate>
		<dc:creator>line</dc:creator>
				<category><![CDATA[misc]]></category>

		<guid isPermaLink="false">http://www.numericalfactor.org/wp/?p=266</guid>
		<description><![CDATA[ACM/ICPCの国内予選が終わったばかりですが，今度は11th ICFP Programming Contestが土曜の朝4時から始まります．

ACM/ICPCとはまた違った感じなんでしょうか．とりあえずICPCの国 [...]]]></description>
			<content:encoded><![CDATA[<p>ACM/ICPCの<a href="http://sparth.u-aizu.ac.jp/icpc2008/d_result.php">国内予選</a>が終わったばかりですが，今度は<a href="http://www.icfpcontest.org/">11th ICFP Programming Contest</a>が土曜の朝4時から始まります．</p>

<p>ACM/ICPCとはまた違った感じなんでしょうか．とりあえずICPCの国内予選は通過できたので，こちらも頑張ってみたい．まずは3時くらいまで寝よう．</p>
]]></content:encoded>
			<wfw:commentRss>http://www.numericalfactor.org/wp/archives/266/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
