blog.8-p.info //blog.8-p.info/2009 加藤和良 (1984年うまれ) の個人的なブログです。 Sun, 13 Dec 2009 12:44:23 +0000 http://wordpress.org/?v=2.7.1 en hourly 1 さよなら WordPress //blog.8-p.info/2009/12/wordpress //blog.8-p.info/2009/12/wordpress#comments Sun, 13 Dec 2009 00:32:31 +0000 KATO Kazuyoshi //blog.8-p.info/2009/?p=1706 この WordPress は /2009/index.php といった具合にインストールしてあるので、今月いっぱいでおわり。

WordPress は流行っているのでさわれたのは良かった。ループのなかのローカル変数であるべきものに the_post() でさわれるとか、自動アップデートの名の下に FTP のパスワードを要求するとか、ノリは危なげ。そこらへんとうまくつきあえれば (ex. 前者はあきらめ、後者は避ける) あらゆる機能があって便利ではある。

今年に変えたこと

「Web プログラマだったらブログ読むよね書くよね (ついでにいうと JavaScript はできるよね)」というのが狭い世界の話だったんだなー、という反省が2008年ごろにあって、2009年は Web に書く文章をちょっと変えた年だった。いままで私はどこか「日記というかメモみたいなもので、でも公開してだれかの役に立ったらいいですね」みたいな、がんばってないですよ、というポーズをとるところがあったんだけど、そういうのは止めにした。

文章は丁寧に長めになったし、前だったら書かなかった背景のはなしも足した。あと、誰と知り合いとかわかりづらくして、内輪感を減らすようにもしてみた。それで、ここ数年の記事ごとのブックマーク数をグラフにしたのが下の画像だ。

はてなブックマーク数

一番下の背景が白いところが2009年で、2本突き出ているのは zsh と JavaScript のはなし。ただ「じゃあ次も同じはなしを」というほどの引き出しは無く、どう書くかは他人を意識しても、なにを書くかは相変わらず自分の興味のままに決めていた。

2007-2008年ごろの一時期、もっと静的で更新時間順でない「しっかりした」ものにあこがれていたんだけど、挫折した。さらに前には Twitter や Tumblr もやっていたんだけど、あきた。いまのところ私にはブログくらいが合っているように思う。

]]>
//blog.8-p.info/2009/12/wordpress/feed
ChromeRepl released //blog.8-p.info/2009/12/chrome-repl-released //blog.8-p.info/2009/12/chrome-repl-released#comments Fri, 11 Dec 2009 12:49:53 +0000 KATO Kazuyoshi //blog.8-p.info/2009/?p=1700 Today, I released ChromeRepl on the Extensions Gallery.

ChromeRepl is is heavily inspired from MozRepl. However Google Chrome can’t speak the telnet protocol. So I released google-chrome-client library (in Ruby) too. The library includes “chrome-repl” command.

I think the installation process is complicated. However, ChromeRepl brings the power of UNIX to Google Chrome. Please try!

]]>
//blog.8-p.info/2009/12/chrome-repl-released/feed
Hatena’s routing problem //blog.8-p.info/2009/12/hatena //blog.8-p.info/2009/12/hatena#comments Thu, 10 Dec 2009 17:30:07 +0000 KATO Kazuyoshi //blog.8-p.info/2009/?p=1684 Hatena released “Hatena Bookmark for iPhone”. Great!

However, the URI of the page is http://b.hatena.ne.jp/touch and I found id:touch. So he (or she?) probably can’t use Hatena Bookmark.

Hatena made same mistake on Hatena Bookmark News and Ashika. I like their short URI better than “foobar.php?id=baz”. But this namespace collision is not good.

]]>
//blog.8-p.info/2009/12/hatena/feed
Test::Synchronized released //blog.8-p.info/2009/12/test-synchronized //blog.8-p.info/2009/12/test-synchronized#comments Tue, 08 Dec 2009 16:26:08 +0000 KATO Kazuyoshi //blog.8-p.info/2009/?p=1650 Tim Bray wrote on his article Concur.next that:

No longer; Next year’s system will do more computing all right, but by giving you more CPUs, running at this year’s speed, to work with.

Perl’s multi-core support is good old-fashioned fork(2). It’s not sexy, but it works. So recently I began to use “prove -j9″. But some of our project’s tests are not works correctly under the “prove” command.

For example, our cron script has tests that create and remove a log file.

  • foo.t open and create a log file.
  • foo.t write something to the file.
  • foo.t remove the file.
  • bar.t open and create a new log file.
  • bar.t write something to the file.
  • bar.t remove the file.

And it’s not works at the same time.

  • foo.t open and create a log file.
  • bar.t open the log file.
  • foo.t write something to the file.
  • bar.t write something to the file, too.
  • foo.t remove the file.
  • bar.t can’t remove the file.

I can modify the code to fix it. However, I’m lazy and impatient. So I wrote a simple lock system named Test::Synchronized.

Test::Synchronized provides a giant lock to your tests. When you add “use Test::Synchronized;” on both foo.t and bar.t.

  • foo.t create a lock directory.
  • foo.t open and create a log file.
  • bar.t can’t create the lock directory. So bar.t wait the end of foo.t.
  • foo.t write something to the file.
  • foo.t remove the file.
  • foo.t remove the lock directory.
  • bar.t create a new lock directory.
  • bar.t open and create a new log file.

It’s not sexy, but it works :)

I released 0.01 on Bitbucket and CPAN already. Enjoy!

0.02

Tokuhiro-san (aka tokuhirom) blogged about some bugs and problems of Test::Synchronized. So I fixed and released 0.02 now. Thanks a lot.

]]>
//blog.8-p.info/2009/12/test-synchronized/feed
11月をふりかえる //blog.8-p.info/2009/11/26 //blog.8-p.info/2009/11/26#comments Thu, 26 Nov 2009 13:09:02 +0000 KATO Kazuyoshi //blog.8-p.info/2009/?p=1642 11月は早かった。さっきはじまったような気がする。ぼんやりしている間に25歳になっていて、しかし25歳らしいことをしているかといわれると、目もあてられない。

私はなにがしたいんだろうなあ。

行ったライブ: Easel presents「neco眠る vs あらかじめ決められた恋人たちへ」(渋谷 O-Nest)

すごく混んでいた。前半は neco 眠るで、後半があら恋。neco 眠るはぜんぜんノイズよりでなく、楽しくて良かったので思わず CD まで買ってしまった。新しいひとの CD 買うのは久しぶり。あら恋はあいかわらずかっこよかった。

出た飲み会: chromiumExtensionDevCon

Google Chrome / Chromium をネタにした飲み会。Twitter ユーザー中心っぽかったけど気にせずまざる。Chrome (PNG と pixel で一致をみるテストはだめだ / タイルなウィンドウマネージャつかってるから Glen ボタンみえない / w3m + WebKit / …) から関係ないこと (X は悪くない / Scala はコンパイルが遅い / …) まで、いろいろ話せて楽しかった。元同僚とも会ったので二次会はスタバ。

出展したイベント: Make: Tokyo Meeting 04

これについてはいろいろ書くことがあるので後で。

]]>
//blog.8-p.info/2009/11/26/feed