追記

20100226

[PHP]PEAR2/PHP5.3以降のパッケージインストーラー "Pyrus" について

#

ウノウラボの仕事を横取り40萬。

インストール

を参考に作業しました。環境は MacOSX 10.6 Snow leopardです。Windows版のインストレーションは識者にお問い合せください。

PyrusはPHP5.3以上で利用できるそうです。これはPHPのインストールからかなあ… と思っていたらSnow leopard にあるPHPが5.3という素敵展開。

$ /usr/bin/php -v
PHP 5.3.0 (cli) (built: Jul 19 2009 00:34:29)

PEAR2のSVNレポジトリからチェックアウトします。パスは ~/local/lib/php/PEAR2 にしましたがどこでもいいです。 上記の記事には「PEAR2用のchannelはまだありませんがレポジトリ内の各package.xmlを利用してPyrusでパッケージをインストールすることができます。」と書いてありましたが 確認したらpear2.php.net で利用できました。 各最新ソースを閲覧したかったのでallでチェックアウトしましたが、Pyrusを利用したいだけなら http://svn.php.net/repository/pear2/all/Pyrus 以下のチェックアウトでいいです。

$ cd ~/local/lib/php
$ svn co http://svn.php.net/repository/pear2/all  PEAR2

Pyrus用のユーザーディレクトリを作成します。好みでドットディレクトリにしました。

$ mkdir ~/.pyrus
$ php ./PEAR2/Pyrus/pyrus.phar mypear ~/.pyrus
Pyrus requires PHP 5.3.1 or newer.

現trunkではPHP5のバージョン5.3.1は要るようです。過去のリビジョンにもどってもいいんですけど、どうせあとあと要るのでMacPortsで5.3.1をインストールしました。

PEAR2/Pyrus/scripts/pyrus のスクリプトを使用します。パス通しちゃえ。

$ ln -s `pwd`/PEAR2/Pyrus/scripts/pyrus  ~/local/bin/

PEAR2パッケージ、PEAR2_Atotoload とかをインストールしてみます。

$ pyrus install  ./PEAR2/Autoload/package.xml
Fatal error: Class 'SQLite3' not found in /Users/laiso/local/lib/php/PEAR2/Pyrus/src/Pyrus/ChannelRegistry/Sqlite3.php on line 103

Pyrusが要求するSQLite3ドライバまわりが入っていないようです。MacPortsでインストールしました。

$ sudo port install php5-sqlite

再度インストール実行。

$ pyrus install  ./PEAR2/Autoload/package.xml
Installed pear2.php.net/PEAR2_Autoload-0.1.0

