Gauche > Archives > 2012/08/08

2012/08/08 01:25:54 UTCとおる。
#
ありゃ。そういえば以前は本をかったら自分の名前を書いてましたけど、最近そういうことしなくなりました。
2012/08/08 03:55:54 UTCshiro
#
明日もう一度lost and foundで聞いてみる。戻ってこなかったら、まあ、Knuthを布教したと思うことにしよう。今更布教の必要は無いかもしれないけど。
2012/08/08 04:31:54 UTCshiro
#
phpで数値と配列を比較すると配列の方が必ず大きくなる。そして配列は長さが同じなら対応する要素ごとに比較される。ということは、配列を使えば超限順序数が
#
表現できるのではなかろうか。ω=array(0)、ω+1=array(1)、2ω=array(array(0))、… http://torus.tumblr.com/post/23156746311/php
2012/08/08 08:06:17 UTCとおる。
#
そういう使い方が! よくみたらマニュアルにも書いてありました。 http://www.php.net/manual/ja/language.operators.comparison.php 再帰的に比較されるんですね。
2012/08/08 18:51:16 UTCnekoie
#
どうもです。この前のKyoto.lispのHackathonで気付いたのですが、
#
dbm.fsdbmの中の dbm-db-copy と dbm-db-move の中で copy-directory* を呼んでいますが、
#
この時に、gdbmやndbmでは :safe #t を一緒に渡しているのに、fsdbmでは :safe #t を渡してないようです。
#
(gdbmやndbmではcopy-directory*ではなくcopy-fileという違いはありますが)
#
fsdbmでも :safe #t を渡しておいて損はないと思うので、渡してほしいです。
2012/08/08 18:59:34 UTCnekoie
#
--- lib/dbm/fsdbm.scm.orig      2012-08-09 03:56:21.000000000 +0900
+++ lib/dbm/fsdbm.scm   2012-08-09 03:57:17.000000000 +0900
@@ -182,13 +182,13 @@
 (define-method dbm-db-copy ((class <fsdbm-meta>) from to)
   (unless (fsdbm-directory? from)
     (error "source path is not an fsdbm database:" from))
-  (copy-directory* from to))
+  (copy-directory* from to :safe #t))

 (define-method dbm-db-move ((class <fsdbm-meta>) from to)
   (unless (fsdbm-directory? from)
     (error "source path is not an fsdbm database:" from))
   ;; NB: move-directory*
-  (copy-directory* from to)
+  (copy-directory* from to :safe #t)
   (remove-directory* from))

 ;;