<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/xml.xsl" type="text/xsl"?><feed xmlns="http://www.w3.org/2005/Atom">
  <title>nulog, NULL::something : out of the headphone &gt; 2005 &gt; January</title>
  <link href="http://lowreal.net/logs/2005/01"/>
  <icon>http://lowreal.net/img/banner.png</icon>
  <link rel="self" type="application/atom+xml" href="http://lowreal.net/logs/2005/01.atom"/>
  <link rel="alternate" type="application/xhtml+xml" href="http://lowreal.net/logs/2005/01.xhtml"/>
  <updated>2005-01-30T03:22:28+09:00</updated>
  <author>
    <name>cho45(砂糖)</name>
  </author>
  <id>http://lowreal.net/2005/01</id>
  <entry>
    <title>2005</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/01/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/01/1.xhtml"/>
    <updated>2005-01-01T01:02:45+09:00</updated>
    <published>2005-01-01T01:02:45+09:00</published>
    <id>http://lowreal.net/2005/01/01/1</id>
    <category term="life"/>
    <category term="self"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>目標的なものはあるわけですが、経済的理由で始められるのがいつになるのか謎。</p>
        <p>書くとやる気がなくなってしまうし、タイミングが合わなくてもモチベーションがかなり落ち込むのでできるだけ早く、できれば今日からでも始める<em>必要がある</em>。去年三年間までの糞さを取り戻す必要がある。今年は変える必要がある。</p>
        <p>俺は今だいぶ鼓動が早い。よく思うんだけれど、周囲の人間ってコアは部分でどれだけ役に立つかっていったら殆ど役に立たないじゃないか。趣味の部分だけだ。コアな部分は自分が考える必要がある。バリエーションの少ないアドバイスが溢れている。つまらない。今寝る前に書いている。朝起きて今のモチベーションがどうなるかわからない。だからできるだけ思いつく限り書いておく。</p>
        <p>うさんくさい。信頼って無理</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>暇かつ忙しい</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/05/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/05/1.xhtml"/>
    <updated>2005-01-05T03:43:45+09:00</updated>
    <published>2005-01-05T03:43:45+09:00</published>
    <id>http://lowreal.net/2005/01/05/1</id>
    <category term="life"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>暇っちゃ暇ですけど、激しく時間が欲しい。はぁ。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>箱デザイナー</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/05/2.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/05/2.xhtml"/>
    <updated>2005-01-05T03:55:02+09:00</updated>
    <published>2005-01-05T03:55:02+09:00</published>
    <id>http://lowreal.net/2005/01/05/2</id>
    <category term="life"/>
    <category term="question"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>電化製品とか、そういうのが入っている箱ってなんかパズルのごとく綺麗にハマってることが多々ある。やっぱこういうの作る<em class="point">箱デザイナー</em>とかがいるんだろうか……いるといいな。箱デザイナー。なんかカコイイじゃまいか。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>メレンゲ</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/05/3.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/05/3.xhtml"/>
    <updated>2005-01-05T03:58:25+09:00</updated>
    <published>2005-01-05T03:58:25+09:00</published>
    <id>http://lowreal.net/2005/01/05/3</id>
    <category term="music"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>今日気付いたんだけど、<q>メレンゲ - [サーチライト #01] 夕凪 [5:08]</q>っていい。なんかふと気付いたら詞がちゃんと耳に入ってきた (それまでだいたい何言ってるか解ってない) ので解釈してたらいいじゃない。いいじゃない。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>夢。複雑な建物。姉</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/05/4.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/05/4.xhtml"/>
    <updated>2005-01-05T12:18:52+09:00</updated>
    <published>2005-01-05T12:18:52+09:00</published>
    <id>http://lowreal.net/2005/01/05/4</id>
    <category term="self"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>姉がでてくる夢を見た (実際にはいない) 。複雑で大きな建物の中に人がいっぱいいる。部屋がいっぱいある。あとは殆ど覚えてない。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>あれ、こえが（ｒｙ</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/06/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/06/1.xhtml"/>
    <updated>2005-01-06T03:44:53+09:00</updated>
    <published>2005-01-06T03:44:53+09:00</published>
    <id>http://lowreal.net/2005/01/06/1</id>
    <category term="life"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>っていうのが脳内でリフレインしているのはとりあえず置いておいて、もうすぐ三学期が始まる。えー。試験勉強してないなぁ。どうなるんだろう。</p>
        <p>ちょっとスクリプトを書いていたけど、殆ど完成の段階になって決定的なバグを発見したのでやめ。解決方法思いつくまで放置。</p>
        <p>そんなスクリプトのアレで、<em>開いたことのない</em>数学のチャートとか開かざるを得なかったりする。でもこういう場合の教科書は役に立つ教科書 (謎) だ。もうシラン。</p>
        <p>寝る前ぎりぎりぼーっとして何を書いているかよくわかりません。理解は（ｒｙ。とかなんとか。仕様書は原文で読むべきだな、とか。あんまりカーテンをあけないとか。無駄に緑が透き通って向こう側の空が見え隠れしたりするチラリズムとか。いいやめんどい。あー。うん</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>バナナ</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/07/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/07/1.xhtml"/>
    <updated>2005-01-07T16:26:14+09:00</updated>
    <published>2005-01-07T16:26:14+09:00</published>
    <id>http://lowreal.net/2005/01/07/1</id>
    <category term="web"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p><a href="http://www.pandora.nu/tempo-depot/notes/PC_side/Web_Browser/d050107x3.htm">サイトのバナーをキャッシュする CGI とか書いてみた - Note @ Temporary-Depot</a> 見て、あーって思って、パクった。Perl がアレなので Ruby にして拡張子じゃなくて Content-type 見るようにして、みたいな。エラー処理が結構微妙。<code class="Ruby">raise CacheImg.const_get(content).new</code> とか無理やりすぎ。なんかサッパリ頭回らない……</p>
        <p>Firefox のブックマークの Description に <q>banner:http://example.com/banner</q> とか書いて、まぁ適当に。</p>
        <p>こういうちっちゃいのはモジュールで動いている <abbr title="PHP: Hypertext Preprocessor">PHP</abbr> のほうが圧倒的に有利だろうけど、わけわからん糞言語弄るほど頭がノっていないです。</p>
        <p>Graphics から Illustration とかいう名前のフォルダに分離して、特別扱いにしたほうがよさそうだなぁ……めんどいからまた今度。ぶっちゃけリンクページとか使わないしねー</p>
        <p>注意：スクリプトの話と <abbr title="XSL Transformations">XSLT</abbr> の変換の話が混ざってます。Synchronize Bookmarks でヤるアレです。はい。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>冬へ</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/07/2.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/07/2.xhtml"/>
    <updated>2005-01-07T18:47:45+09:00</updated>
    <published>2005-01-07T18:47:45+09:00</published>
    <id>http://lowreal.net/2005/01/07/2</id>
    <category term="life"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>JR 東日本の CM がなんかいいね。</p>
        <p>CM といえば、ハイテク企業の CM ってセンスいいなぁって思う。Microsoft, IBM, Apple, etc.</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>三角形カラーピッカー</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/08/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/08/1.xhtml"/>
    <updated>2005-01-08T22:55:26+09:00</updated>
    <published>2005-01-08T22:55:26+09:00</published>
    <id>http://lowreal.net/2005/01/08/1</id>
    <category term="web"/>
    <category term="javascript"/>
    <category term="prog"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p><a href="/2005/triangle-color-selector">Painter 風のやつを JavaScript で実装した。</a>っていっても重要な部分は GIMP のコードからまるパクり。別のもっと単純な計算方法でやってたら、どう考えても三角形の範囲から色がはみ出すのでパクり。某 <abbr title="Internet Relay Chat">IRC</abbr> チャンネルで長いことチャンネル違いな話をしつつアレとかソレとか。</p>
        <p><abbr title="Internet Explorer">IE</abbr> はやる気になったらやろう……</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>アホみたいに僕は笑ってた</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/09/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/09/1.xhtml"/>
    <updated>2005-01-09T23:47:44+09:00</updated>
    <published>2005-01-09T23:47:44+09:00</published>
    <id>http://lowreal.net/2005/01/09/1</id>
    <category term="life"/>
    <category term="technology"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>アナログな文字を機械処理する書類が激しく苦手だ。機械の読み取り精度がどれほどかわかっていないので、書くのにひどく神経を使う。最初からデジタルデータを送るようにすればいいのに。入試の出願書の話ですけど、まぁミスがあってはいけないものだから、いくらか多めに可能性を考慮するわけですけど、ステップが多い。普通に自分の脳みそがイカれててわけわからない場所に書いたりだとか、実際この字の濃さ・書体で読み取れるかだとか、数値として記入する部分で間違いを犯していないかとか。機械処理させるなら書くところも機械にやらせればいいのに。あと、紙面の都合上入力できる文字に制限があるのがアレだよなぁ。10文字以上の名前の人は余計不安になるじゃないか。根拠のない仮定はするな (プログラミング基礎 セクション 5.3. <span class="fn">でっちあげ。</span>) っていうやつに似てる。</p>
        <p>個人情報なんかはなんかもっと簡単に処理できないのかなぁ。住民基本台帳とか……セキュアな問題がアレそう。</p>
        <p>理想的には個人識別用のコードと受験科目とかそういうのだけ入力してポチっておしゃ OK とか。替え玉が増えそうだけどなー。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>互いに素</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/09/2.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/09/2.xhtml"/>
    <updated>2005-01-10T01:32:40+09:00</updated>
    <published>2005-01-10T01:32:40+09:00</published>
    <id>http://lowreal.net/2005/01/09/2</id>
    <category term="life"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>そういう人間は実際のとこ結構いるんだよね。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>夢、森の中</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/10/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/10/1.xhtml"/>
    <updated>2005-01-10T12:56:29+09:00</updated>
    <published>2005-01-10T12:56:29+09:00</published>
    <id>http://lowreal.net/2005/01/10/1</id>
    <category term="self"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>森の中の家。たぶん三階建て。地下に台所。一階は操作室。いたるところに中身が空っぽな自動販売機。好奇心旺盛な女の子。謎の男。どうやってでるか。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>CSS 切り替えのユーザビリティ</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/11/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/11/1.xhtml"/>
    <updated>2005-01-11T04:00:58+09:00</updated>
    <published>2005-01-11T04:00:58+09:00</published>
    <id>http://lowreal.net/2005/01/11/1</id>
    <category term="web"/>
    <category term="script"/>
    <category term="css"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p><abbr title="Cascading Style Sheets">CSS</abbr> 切り替えスクリプトみたいなのを使って、ページ内にドロップダウンとかつけているサイトは結構あるけど、スタイルを変えるごとにそのドロップダウンがどっか別に場所に移動したりするのはなんかアレだなって思う……見失って元に戻すのまで若干混乱する。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>バナーをキャッスのソース</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/11/2.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/11/2.xhtml"/>
    <updated>2005-01-11T04:22:46+09:00</updated>
    <published>2005-01-11T04:22:46+09:00</published>
    <id>http://lowreal.net/2005/01/11/2</id>
    <category term="web"/>
    <category term="prog"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p><a href="http://lowreal.net/logs//2005/01/07.atom/1">バナナ</a>: <a href="/2005/cache.rb">cache.rb</a></p>
        <p>なんかやっぱソースが汚いけどとりあえず置いとく。</p>
        <p>ちなみにうちは以下のような構成</p>
        <ol>
          <li>img/
						<ol><li>cache/
								<ol><li>.htaccess</li><li>cache.rb</li><li>http%3a%2f%2f...</li><li>...</li></ol></li></ol></li>
        </ol>
        <p>.htaccess でアクセス制限＆DirectoryIndex cache.rb 設定みたいな。アクセス制限よりスクリプトでパーミッション設定してもいい気もする。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>三学期特別授業</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/11/3.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/11/3.xhtml"/>
    <updated>2005-01-11T10:50:10+09:00</updated>
    <published>2005-01-11T10:50:10+09:00</published>
    <id>http://lowreal.net/2005/01/11/3</id>
    <category term="life"/>
    <category term="school"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>三学期特別授業なるものを実はとっていたりしたり。というのも一応試験直前に勉強脳に切り替え、リハビリするためなんだけど実際どうなのよ、とかいうのをもう既に遅刻な時間 (振込みとか郵便局とかごちゃごちゃやってた) にやっているわけでやっぱ意味気もする。</p>
        <p>勉強脳、とかいたけれど、ここでの<em class="point">勉強</em>は即ち読んで字のごとく<em>強</em>いられる<em>勉</em>学 (ただしここで勉学を勉強と読み替えると軽く再帰的になって混乱する。Ruby でいうなら alias を使ってメソッドを宣言したのごとく前のメソッドは前のメソッドのまま的な) なわけで以下略。</p>
        <p>さて着替えしよう。</p>
        <ins datetime="2005-01-12T03:42:40+09:00">
          <p>やっぱこの時期はセンター対策だった。なんか<abbr title="現代国語">現国</abbr>は運だ。うん。運がよければ満点いける。</p>
        </ins>
      </div>
    </content>
  </entry>
  <entry>
    <title>ソレっぽさ</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/12/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/12/1.xhtml"/>
    <updated>2005-01-12T03:27:34+09:00</updated>
    <published>2005-01-12T03:27:34+09:00</published>
    <id>http://lowreal.net/2005/01/12/1</id>
    <category term="life"/>
    <category term="thinking"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>一番重要なのは雰囲気で、それが実際にありえるかどうかは大した問題じゃない。とはいえ最低限のリアリティは必要。まぁ結局場合によるけれど……</p>
        <p>さて、ニ段落目を書いては消し、書いては消し、結局うまく文章化できなかった。こういうのが多いな。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>chokan 再実装</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/12/2.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/12/2.xhtml"/>
    <updated>2005-01-12T22:21:34+09:00</updated>
    <published>2005-01-12T22:21:34+09:00</published>
    <id>http://lowreal.net/2005/01/12/2</id>
    <category term="prog"/>
    <category term="ruby"/>
    <category term="irc"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p><abbr title="Internet Relay Chat">IRC</abbr> BOT を作り直し。RICE 使うことにする。</p>
        <p>プラグインのロード方法を変えた。新しい無名のモジュールを作ってその中で実行してクラスのインスタンスを得るようにする。そうすれば空間が汚れないし <abbr title="Garbage Collect">GC</abbr> 的にも嬉しいっぽい。たぶん。</p>
        <pre class="Ruby" title="PluginManager#load">    def load(klass_name)
        filename = klass2file(klass_name)

        mod = Module.new
        mod.module_eval(File.open("#{dir}/#{filename}") {|f| f.read}, filename)

        c = nil
        begin
            c = mod.const_get(klass_name)
        rescue NameError
            raise ClassNotFoundError.new("#{dir}/#{filename} must include #{klass_name} class")
        end

        # @klass (new に渡した上位クラス) を継承していなかったらエラー
        if c &lt; @klass
            @plugins[klass_name] = {
                :instance =&gt; c.new,
                :loaded   =&gt; Time.now,
            }
        else
            raise NotInheritAbstractClassError.new("The class #{klass_name} must inherit #{@klass}")
        end

        klass_name
    end
</pre>
        <p>Abstract っていうのはなんか違う気がする。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>夢、動物の学校</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/13/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/13/1.xhtml"/>
    <updated>2005-01-13T15:15:43+09:00</updated>
    <published>2005-01-13T15:15:43+09:00</published>
    <id>http://lowreal.net/2005/01/13/1</id>
    <category term="self"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>生徒に動物が混ざっている。でも違和感は特にない。誰も気にしない。動物たちはもともと人間であった。彼らは望んで動物になった。何故だかは知らない。人間の頃の写真を見た。今はライオンの人が印象に残っている。持ち物検査か何かがあるらしくライオンは途中でどっかにいった。ライオンはあまり成績はよろしくない。でも他の生徒からは割りとすかれている存在だった。俺はその教室の中にいつのまにかいる。本校舎から教室が分離してある。</p>
        <p>場面が変わって雪山。スキーをつけずに滑り降りる。(ファンスキーをもっとちっちゃくしたら靴サイズになっちゃったよ。みたいな勢い) スノーボーダーが危ない。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>Ruby for-in</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/13/2.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/13/2.xhtml"/>
    <updated>2005-01-13T18:37:39+09:00</updated>
    <published>2005-01-13T18:37:39+09:00</published>
    <id>http://lowreal.net/2005/01/13/2</id>
    <category term="prog"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p><code>elsif</code> もそうだけど <code>for</code> - <code>in</code> も嫌いだ。読む順番がアレなんだよなぁ。素直に each でいいじゃないみたいな。ついでに each と同じだと考えてるとハマる。スコープがスタックされない (この表現が正しいかは知らない) </p>
      </div>
    </content>
  </entry>
  <entry>
    <title>chokan の設定</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/14/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/14/1.xhtml"/>
    <updated>2005-01-14T11:42:21+09:00</updated>
    <published>2005-01-14T11:42:21+09:00</published>
    <id>http://lowreal.net/2005/01/14/1</id>
    <category term="ruby"/>
    <category term="prog"/>
    <category term="script"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p><abbr title="YAML Ain't Markup Language">YAML</abbr> を使うことにした。当初 <abbr title="Extensible Markup Language">XML</abbr> を使うつもりだったけどマップするのがめんどいので保留。<code>obj.to_yaml</code> だけなのは簡単でいい。あんまり文法は好きじゃないんだけど……</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>センター試験まであと0日</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/15/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/15/1.xhtml"/>
    <updated>2005-01-15T00:23:21+09:00</updated>
    <published>2005-01-15T00:23:21+09:00</published>
    <id>http://lowreal.net/2005/01/15/1</id>
    <category term="life"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>結局微塵も勉強しないで大学入試センターなわけだ。いくつか試験の心構え的なもの (古典は適当にマークするだけで考えないとか) は考えたけどぶっちゃけどうでもいい。</p>
        <p>今日は英語のみだから特に糞不安ってことはないし、むしろテンションハイになっているわけだけど、長文で運が悪いとその後に続く試験 (二日目・一般) がたぶんアレになるのでそれなりの覚悟が必要な気もする。一番気にかかるのはぶっちゃけ試験場なんだけどね。まくら違うと寝れない (嘘) ですから！</p>
        <p>勉強しないとサッパリできない科目、つまり政治経済が一番不安要素満載なんですよ。怖い怖い。</p>
        <p>昨日なにやってたって chokan 実装やってたよ。本屋行ってアレな雑誌読んだよ。謎だ。</p>
        <p>俺が今ある種異様なテンションなのは、ここ三年求めていた向うから強制的にやってくる刺激が、今あるからだと思う。センター試験はいくつかのイベントの始まりにすぎない。いい方に傾くか悪いほうに傾くかはまさしく神のみぞ知るところだから結局どうでもいい。いずれにしても、これから自分がどうなっていくのが楽しみでニヤける。</p>
        <ins datetime="2005-01-15T21:04:21+09:00">
          <p>自己採点したらめっさ低いよ。やべー。</p>
        </ins>
        <ins datetime="2005-01-15T21:09:39+09:00">
          <p>や、平均っぽい？ぶっちゃけどれぐらいが平均なのかわからｎ</p>
          <p>どっちにしろセンター利用私大は無理くさい。一般は願書とりよせた大学全部うけることになりそうだ。</p>
        </ins>
      </div>
    </content>
  </entry>
  <entry>
    <title>chokan &amp; FOAF</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/15/2.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/15/2.xhtml"/>
    <updated>2005-01-15T18:04:08+09:00</updated>
    <published>2005-01-15T18:04:08+09:00</published>
    <id>http://lowreal.net/2005/01/15/2</id>
    <category term="rdf"/>
    <category term="sw"/>
    <category term="irc"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>実験的に <a href="http://raa.ruby-lang.org/project/rena/">Rena</a> を使ってみたかったので、よろしそうなプログラムを考える。</p>
        <p><abbr title="Internet Relay Chat">IRC</abbr> BOT に何か <abbr title="Friend Of A Friend">FOAF</abbr> アレこれできるような機能をつけてみたかった (意味があるかは考えない) ので、とりあえず <abbr title="Uniform Resource Identifer | Universal Resource Identifer">URI</abbr> に反応して、それが <abbr title="Friend Of A Friend">FOAF</abbr> だったら foaf:nick と foaf:name をとってくるようにしてみた。</p>
        <p><abbr title="Uniform Resource Identifer | Universal Resource Identifer">URI</abbr> (http:) が PRIV されたら <del datetime="2005-01-15T20:19:02+09:00">HEAD</del> でアクセスして、ステータスコードと Content-Type を確認。`text/xml', `application/xml', `application/rdf+xml', `text/ntriples' であれば Rena にロードさせる。</p>
        <p>ロードしたら rdf:about="" なリソースを探し、それが foaf:PersonalProfileDocument であれば foaf:primaryTopic のさすリソースの foaf:nick と foaf:name をてけとーに取得して <abbr title="Internet Relay Chat">IRC</abbr> に NOTICE</p>
        <p>Rena は結構遅いので、<abbr title="Resource Description Framework">RDF</abbr> パース中は chokan が他の処理しないかもしれない。</p>
        <p>作るにあたって <a href="http://www.fakeroot.net/sw/rena-intro/">Using Rena to Process RDF in Ruby</a> が役に立った。</p>
        <ins datetime="2005-01-15T20:19:46+09:00">
          <p>よく考えると open-uri に Accept ヘッダを加えるのは無理 (もしくはめんどう) なので、最初から GET して、response.body を StringIO にして Rena に投げることにする。こうしないとネゴシエーション効いてる場合ダメになる。</p>
        </ins>
        <ins datetime="2005-01-15T23:45:47+09:00">
          <p>メイン部分のコード。</p>
          <pre class="Ruby"># uri は読み込んだ RDF の URI の URI クラスのインスタンス
# res は HTTP#get の値
model = Rena::MemModel.new
model.load(StringIO.new(res.body),{
    :content_type =&gt; Regexp.last_match[0],
    :base =&gt; uri.to_s
})
resource = model[uri.to_s] # 相対 URI は絶対 URI に変換されている。
if resource &amp;&amp;
    resource.get_property(RDF + "type").uri == URI.parse(FOAF + "PersonalProfileDocument")
    mes = "foaf:PersonalProfileDocument"

    foaf = resource.get_property(FOAF + "primaryTopic")

    nick = foaf.get_property_values(FOAF + "nick")
    name = foaf.get_property_values(FOAF + "name")

    # string_array は rdf:Alt とかも全部ひっくるめて単一の文字列の配列にする
    mes += " [nick:#{string_array(nick).join(", ")}]" unless nick.empty?
    mes += " [name:#{string_array(name).join(", ")}]" unless name.empty?

    subject &lt;&lt; notice(channel, mes.to_jis)
else
    puts "Not FOAF"
end
</pre>
        </ins>
      </div>
    </content>
  </entry>
  <entry>
    <title>センター試験を終えた。</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/16/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/16/1.xhtml"/>
    <updated>2005-01-16T19:49:22+09:00</updated>
    <published>2005-01-16T19:49:22+09:00</published>
    <id>http://lowreal.net/2005/01/16/1</id>
    <category term="life"/>
    <category term="self"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>よく寝た。っていうか外は糞寒いし、控え室微妙に寒いし、試験会場暑いし……</p>
        <p>自己採点してみると古文が0点だった。笑える。漢文は少しあたってたぜ？</p>
        <p>まぁ現代文しか使わない学部だから関係ないです。ならマークするなよって感じだけど、やっぱ埋めてないと不安 (謎) なので。</p>
        <ins datetime="2005-01-16T22:59:08+09:00">
          <p>河合塾速報のやつによると、平均点があがるだろうと思った英語は昨年よりさがってる。ありがたや。平均点超えそう？　国語は現代文以上の点数はないので比較できない。政治経済はほぼ平均点 (より下)。</p>
          <p>明日学校で一斉自己採点＆予備校にデータ提出だから、これから母集団が増えて変わるだろうけど、すんげー微妙。よくも悪くも平均人間って感じ。ウキー。</p>
          <p>ついでに国語Ⅰのアレ (謎) でアレだと思う。アレのせいで微妙に不利なのか？</p>
        </ins>
      </div>
    </content>
  </entry>
  <entry>
    <title>LastFM Web Service</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/17/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/17/1.xhtml"/>
    <updated>2005-01-17T17:42:57+09:00</updated>
    <published>2005-01-17T17:42:57+09:00</published>
    <id>http://lowreal.net/2005/01/17/1</id>
    <category term="web"/>
    <category term="script"/>
    <category term="ruby"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p><a href="/2005/lastfm.rb">lastfm.rb</a> 超微妙</p>
        <p>ただの <abbr title="Hyper Text Transfer Protocol">HTTP</abbr> アクセスに過ぎない簡単さにも関わらず割とおもろいので、てけとーにコンソールから操作できるようにした。require できるようにアレしてアレしたけど、糞実装なのでなんとも……これからいろいろ考えよう。</p>
        <p>単体で起動した場合は --user, --pass が必須。あとつかえるオプションは --help。 OptionParser の練習もしたかったから丁度良かった。入力待ちになったら <kbd>help</kbd> すれば使えるコマンドが出るはず。知らない。</p>
        <ins datetime="2005-01-22T18:48:32+09:00">
          <p>勢いで <abbr>RAA</abbr> に登録した。<a href="http://raa.ruby-lang.org/project/lastfm/">lastfm</a></p>
        </ins>
      </div>
    </content>
  </entry>
  <entry>
    <title>センター自己採点</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/17/2.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/17/2.xhtml"/>
    <updated>2005-01-17T17:55:18+09:00</updated>
    <published>2005-01-17T17:55:18+09:00</published>
    <id>http://lowreal.net/2005/01/17/2</id>
    <category term="self"/>
    <category term="life"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <dl>
          <dt>英語</dt>
          <dd>138 / 200</dd>
          <dt>国語</dt>
          <dd>95 / 200 (<abbr title="近代以降">現</abbr>: 80 / 100, <abbr title="古文">古</abbr>: 0 / 50, <abbr title="漢文">漢</abbr>: 15 / 50)</dd>
          <dt>政治経済</dt>
          <dd>65 / 100</dd>
        </dl>
        <p>漢文 15 点って奇跡としかいいようがない！</p>
        <p>私大めんどくさ……</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>LOST IN THE AIR</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/17/3.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/17/3.xhtml"/>
    <updated>2005-01-17T19:45:14+09:00</updated>
    <published>2005-01-17T19:45:14+09:00</published>
    <id>http://lowreal.net/2005/01/17/3</id>
    <category term="music"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p><a href="http://www.art-school.net/img/jk_var002.jpg">ジャケ</a> かこいいなぁ……</p>
        <p>しかし二枚連続で<abbr title="Tower Records">タワレコ</abbr>初回限定なのはなんでだろう。というかなんで東芝 EMI から出さないんだろう。何かあったのか。VeryApeRecords とかいう怪しい<abbr title="ART-SCHOOL">アート</abbr>専用レーベルらしきものから出すし……謎。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>夢あるいは</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/18/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/18/1.xhtml"/>
    <updated>2005-01-19T00:08:48+09:00</updated>
    <published>2005-01-19T00:08:48+09:00</published>
    <id>http://lowreal.net/2005/01/18/1</id>
    <category term="life"/>
    <category term="self"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>今日の朝夢見たけど書くのを忘れた。唯一覚えているのは肩ぐらいまでの髪の長さの女の子がでてきたことぐらい。キラキラ。</p>
        <p>空がかなり晴れていて、そんなに寒さを感じなかった。マフラーがほしいと思った。ねむい。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>PHP の簡略化あるいは</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/18/2.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/18/2.xhtml"/>
    <updated>2005-01-19T18:53:02+09:00</updated>
    <published>2005-01-19T18:53:02+09:00</published>
    <id>http://lowreal.net/2005/01/18/2</id>
    <category term="prog"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p><abbr title="PHP: Hypertext Preprocessor">PHP</abbr> の簡略化 <abbr title="Processing Instruction">PI</abbr> (&lt;? .. ?&gt;) は好きじゃない。ターゲットが示されてないのがなんか気になるし、<abbr title="Extensible Markup Language">XML</abbr> 宣言実行しようとするのがウザすぎ。それと <abbr>ASP</abbr> 方式 (&lt;% .. %&gt;) は問題外。</p>
        <p><abbr title="Extensible Markup Language">XML</abbr> の Processing instruction の仕様を引用する。</p>
        <blockquote cite="http://www.w3.org/TR/REC-xml/#sec-pi" title="Extensible Markup Language (XML) 1.0">
          <table class="scrap" summary="Scrap">
            <caption>Processing Instructions</caption>
            <tbody>
              <tr>
                <td>[16]</td>
                <td>
                  <code>PI</code>
                </td>
                <td>::=</td>
                <td>
                  <code>'&lt;?' <a href="http://www.w3.org/TR/REC-xml/#NT-PITarget">PITarget</a> (<a href="http://www.w3.org/TR/REC-xml/#NT-S">S</a> (<a href="http://www.w3.org/TR/REC-xml/#NT-Char">Char</a>* - (<a href="http://www.w3.org/TR/REC-xml/#NT-Char">Char</a>* '?&gt;' <a href="http://www.w3.org/TR/REC-xml/#NT-Char">Char</a>*)))? '?&gt;'</code>
                </td>
              </tr>
            </tbody>
            <tbody>
              <tr>
                <td>[17]</td>
                <td>
                  <code>PITarget</code>
                </td>
                <td>::=</td>
                <td>
                  <code><a href="http://www.w3.org/TR/REC-xml/#NT-Name">Name</a> - (('X' | 'x') ('M' |
									'm') ('L' | 'l'))</code>
                </td>
              </tr>
            </tbody>
          </table>
        </blockquote>
        <p><abbr title="Extensible Markup Language">XML</abbr> の <abbr title="Processing Instruction">PI</abbr> においてターゲットは必須。よってないとキモい。</p>
        <p>そんなわけで <a href="http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/04266">[ruby-core:04266]</a> ってのは &lt;?erb .. ?&gt; とかにするほうがいいんだけど、それだと目的のタイプのし易さが結局アレになるのでそもそもだめじゃんみたいな。</p>
        <p>何が言いたいんですがあたしは。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>草原について</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/21/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/21/1.xhtml"/>
    <updated>2005-01-21T00:55:55+09:00</updated>
    <published>2005-01-21T00:55:55+09:00</published>
    <id>http://lowreal.net/2005/01/21/1</id>
    <category term="self"/>
    <category term="life"/>
    <category term="imagenation"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>夢とは別によく草原を想像する。草がいっぱい緑色で、花が咲いてたりするところ。おなかが減らない、食べることが任意な世界で、何もしなくても生きていける。ホントのとこそういう場所にいられるならコンピュータなんぞいらない。歩き回って、寝て、そこらに見つけた植物に名前をつけて遊ぶ。飽きるだろうか。いやたぶん飽きないと思う。</p>
        <p>生まれたときからそういう世界に属しているならいいけれど、自分は既に生まれてしまっていて、喧騒の中で生きている。だからこういう想像をするときはだいたいいつも「どこでもドア」が付属する。「どこでもドア」の向こう側に今いる喧騒が広がっていて、閉めると音がしなくなる。</p>
        <p>「どこでもドア」と俺の部屋にある洗濯機は似てる。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>なんか汗がでるジャケ</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/21/2.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/21/2.xhtml"/>
    <updated>2005-01-21T15:18:58+09:00</updated>
    <published>2005-01-21T15:18:58+09:00</published>
    <id>http://lowreal.net/2005/01/21/2</id>
    <category term="music"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>Amazon にジャケがないので公式に直リンするけど、メレンゲの<a href="http://www.e-merengue.com/index_files0/index/discography/hatukoi.jpg">初恋サンセット</a>のジャケはヤバいと思うよ。汗でた。汗。</p>
        <p>買うしかないけど金がない。ぎぎぎ。</p>
        <ins datetime="2005-01-21T17:07:32+09:00">
          <p><abbr title="Tower Records">タワレコ</abbr> のポイントが 1k 分溜まっていたので<abbr title="Tower Records">タワレコ</abbr>行って来た。</p>
        </ins>
      </div>
    </content>
  </entry>
  <entry>
    <title>名前空間が null?</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/21/3.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/21/3.xhtml"/>
    <updated>2005-01-21T21:23:00+09:00</updated>
    <published>2005-01-21T21:23:00+09:00</published>
    <id>http://lowreal.net/2005/01/21/3</id>
    <category term="xml"/>
    <category term="dom"/>
    <category term="xslt"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p><abbr title="Internet Relay Chat">IRC</abbr> ネタ。</p>
        <p><cite><a href="http://ishikawa.arielworks.com/memo/2005/01#d21">2005年1月の指向性メモ</a></cite> に <q>createElement()で作られたエレメントノードは名前空間がnullになるはずなのに、親要素のデフォルト名前空間を引き継いでしまっている。</q> って書いてあるけど、何か違う気がする。</p>
        <p>確かに <abbr title="Document Object Model">DOM</abbr> Core の createElement の項には <q cite="http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#i-Document"><code>localName</code>, <code>prefix</code>, and <code>namespaceURI</code> set to <code>null</code>.</q> とは書いてある (これを根拠にしているかは定かじゃない) けれど、これは名前空間っていう概念がないから、名前空間関連のプロパティにはとりあえず <code>null</code> という値を入れておけよってことで、名前空間<abbr title="Uniform Resource Identifer | Universal Resource Identifer">URI</abbr> を空値に設定するっていう意味じゃない気がする。code でマークアップされてるしね？</p>
        <p>そもそも自分も書いたことあるんだけれど、<q>名前空間がnullになる</q>っていうのが何かおかしいかもしれないとも思う。<a href="http://www.w3.org/TR/REC-xml/">Extensible Markup Language (XML) 1.0</a> にも <a href="http://www.w3.org/TR/REC-xml-names/">Namespaces in XML</a> にも null という単語が出てこない。名前空間が null っていう表現が出てくるのは <abbr title="XML Path language">XPath</abbr> の仕様の日本語訳で、原文の null には code 要素がついていないので、ただたんに“空”といいたいだけなんじゃないかとか。でもそうだったら empty って書くかなぁ……仕様書だし紛らわしいふうには書かないから、あるいは俺の読解力が糞なおかげで違うかもしれない……</p>
        <p>まー結局のところ createElement に名前空間の概念がそもそもないので単純に引数の nodeName を引数の名前にするよってことで、それ以上は実装依存なんじゃまいか。みたいな？　併用することは稀なので。。。</p>
        <p>しかし自分の解釈があっているかどうかは永遠に謎だ。確かめようがないから困る。誰に聞けばいいのか。その人が言っていることが正しいのか、正しいとしても自分がそれを正しいまま受け取れているかは確かめようがない。あーアレだね。アレ。理解は誤解の総体 (だっけ？) ってヤツ。　わかりあえているように感じるにはできるだけ曖昧な表現をすればいい。アレとかソレとかを、明確にしない「ありえねー」とか。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>LOST IN THE AIR 試聴</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/21/4.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/21/4.xhtml"/>
    <updated>2005-01-22T01:20:14+09:00</updated>
    <published>2005-01-22T01:20:14+09:00</published>
    <id>http://lowreal.net/2005/01/21/4</id>
    <category term="music"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>イントロでピアノでびびった。素敵だ。てか <abbr>PV</abbr> がなんか素敵だからちゃんと見たい。次のシングルの extra あたりに入れて欲しい。</p>
        <p><abbr>PV</abbr> といえば LILY の <abbr>PV</abbr> が素敵。前も書いたけど好きだな。</p>
        <p>それとスカーレットの <abbr>PV</abbr> もちゃんと見てない……</p>
        <p>ていうかね。<abbr>PV</abbr> をちゃんと見せてくれないのはもったいない。せっかく作ったのに贅沢な！</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>Ruby コードを安全に実行する。</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/22/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/22/1.xhtml"/>
    <updated>2005-01-22T03:05:02+09:00</updated>
    <published>2005-01-22T03:05:02+09:00</published>
    <id>http://lowreal.net/2005/01/22/1</id>
    <category term="ruby"/>
    <category term="prog"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>前にも書いたけど完全じゃないので。たぶん、これでいいはず。</p>
        <pre class="Ruby" title="全く信頼できない Ruby コードを安全に実行">def safe(lvl, tm=1)
    result = nil
    tg = nil
    th = Thread.start(lvl) do |level|
        tg = ThreadGroup.new.add(Thread.current)
        $SAFE = level
        result = yield
    end.join(tm)
    tg.list.each {|t| t.kill}
    raise TimeoutError unless th
    result
end
</pre>
        <p>ThreadGroup を新しく作り、それにカレント実行スレッドを突っ込んで、信頼できないコードから生成されるスレッドを全てこいつの所属させ、実行終了したら kill! kill! kill!</p>
        <p><abbr title="Internet Relay Chat">IRC</abbr> BOT の Ruby コード実行機能をこれにした。まぁしかし！ SEGV されたら終りというどうしようもない脆弱性がありますけれども。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>Ruby, ブロック引数をとるメソッド</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/22/2.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/22/2.xhtml"/>
    <updated>2005-01-22T12:13:19+09:00</updated>
    <published>2005-01-22T12:13:19+09:00</published>
    <id>http://lowreal.net/2005/01/22/2</id>
    <category term="ruby"/>
    <category term="prog"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <pre class="Ruby">
def foo(a, b)
    yield a + b
end

def fop(a, b, &amp;block)
    yield a + b
end

def foq(a, b, &amp;block)
    block.call a + b
end
</pre>
        <p>引数に <code>&amp;block</code> を書かないとブロックをとるメソッドなのか取らないメソッドなのかわかりにくい。でもなんか <code>&amp;block</code> を書くとダサい。</p>
        <p>二番目の方法だと block という引数を使ってなくてキモい。三番目の方法は一般的なコードじゃなくてキモい。</p>
        <p>さて、ホントは上のコードの block.call は block.yield (引数のチェックをしない) になるんだろうけど、NoMethodError がでる。なんでだろ。</p>
        <pre>$ ruby -v -e 'Proc.new {|t| puts t}.yield("foo")'
ruby 1.8.1 (2003-12-25) [i386-cygwin]
-e:1: undefined method 'yield' for #&lt;Proc:0x100e6dd8@-e:1&gt; (NoMethodError)
exit 1</pre>
      </div>
    </content>
  </entry>
  <entry>
    <title>教室についての考察、とかいいつつ</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/23/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/23/1.xhtml"/>
    <updated>2005-01-23T00:39:05+09:00</updated>
    <published>2005-01-23T00:39:05+09:00</published>
    <id>http://lowreal.net/2005/01/23/1</id>
    <category term="life"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>だいたいの教室は右利きのために黒板に向かって左側に窓がくる。らしい。そんなわけだから大体夕方の教室ってのは一種の幻想性すなわちファンタジーなわけですよ。と。</p>
        <p>ファンタジー。</p>
        <p>話は変わって、昨日買った初恋サンセットですけど、最後の曲の後に入ってるピアノがよい。よい。でもあれかもメレンゲはサーチライトのほうが好きだな。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>ぼーっとする</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/23/2.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/23/2.xhtml"/>
    <updated>2005-01-24T00:02:16+09:00</updated>
    <published>2005-01-24T00:02:16+09:00</published>
    <id>http://lowreal.net/2005/01/23/2</id>
    <category term="life"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://box.elsia.net/~blog/archive/2005/01/23/#id1106490891">blomemo 2005-01-23 - 消えていくボーッとする時間</a>
        </p>
        <p>これここ最近よく思うことの一つ。暇なとき、いろんなことを考えて発展させて、少し前まで考えていたことが消えて、結局あとから考えるとあんまり覚えていない。</p>
        <p>その時間が具体的にどういう風にいいのか、っていうのはうまく説明できない。そりゃ今あらためて考えると電車の中とか、寝る前とか、風呂に入っているときとか何を考えているか覚えてないから。</p>
        <p>寝る前とか、もしくはコンピュータの前でぼーっとしているときは日記に書く。</p>
        <p>あぁ。これは起きているときの見る夢みたいなもんなのかな。たぶん。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>考</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/25/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/25/1.xhtml"/>
    <updated>2005-01-25T03:29:38+09:00</updated>
    <published>2005-01-25T03:29:38+09:00</published>
    <id>http://lowreal.net/2005/01/25/1</id>
    <category term="life"/>
    <category term="self"/>
    <category term="thinking"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p><cite><a href="http://www.shiro.dreamhost.com/scheme/trans/hs-j.html">What You'll Wish You'd Known</a></cite> via <abbr title="Internet Relay Chat">IRC</abbr></p>
        <p>面白い。</p>
        <blockquote>
          <p>ぼくらは天才というものを信じたがるんだ。ぼくらが怠けている言い訳ができるからね。</p>
        </blockquote>
        <p>耳が痛い。でも天才は自分の興味あることに完全に没頭できるっていう天才があるんだけどね。</p>
        <p><q>ドキドキするスリルがなくちゃ。</q> はなんかアレだなと思った。不安は不安だ。結局期待 (希望) が不安を上回る必要があって、んでもってそのボーダーが低くて、スリルを感じるボーダーと近いと、そもそも挑戦できることが限られていたりする。やっていることが少しズレただけでボーダーを越える。「アレ」が何なのかホント微妙だけど……</p>
        <ol>
          <li>
            <q>興味の持てるプロジェクトを選ぶ</q>
          </li>
          <li>
            <q>ひと月以内で終わらせられるようなプロジェクト</q>
          </li>
          <li>
            <q>ちゃんと終わらせられる手段があるようなもの</q>
          </li>
        </ol>
        <p>これってやっぱ重要だよなぁ。最近よく思う。</p>
        <p>あんま関係ないけど、自分は秘密に何かするのが好きだ。あるとき、「ふっ」と誰かに見せてみるのが面白い。もちろん<q>失敗したって誰にもばれない</q>ってのもある。秘密じゃなくなるとむしろダメになる。だから最近はできるだけ目標は他人に話さないようにしてる。他人に話すと達成した気分になる。話さなければよかったとよく後悔する。</p>
        <p>できればもっと早く読みたかった。早く読んだから何か変わったかっていうと疑問だけど。うん。そう。少なくとも16歳のときの自分はこんなの読まなかった。ダメじゃん。</p>
        <p>微妙に関係ないけど、好きなことで生活するための仕事をするのって難しいんだよなたぶん。義務になった時点でやる気が失せる。単純に既にある技術内で完結する仕事ならいいだろうけど、そういう仕事ってあるんだろうか。とか考え始めると面倒くさくなってくるわけだけど。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>一人称について</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/25/2.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/25/2.xhtml"/>
    <updated>2005-01-25T23:50:40+09:00</updated>
    <published>2005-01-25T23:50:40+09:00</published>
    <id>http://lowreal.net/2005/01/25/2</id>
    <category term="self"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>数度書いてる。そして未だに定まらない。</p>
        <p>普段使う一人称は<em class="point">俺</em>なんだけれど、なんか文章にしたときに浮く。だからといって<em class="point">私</em>を一人称にするのはちょっとアレというか、大人ぶってんじゃねーよとか自分の中にいる常任理事の一人 (こいつは<a href="http://lowreal.net/logs//2004/10/01.atom/2">最低限のリアリティ</a>を保てと言っているヤツと同一) が拒否権を行使するので使えない。<em class="point">あたし</em>とか、<em class="point">さとぅ☆</em>とかどうよとかいう案は過半数で即否決される。結局文脈的に一人称入れないとおかしいときは<em class="point">自分</em>を使っているんだけど、これも何かお前はどこの空手部だよとか思える。困る。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>ネゴシエーション時のリンク先</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/26/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/26/1.xhtml"/>
    <updated>2005-01-26T00:13:55+09:00</updated>
    <published>2005-01-26T00:13:55+09:00</published>
    <id>http://lowreal.net/2005/01/26/1</id>
    <category term="web"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p><cite><a href="http://lowreal.net/logs//2004/08/03.atom/2">マルチランゲージ化</a></cite>したとき、<q>言語指定したページでもリンク先は言語指定してないページになったりする</q>とかいう手抜きをしたためアレだったのを先日修正した。たぶん link 要素とか残ってるけど面倒臭いのでそのうち。忘れるけど。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>再読日記</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/26/2.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/26/2.xhtml"/>
    <updated>2005-01-26T02:01:04+09:00</updated>
    <published>2005-01-26T02:01:04+09:00</published>
    <id>http://lowreal.net/2005/01/26/2</id>
    <category term="self"/>
    <category term="life"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>日記であるからには、あとから読み直して再考察してみるのがやっぱ大切なんだよね。</p>
        <p>読み直して考えたことは追記する。ハイパーテキストな日記だから追記は新しくセクションを切ってリンクを貼り、めんどくさくなければトラックバック (でもたいてい面倒くさがってトラックバックしない。悪い傾向)。</p>
        <p>相変わらず纏まらない文章だ。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>Segmentation fault</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/26/3.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/26/3.xhtml"/>
    <updated>2005-01-26T21:04:00+09:00</updated>
    <published>2005-01-26T21:04:00+09:00</published>
    <id>http://lowreal.net/2005/01/26/3</id>
    <category term="prog"/>
    <category term="script"/>
    <category term="ruby"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>なんか cygwin ruby 1.8.2 の net/protocol.rb がたまに Segmentation fault で落ちる。とりあえず落ちてもすぐ復帰するようにして放置。知らん。</p>
        <pre class="Ruby">loop do
    # Make running process
    pid = Process.fork do
        # IRC BOT 起動
    end

    # I am monitoring process.
    pid, status = Process.waitpid2(pid)
    p status
end
</pre>
        <p>プロセス死んでもとにかく復帰。復帰。復帰。ぐるぐる。</p>
        <ins datetime="2005-01-27T23:29:02+09:00">
          <p>結構頻度が高い。socket 関連でダメだと思うんだけど、どうすればいいんだろ。</p>
          <pre>2005-01-27 01:45:23 #&lt;Process::Status: pid=12296,signaled(SIGABRT=6)&gt;
2005-01-27 02:19:07 #&lt;Process::Status: pid=15652,signaled(SIGABRT=6)&gt;
2005-01-27 17:32:52 #&lt;Process::Status: pid=13756,signaled(SIGABRT=6)&gt;
2005-01-27 23:23:39 #&lt;Process::Status: pid=19748,signaled(SIGSEGV=11)&gt;
</pre>
          <p>SIGABRT のやつは net/protocol.rb の <code>rbuf_fill</code> メソッド <code class="Ruby">@socket.sysread(1024)</code> でエラー。SIGSEGV は timeout.rb。発生元はたぶん同じメソッド。</p>
        </ins>
      </div>
    </content>
  </entry>
  <entry>
    <title>GCer</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/26/4.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/26/4.xhtml"/>
    <updated>2005-01-26T23:17:25+09:00</updated>
    <published>2005-01-26T23:17:25+09:00</published>
    <id>http://lowreal.net/2005/01/26/4</id>
    <category term="life"/>
    <category term="net"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p><a href="http://lowreal.net/logs//2005/01/21.atom/1">草原の話</a>に関連するけど、生活という視点 (?) からみればコンピュータ、あるいはインターネットはゴミ捨て場にすぎない。</p>
        <p>結局ゴミなわけだから、ゴミ同士を比べても大して変わらない。</p>
        <p>とりびあー</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>ruby 1.8.2</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/29/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/29/1.xhtml"/>
    <updated>2005-01-29T16:22:30+09:00</updated>
    <published>2005-01-29T16:22:30+09:00</published>
    <id>http://lowreal.net/2005/01/29/1</id>
    <category term="ruby"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>落ち杉。1.8.1 に戻すかとか思ったけど、既に 1.8.2 feature なの (NKF の UTF-8 変換とか) を使い始めちゃったりしてるのでめんどい。計算機がもう一台欲しい。それよりメモリ欲しい。coLinux を常に動かすのは無理です。</p>
        <p>つーか Linux ってつかいにｋ(r <abbr title="Grachical User Interface">GUI</abbr> マンセーな僕には <abbr title="Character User Interface">CUI</abbr> のコマンドラインオプソンが覚えられません。--help するとオプション多すぎです。何の頭文字かわかんねーし。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>直接的伝達手段</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/30/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/30/1.xhtml"/>
    <updated>2005-01-30T01:29:48+09:00</updated>
    <published>2005-01-30T01:29:48+09:00</published>
    <id>http://lowreal.net/2005/01/30/1</id>
    <category term="net"/>
    <category term="life"/>
    <category term="thinking"/>
    <category term="skype"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>直接向かい合って話をするのって想像以上に重要。インターネットでのコミュニケーションは危険。殴り書き。日記。</p>
        <p>今インターネットでコミュニケーションするとしたら殆ど文字データのやりとり。伝達できる情報が限られてる。つまり、なんていうか曖昧な部分が増える。文字データから得られる情報以外で、会話するのに必要な情報は勝手に補完されたりする。しゃべりが上手かったりとか、イメージ先行だったりすると勝手に補完される情報が実際よりもいいもので補完される。いや、これは別にあんまり関係ないけど、こういうのってアレなんだよね。期待の裏切りがあるんだよね。必ず。しかも相手に罪がない。</p>
        <p>曖昧さが増えると、それだけ<em class="point">わかった気</em>になれる。(もちろん曖昧さが多すぎると駄目だけど) なぜなら都合がいいように勝手に補完しちゃうから。何度も書いてる気がする。これはこれでいいんだけど、<em class="point">これはこれでいい</em>とするなら、それ以上相手のことを知ったり、近づいたりすべきじゃない。するならまぁ、<q cite="http://www.ruby-lang.org/ja/man/?cmd=view;name=Object">汚染マークを取り除くことによる危険性はプログラマが責任を負う必要があります。</q>みたいな。</p>
        <p>まぁそんなことはある意味どうでもよくて、うん。それより存在感。リアルで直接向かい合って話すときの存在感って、ネットのそれと比べものにならないわけだよね。人間の五感がすごいんだか何だか。表情・声色・周りの空気の流れ。いろんなもの感じながら会話したりしてる。もうこれそれこそたぶん想像以上に。最後のって抽象的だけどやっぱ特に重要だったりするわけですよ。しかも離れてると絶対共有できない。ある場合では破壊力さえあったりする。怖い怖い。</p>
        <p>syrup16g のリアルに、真意はわからないけど面白いフレーズ (?) がある。</p>
        <blockquote title="syrup16g リアル">
          <span class="l">圧倒的な存在感</span>
          <span class="l">生身の感情の表現</span>
          <span class="l">すべての言葉しっぽ巻いて</span>
          <span class="l">逃げ出すほどのリアル</span>
        </blockquote>
        <p>こんなリアルもある。あるいはこんなんがリアル。</p>
        <p>まぁ私はできることなら妄想リアルで生きていたいわけですけれど。と一人称を私にしてみるけど、やっぱキモい。自分の想像する自分に合わない (わらい)</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>代ゼミメモ</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/01/30/2.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/01/30/2.xhtml"/>
    <updated>2005-01-30T03:22:28+09:00</updated>
    <published>2005-01-30T03:22:28+09:00</published>
    <id>http://lowreal.net/2005/01/30/2</id>
    <category term="net"/>
    <category term="neta"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <ol>
          <li>
            <a href="http://www.geocities.jp/tsu_ka54/konoten/">この点はでねぇよぉ！</a>
          </li>
          <li>
            <a href="http://that3.2ch.net/test/read.cgi/gline/1106477760/">この点は出ねぇよぉ!!のｶﾞｲﾄﾞﾗｲﾝ 12-aだろぉ？</a>
          </li>
          <li>
            <a href="javascript:as=document.getElementsByTagName('a');for(i=0,len=as.length;i&lt;len;i++) void(as[i].appendChild(document.createTextNode('だねぇと。')));">だねぇと。</a>
          </li>
        </ol>
        <ins datetime="2005-01-30T15:51:33+09:00">
          <p>まとめサイトが消えた臭いので 2ch 本スレにリンクしておこう。</p>
        </ins>
      </div>
    </content>
  </entry>
</feed>
