<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6843365766908130738</id><updated>2011-07-31T14:29:20.249+09:00</updated><category term='C#'/><category term='Qt'/><category term='wxRuby'/><category term='Emacs'/><category term='Cygwin'/><category term='Ruby'/><category term='Clip'/><category term='.NET'/><category term='アイデアのつくり方'/><category term='OpenGL'/><title type='text'>LT140</title><subtitle type='html'>140文字を超える(Longer Than 140 symbols)文書を書きたくなった時に更新されます。 by vaiorabbit</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://lt140.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>60</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-4508355785709836627</id><published>2010-06-06T17:25:00.002+09:00</published><updated>2010-06-06T17:25:50.143+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>C# : Flatten()のようなもの</title><summary type='text'>RubyでいうArray#flattenに相当するメソッドがC#には無いということで、似たものを書いてみたのがこちら。System.Arrayに対する拡張メソッドとなっています。

using System;
using System.Collections;
using System.Collections.Generic;
 
namespace FlattenTest
{
    public static class ExtensionMethods
    {
        /// Ref.: Flatten Ruby method in C# - Stack Overflow
        ///   http://stackoverflow.com/questions/197081/flatten-ruby-method-in-c
        private </summary><link rel='replies' type='application/atom+xml' href='http://lt140.blogspot.com/feeds/4508355785709836627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lt140.blogspot.com/2010/06/c-flatten_06.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/4508355785709836627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/4508355785709836627'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2010/06/c-flatten_06.html' title='C# : Flatten()のようなもの'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-7960427228673047512</id><published>2010-05-16T17:05:00.001+09:00</published><updated>2010-05-16T17:07:46.244+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>乱数生成アルゴリズム WELL</title><summary type='text'>Mersenne Twister (MT) の作者らによる比較的新しいアルゴリズム・ WELL (Well Equidistributed Long-period Linear) についてのメモです。
原著はこちら：L'Ecuyer, Pierre; Panneton, François; Matsumoto, Makoto (2006), Improved Long-Period Generators Based on Linear Recurrences Modulo 2

http://www.iro.umontreal.ca/~lecuyer/myftp/papers/wellrng.pdf

論文の訂正表はこちら。シフト演算の部分に関する誤りが訂正されているので必ず参考に。

http://www.iro.umontreal.ca/~lecuyer/myftp/papers/</summary><link rel='replies' type='application/atom+xml' href='http://lt140.blogspot.com/feeds/7960427228673047512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lt140.blogspot.com/2010/05/well.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/7960427228673047512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/7960427228673047512'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2010/05/well.html' title='乱数生成アルゴリズム WELL'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-3133446243091461325</id><published>2010-04-30T14:46:00.000+09:00</published><updated>2010-04-30T14:46:56.965+09:00</updated><title type='text'>Vista : シンボリック リンクでフォルダを別ドライブへ移設</title><summary type='text'>Windows Vista 以降からは mklink コマンドで「シンボリックリンク」を作成することができる。
これによりファイル/ディレクトリの実体をドライブをまたいで配置することが可能となっている。

この機能を利用して C:\Program Files\Adobe を D:\Program Files\Adobe へ移設する方法は次のようになる：

1. 管理者権限でコマンドプロンプトを起動
   (※「すべてのプログラム&gt;アクセサリ&gt;コマンド プロンプト」を右クリックし「管理者として実行」)

2. コマンドラインでの作業：
  C:\Windows\system32&gt; cd "c:\Program Files"
  C:\Program Files&gt; xcopy /E /H /I /K /X Adobe "D:\Program Files\Adobe"
  ...
  C:\</summary><link rel='replies' type='application/atom+xml' href='http://lt140.blogspot.com/feeds/3133446243091461325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lt140.blogspot.com/2010/04/vista.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/3133446243091461325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/3133446243091461325'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2010/04/vista.html' title='Vista : シンボリック リンクでフォルダを別ドライブへ移設'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-1763177344214959367</id><published>2010-04-23T23:58:00.006+09:00</published><updated>2010-04-24T00:48:45.230+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>LINQ to XML メモ</title><summary type='text'>





&lt;version="1.0" encoding="utf-8"?&gt;
&lt;game_consoles&gt;
  &lt;ip_address_map&gt;
     &lt;name="Xbox 360"&gt;192.168.11.2&gt;
     &lt;name="PlayStation 3"&gt;192.168.11.3&gt;
     &lt;name="Wii"&gt;192.168.11.4&gt;
     &lt;name="3DO Real"&gt;192.168.11.5&gt;
     &lt;name="DreamCast"&gt;192.168.11.6&gt;
  &lt;/ip_address_map&gt;
&lt;game_consoles&gt;
というXMLファイル・config.xml があるとき、「targetタグ」から「nameに3を含む」項目に次のようにしてアクセスできる：
using System;
using System.Linq;
</summary><link rel='replies' type='application/atom+xml' href='http://lt140.blogspot.com/feeds/1763177344214959367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lt140.blogspot.com/2010/04/version-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/1763177344214959367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/1763177344214959367'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2010/04/version-1.html' title='LINQ to XML メモ'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-2887429790244820859</id><published>2010-02-14T17:36:00.000+09:00</published><updated>2010-02-14T17:36:17.872+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='アイデアのつくり方'/><title type='text'>The Pareto Theory</title><summary type='text'>A Technique for Producing Ideas (アイデアのつくり方) のメモ。 日本語版の「パレートの学説」。
80対20の法則で知られるパレートによる人の分類・speculatorとrentierが登場します。
以下は単語のメモ：



speculator

投機家、相場師；思索家

rentier

〈フランス語〉不労所得生活者

speculative

adj.思索にふける、熟考する；（不確かな情報に基づいた）推測の；《金融》投機的な、危険をはらんだ

preoccupied

没頭している、頭がいっぱいで；すでに占有されている

italicized

イタリック体の ※訳書中で傍点により強調している部分は原著だとイタリック体で表記されている

brood

卵を抱く；（雲が）垂れ込める、静かに覆う；じっと考える、思案［熟考］する、くよくよ考える ※難しい…</summary><link rel='replies' type='application/atom+xml' href='http://lt140.blogspot.com/feeds/2887429790244820859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lt140.blogspot.com/2010/02/pareto-theory.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/2887429790244820859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/2887429790244820859'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2010/02/pareto-theory.html' title='The Pareto Theory'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-1704715589466465587</id><published>2010-02-07T20:13:00.001+09:00</published><updated>2011-01-15T19:17:16.688+09:00</updated><title type='text'>.zshrc</title><summary type='text'>明日からちょっと使ってみよう、という分にはこのくらいの設定で十分かと。
HTML変換にはPastebinを利用させていただきました。(2011-01-15)設定ファイル中の「^[」はエスケープなので注意。Emacsなら C-q ESC で入力できます。

/* GeSHi (c) Nigel McNie 2004 (http://qbnz.com/highlighter) */
.bash_zshrc_20100207 .de1, .bash_zshrc_20100207 .de2 {font-family: 'Courier New', Courier, monospace; font-weight: normal;}
.bash_zshrc_20100207  {font-family: monospace;}
.bash_zshrc_20100207 .imp {</summary><link rel='replies' type='application/atom+xml' href='http://lt140.blogspot.com/feeds/1704715589466465587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lt140.blogspot.com/2010/02/zshrc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/1704715589466465587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/1704715589466465587'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2010/02/zshrc.html' title='.zshrc'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-3455586782924261755</id><published>2010-02-07T13:11:00.001+09:00</published><updated>2010-02-07T13:12:34.840+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='アイデアのつくり方'/><title type='text'>The Formula of Experience</title><summary type='text'>A Technique for Producing Ideas (アイデアのつくり方) のメモ。
日本語版の「経験による公式」。
サンゴの島(atoll)だって突然できあがるわけではないんだし、アイデアにもできあがる過程があるはずだ、と。
以下は単語のメモ：

romance


恋愛物語、空想小説、冒険物語、伝奇物語、作り話、虚構


lend to


～に役立つ


South Seas


南太平洋


atoll


環状サンゴ島


unaccountable


説明できない、不思議な


ponder


じっくり考える、思案する


confide


～を打ち明ける;～を委託する、信任する


glut


供給過剰;食べすぎる;～の欲望を満たす、～を飽かせる

</summary><link rel='replies' type='application/atom+xml' href='http://lt140.blogspot.com/feeds/3455586782924261755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lt140.blogspot.com/2010/02/formula-of-experience.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/3455586782924261755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/3455586782924261755'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2010/02/formula-of-experience.html' title='The Formula of Experience'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-5170962818807007483</id><published>2010-01-31T20:21:00.001+09:00</published><updated>2010-01-31T20:24:15.513+09:00</updated><title type='text'>MSBuildのパスを探す</title><summary type='text'>
@echo off
for %%v in (4.0 3.5 2.0) do (
    for /f "tokens=2*" %%i in ('reg query "HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\%%v" /v MSBuildToolsPath ') do (
       echo Your MSBuild is installed in: %%jMSBuild.exe
    )
) 2&gt;NUL



MSBuild.exeが配置されている場所がHKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\2.0\MSBuildToolsPath というレジストリにあるのでそれを取得しようとしています。
コマンドラインからレジストリの情報を操作するために reg.exe を利用しています。
</summary><link rel='replies' type='application/atom+xml' href='http://lt140.blogspot.com/feeds/5170962818807007483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lt140.blogspot.com/2010/01/msbuild.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/5170962818807007483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/5170962818807007483'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2010/01/msbuild.html' title='MSBuildのパスを探す'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-2113130751796840578</id><published>2010-01-24T21:14:00.002+09:00</published><updated>2010-01-24T21:15:42.748+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='アイデアのつくり方'/><title type='text'>How It Started</title><summary type='text'>A Technique for Producing Ideas (アイデアのつくり方) のメモ。
日本語版の「この考察をはじめたいきさつ」。とある質問に答えられなかったのがきっかけだったそうで。

以下は単語のメモ：




dandy


極上の、最高級の、飛び切り素晴らしい

rueful


痛ましい、悲しそうな、後悔している

flattered


《be ～》うれしく思う
flatter


vi.お世辞を言う, vt.ご機嫌を取る、こびを売る、取り入ろうとする、お世辞を言う


hearty


心のこもった;元気な;豊富な、たっぷりの

fit


（感情・行動などの）一時的激発、ひきつけ、発作
fit of rage


発作的激怒


on and off


断続的に、間欠的に



</summary><link rel='replies' type='application/atom+xml' href='http://lt140.blogspot.com/feeds/2113130751796840578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lt140.blogspot.com/2010/01/how-it-started.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/2113130751796840578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/2113130751796840578'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2010/01/how-it-started.html' title='How It Started'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-7459051672709387027</id><published>2010-01-24T19:46:00.000+09:00</published><updated>2010-01-24T19:46:09.118+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='アイデアのつくり方'/><title type='text'>Prefatory Note</title><summary type='text'>A Technique for Producing Ideas (アイデアのつくり方) のメモ。日本語版の「まえがき」です。この文書が書かれて今年で半世紀なんですね。
最後の地名、カタカナだと謎ですが、 "Rancho de la Cañada, Peña Blanca, New Mexico" と書きます。
以下は単語のメモ：


prefatory

序文の、前口上の

allege

（～が事実だと）主張する

alleged to be ～

（聞くところ）～だ［する］といわれている

recollection

記憶（力）、回想

call attention to

～に注意を促す、～に注意するよう呼び掛ける



</summary><link rel='replies' type='application/atom+xml' href='http://lt140.blogspot.com/feeds/7459051672709387027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lt140.blogspot.com/2010/01/prefatory-note.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/7459051672709387027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/7459051672709387027'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2010/01/prefatory-note.html' title='Prefatory Note'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-3071433065888639963</id><published>2010-01-10T16:31:00.005+09:00</published><updated>2010-01-10T16:34:55.346+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='アイデアのつくり方'/><title type='text'>Foreword William Bernbach</title><summary type='text'>A Technique for Producing Ideas (アイデアのつくり方) のメモ。
日本語訳はこの節から始まっています。ウィリアム・バーンバック氏はフォルクスワーゲン・ビートルの "Think Small." という広告を考案するなど、アメリカの広告業界で有名な方だそうです。
以下は単語のメモ：

convey

（意思・情報を）伝達する、伝える、告げる

practice


実務、（医者・弁護士の）業務

craft


（特殊な）技術、手技

tribute


賛辞

lucid


明快な、正気の、透明な

be indebted to


～の恩恵を受けている


</summary><link rel='replies' type='application/atom+xml' href='http://lt140.blogspot.com/feeds/3071433065888639963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lt140.blogspot.com/2010/01/foreword-william-bernbach.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/3071433065888639963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/3071433065888639963'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2010/01/foreword-william-bernbach.html' title='Foreword William Bernbach'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-7840390561907080411</id><published>2010-01-06T01:59:00.001+09:00</published><updated>2010-01-06T01:59:42.398+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='アイデアのつくり方'/><title type='text'>Foreword Keith Reinhard</title><summary type='text'>A Technique for Producing Ideas (アイデアのつくり方) を最後に読んでから間が開いたので読み直してます。

手元の原著には Keith Reinhard さんという広告業の偉い方が序文を寄せています。これは日本語版にはない節で、原著を新装したときに追加されたものではないかと。

以下は単語のメモ：

intimidate


怖がらせる; 脅迫する、威圧する


lay down


書き記す; 貯蔵する; 
…などなど、相当意味の広い句動詞です


illuminating


adj. 啓発する、啓もう的な、明らかにする

</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/7840390561907080411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/7840390561907080411'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2010/01/foreword-keith-reinhard.html' title='Foreword Keith Reinhard'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-4058515233609306045</id><published>2009-12-26T00:53:00.002+09:00</published><updated>2009-12-26T10:22:43.370+09:00</updated><title type='text'>PhysicsEffects メモ</title><summary type='text'>
masafumi さん情報に感謝です。

入手とビルド

&gt; svn co http://bullet.googlecode.com/svn/branches/PhysicsEffects .

Bullet本体も src/ 以下にダウンロードされます。PhysicsEffects は


PhysicsEffects/Physics
PhysicsEffects/Util


が本体。

ビルドスクリプトは cmake で生成。Visual Studio 2008 Express Edition を利用したいので：

&gt; cmake -G "Visual Studio 9 2008"


&gt; start PHYSICS_EFFECTS.sln

OpenGLのセットアップが済んでいるなら問題なくビルドは通るはず。

AppHelloWorld が利用方法を示す最低限のサンプルです。で</summary><link rel='replies' type='application/atom+xml' href='http://lt140.blogspot.com/feeds/4058515233609306045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lt140.blogspot.com/2009/12/physicseffects.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/4058515233609306045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/4058515233609306045'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2009/12/physicseffects.html' title='PhysicsEffects メモ'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_DwzvfizuCfw/SzTe42iSEfI/AAAAAAAAADc/o_IibpNdLWk/s72-c/PhysicsEffects_PfxViewer-20091225.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-5120480215162777444</id><published>2009-12-20T19:16:00.002+09:00</published><updated>2009-12-23T14:35:08.729+09:00</updated><title type='text'></title><summary type='text'>Qt 4.6 と qt4-qtruby の自前ビルド版 で遊んでいるところ。


OGLUtilsQt-20091220.7z

OpenGLの描画後にQtの2D描画を重ねることができる(今回はQPainter::drawText)。
RubyからOpenGLを利用したい場合はこちら(ruby-opengl)を。
数学関数はこちら(RMath)。
GLUTにできてQtにできないことは…あとはパッド入力くらいでしょうか。
</summary><link rel='replies' type='application/atom+xml' href='http://lt140.blogspot.com/feeds/5120480215162777444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lt140.blogspot.com/2009/12/qt-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/5120480215162777444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/5120480215162777444'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2009/12/qt-4.html' title=''/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_DwzvfizuCfw/Sy3yzSwsDCI/AAAAAAAAADM/xv6a1iQUZfg/s72-c/Qt4.6%2BRuby1.9.1%2Bqtruby2.0.5-20091220.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-4285192018319247486</id><published>2009-12-13T02:40:00.007+09:00</published><updated>2010-11-17T00:57:51.209+09:00</updated><title type='text'>Game Engine Architecture : 目次の翻訳</title><summary type='text'>(2010-11-16 追記) 日本語訳が出版されます。こちらからどうぞ：
ソフトバンク クリエイティブ:ゲームエンジン・アーキテクチャ
http://www.sbcr.jp/products/4797360714.html
Amazon.co.jp： ゲームエンジン・アーキテクチャ: ジェイソン・グレゴリー, 今給黎 隆, 桐山 忍, 鴨島 潤, 湊 和久, 大貫 宏美, 田中 幸: 本
http://www.amazon.co.jp/dp/4797360712

Jason Gregory, Game Engine Architecture (2009) の目次を訳したものです。
目次 (Table of Contents)
はじめに (INTRODUCTION)
1.1   ゲーム製作チームの典型的な構造 (Structure Of A Typical Game Team)
1.2</summary><link rel='replies' type='application/atom+xml' href='http://lt140.blogspot.com/feeds/4285192018319247486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lt140.blogspot.com/2009/12/game-engine-architecture.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/4285192018319247486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/4285192018319247486'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2009/12/game-engine-architecture.html' title='Game Engine Architecture : 目次の翻訳'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-610932248217652800</id><published>2009-12-12T19:26:00.001+09:00</published><updated>2009-12-12T19:27:15.520+09:00</updated><title type='text'>qt4-qtruby を Windows で : Qt 4.6でもOK</title><summary type='text'>今月リリースされた Qt 4.6

http://qt.nokia.com/

KDE Bindingsリポジトリからいただいてきた qtruby
svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebindings
Revision : 1061553

セキュリティホールが修正された Ruby 1.9.1 p376

http://www.ruby-lang.org/ja/news/2009/12/07/ruby-1-9-1-p376/

…という組み合わせでも問題なくビルドできました。qtrubyのcmakeに渡すオプションに変更が必要でした。
cmake -G "Visual Studio 9 2008" -DCMAKE_INSTALL_PREFIX=d:\ruby19  -DRUBY_EXECUTABLE=d:\ruby19\bin\ruby</summary><link rel='replies' type='application/atom+xml' href='http://lt140.blogspot.com/feeds/610932248217652800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lt140.blogspot.com/2009/12/qt4-qtruby-windows-qt-46ok.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/610932248217652800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/610932248217652800'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2009/12/qt4-qtruby-windows-qt-46ok.html' title='qt4-qtruby を Windows で : Qt 4.6でもOK'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-1619507868151593197</id><published>2009-11-29T16:01:00.002+09:00</published><updated>2009-12-12T16:31:50.135+09:00</updated><title type='text'>qt4-qtruby を Windows で : qt4-qtrubyビルド編</title><summary type='text'>ツール導入編からの続きです。


qt4-qtruby

KDEのSubversionリポジトリからソースコードを入手：
&gt; mkdir kdebindings
&gt; cd kdebindings
&gt; svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebindings .
  ...
  Checked out revision 1055931.
Ruby以外用のソースコード(Python,C#など)も大量にダウンロードされる。今回利用するのは
smoke/qt
ruby/qtruby
の2個のみ。

まず CMakeLists.txt を qtruby 用に書き換える。

kdebindings/CMakeLists.txt を kdebindings/CMakeLists.txt.qtruby で上書き。その内容を以下のように編集する</summary><link rel='replies' type='application/atom+xml' href='http://lt140.blogspot.com/feeds/1619507868151593197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lt140.blogspot.com/2009/11/qt4-qtruby-windows-qt4-qtruby.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/1619507868151593197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/1619507868151593197'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2009/11/qt4-qtruby-windows-qt4-qtruby.html' title='qt4-qtruby を Windows で : qt4-qtrubyビルド編'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_DwzvfizuCfw/SxIcLGpVpUI/AAAAAAAAADE/VRqZQvA_FwY/s72-c/qt4qtruby_hello-20091129.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-3900789421295629169</id><published>2009-11-29T15:42:00.004+09:00</published><updated>2009-12-10T22:51:41.947+09:00</updated><title type='text'>qt4-qtruby を Windows で : ツール導入編</title><summary type='text'>Ruby から Qt を利用するための qt4-qtruby を Visual C++ 2008 Express Edition で利用できるようにするまでの作業メモ。
長くなったので「ツール導入編」「qt4-qtrubyビルド編」に分けました。

Perl

  https://www.activestate.com/activeperl/downloads/

から ActivePerl-5.10.1.1006-MSWin32-x86-291086.zip をダウンロード。 ここでは D:\Perl 以下にインストールした。

CMake

  http://www.cmake.org/cmake/resources/software.html

から cmake-2.8.0-win32-x86.zip をダウンロード。適当な場所へ展開しておく。パスを通すのは後で。

Ruby

</summary><link rel='replies' type='application/atom+xml' href='http://lt140.blogspot.com/feeds/3900789421295629169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lt140.blogspot.com/2009/11/qt4-qtruby-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/3900789421295629169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/3900789421295629169'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2009/11/qt4-qtruby-windows.html' title='qt4-qtruby を Windows で : ツール導入編'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-5206823169296247442</id><published>2009-11-14T13:24:00.001+09:00</published><updated>2009-11-14T13:25:27.578+09:00</updated><title type='text'>Kindle : Wishlist (2)</title><summary type='text'>Kindle Store からのリストアップその2。

Game Physics Engine Development : Ian Millington
http://www.amazon.com/dp/B001C4MZC4/

原著購入済み。Kindleだと半額なのか。
小さな物理エンジンを作って処理の流れを納得するための本。David Eberly 氏のGame Physics よりも実践的でおすすめ。ただしそのまま規模の大きな問題に適用できるシステムではないので過剰な期待は禁物ですが。

この本こそ翻訳されるべきものだと思うのだけれど、そんな話は無いものでしょうかね。



Artificial Intelligence for Games (The Morgan Kaufmann Series in Interactive 3D Technology) : Ian </summary><link rel='replies' type='application/atom+xml' href='http://lt140.blogspot.com/feeds/5206823169296247442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lt140.blogspot.com/2009/11/kindle-wishlist-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/5206823169296247442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/5206823169296247442'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2009/11/kindle-wishlist-2.html' title='Kindle : Wishlist (2)'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-2168566742989498363</id><published>2009-11-13T00:27:00.000+09:00</published><updated>2009-11-13T00:27:13.866+09:00</updated><title type='text'>Kindle : Wishlist</title><summary type='text'>Kindle Store から欲しい本等をリストアップ。

Real-Time Collision Detection (The Morgan Kaufmann Series in Interactive 3-D Technology) : Christer Ericson
http://www.amazon.com/dp/B001086MGM/
購入第一冊目。訳書はこちら：
ゲームプログラミングのためのリアルタイム衝突判定: Christer Ericson, 中村 達也
http://www.amazon.co.jp/dp/493900791X
The Art of Multiprocessor Programming : Maurice Herlihy, Nir Shavit
http://www.amazon.com/dp/B00245A4U0/

最近日本語訳が出ました：
</summary><link rel='replies' type='application/atom+xml' href='http://lt140.blogspot.com/feeds/2168566742989498363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lt140.blogspot.com/2009/11/kindle-wishlist.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/2168566742989498363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/2168566742989498363'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2009/11/kindle-wishlist.html' title='Kindle : Wishlist'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-3708156590895684175</id><published>2009-11-03T19:51:00.000+09:00</published><updated>2009-11-03T19:51:05.483+09:00</updated><title type='text'>Pro C# : Chapter 11 の単語リスト</title><summary type='text'>
Pro C# 2008 and the .NET 3.5 Platform, Fourth Edition の Chapter 11 : Delegates, Events, and Lambdas に出てきた表現・単語のメモ。
out of the box
adj. すぐに利用できる(箱から取り出したままの状態で）
crux
n. 最も重要なポイント
retrofit
v. (改良した)部品を組み込む
boilerplate
n. 定型的なソースコードの断片
prim and proper
adj. きちんとした、整った
showstopper
(コンピュータ分野限定、作業を止めてしまうような)不具合
※通常だと「(ショーの進行を止めてしまうほどの)すばらしいもの」のことを指す
</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/3708156590895684175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/3708156590895684175'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2009/11/pro-c-chapter-11.html' title='Pro C# : Chapter 11 の単語リスト'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-9201897612121925179</id><published>2009-01-31T12:00:00.000+09:00</published><updated>2009-12-26T13:51:58.101+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><title type='text'>Ruby 1.9.1-p0 : VC++ 2008 Express Edition でビルド</title><summary type='text'>

「Ruby 1.9.1をリリースしました。」、ということで作業メモ。

OS は Windows Vista SP1 (Home Premium) です。
"D:\Programs\Microsoft Visual Studio 9.0" に VC++ 2008 をインストールしてあります。
ところどころで cygwin 由来のツール (wget、tar, gzip, bzip2) を使っています。


まずスタートメニューから「Visual C++ 9.0 Express Edition &gt; Visual Studio Tools &gt; Visual Studio 2008 コマンド プロンプト」起動。作業場へ移動します。
D:\Programs\Microsoft Visual Studio 9.0\VC&gt; d:
D:\&gt; cd tmp
D:\tmp&gt;

ソースをいただいてきたら</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/9201897612121925179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/9201897612121925179'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2009/01/ruby-191-p0-vc-2008-express-edition.html' title='Ruby 1.9.1-p0 : VC++ 2008 Express Edition でビルド'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-4223978370643070308</id><published>2008-11-25T12:00:00.000+09:00</published><updated>2009-12-26T13:50:15.435+09:00</updated><title type='text'>MPRTest : 円筒・円錐を追加</title><summary type='text'>

 

直方体の他に、

円筒 (Cylinder)
円錐 (Cone)
球 (Sphere)


を追加しました。円筒・円錐それぞれのサポート写像には GJK アルゴリズムで使用するものをそのまま利用しています。 Gino van den Bergen 氏の著作が参考になります。

MPRTest (http://sites.google.com/site/ltsevenscore/algorithm/mprtest_jp)

凸多面体同士の交差判定/接触点情報の算出を行う Minkowski Portal Refinement (MPR) アルゴリズム の実験プログラムです。
</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/4223978370643070308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/4223978370643070308'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/11/mprtest_25.html' title='MPRTest : 円筒・円錐を追加'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_DwzvfizuCfw/SzWVtBci0YI/AAAAAAAAAGs/R1Xwu0huElY/s72-c/MPR20081124t-001-20081124.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-4224442597252251843</id><published>2008-11-16T12:00:00.000+09:00</published><updated>2009-12-26T13:46:40.094+09:00</updated><title type='text'>MPRTest</title><summary type='text'>

任意の凸多面体同士の交差判定/接触点情報の算出ができるという Minkowski Portal Refinement (MPR) アルゴリズム の実験プログラムです。

MPRTest (http://sites.google.com/site/ltsevenscore/algorithm/mprtest_jp)







とりあえず直方体同士の交差判定のみ実装してあります。 MPR自体は接触点情報(※接触法線等)も算出可能です。詳細は Game Programming Gems 7 や XenoCollide (著者本人のサポートページ)で。

GJK(+EPA)アルゴリズムと同等の用途に利用でき、なおかつわかりやすくて数値計算的にシンプルでロバストであるというのが謳い文句です。流行るでしょうか。
</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/4224442597252251843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/4224442597252251843'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/11/mprtest.html' title='MPRTest'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_DwzvfizuCfw/SzWUoTYWxGI/AAAAAAAAAF8/h2zXkLnQwFE/s72-c/MPR001t-20081116.png' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-8767351259464836562</id><published>2008-09-23T12:00:00.002+09:00</published><updated>2010-01-17T19:17:05.047+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGL'/><title type='text'>Yellow Dog Linux on PS3 で GL Excess / Ruby</title><summary type='text'>

暇なので Yellow Dog Linux on PS3 を整備して遊んでいました。 以下に GL Excess / Ruby を動かすまでの作業をメモしておきます。


root で作業してください。
Yellow Dog Linux 6.0 は PS3 にインストール済みであるとします。


まずは /etc/X11/xorg.conf を編集。 GLX 拡張をロードするため、"Module" セクションに次のように追記します：

Section "Module"
       Load  "dbe"
       Load  "extmod"
       Load  "fbdevhw"
       Load  "freetype"
       Load  "type1"
       #Load   "dri"
       Load  "glx"  # ←この行を追記
</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/8767351259464836562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/8767351259464836562'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/09/yellow-dog-linux-on-ps3-gl-excess-ruby.html' title='Yellow Dog Linux on PS3 で GL Excess / Ruby'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_DwzvfizuCfw/SzWMU6YjCTI/AAAAAAAAAF0/U7TfCHet1-4/s72-c/glxsruby_on_ps3linux-20080923.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-3657111499505415770</id><published>2008-09-23T12:00:00.001+09:00</published><updated>2009-12-26T13:10:20.598+09:00</updated><title type='text'>Yellow Dog Linux 6.0 on PS3 : 設定等のメモ</title><summary type='text'>

ランレベルは 5 から 3 に変更

/etc/inittab を開いて、
id:5:initdefault:

となっている行を以下に変更する：
id:3:initdefault:

Fluxbox ウィンドウマネージャを導入

メインメモリ 256MB のマシンに Enlightenment, GNOME は厳しいので。
[root@localhost tmp] wget http://prdownloads.sourceforge.net/fluxbox/fluxbox-1.0.0.tar.bz2
...
[root@localhost tmp] tar xvjf fluxbox-1.0.0.tar.bz2
...
[root@localhost tmp] cd fluxbox-1.0.0
...
[root@localhost fluxbox-1.0.0] ./</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/3657111499505415770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/3657111499505415770'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/09/yellow-dog-linux-60-on-ps3.html' title='Yellow Dog Linux 6.0 on PS3 : 設定等のメモ'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-420497695604953517</id><published>2008-08-08T12:00:00.000+09:00</published><updated>2009-12-26T14:00:03.199+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><title type='text'>Ruby/SDL をビルド</title><summary type='text'>

素の Ruby/SDL を Visual C++ 2008 Express Edition でビルドするまでのメモです。 TTF や draw_line などを使用しているサンプルは動きませんのでご注意を。

用意するもの

Visual C++ 2008 (Express Edition SP1)
OpenGL
include : c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include
lib : c:/Program Files/Microsoft SDKs/Windows/v6.0A/Lib


DirectX SDK


SDL のビルドに必要です。March 2009 を利用しました。

Ruby 1.9.1-p243
VC++2008 でビルドしたものです。こちらを参考に。



D:\tmp&gt;ruby -v
ruby </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/420497695604953517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/420497695604953517'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/08/rubysdl.html' title='Ruby/SDL をビルド'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_DwzvfizuCfw/SzWXVdvpu4I/AAAAAAAAAG8/8ec9v2kKDu8/s72-c/20090806-001.png' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-811891083740476729</id><published>2008-08-03T12:00:00.001+09:00</published><updated>2010-08-29T20:51:11.177+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><title type='text'>Ruby 1.9.0-3 : インタプリタ DLL を C から呼ぶ例</title><summary type='text'>(2010-08-29 追記 : 以下の記事は古くなっています。こちらが参考になるかもしれません。 http://sites.google.com/site/ltsevenscore/ruby/tips/interpreter_dll )

ruby_options が値を返すようになっている
ruby_run という関数がない
など、Rubyの初期化・実行に関する README.EXT の内容は現状に追いついていないようです。そのようなわけで、Ruby 1.9 を外部から利用する方法を少し調べてみました。アプリケーションに Ruby を組み込みたい
rubyw.exe に代わる前処理プログラムを作りたい
といったときに役立つかもしれません。利用したのは Ruby 1.9.0-3です。 これを VC++ 2008 でビルドした msvcr90-ruby190.dll を C プログラム</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/811891083740476729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/811891083740476729'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/08/ruby-190-3-dll-c.html' title='Ruby 1.9.0-3 : インタプリタ DLL を C から呼ぶ例'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-1763465432509692690</id><published>2008-07-20T12:00:00.001+09:00</published><updated>2009-12-26T12:55:45.632+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><title type='text'>RMath</title><summary type='text'>
今年1月に書いておきながら、 そのまま忘れて半年放置していた 3D CG 向けの数学関数の拡張ライブラリを公開しておこうと思います。

RMath といいます。

RMath : Ruby math module for 3D Applications

http://sites.google.com/site/ltsevenscore/ruby/rmath3d

RMath は行列(3x3,4x4)、ベクトル(3要素,4要素)、クォータニオンの各クラスを含んだ拡張ライブラリです。 デバッグ用に同じインタフェースを持った Ruby 実装版も同梱しています(RMath.rb)。

ライセンスは zlib/libpng としました。

リファレンスやサンプルが少ないので、それらの充実が当面の課題ですね。

(2009-12-26 URLを新しいものに修正しました)
</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/1763465432509692690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/1763465432509692690'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/07/rmath.html' title='RMath'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-1706476294139853945</id><published>2008-07-06T12:00:00.002+09:00</published><updated>2009-12-30T18:31:47.250+09:00</updated><title type='text'>takeown, icacls コマンド</title><summary type='text'>
Windows Vista での chown / chmod コマンドに相当するものです。


訳あって C ドライブの Vista (Home Premium) をインストールしなおしたところ、 以前から D ドライブ側に置いていたファイルへのアクセスに支障が出てしまいました。


具体的には：


消せないファイルが多発。
Cygwin 系コマンドでの操作が軒並み ``Permission denied'' に。


OS からは別な(しかももう存在しない!)ユーザーの所有物とみなされているのが原因です。


この問題を次のようにして解決してみました。


1. コマンドプロンプトを「管理者として実行」する


``C:\Windows\System32\cmd.exe'' のアイコンを右クリックし、「管理者として実行(A)」で起動。




2. 作業するディレクトリに移動


</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/1706476294139853945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/1706476294139853945'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/07/takeown-icacls.html' title='takeown, icacls コマンド'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_DwzvfizuCfw/SzWIAYJKmeI/AAAAAAAAAFs/jRwalfbHVZQ/s72-c/CmdAsAdministrator-20080706.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-2465667118764476803</id><published>2008-06-08T12:00:00.001+09:00</published><updated>2009-12-26T12:48:52.918+09:00</updated><title type='text'>マニフェスト関連</title><summary type='text'>

Visual C++ ファイルの再配布

http://msdn.microsoft.com/ja-jp/library/ms235299(VS.80).aspx
Visual C++ ライブラリ DLL (MSVCR80.DLL など) に到達できた場合 (アプ
リケーションのローカル フォルダまたはシステム フォルダにインストール
されている場合など)、次のメッセージが表示されます。

R6034 An application has made an attempt to load the C runtime library incorrectly.

C/C++ 分離アプリケーションおよび side-by-side アセンブリのトラブルシューティング

http://msdn.microsoft.com/ja-jp/library/ms235342(VS.80).aspx
</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/2465667118764476803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/2465667118764476803'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/06/blog-post.html' title='マニフェスト関連'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-1182650454144318759</id><published>2008-06-08T12:00:00.000+09:00</published><updated>2009-12-26T12:47:38.672+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wxRuby'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><title type='text'>wxRuby2</title><summary type='text'>

wxWidgets の Ruby バインディング・ wxRuby というものを試そうとしてみました。 利用しているのは One-Click Ruby Installer 1.8.6-26。以下の作業は主に Cygwin Bash シェルで行っています。

インストールは RubyGems で楽勝でした。
$ gem.bat install wxruby
Bulk updating Gem source index for: http://gems.rubyforge.org
Building native extensions.  This could take a while...
Successfully installed wxruby-1.9.7-x86-mswin32-60
1 gem installed

wxRuby 1.9.7 の Windows 版バイナリが</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/1182650454144318759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/1182650454144318759'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/06/wxruby2.html' title='wxRuby2'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_DwzvfizuCfw/SzWHLmaKfNI/AAAAAAAAAFk/WBptuJRgqrU/s72-c/Minimal_wxRuby_App-20080608.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-4265686718847212983</id><published>2008-05-18T12:00:00.000+09:00</published><updated>2009-12-26T12:44:27.841+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='Qt'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGL'/><title type='text'>メニューなどのテスト</title><summary type='text'>




Qtの各種機能を試してみました。前回のものではGLUTとの違いがわかりませんからね。

OpenGLによる描画とQtによる2Dオブジェクトの描画機能が併用できる、というのは強力だと思いました(画面右下のRubyロゴがそれ)。

コード： qtruby_menutest-20080518.zip

中にはGLUTのソースコード(glut_teapot.c)から移植した 'teapot.rb' というものも入ってます。 GLUTから離れてティーポットが拝めなくなってしまったのが寂しかったものですから(^^;

アーカイブの展開後に
$ ruby -rubygems menutest.rb

…として起動してください。

動作に必要なものは以下の通り：

ruby 1.8.6 [i386-mswin32]
http://rubyforge.org/projects/</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/4265686718847212983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/4265686718847212983'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/05/blog-post.html' title='メニューなどのテスト'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_DwzvfizuCfw/SzWFgkLv9uI/AAAAAAAAAFc/sJdKKRAtaW4/s72-c/qtruby_menutest-20080518.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-415029530152059824</id><published>2008-05-15T12:00:00.000+09:00</published><updated>2009-12-26T12:37:38.492+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='Qt'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGL'/><title type='text'>glwidget.rb</title><summary type='text'>




QtのOpenGLサンプルにあるglwidget.cppを qt4-qtruby向けに書き直してみました。ruby-openglを併用しています。

これ単体で動くようにしてありますので、
$ ruby -rubygems glwidget.rb

…とすれば起動します。

動作に必要なものは以下の通りです：

ruby 1.8.6 [i386-mswin32]
http://rubyforge.org/projects/rubyinstaller/


qtruby4-1.4.9-mswin32.gem
http://rubyforge.org/projects/korundum/


ruby-opengl-0.60.0-i386-mswin32.gem
http://rubyforge.org/projects/ruby-opengl/




コード：
require </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/415029530152059824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/415029530152059824'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/05/glwidgetrb.html' title='glwidget.rb'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_DwzvfizuCfw/SzWEjycLlqI/AAAAAAAAAFM/GYm-J1dtVcE/s72-c/qtruby_glwidget-20080515.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-171572119646456440</id><published>2008-03-08T12:00:00.000+09:00</published><updated>2009-12-26T12:25:51.614+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGL'/><title type='text'>GL Excess／Ruby : Scene 11 移植完了</title><summary type='text'>

Scene 11 はエンディングです。スタッフロールが流れます。



これで GL Excess 全12シーンの Ruby 移植ができたことになります。なんとかなるもんですね。

今後は

全シーンをまとめたものを再パッケージ化
シーン個別での配布は廃止する


特に遅い Scene 2, Scene 8 の一部を拡張ライブラリ化(「チート版」が適切かな?)


を予定しています。

GL Excess / Ruby のページも更新。 Scene 11 をダウンロードできるようにしておきました:

GL Excess / Ruby のページ

※ Scene 2 と 8 は動作が非常に遅くなってしまっています。 そこで glxsruby にもオリジナルと同様、更新のタイプステップを変更する機能が実装されています。 アプリケーション起動後に以下の操作を行ってください：

'a' を押</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/171572119646456440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/171572119646456440'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/03/gl-excessruby-scene-11.html' title='GL Excess／Ruby : Scene 11 移植完了'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_DwzvfizuCfw/SzWCC2RpSOI/AAAAAAAAAFE/JOjT6_v7zsM/s72-c/GLExcessRuby_scene11-20080308.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-46301095458169636</id><published>2008-03-02T12:00:00.000+09:00</published><updated>2009-12-26T12:24:00.633+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGL'/><title type='text'>GL Excess / Ruby : Scene 10 移植完了</title><summary type='text'>

Scene 10 です。これといって問題になるような部分はありませんでした。



このシーンで印象的なのはやはりレーザー効果ですが、本質的には GL_TRIANGLE_FAN だけでシンプルに実装されています。このようなことが勉強 できるのも、ソースコードが公開されているおかげですね。

GL Excess / Ruby のページも更新。 Scene 10 をダウンロードできるようにしておきました:

GL Excess / Ruby のページ

未実装のシーンは 11。とうとう残り 1 個になりました。

※ Scene 2 と 8 は動作が非常に遅くなってしまっています。 そこで glxsruby にもオリジナルと同様、更新のタイプステップを変更する機能が実装されています。 アプリケーション起動後に以下の操作を行ってください：

'a' を押すと @step += 1 (</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/46301095458169636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/46301095458169636'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/03/gl-excess-ruby-scene-10.html' title='GL Excess / Ruby : Scene 10 移植完了'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_DwzvfizuCfw/SzWBnyjYA7I/AAAAAAAAAE8/-HG9tHz1uJs/s72-c/GLExcessRuby_scene10-20080302.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-1554950329337810280</id><published>2008-03-01T12:00:00.002+09:00</published><updated>2009-12-26T12:21:56.387+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='Clip'/><title type='text'>RDフォーマット</title><summary type='text'>

Re: RDoc,RDフォーマットの公式文書はどこにあるのでしょうか
「仕様書」と呼ぶべきかどうかはともかくとして、Ruby自身の配布ファイル
の中に"lib/rdocs/README"というのが含まれています。公式のドキュメントの中で
は、これが一番良く書かれたものだと思います。

Module: RDoc
Rdoc is an application that produces documentation for one or more Ruby source files.
</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/1554950329337810280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/1554950329337810280'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/03/rd.html' title='RDフォーマット'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-4760186691076601463</id><published>2008-03-01T12:00:00.001+09:00</published><updated>2009-12-26T12:20:58.991+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGL'/><title type='text'>GL Excess / Ruby : Scene 8 移植</title><summary type='text'>

Scene 8 ですが…遅いっ。




原因は Scene 2 と 同様で、水面の表現に利用している 64x64 個のグリッドの更新が重荷になって います。描画の部分に頂点配列(glVertexPointer/glDrawArrays)を利用するよ うに書き直してみたりもしたのですが、有意な差が見られるほどの改善には至 りませんでした。


移植の最中に思い出しましたが、Ruby では !0 == false なのでした。

$ irb.bat
irb(main):001:0&gt; some_value = 0
=&gt; 0
irb(main):002:0&gt; !some_value
=&gt; false
irb(main):003:0&gt; some_value==0
=&gt; true
irb(main):004:0&gt;

C/C++ によくあるイディオムの移植には注意が必要ですね。


GL </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/4760186691076601463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/4760186691076601463'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/03/gl-excess-ruby-scene-8.html' title='GL Excess / Ruby : Scene 8 移植'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_DwzvfizuCfw/SzWAjnGhphI/AAAAAAAAAE0/Ln6iUQ6WlIY/s72-c/GLExcessRuby_scene08-20080301.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-7492866367041243203</id><published>2008-02-17T12:00:00.000+09:00</published><updated>2009-12-26T12:16:57.782+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGL'/><title type='text'>GL Excess／Ruby : Scene 7 を移植</title><summary type='text'>

レンズフレアの効果がかっこいい Scene 7 です。



Scene 7 では 10x10x10 の多次元配列が登場しますが、次のように定義してみました：
@f_angle = Array.new(10) { Array.new(10) { Array.new(10) { 0.0 } } }
...
@f_angle[i][j][k] = (100*a + 10*b + c).to_f

他にも Hash と Array を組み合わせることで、もっときれいに記述することもできます：
ary = Hash.new
...
ary[[i,j,k]] = ... # ここで [i,j,k] が Array。

こちらの方が簡潔ですが、配列を参照するたびに Array のインスタンスが生成されてしまいます。今回のように速度が要求されるケースでは利用しない方が無難であると思います。

GL</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/7492866367041243203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/7492866367041243203'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/02/gl-excessruby-scene-7.html' title='GL Excess／Ruby : Scene 7 を移植'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_DwzvfizuCfw/SzV_99sqdjI/AAAAAAAAAEs/MeswNemIXU0/s72-c/GLExcessRuby_scene07-20080217.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-5407357485418146633</id><published>2008-02-16T12:00:00.001+09:00</published><updated>2009-12-26T12:15:00.887+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='Clip'/><title type='text'>ruby-breakpoint, etc.</title><summary type='text'>

[ruby-list:44570] Re: Q: 動的デバッグ方法
&gt; (1) 動的にデバッグモードに移るようなライブラリ関数はあります
&gt;    でしょうか?

ruby-breakpointはどうでしょうか？
breakpointと書いた時点でirbに突入します。

RubyForge: ruby-breakpoint: Project Info
ruby-breakpoint lets you inspect and modify state, diagnose bugs,
patch applications and more all via IRB by simply doing a method
call at the place you want to investigate. It is no longer being
maintained. Please </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/5407357485418146633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/5407357485418146633'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/02/ruby-breakpoint-etc.html' title='ruby-breakpoint, etc.'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-6358107545179502966</id><published>2008-02-16T12:00:00.000+09:00</published><updated>2009-12-26T12:13:41.048+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGL'/><title type='text'>GL Excess / Ruby : Scene 6 の移植完了</title><summary type='text'>

結局、ロケットの形状データはオリジナル版と同様に配列ベタ持ちで使うことにしました。 パフォーマンスに深刻な影響が出ることもありませんでしたので。

あと実行終了後のクリーンアップ部分に glDeleteLists( @shiplist, 1 ) と追記。これってオリジナル版には見当らないのですが、大丈夫なんでしょうかね。



GL Excess / Ruby のページも更新。 Scene 6 をダウンロードできるようにしておきました:

GL Excess / Ruby のページ

未実装のシーンは 7, 8, 10, 11 の 4 個。
</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/6358107545179502966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/6358107545179502966'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/02/gl-excess-ruby-scene-6.html' title='GL Excess / Ruby : Scene 6 の移植完了'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_DwzvfizuCfw/SzV_Ixr4voI/AAAAAAAAAEk/3POCaszktAs/s72-c/GLExcessRuby_scene06-20080216.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-4359865445281602330</id><published>2008-02-15T12:00:00.000+09:00</published><updated>2009-12-26T12:10:57.181+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGL'/><title type='text'>GL Excess／Ruby : Scene 6 の移植中</title><summary type='text'>

Scene 6 です。GL Excess で唯一、何らかのツールでモデリングされたジオメトリ(ロケットです)が登場します。 とりあえず、ロケット以外のもの全部を移植してしまいました。



ロケットの準備ができるまでの間、かわりに Teapot に飛んでもらうことにしました(^^;

オリジナル版ではモデルデータ(頂点情報とインデックス)を C の配列でベタ持ちしています。 Ruby ではこれをどのような形式で持つのがいいか、考え中です。

(案)

Marshal.dump で前処理しておいたバイト列を Marshal.load で復活
Array#pack/String#unpack

</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/4359865445281602330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/4359865445281602330'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/02/gl-excessruby-scene-6.html' title='GL Excess／Ruby : Scene 6 の移植中'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_DwzvfizuCfw/SzV-pdQnpyI/AAAAAAAAAEc/IwozrLoivK0/s72-c/GLExcessRuby_scene06InProgress-20080214.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-1517812565846846852</id><published>2008-02-11T12:00:00.001+09:00</published><updated>2009-12-26T12:08:28.337+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGL'/><title type='text'>GL Excess / Ruby : Scene 5 を移植</title><summary type='text'>

バンプマッピングが印象的な Scene 5 です。最近主流のピクセル単位の処理で はないことから、負荷はそれほどでもありません。バンプマップの処理よりも、 燈台の炎を表現するパーティクルが負担になっている印象を受けます。



GL Excess / Ruby のページも更新。 Scene 5 をダウンロードできるようにしておきました:

GL Excess / Ruby のページ

未実装のシーンは 6, 7, 8, 10, 11 の 5 個です。
</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/1517812565846846852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/1517812565846846852'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/02/gl-excess-ruby-scene-5.html' title='GL Excess / Ruby : Scene 5 を移植'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_DwzvfizuCfw/SzV9-rCN17I/AAAAAAAAAEU/6ZRctO6cUv8/s72-c/GLExcessRuby_scene05-20080211.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-3089012380776112394</id><published>2008-02-06T12:00:00.000+09:00</published><updated>2009-12-26T12:06:13.638+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGL'/><title type='text'>GL Excess / Ruby : Scene 1 を移植</title><summary type='text'>

GL Excess のオープニングである Scene 1 を移植しました。全然問題なしです。



GL Excess / Ruby のページも更新。 Scene 1 をダウンロードできるようにしておきました:

GL Excess / Ruby のページ

残りは 6 シーンになりました。未実装のシーンは 5, 6, 7, 8, 10, 11。大物ばかりですね。
</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/3089012380776112394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/3089012380776112394'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/02/gl-excess-ruby-scene-1.html' title='GL Excess / Ruby : Scene 1 を移植'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_DwzvfizuCfw/SzV9fAEOqxI/AAAAAAAAAEM/rr_n9vEm1PM/s72-c/GLExcessRuby_scene01-20080205.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-7856919791696664801</id><published>2008-02-04T12:00:00.000+09:00</published><updated>2009-12-26T12:04:19.671+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGL'/><title type='text'>GL Excess / Ruby : Scene 12 をサクッと移植、と思いきや</title><summary type='text'>

Scene 12 は GL Excess 全12シーンで一番短い行数のプログラムです(scene12.cppが281行)。



移植なんて一瞬だぜ、と思っていたら。

texture.rb で raw テクスチャの幅が正しく取れないケースがあることがわかりました。 Ruby 1.8 と 1.9 との間で、 String#to_i の挙動に違いがあることが原因のようです。

両方のバージョンで動かしたかったがために、次のようにして対処してみました：

texture.rb
major, minor, micro = RUBY_VERSION.scan( /\d+/ )

if ( major == "1" &amp;&amp; minor == "8" )
  # for Ruby 1.8.
  width  = pow2( w[0].to_i - "0"[0].to_i )
  height = </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/7856919791696664801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/7856919791696664801'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/02/gl-excess-ruby-scene-12.html' title='GL Excess / Ruby : Scene 12 をサクッと移植、と思いきや'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_DwzvfizuCfw/SzV9A6WsrxI/AAAAAAAAAEE/3UUWBW5vmYk/s72-c/GLExcessRuby_scene12-20080204.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-5438471111853540227</id><published>2008-02-03T12:00:00.000+09:00</published><updated>2009-12-26T12:02:01.766+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGL'/><title type='text'>GL Excess / Ruby : Scene 4 を移植</title><summary type='text'>

パーティクルが多いように見えるので心配でしたが、特に問題なく移植できました。



GL Excess / Ruby のページも更新。 Scene 4 をダウンロードできるようにしておきました:

GL Excess / Ruby のページ
</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/5438471111853540227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/5438471111853540227'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/02/gl-excess-ruby-scene-4.html' title='GL Excess / Ruby : Scene 4 を移植'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_DwzvfizuCfw/SzV8dHvNSoI/AAAAAAAAAD8/cJ0KdHKcSDc/s72-c/GLExcessRuby_scene04-20080202.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-3308758649651404566</id><published>2008-02-02T12:00:00.001+09:00</published><updated>2009-12-26T12:00:17.143+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGL'/><title type='text'>GL Excess / Ruby : Scene 3 を移植</title><summary type='text'>

シーン冒頭の山がせり上がってる部分については、ディスプレイリスト + glScalef() の組み合わせで書き直しました。計算の無駄を省いたおかげで、元となっている glxsglut に比べても遜色ない速度で動いてくれるようになりました。




そのようなわけで GL Excess / Ruby のページも更新。


GL Excess / Ruby のページ


移植済みのシーンは 2, 3, 9 。残りはあと 9 個です。

</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/3308758649651404566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/3308758649651404566'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/02/glexcessruby-scene-3.html' title='GL Excess / Ruby : Scene 3 を移植'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_DwzvfizuCfw/SzV7scNLumI/AAAAAAAAAD0/gBoqcn0tmK0/s72-c/GLExcessRuby_scene03-20080202.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-1590729737642503875</id><published>2008-01-27T12:00:00.000+09:00</published><updated>2009-12-26T11:49:58.898+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGL'/><title type='text'>GL Excess / Ruby : Scene 2 を移植してみましたが…</title><summary type='text'>

オリジナルと同じ挙動が再現できていますが…遅い orz



200粒のパーティクルもキツそうですが、水面の波紋を表現するために 64x64個 の位置と法線を毎フレーム更新しているところが Ruby にはつらすぎます。

今なら頂点属性の時間発展はバーテックスシェーダにまかせてしまうところな のですが、オリジナルは 2001 年の作品。

負荷の大きい部分はわかりきっているので、そこだけを C の拡張モジュール化 してしまえば、処理速度は改善されるはずです。しかしそれで GL Excess / Ruby を名乗ってよいものなのでしょうか。悩み中です。
</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/1590729737642503875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/1590729737642503875'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/01/gl-excess-ruby-scene-2.html' title='GL Excess / Ruby : Scene 2 を移植してみましたが…'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_DwzvfizuCfw/SzV5oRoep0I/AAAAAAAAADs/21HKvip47kE/s72-c/GLExcessRuby_scene02-20080127.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-6762495491055085782</id><published>2008-01-26T12:00:00.001+09:00</published><updated>2009-12-26T11:47:20.658+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGL'/><title type='text'>GL Excess / Ruby : ページを用意しました</title><summary type='text'>
GL Excess／Ruby


ソースコードのライセンスは GPL Version 2 としています。オリジナ ル版のライセンスをそのまま引き継ぎました。


まだ Scene 9 しか移植していません。残りは 11 個! orz.

</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/6762495491055085782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/6762495491055085782'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2009/12/glexcessruby.html' title='GL Excess / Ruby : ページを用意しました'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-3211418694784144846</id><published>2008-01-21T00:00:00.002+09:00</published><updated>2009-12-23T17:00:30.160+09:00</updated><title type='text'></title><summary type='text'>


ruby-opengl で GLExcess

数学関数の拡張ライブラリを書くのにも少々飽きました。というか ruby-opengl で遊ぶつもりだったはずなのに、どんどん目的から離れてますね…


そのようなわけで、GLExcess の Ruby 移植をして遊ぶことにしました。 とりあえず癒し系の Scene 9 から。





ruby-opengl 自体は特に問題になることもなく移植できました。 それよりは元のソースコード(C++)の変数未初期化が原因で、パーティクルの挙動がオリジナル版と一致しないというバグに悩みました。


Ruby 1.8 と 1.9 での動作を確認しています。両者の比較をしてみるのも面白いかも。


そしてせっかく作った RMath ライブラリは一切使ってないわけですが何かorz

</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/3211418694784144846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/3211418694784144846'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/01/ruby-opengl-glexcess-ruby-opengl.html' title=''/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_DwzvfizuCfw/SzHODGpsTBI/AAAAAAAAADU/ev4CfYTu4Pc/s72-c/GLExcessRuby_Scene09-20080121.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-8699679458164890072</id><published>2008-01-15T12:00:00.000+09:00</published><updated>2009-12-26T11:44:05.955+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><title type='text'>まだ拡張ライブラリ作成中</title><summary type='text'>

ruby-openglで遊ぶための数学関数ライブラリ・ RMath を作成中。とりあえず用意できたのはここまで：

RVec3/RVec4 ： 3次元/4次元ベクトル
RMtx3/RMtx4 ： 3x3/4x4正方行列
RQuat ： クォータニオン


ちゃんと使い物になればいいのですけれどね。

Test::Unitでテストも書いてみています。テストを駆動するメソッド名を"test_..." としておけば、自動的に実行対象にしてくれるのが素敵です。 それにしても、「テストを書く順番が違う」と叱られそうですね。テストコードの書き方にも作法があるのでしょうけれど、便利な assert が使えるだけで私には十分です。

mkrf を利用したビルドも使ってみました。ソースディレクトリのルートにmkrf_conf.rbというファイルを作ります。
&gt; more mkrf_conf.rb
</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/8699679458164890072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/8699679458164890072'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/01/blog-post_15.html' title='まだ拡張ライブラリ作成中'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-9121367501853377858</id><published>2008-01-13T12:00:00.001+09:00</published><updated>2009-12-26T11:43:10.764+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGL'/><title type='text'></title><summary type='text'>


ruby-opengl 0.60.0 : セットアップに再挑戦

追記： 以下の内容は古くなっています。こちらが役に立つかもしれません。


VC++ 2008 版の Ruby 1.9.0 ができたので、ruby-opengl 0.60.0 のインストール。


GLUTのヘッダ・ライブラリは Windows SDK や Platform SDK で使える場所に配置しておきます。
rake や mkrf を最新版にしておきます。mkrf の 0.2.3 は Ruby 1.9.0 対応済みのバージョンです。

  &gt; gem install mkrf
  Successfully installed mkrf-0.2.3
  1 gem installed
  Installing ri documentation for mkrf-0.2.3...
  Installing </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/9121367501853377858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/9121367501853377858'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/01/ruby-opengl-0.html' title=''/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_DwzvfizuCfw/SzV3OtQ7HGI/AAAAAAAAADk/Fe0od3uoKhg/s72-c/teapots-20080113.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-5226643867850281460</id><published>2008-01-10T12:00:00.001+09:00</published><updated>2009-12-26T11:21:57.550+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGL'/><title type='text'>ruby-opengl 0.60.0 リリース</title><summary type='text'>

でてました。同じ日にこれが利用しているmkrf も 0.2.3 に。

One-Click Ruby Installer (Ruby 1.8.6) での利用は問題無しでした(Ruby 1.8向けのバイナリが自動的にインストールされるので)。

Ruby 1.9.0 の方は…、ちょっとうまくいきません。考えられる原因は多々ありまして、

target=mingw32 として Cygwin でビルドした私家版 Ruby 1.9.0 を使ってる
OS が VIsta (UAC有効)
...


パス名の問題かもしれないですし、パーミッションに違反しているために必要なファイルにアクセスできていないのかもしれませんし。うん、問題が切り分けられない(笑

最近出た Visual C++ 2008 Express Edition をインストールしてあるので、私家版 Ruby もこれで作</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/5226643867850281460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/5226643867850281460'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/01/ruby-opengl-0600.html' title='ruby-opengl 0.60.0 リリース'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-8938290961611523289</id><published>2008-01-07T12:00:00.003+09:00</published><updated>2009-12-26T11:19:21.072+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cygwin'/><title type='text'>Cygwin Package List</title><summary type='text'>
http://cygwin.com/packages/。"Search Package List: " というテキストボックスにファイル名を入力して検索すると、そのファイル名 を含む Cygwin パッケージ名を教えてくれます。


例えば今日は svn を使おうとして 「"cygexpat-0.dll" というファイルが見付 からない」、というエラーが出ましたが、上記サイトで検索してみると、

Found 3 matches for cygexpat-0.dll.

  expat/expat-1.95.7-1 XML parser library written in C (development/documentation package)
  expat/expat-1.95.8-1 XML parser library written in C (development/</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/8938290961611523289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/8938290961611523289'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/01/cygwin-package-list.html' title='Cygwin Package List'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-8313200971121161621</id><published>2008-01-02T12:00:00.001+09:00</published><updated>2009-12-26T11:15:24.689+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cygwin'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><title type='text'>Cygwin の make</title><summary type='text'>

Ruby 1.9.0 で extconf.rb から生成した Makefile を使おうとするとこんなことに：
$ d\:/ruby19/bin/ruby extconf.rb
creating Makefile

$ make -f Makefile
Makefile:130: *** target pattern contains no `%'.  Stop.

$ make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/8313200971121161621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/8313200971121161621'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/01/cygwin-make.html' title='Cygwin の make'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-4140086808042171471</id><published>2008-01-02T12:00:00.000+09:00</published><updated>2009-12-26T11:14:09.048+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><title type='text'>引き続き拡張ライブラリ</title><summary type='text'>

数学関数はとりあえず

3/4次元ベクトル
4x4行列


まで実装。あとは3x3行列とクォータニオンがあれば結構使い物になりそう。

でもテストは一個も書いてませんが何か。

CppUnit ならわかるのですが、 Ruby でのテスト方法ってどうなってるんでしょう。

今日は Ruby 1.8.6 ( One-Click Ruby Installerの 1.8.6-26 )向けにビ ルドしようとしたら、1.9.0と微妙に違う点があることに気付いたので何点かメ モ：

ruby.h の場所
(Ruby 1.8.6) $(RUBY)/lib/ruby/1.8/i386-mswin32/ruby.h
(Ruby 1.9.0) $(RUBY)/include/ruby-1.9.0/ruby.h

1.9になって、インクルードファイルがちゃんと include/の下に配置さ れるようになった</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/4140086808042171471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/4140086808042171471'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2008/01/blog-post.html' title='引き続き拡張ライブラリ'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-6889524697637107749</id><published>2007-12-31T12:00:00.000+09:00</published><updated>2009-12-26T11:08:28.716+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><title type='text'>coerceとか代入演算子とか</title><summary type='text'>

数学関数をお題にして、拡張ライブラリの制作方法を勉強中。以下、今日知っ たことのメモです。昨日の分と同様、RVec4は「4次元ベクトルを表すクラス」 として読んでください。

coerce

たとえば v * 2.0 と書いたなら RVec4#* が利用されるが、 2.0 * v だとまず Float#* が使われる。しかし Float は RVec4 というクラスについて知らない。

このような場合、Ruby では v.coerce(self) というメソッドを介して RVec4 に自身の型変換を依頼し、その結果を元に演算を続行する：
a, b = v.coerce(self)
a * b

自分のクラスで coerce を導入するならば、
rb_define_method( rb_cRVec4, "coerce", RVec4_coerce, -1 );

…のように初期化して、</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/6889524697637107749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/6889524697637107749'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2007/12/coerce.html' title='coerceとか代入演算子とか'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-554285548358770615</id><published>2007-12-30T12:00:00.001+09:00</published><updated>2009-12-26T11:06:10.586+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><title type='text'>拡張ライブラリ</title><summary type='text'>

mkrf も ruby-opengl 0.60.0 もアップデート来ませんね。しかたがないので、Ruby の拡張ライブラリの作り 方を勉強しながら待つことに(笑

SWIGを試してみたことはありますが、1から 書いたことがなかったので。

お題は数学関数に。うまいこと完成したら、ruby-opengl と一緒に使えるかも しれません。

以下のメモに出てくるRVec4は「4次元ベクトルを表すクラス」として 読んでみてください。

クラスの追加
rb_cRVec4 = rb_define_class( "RVec4", rb_cObject );

rb_cObject は include/ruby/ruby.h で宣言されている組み込みの変数。

メモリ確保関数の指定
rb_define_alloc_func( rb_cRVec4, RVec4_allocate );

RVec4.</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/554285548358770615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/554285548358770615'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2007/12/blog-post.html' title='拡張ライブラリ'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-2273990524688193023</id><published>2007-12-28T12:00:00.003+09:00</published><updated>2009-12-26T11:01:28.630+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OpenGL'/><title type='text'>Mesa-7.0.2 : リンクエラー</title><summary type='text'>

MesaLib-7.0.2 を VC++2005 でビルドしようとしたら、こんなリンクエラーが出た：
2&gt;   ライブラリ .\Release/OPENGL32.lib とオブジェクト .\Release/OPENGL32.exp を作成中
2&gt;mesa.lib(glapi.obj) : error LNK2001: 外部シンボル "_gl_dispatch_stub_772" は未解決です。
2&gt;Release/OPENGL32.DLL : fatal error LNK1120: 外部参照 1 が未解決です。

修正方法の指針はここにあった：

Nabble - mesa3d-users - Compile problem





具体的には以下の通り。
Mesa-7.0.2/src/mesa/drivers/windows/gdi/wmesa.c

に、1536行目として
</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/2273990524688193023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/2273990524688193023'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2007/12/mesa-702.html' title='Mesa-7.0.2 : リンクエラー'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-6843365766908130738.post-8653516553798055281</id><published>2007-12-28T12:00:00.001+09:00</published><updated>2009-12-26T10:59:38.569+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Emacs'/><title type='text'>TRAMP で FTP</title><summary type='text'>

TRAMP に FTP を使ってアクセスしてもらうには、明示的にプロトコル名を書かなけれ ばいけないらしい。

Emacs のミニバッファには次のように書くことになる：
Find file: /ftp:username@server.address:/path/to.file

これで TRAMP はユーザーからの命令を Ange-FTP に渡してくれるようにな る とのこと。
</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/8653516553798055281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6843365766908130738/posts/default/8653516553798055281'/><link rel='alternate' type='text/html' href='http://lt140.blogspot.com/2007/12/tramp-ftp.html' title='TRAMP で FTP'/><author><name>LT140</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_DwzvfizuCfw/S9ptva84b_I/AAAAAAAAAIo/BjXloYrgub4/S220/profile.jpg'/></author></entry></feed>
