2009-11-01から1ヶ月間の記事一覧

Goで編集距離

とりあえず遊んでみたかったので、"An O(NP) Sequence Comparison Algorithm"をGoでササッと実装してみた。 まだまともにマニュアルを読んでないので、かなりテキトー。 /** * The algorithm implemented here is based on "An O(NP) Sequence Comparison Al…

MercurialのリポジトリをGithubにpushする

dtlは去年からずっとMercurialでバージョン管理してるんだけど、Githubに一応ミラーリングしておこうと思って変換ツールであるHgGitを使ってみた。 http://hg-git.github.com/ まず、HgGitを動作させるのに必要なdulwichをインストールする。 $ sudo apt-get…

メモリプール

http://github.com/cubicdaiya/mpool Cで至極簡単なメモリプールを実装してみた。 使い方はこんな感じ。(↑のgithubのexamplesにあるのと同じ物) #include <stdio.h> #include <string.h> #include <mpool.h> int main (int argc, char *argv[]) { mpool_t *pool; int *n = NULL; int *m =</mpool.h></string.h></stdio.h>…