$ tree ~/.pyrus                    
/Users/laiso/.pyrus
`-- php
    `-- pear2
        `-- Autoload.php

できました。

PEAR2公式のチャネルからもインストールしてみます。

$ pyrus install -o  PEAR2_HTTP_Request

試用

コンパチなので当然pearコマンドと同じように使用できます。

$ pyrus help

なにかパッケージをつくってみましょう。

$ pyrus generate-pear2 Wozozo_Acme_SPAM

とすると‘Install developer tools?‘と聞かれたのでyesに

Installed pear2.php.net/PEAR2_Pyrus_Developer-0.1.0

PEAR2PyrusDeveloperがインストールされました。

カレント以下には先程作成したパッケージのSVN用ディレクトリができていました。

$ tree ./Wozozo_Acme_SPAM/
Wozozo_Acme_SPAM/
|-- branches
|-- tags
`-- trunk
    |-- API-0.1.0
    |-- CREDITS
    |-- README
    |-- RELEASE-0.1.0
    |-- customcommand
    |-- customrole
    |-- customtask
    |-- data
    |-- docs
    |-- examples
    |-- extrasetup.php
    |-- package.xml
    |-- package_compatible.xml
    |-- packagexmlsetup.php
    |-- src
    |   `-- Wozozo
    |       `-- Acme
    |           `-- SPAM
    |               `-- Main.php
    |-- stub.php
    |-- tests
    `-- www

チャネルを追加してPHPUnit3をインストールしてみます。

$ pyrus channel-discover pear.phpunit.de
$ pyrus install phpunit/PHPUnit

インストールパッケージの照会。

$ pyrus l
 PEAR2_BugManager
 PEAR2_Exception
 PEAR2_HTTP_Request
 PEAR2_MultiErrors
 PEAR2_Templates_Savant

Simple Channel Server をつくってみます。

$ pyrus  scs-create pear2.laiso.org "my local channel" local local-pear2

Install simple channel server tools?を聞かれるのでyes。

pear2\Pyrus\Installer\Exception: Installation failed
pear2\Pyrus\AtomicFileTransaction\Exception: Unable to begin transaction for /opt/local/bin
pear2\Pyrus\AtomicFileTransaction\Exception: unrecoverable transaction error: cannot create journal path /opt/local/.journal-bin

(わけもわからず)ルート権限で再実行。

$ sudo pyrus  scs-create pear2.laiso.org "my local channel" local local-pear2

同じエラーでした。保留。

感想

実は普段PEARに触れていないので、比較してどう違うのかがよくわかっていませんでした。んがんぐ。

PEAR2でどのような世界が訪ずれるのかは pear.php.net の以下の文章で触れることができます。 Manual :: 規則


20100127

Google Desktop on Gentoo amd64(x86_64)

設定した。

から google-desktop-1.2.0.0088.ebuild, mozextension_emid.patch をダウンロード。

    mkdir -p /usr/local/portage/local/app-misc/google-desktop
    cd /usr/local/portage/local/app-misc/google-desktop
    mkdir files
    wget "http://bugs.gentoo.org/attachment.cgi?id=193489" -O google-desktop-1.2.0.0088.ebuild 
    wget "http://bugs.gentoo.org/attachment.cgi?id=123411" -O files/mozextension_emid.patch
    sudo ebuild ./google-desktop-1.2.0.0088.ebuild digest
    sudo echo "app-misc/google-desktop **" >> /etc/portage/package.keywords
    sudo emerge -auvND app-misc/google-desktop
    # libgdl.so とかがみつからないので
    sudo ln -s /opt/google/desktop/lib32 /opt/google/desktop/lib
    xdg-open /usr/share/applications/google-gdl.desktop
    # GUIセットアップ画面が起動(普通にデスクトップのアプリケーションメニューからもえらべるはず)

ps aux > launch.txt が流行っている

ことにしたい。

Core i5 BOXにしてから面白くて富豪的にKDE4環境で動かしている。

メインはXmonad環境で他のディストリとか*BSDとかOpen Solaris, Plan9, Windowsの世界に旅立ちたい時はdwmとかでVirtualBOXを起動している。

Mozilla Firefox は閲覧プロファイルと開発プロファイル、動画再生用プロファイルで--no-remoteで常時3つ起動している。

strigi関連の検索のデーモンとかうごいているのに今気付いた…

    USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
    root         1  0.0  0.0   3832   644 ?        Ss   Jan25   0:01 init [3]   
    root         2  0.0  0.0      0     0 ?        S<   Jan25   0:00 [kthreadd]
    root         3  0.0  0.0      0     0 ?        S<   Jan25   0:00 [migration/0]
    root         4  0.0  0.0      0     0 ?        S<   Jan25   0:00 [ksoftirqd/0]
    root         5  0.0  0.0      0     0 ?        S<   Jan25   0:00 [watchdog/0]
    root         6  0.0  0.0      0     0 ?        S<   Jan25   0:00 [migration/1]
    root         7  0.0  0.0      0     0 ?        S<   Jan25   0:00 [ksoftirqd/1]
    root         8  0.0  0.0      0     0 ?        S<   Jan25   0:00 [watchdog/1]
    root         9  0.0  0.0      0     0 ?        S<   Jan25   0:00 [migration/2]
    root        10  0.0  0.0      0     0 ?        S<   Jan25   0:00 [ksoftirqd/2]
    root        11  0.0  0.0      0     0 ?        S<   Jan25   0:00 [watchdog/2]
    root        12  0.0  0.0      0     0 ?        S<   Jan25   0:00 [migration/3]
    root        13  0.0  0.0      0     0 ?        S<   Jan25   0:00 [ksoftirqd/3]
    root        14  0.0  0.0      0     0 ?        S<   Jan25   0:00 [watchdog/3]
    root        15  0.0  0.0      0     0 ?        S<   Jan25   0:00 [events/0]
    root        16  0.0  0.0      0     0 ?        S<   Jan25   0:00 [events/1]
    root        17  0.0  0.0      0     0 ?        S<   Jan25   0:00 [events/2]
    root        18  0.0  0.0      0     0 ?        S<   Jan25   0:00 [events/3]
    root        19  0.0  0.0      0     0 ?        S<   Jan25   0:00 [khelper]
    root        24  0.0  0.0      0     0 ?        S<   Jan25   0:00 [async/mgr]
    root       129  0.0  0.0      0     0 ?        S<   Jan25   0:00 [kblockd/0]
    root       130  0.0  0.0      0     0 ?        S<   Jan25   0:00 [kblockd/1]
    root       131  0.0  0.0      0     0 ?        S<   Jan25   0:00 [kblockd/2]
    root       132  0.0  0.0      0     0 ?        S<   Jan25   0:00 [kblockd/3]
    root       135  0.0  0.0      0     0 ?        S<   Jan25   0:00 [kacpid]
    root       136  0.0  0.0      0     0 ?        S<   Jan25   0:00 [kacpi_notify]
    root       137  0.0  0.0      0     0 ?        S<   Jan25   0:00 [kacpi_hotplug]
    root       238  0.0  0.0      0     0 ?        S<   Jan25   0:00 [kseriod]
    root       306  0.0  0.0      0     0 ?        S    Jan25   0:00 [khungtaskd]
    root       307  0.0  0.0      0     0 ?        S    Jan25   0:00 [pdflush]
    root       308  0.0  0.0      0     0 ?        S    Jan25   0:00 [pdflush]
    root       309  0.0  0.0      0     0 ?        S<   Jan25   0:00 [kswapd0]
    root       310  0.0  0.0      0     0 ?        S<   Jan25   0:00 [aio/0]
    root       311  0.0  0.0      0     0 ?        S<   Jan25   0:00 [aio/1]
    root       312  0.0  0.0      0     0 ?        S<   Jan25   0:00 [aio/2]
    root       313  0.0  0.0      0     0 ?        S<   Jan25   0:00 [aio/3]
    root       314  0.0  0.0      0     0 ?        S<   Jan25   0:00 [nfsiod]
    root       315  0.0  0.0      0     0 ?        S<   Jan25   0:00 [crypto/0]
    root       316  0.0  0.0      0     0 ?        S<   Jan25   0:00 [crypto/1]
    root       317  0.0  0.0      0     0 ?        S<   Jan25   0:00 [crypto/2]
    root       318  0.0  0.0      0     0 ?        S<   Jan25   0:00 [crypto/3]
    root       523  0.0  0.0      0     0 ?        S<   Jan25   0:00 [iscsi_eh]
    root       549  0.0  0.0      0     0 ?        S<   Jan25   0:00 [kpsmoused]
    root       554  0.0  0.0      0     0 ?        S<   Jan25   0:00 [rpciod/0]
    root       555  0.0  0.0      0     0 ?        S<   Jan25   0:00 [rpciod/1]
    root       556  0.0  0.0      0     0 ?        S<   Jan25   0:00 [rpciod/2]
    root       557  0.0  0.0      0     0 ?        S<   Jan25   0:00 [rpciod/3]
    root      1024  0.0  0.0      0     0 ?        S<   Jan25   0:00 [ata/0]
    root      1025  0.0  0.0      0     0 ?        S<   Jan25   0:00 [ata/1]
    root      1026  0.0  0.0      0     0 ?        S<   Jan25   0:00 [ata/2]
    root      1027  0.0  0.0      0     0 ?        S<   Jan25   0:00 [ata/3]
    root      1028  0.0  0.0      0     0 ?        S<   Jan25   0:00 [ata_aux]
    root      4055  0.0  0.0      0     0 ?        S<   Jan25   0:00 [scsi_eh_0]
    root      4057  0.0  0.0      0     0 ?        S<   Jan25   0:00 [scsi_eh_1]
    root      4228  0.0  0.0      0     0 ?        S<   Jan25   0:00 [scsi_eh_2]
    root      4230  0.0  0.0      0     0 ?        S<   Jan25   0:00 [scsi_eh_3]
    root      4232  0.0  0.0      0     0 ?        S<   Jan25   0:00 [scsi_eh_4]
    root      4234  0.0  0.0      0     0 ?        S<   Jan25   0:00 [scsi_eh_5]
    laiso      4546  0.0  0.0  42928  3932 pts/2    Ss   03:06   0:00 -zsh
    root      6603  0.0  0.0      0     0 ?        S<   Jan25   0:00 [scsi_tgtd/0]
    root      6604  0.0  0.0      0     0 ?        S<   Jan25   0:00 [scsi_tgtd/1]
    root      6605  0.0  0.0      0     0 ?        S<   Jan25   0:00 [scsi_tgtd/2]
    root      6606  0.0  0.0      0     0 ?        S<   Jan25   0:00 [scsi_tgtd/3]
    laiso      8059  0.0  0.0  17024  1120 pts/2    R+   03:31   0:00 ps aux
    root      8748  0.0  0.0      0     0 ?        S<   Jan25   0:00 [ksuspend_usbd]
    root      8752  0.0  0.0      0     0 ?        S<   Jan25   0:00 [khubd]
    root      9322  0.0  0.0      0     0 ?        S<   Jan25   0:00 [usbhid_resumer]
    root      9601  0.0  0.0      0     0 ?        S<   Jan25   0:00 [khpsbpkt]
    root      9750  0.0  0.0      0     0 ?        S<   Jan25   0:00 [knodemgrd_0]
    root     10175  0.0  0.0      0     0 ?        S<   Jan25   0:00 [kstriped]
    root     10801  0.0  0.0      0     0 ?        S<   Jan25   0:00 [ksnapd]
    root     11257  0.0  0.0      0     0 ?        S<   Jan25   0:00 [dm-bbr/0]
    root     11258  0.0  0.0      0     0 ?        S<   Jan25   0:00 [dm-bbr/1]
    root     11259  0.0  0.0      0     0 ?        S<   Jan25   0:00 [dm-bbr/2]
    root     11260  0.0  0.0      0     0 ?        S<   Jan25   0:00 [dm-bbr/3]
    root     12659  0.0  0.0      0     0 ?        S<   Jan25   0:00 [kjournald2]
    root     12757  0.0  0.0  12624  1124 ?        S<  Jan25   0:00 /sbin/udevd --daemon
    root     13043  0.0  0.0      0     0 ?        S<   Jan25   0:00 [hd-audio0]
    root     13161  0.0  0.0      0     0 ?        S<   Jan25   0:00 [kdmflush]
    root     13164  0.0  0.0      0     0 ?        S<   Jan25   0:00 [kdmflush]
    root     13167  0.0  0.0      0     0 ?        S<   Jan25   0:00 [kdmflush]
    root     13175  0.0  0.0      0     0 ?        S<   Jan25   0:01 [kdmflush]
    root     13185  0.0  0.0      0     0 ?        S<   Jan25   0:00 [kdmflush]
    root     13241  0.0  0.0      0     0 ?        S<   Jan25   0:00 [kjournald2]
    root     13242  0.0  0.0      0     0 ?        S<   Jan25   0:00 [kjournald2]
    root     13243  0.0  0.0      0     0 ?        S<   Jan25   0:00 [kjournald2]
    root     13244  0.0  0.0      0     0 ?        S<   Jan25   0:00 [kjournald2]
    root     13245  0.0  0.0      0     0 ?        S<   Jan25   0:00 [kjournald2]
    root     14675  0.0  0.0 127744  1740 ?        Sl   Jan25   0:00 /usr/sbin/rsyslogd -c3 -i /var/run/rsyslogd.pid -f /etc/rsyslog.conf
    root     14738  0.0  0.0   3836   612 ?        Ss   Jan25   0:00 /usr/sbin/acpid
    101      14798  0.0  0.0  15040  1156 ?        Ss   Jan25   0:00 /usr/bin/dbus-daemon --system
    root     14857  0.0  0.0 102432  2572 ?        Ssl  Jan25   0:00 /usr/sbin/console-kit-daemon
    unbound  15447  0.0  0.1  48160  4448 ?        Ss   Jan25   0:00 /usr/sbin/unbound -c /etc/unbound/unbound.conf
    102      15508  0.0  0.1  27340  4420 ?        Ss   Jan25   0:00 /usr/sbin/hald --use-syslog --verbose=no
    root     15509  0.0  0.0  15728  1220 ?        S    Jan25   0:00 hald-runner
    root     15534  0.0  0.0  17852  1156 ?        S    Jan25   0:00 hald-addon-input: Listening on /dev/input/event3 /dev/input/event2 /dev/input/event1
    102      15548  0.0  0.0  19608  1080 ?        S    Jan25   0:00 hald-addon-acpi: listening on acpid socket /var/run/acpid.socket
    root     15549  0.0  0.0  17852  1172 ?        S    Jan25   0:00 hald-addon-storage: polling /dev/hda (every 2 sec)
    root     15663  0.0  0.0 121172  2016 ?        Ssl  Jan25   0:00 /usr/sbin/multiskkserv -r /usr/share/skk SKK-JISYO.L.cdb SKK-JISYO.fullname.cdb SKK-JISYO.geo.cdb SKK-JISYO.jinmei.cdb SKK-JISYO.propernoun.cdb SKK-JISYO.station.cdb SKK-JISYO.zipcode.cdb keywordlist_furigana.skkdic
    polipo   15782  0.0  1.6 111408 68492 ?        Ss   Jan25   0:01 /usr/bin/polipo
    root     15932  0.0  0.0  24164   712 ?        Ss   Jan25   0:00 /usr/bin/kdm
    root     15960  0.8  3.4 745756 141640 tty7    Ss+  Jan25  22:35 /usr/bin/X -br -novtswitch -quiet -nolisten tcp :0 vt7 -auth /var/run/xauth/A:0-FwKPPH
    root     15998  0.0  0.0  10136   844 tty1     Ss+  Jan25   0:00 /sbin/agetty 38400 tty1 linux
    root     15999  0.0  0.0  10136   840 tty2     Ss+  Jan25   0:00 /sbin/agetty 38400 tty2 linux
    root     16000  0.0  0.0  10136   840 tty3     Ss+  Jan25   0:00 /sbin/agetty 38400 tty3 linux
    root     16001  0.0  0.0  10136   840 tty4     Ss+  Jan25   0:00 /sbin/agetty 38400 tty4 linux
    root     16002  0.0  0.0  10136   844 tty5     Ss+  Jan25   0:00 /sbin/agetty 38400 tty5 linux
    root     16003  0.0  0.0  10136   840 tty6     Ss+  Jan25   0:00 /sbin/agetty 38400 tty6 linux
    root     16006  0.0  0.0  12620   992 ?        S<   Jan25   0:00 /sbin/udevd --daemon
    root     16007  0.0  0.0  12620   880 ?        S<   Jan25   0:00 /sbin/udevd --daemon
    root     16009  0.0  0.0  60004  2036 ?        S    Jan25   0:00 -:0         
    root     16017  0.0  0.0  30224   820 ?        S    Jan25   0:00 dbus-launch --autolaunch 1334625fb7463d85714f038a4b3c05d8 --binary-syntax --close-stderr
    root     16018  0.0  0.0  14788   708 ?        Ss   Jan25   0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    laiso     16036  0.0  0.0  11660  1464 ?        Ss   Jan25   0:00 /bin/sh /usr/bin/startkde
    laiso     16041  0.0  0.2 126024  8232 ?        SN   Jan25   0:00 uim-xim
    laiso     16046  0.0  0.0  14952  1496 ?        SN   Jan25   0:00 /usr/libexec/uim-helper-server
    laiso     16051  0.0  0.0  30228   828 ?        S    Jan25   0:00 /usr/bin/dbus-launch --sh-syntax --exit-with-session
    laiso     16052  0.0  0.0  15316  1320 ?        Ss   Jan25   0:02 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    laiso     16094  0.0  0.5 203292 21840 ?        Ss   Jan25   0:00 kdeinit4: kdeinit4 Running...
    laiso     16095  0.0  0.2 207004 12088 ?        S    Jan25   0:00 kdeinit4: klauncher [kdeinit] --fd=9
    laiso     16097  0.0  0.5 303948 22276 ?        S    Jan25   0:00 kdeinit4: kded4 [kdeinit]
    laiso     16099  0.0  0.0  15368  1276 ?        S    Jan25   0:00 /usr/libexec/gam_server
    laiso     16122  0.0  0.0   3812   436 ?        S    Jan25   0:00 kwrapper4 ksmserver
    laiso     16123  0.0  0.4 328348 19044 ?        Sl   Jan25   0:00 kdeinit4: ksmserver [kdeinit]
    laiso     16125  0.0  1.0 461608 42900 ?        S    Jan25   0:10 kwin -session 10706f706f000126226366300000260730000_1264393626_78381
    laiso     16127  0.0  0.4 245456 17328 ?        S    Jan25   0:00 kdeinit4: kglobalaccel [kdeinit]
    laiso     16129  0.0  2.0 811480 82432 ?        Sl   Jan25   1:34 kdeinit4: plasma-desktop [kdeinit]
    laiso     16131  0.0  0.5 352168 23180 ?        Sl   Jan25   0:02 /usr/bin/knotify4
    laiso     16137  0.0  0.4 245304 16820 ?        S    Jan25   0:00 kdeinit4: kaccess [kdeinit]
    laiso     16145  0.0  0.4 253152 16824 ?        S    Jan25   0:00 kdeinit4: nepomukserver [kdeinit]
    laiso     16147  0.0  1.1 826364 47504 ?        Sl   Jan25   0:02 kdeinit4: krunner [kdeinit]
    laiso     16151  0.0  0.3 215864 12796 ?        S    Jan25   0:00 kdeinit4: kio_trash [kdeinit] trash local:/tmp/ksocket-laiso/klauncherT16095.slave-socket local:/tmp/ksocket-laiso/krunnerJ16147.slave-socket
    laiso     16152  0.0  0.4 271740 16440 ?        S    Jan25   0:00 nautilus --sm-client-id 10706f706f000126228060500000260730066 --sm-client-state-file /home/laiso/.config/session-state/nautilus-1264393625.desktop
    laiso     16155  0.0  0.0  42248  3096 ?        S    Jan25   0:00 /usr/libexec/gconfd-2
    laiso     16158  0.0  1.5 591748 62280 ?        Sl   Jan25   0:17 konversation -session 10706f706f000126377884400000159410008_1264393625_873175
    laiso     16160  0.0  0.0  41800  2284 ?        S    Jan25   0:00 /usr/libexec/gvfsd
    laiso     16163  0.0  0.6 253008 25456 ?        S    Jan25   0:00 kchmviewer -session 10706f706f000126387355300000159410027_1264393625_874812
    laiso     16166  0.0  0.0  71064  2736 ?        Ssl  Jan25   0:00 /usr/libexec//gvfs-fuse-daemon /home/laiso/.gvfs
    laiso     16171  0.0  0.0  50700  3104 ?        S    Jan25   0:00 /usr/libexec/gvfsd-trash --spawner :1.35 /org/gtk/gvfs/exec_spaw/0
    laiso     16174  0.0  0.2 214860 11872 ?        S    Jan25   0:00 kdeinit4: kio_file [kdeinit] file local:/tmp/ksocket-laiso/klauncherT16095.slave-socket local:/tmp/ksocket-laiso/dolphinZ16156.slave-socket
    laiso     16176  0.0  0.0  50808  3212 ?        S    Jan25   0:00 /usr/libexec/gvfs-hal-volume-monitor
    laiso     16180  0.0  0.5 258212 21340 ?        S    Jan25   0:00 kdeinit4: kmix [kdeinit] -session 10706f706f000126436015800000159490007_1264393625_863339
    laiso     16182  1.3 12.7 1104672 516488 ?      Sl   Jan25  37:10 /usr/lib64/mozilla-firefox/firefox
    laiso     16189  0.0  0.4 282232 18768 ?        S    Jan25   0:00 kdeinit4: klipper [kdeinit]
    laiso     16194  0.0  0.0  38448  1784 ?        S    Jan25   0:00 /home/laiso/.kde4/Autostart/sands
    laiso     16195  0.0  0.3 145312 12552 ?        S    Jan25   0:02 /home/laiso/.kde4/Autostart/uim-toolbar-gtk
    laiso     16196  0.0  0.3 152640 15272 ?        S    Jan25   0:02 /home/laiso/.kde4/Autostart/uim-toolbar-gtk-systray
    laiso     16198  0.0  3.7 553736 153620 ?       Ssl  Jan25   0:48 /home/laiso/.dropbox-dist/dropbox
    laiso     16252  0.0  0.3 154804 13456 ?        S    Jan25   0:01 /usr/libexec/notification-daemon
    laiso     16308  0.0  0.2 144420  9656 ?        S    Jan25   0:02 /usr/bin/mlterm
    laiso     16310  0.0  0.0  38496  3360 pts/1    Ss   Jan25   0:00 zsh
    laiso     16434  0.0  0.0  12948  1008 pts/1    S+   Jan25   0:00 tmux
    laiso     16436  0.0  1.1  58480 46556 ?        Ss   Jan25   0:00 tmux
    laiso     28430  0.0  1.0 366080 40632 ?        S    00:31   0:02 /usr/bin/dolphin -icon system-file-manager -caption Dolphin
    laiso     28724  0.1  0.3  48440 14080 ?        Ss   02:32   0:04 /opt/google/desktop/bin/gdl_box start
    laiso     28725  0.0  0.0   9704  3388 ?        S    02:32   0:00 ./gdl_service.bin --Verbose=FATAL
    laiso     28726  0.0  0.0  10700  3468 ?        S    02:32   0:00 ./gdl_config.bin
    laiso     28727  0.9  0.3  56188 15436 ?        Sl   02:32   0:32 ./gdl_indexer.bin
    laiso     28728  0.7  0.1  83376  7788 ?        Sl   02:32   0:28 ./gdl_fs_crawler.bin
    laiso     28739  0.0  0.2 114996  8776 ?        SN   02:32   0:00 /usr/libexec/uim-candwin-gtk
    laiso     28935  0.0  0.9 172752 38056 ?        S    01:08   0:00 /home/laiso/local/bin/apvlv /home/laiso/Documents/Developper/Linux/VimOL.pdf
    laiso     29456  0.0  0.0  42968  3884 pts/3    Ss+  02:40   0:00 -zsh
    laiso     30300  0.0  0.0  11396  1400 ?        S    02:49   0:00 /bin/sh /usr/bin/thunderbird
    laiso     30312  0.0  0.0  11396  1456 ?        S    02:49   0:00 /bin/sh /usr/lib64/mozilla-thunderbird/run-mozilla.sh /usr/lib64/mozilla-thunderbird/thunderbird-bin
    laiso     30316  0.2  2.4 653524 97688 ?        Sl   02:49   0:07 /usr/lib64/mozilla-thunderbird/thunderbird-bin

20100126

[Kayframework] python2.5 ./manage.py test app

Changeset 701 でやった。

urlfetch, memcache のappengine.apiを使っていたのでapi_stubを自分で登録しないといけなかった。

kay/management/test.py であらかたセットアップされると思ったんだけど…

参考: Google App Engineでテスト駆動開発を行うための3つのTips ?? TRIVIAL TECHNOLOGIES 2.0


20100125

tdiary.vim

便利


20100124

[WebSite]はてなブックマークアイテムの監視

Plagger→Rhaco→GoogleAppengineと3回実装した…


20100121

[PHP5他]変数名・関数名の大文字小文字の区別

PHPの関数呼出に大文小文字を区別しないのが前から気になっていたけど、これは別にC由来じゃないのか…

PHP では、関数やクラスはすべてグローバルスコープにあります - 関数の内部で定義したものであっても関数の外部からコールできますし、 その逆も可能です。

PHP は関数のオーバーロードをサポートしていません。 また、宣言された関数の定義を取り消したり再定義することも できません。

注意: 関数名は大文字小文字を区別しませんが、通常は 関数宣言時と同じ名前で関数をコールする方が好ましいです。

じゃあ関数・メソッド名はらくだよりへびのがいいの? かわらんか…

PHPのさりげない気違いが光る。PHPはモテ。

PHP5.3.0

<?php

$someValue = "Hello";
$somevalue = "World";

function helloworld($say){
    echo $say.PHP_EOL;
}

// Fatal error: Cannot redeclare helloWorld()
/*
function helloWorld($say){
    echo $say.$say.PHP_EOL;
}
*/

helloWorld($someValue.$somevalue);//HelloWorld

helloworld($someValue.$somevalue);//HelloWorld

Python2.6.4

#!/usr/bin/env python
# -*- coding: utf-8 -*-

someValue = "Hello"
somevalue = "World"

def helloWorld(say):
    print say

def helloworld(say):
    print say+say


helloWorld(someValue+somevalue)#HelloWorld
helloworld(someValue+somevalue)#HelloWorldHelloWorld

Ruby1.8.7

#!/usr/bin/env ruby

someValue = "Hello"
somevalue = "World"

def helloWorld(say)
  p say
end

def helloworld(say)
  p say+say
end

helloWorld(someValue+somevalue)#HelloWorld
helloworld(someValue+somevalue)#HelloWorldHelloWorld

C

#include <stdio.h>

void 
helloWorld(char say[])
{
    printf("%s\n", say);
}

void 
helloworld(char say[])
{
    printf("%s%s\n", say, say);
}

int main()
{
  char someValue[] = "Hello";
  char somevalue[] = "World";
  helloWorld(someValue);/* Hello  */
  helloWorld(somevalue);/* World  */

  helloworld(someValue);/* HelloHello */
  helloworld(somevalue);/* WorldWorld */
  return 0;
}

Perl5.8.9

#!/usr/bin/env perl

use strict;

my $someValue = "Hellow";
my $somevalue = "World";

sub helloWorld{
    my $say = shift;
    print "${say}\n";
}

sub helloworld{
    my $say = shift;
    print "${say}${say}\n";
}

helloWorld($someValue.$somevalue);#HellowWorld
helloworld($someValue.$somevalue);#HellowWorldHellowWorld

Javascript

<html>
<head>
<script type="text/javascript" charset="utf-8">
    var someValue = "Hello";
    var somevalue = "World";

    function helloWorld(say){
        alert(say);
    }

    function helloworld(say){
        alert(say+say);
    }

    helloWorld(someValue+somevalue);//HelloWorld
    helloworld(someValue+somevalue);//HelloWorldHelloWorld
</script>
</head>
</html>

C++

#include <iostream>
#include <string>

using namespace std;

void
helloWorld(string say)
{
  cout << say << endl;
}

void
helloworld(string say)
{
  cout << say+say << endl;
}


int
main()
{
  string someValue = "Hello";
  string somevalue = "World";

  helloWorld(someValue+somevalue); // HelloWorld
  helloworld(someValue+somevalue); // HelloWorldHelloWorld

  return 0;
}

lua

someValue = "Hello"
somevalue = "World"

function helloWorld(say)
    print(say)
end

function helloworld(say)
    print(say..say)
end


helloWorld(someValue..somevalue) --HelloWorld
helloworld(someValue..somevalue) --HelloWorldHelloWorld

20100117

GNU/Linuxで利用できる無償のマインドマップ作成アプリケーションのリストアップ 2010新春

オープンソースソフトウェア

クロスプラットフォーム

プロプライエタリソフトウェア

Memo

  • semantik -- シンプル -- uim変換候補が表示されない。入力自体はできる
  • vym, Labyrinth -- シンプル
  • Freeplane -- 多機能 -- 基本的にFreemindみたいなもの
  • PersonalBrain -- 多機能 -- 用語やUIなどが独自路線 -- アニメーションエフェクトなどがこってる
  • XMind -- 多機能 -- eclipseライクなルック&フィールでswing系デフォルトのより綺麗な見た目な印象

追記