[perldocjp-cvs 64] CVS update: docs/perl/5.8.4

Back to archive index

Kentaro Shirakata argra****@users*****
2006年 4月 25日 (火) 04:14:10 JST


Index: docs/perl/5.8.4/perl58delta.pod
diff -u docs/perl/5.8.4/perl58delta.pod:1.8 docs/perl/5.8.4/perl58delta.pod:1.9
--- docs/perl/5.8.4/perl58delta.pod:1.8	Mon Apr 24 18:17:17 2006
+++ docs/perl/5.8.4/perl58delta.pod	Tue Apr 25 04:14:09 2006
@@ -1,3 +1,4 @@
+
 =encoding euc-jp
 
 =head1 NAME
@@ -340,14 +341,15 @@
 
 =end original
 
-This was found to be an inconvenient interface, and in Perl 5.8 the
-Unicode model has completely changed: now the "Unicodeness" is bound
-to the data itself, and for most of the time "use utf8" is not needed
-at all.  The only remaining use of "use utf8" is when the Perl script
-itself has been written in the UTF-8 encoding of Unicode.  (UTF-8 has
-not been made the default since there are many Perl scripts out there
-that are using various national eight-bit character sets, which would
-be illegal in UTF-8.)
+これは不便なインターフェースであることがわかりましたので、
+Perl 5.8 では Unicode モデルは完全に変更されました:
+"Unicodeness" はデータ自体に結び付けられ、"use utf8" はほとんどの場合に
+全く不要になりました。
+残った唯一の"use utf8"の使い道は、Perl スクリプト自身が Unicode の
+UTF-8 エンコーディングで書かれているときです。
+(すでに多くの Perl スクリプトがさまざまな 8 ビット文字セットを使って
+書かれており、これらは UTF-8 では不正となるので、UTF-8 はデフォルトには
+なっていません。)
 
 =begin original
 
@@ -520,10 +522,10 @@
 
 =end original
 
-Using chdir("") or chdir(undef) instead of explicit chdir() is
-doubtful.  A failure (think chdir(some_function()) can lead into
-unintended chdir() to the home directory, therefore this behaviour
-is deprecated.
+明示的な chdir() の代わりに chdir("") や chdir(undef) を使うことには
+疑問があります。失敗(chdir(some_function()) を考えてみてください)した
+場合に chdir() が図らずもホームディレクトリに
+移動してしまうかもしれませんので、この振る舞いは非推奨となりました。
 
 =item *
 
@@ -719,7 +721,7 @@
 =end original
 
 5.005 のスレッドモデル(モジュール C<Thread>)は非推奨となり、Perl 5.10 で
-取り除かれる予定です。マルチスレッド化されたコードは新しい ithread モデルに
+取り除かれる予定です。マルチスレッド化されたコードは新しいiスレッドモデルに
 移るべきです(L<threads>, L<threads::shared>, L<perlthrtut> を参照してください)。
 
 =item *
@@ -988,8 +990,9 @@
 
 =end original
 
-File handles can be marked as accepting Perl's internal encoding of Unicode
-(UTF-8 or UTF-EBCDIC depending on platform) by a pseudo layer ":utf8" :
+擬似層 ":utf8" を使うことで、 Unicode の Perl の 内部エンコーディング
+(プラットフォームによって UTF-8 か UTF-EBCDIC) を
+受け入れること示す印をファイルハンドルにつけることができます:
 
    open($fh,">:utf8","Uni.txt");
 
@@ -1004,12 +1007,12 @@
 
 =end original
 
-Note for EBCDIC users: the pseudo layer ":utf8" is erroneously named
-for you since it's not UTF-8 what you will be getting but instead
-UTF-EBCDIC.  See L<perlunicode>, L<utf8>, and
-http://www.unicode.org/unicode/reports/tr16/ for more information.
-In future releases this naming may change.  See L<perluniintro>
-for more information about UTF-8.
+EBCDIC ユーザーへの注意: あなたが受け取るのは UTF-8 ではなく
+UTF-EBCDIC なので、擬似層の名前 ":utf8" というのは間違った命名です。
+さらなる情報については L<perlunicode>, L<utf8>,
+http://www.unicode.org/unicode/reports/tr16/ を参照してください。
+将来のリリースではこの名前は変わるかもしれません。
+UTF-8 に関するさらなる情報については L<perluniintro> を参照してください。
 
 =item *
 
@@ -1096,7 +1099,7 @@
 
 =end original
 
-Anonymous temporary file が 'use FileHandle' や他のモジュールを使う必要なしに
+無名テンポラリファイルが 'use FileHandle' や他のモジュールを使う必要なしに
 利用可能です。
 
    open($fh,"+>", undef) || ...
@@ -1233,7 +1236,7 @@
 Perl は、数の変換や基本計算(+ - * /)において、もし引数が整数ならば内部的に
 整数値を使うように努め、さらに、内部的に整数として記憶された結果を
 保持するように努めるようになりました。この変更により、わずかに速くなる
-ことがよく起こり、常に less lossy arithmetics になります。
+ことがよく起こり、常により桁落ちの少ない計算方法になります。
 (Perl は以前は常に計算時には浮動小数点数を優先していました。)
 
 =head2 Arrays now always interpolate into double-quoted strings [561]
@@ -2178,9 +2181,10 @@
 
 =end original
 
-C<ExtUtils::Constant>, by Nicholas Clark, is a new tool for extension
-writers for generating XS code to import C header constants.
-See L<ExtUtils::Constant>.
+Nicholas Clark による C<ExtUtils::Constant> は
+拡張を書く人にとっての新しいツールで、インポート C ヘッダ定数の
+XS コードを生成します。
+L<ExtUtils::Constant> を参照してください。
 
 =item *
 
@@ -2738,7 +2742,7 @@
 =end original
 
 Arthur Bergman による C<threads>は、インタプリタスレッドへの
-インターフェースです。インタプリタスレッド(ithreads)は Perl5.6 で導入された
+インターフェースです。インタプリタスレッド(iスレッド)は Perl5.6 で導入された
 新しいスレッドモデルでしたが拡張機能を書く人に対して内部形式の
 インターフェースのみしか利用できませんでした
 (また、Win32 の Perl では C<fork()> のエミュレーションのためのものでした)。
@@ -4057,11 +4061,12 @@
 
 =end original
 
-A numerical sort of the digits will yield (1,1,3,4,5,9), as expected.
-Which C<1> comes first is hard to know, since one C<1> looks pretty
-much like any other.  You can regard this as totally trivial,
-or somewhat profound.  However, if you just want to sort the even
-digits ahead of the odd ones, then what will
+数値の数値ソートは予想通り (1,1,3,4,5,9) となります。
+どちらの C<1> が最初に来るのかはわかりにくいです。
+なぜなら片方の C<1> はもう片方とかなり良く似ているからです。
+このことは全くつまらないことと考えるかもしれませんし、
+何か深遠なことと考えるかもしれません。
+しかし、もし偶数を奇数の前にしたくて以下のように書いたとします:
 
     sort { ($a % 2) <=> ($b % 2) } @digits;
 
@@ -4079,15 +4084,17 @@
 
 =end original
 
-yield?  The only even digit, C<4>, will come first.  But how about
-the odd numbers, which all compare equal?  With the quicksort algorithm
-used to implement Perl 5.6 and earlier, the order of ties is left up
-to the sort.  So, as you add more and more digits of Pi, the order
-in which the sorted even and odd digits appear will change.
-and, for sufficiently large slices of Pi, the quicksort algorithm
-in Perl 5.8 won't return the same results even if reinvoked with the
-same input.  The justification for this rests with quicksort's
-worst case behavior.  If you run
+結果は?唯一の偶数である C<4> が最初に来ます。
+しかし、比較すると全て同じになる奇数はについては?
+Perl 5.6 以前で実装されていたクイックソートアルゴリズムでは、
+同点の場合の順序はソートに委ねられます。
+従って、円周率の数値を追加するにつれて、
+ソートされた偶数と奇数の順序は変わります。
+また、十分に多い数の円周率の場合は、Perl 5.8 のクイックソート
+アルゴリズムは、同じ入力のソートを再実行した場合でも
+同じ結果にはなりません。
+TBT
+以下を実行すると:
 
    sort { $a <=> $b } ( 1 .. $N , 1 .. $N );
 
@@ -4107,17 +4114,19 @@
 
 =end original
 
-(something you might approximate if you wanted to merge two sorted
-arrays using sort), doubling $N doesn't just double the quicksort time,
-it I<quadruples> it.  Quicksort has a worst case run time that can
-grow like N**2, so-called I<quadratic> behaviour, and it can happen
-on patterns that may well arise in normal use.  You won't notice this
-for small arrays, but you I<will> notice it with larger arrays,
-and you may not live long enough for the sort to complete on arrays
-of a million elements.  So the 5.8 quicksort scrambles large arrays
-before sorting them, as a statistical defence against quadratic behaviour.
-But that means if you sort the same large array twice, ties may be
-broken in different ways.
+(二つのソートされた配列を sort を使ってマージしたいと
+仮定します)、$N の値を 2 倍にした場合、クイックソートに掛かる時間は
+2 倍ではなく、 I<4 倍> になります。
+クイックソートの実行時間は最悪の場合で N**2 で増えることになるため、
+I<4 倍の> 振る舞いと呼ばれ、これは通常の使用のパターンでも発生しえます。
+これは小さい配列の場合は注意する必要はありませんが、
+大きい配列の場合は I<注意する必要があります>。
+そしてあなたは何百万要素もあるような配列のソートが終わるまで
+長生きできないかもしれません。
+それで、5.8 のクイックソートは大きな配列の場合は 4 倍の振る舞いから
+守るためにはソート前に配列をかき混ぜます。
+しかしこれは、もし同じ大きな配列をもう一度ソートすると、
+同点の場合の挙動は色々は方法で変わることを意味します。
 
 =begin original
 
@@ -4128,10 +4137,11 @@
 
 =end original
 
-Because of the unpredictability of tie-breaking order, and the quadratic
-worst-case behaviour, quicksort was I<almost> replaced completely with
-a stable mergesort.  I<Stable> means that ties are broken to preserve
-the original order of appearance in the input array.  So
+同点の時の優先順位が予測不可能であることと、
+最悪の場合に 4 倍の振る舞いをするので、
+クイックソートは安定したマージソートに I<ほとんど> 完全に置き換えられました。
+I<安定した> とは、同点の場合は入力配列での出現順が保存されるということです。
+従って:
 
     sort { ($a % 2) <=> ($b % 2) } (3,1,4,1,5,9);
 
@@ -4154,13 +4164,13 @@
 
 =end original
 
-will yield (4,3,1,1,5,9), guaranteed.  The even and odd numbers
-appear in the output in the same order they appeared in the input.
-Mergesort has worst case O(N log N) behaviour, the best value
-attainable.  And, ironically, this mergesort does particularly
-well where quicksort goes quadratic:  mergesort sorts (1..$N, 1..$N)
-in O(N) time.  But quicksort was rescued at the last moment because
-it is faster than mergesort on certain inputs and platforms.
+では (4,3,1,1,5,9) という結果が保証されます。
+偶数と奇数は入力で現れた順に出力にも現れます。
+マージソートは最悪の場合でも理想値である O(N log N) の振る舞いを示します。
+そして皮肉にも、クイックソートで 4 倍になるような場合に特によい性能を
+示します: (1..$N, 1..$N) のソートは O(N) 時間です。
+しかしクイックソートは、ある種の入力とプラットフォームでは
+マージソートより速いという理由で最後の瞬間に救出されました。
 For example, if you really I<don't> care about the order of even
 and odd digits, quicksort will run in O(N) time; it's very good
 at sorting many repetitions of a small number of distinct elements.
@@ -4900,12 +4910,14 @@
 
 =end original
 
-Perl has been tested with the GNU pth userlevel thread package
-( http://www.gnu.org/software/pth/pth.html ).  All thread tests
-of Perl now work, but not without adding some yield()s to the tests,
-so while pth (and other userlevel thread implementations) can be
-considered to be "working" with Perl ithreads, keep in mind the
-possible non-preemptability of the underlying thread implementation.
+Perl は GNU pth ユーザーレベルスレッドパッケージ
+( http://www.gnu.org/software/pth/pth.html ) でテストされました。
+Perl の全てのスレッドテストは動作しましたが、
+テストにいくつかの yield() を追加する必要がありました。
+そのため、pth (とその他のユーザーレベルスレッド実装) は
+Perl iスレッドで"動作する"と考えらえられますが、
+スレッド実装に内在するノンプリエンプティブ性の可能性について
+考慮してください。
 
 =item *
 
@@ -5538,8 +5550,8 @@
 
 =end original
 
-Right-hand side magic (GMAGIC) could in many cases such as string
-concatenation be invoked too many times.
+右辺値マジック (GMAGIC) は、文字列連結などの多くの場合に
+多く呼び出され過ぎていました。
 
 =item *
 
@@ -7437,7 +7449,7 @@
 
 =head2 Localising Tied Arrays and Hashes Is Broken
 
-(localのtieされた配列のハッシュは破壊されます)
+(tie された配列やハッシュを local 化すると破壊されます)
 
     local %tied_array;
 
@@ -7494,6 +7506,8 @@
 
 =head2 Modifying $_ Inside for(..)
 
+(for(..) 内部での $_ の変更)
+
    for (1..5) { $_++ }
 
 =begin original
@@ -7510,6 +7524,8 @@
 
 =head2 mod_perl 1.26 Doesn't Build With Threaded Perl
 
+(mod_perl 1.26 でスレッド化 Perl がビルドできません)
+
 =begin original
 
 Use mod_perl 1.27 or higher.
@@ -7520,6 +7536,8 @@
 
 =head2 lib/ftmp-security tests warn 'system possibly insecure'
 
+(lib/ftmp-security テストで 'system possibly insecure' 警告が出ます)
+
 =begin original
 
 Don't panic.  Read the 'make test' section of INSTALL instead.
@@ -7530,6 +7548,8 @@
 
 =head2 libwww-perl (LWP) fails base/date #51
 
+(libwww-perl (LWP) が base/date #51 で失敗します)
+
 =begin original
 
 Use libwww-perl 5.65 or later.
@@ -7540,6 +7560,8 @@
 
 =head2 PDL failing some tests
 
+(PDL でいくつかのテストが失敗します)
+
 =begin original
 
 Use PDL 2.3.4 or later.
@@ -7584,6 +7606,8 @@
 
 =head2 Self-tying Problems
 
+(自己 tie 問題)
+
 =begin original
 
 Self-tying of arrays and hashes is broken in rather deep and
@@ -7637,6 +7661,8 @@
 
 =head2 Failure of Thread (5.005-style) tests
 
+(Thread (5.005-スタイル) テストの失敗)
+
 =begin original
 
 B<Note that support for 5.005-style threading is deprecated,
@@ -7724,6 +7750,8 @@
 
 =head2 Tied/Magical Array/Hash Elements Do Not Autovivify
 
+(tied/magical 配列/ハッシュ要素は自動活性化されません)
+
 =begin original
 
 For normal arrays C<$foo = \$bar[1]> will assign C<undef> to
@@ -7737,7 +7765,7 @@
 
 普通の配列に対して C<$foo = \$bar[1]> とすると、
 (以前に存在していなかったとして) C<$bar[1]> には C<undef> が割り当てられます。
-しかし、autovivification のような tied/magical 配列やハッシュの場合は
+しかし、自動活性化のような tied/magical 配列やハッシュの場合は
 このようにはなりません。現在のところリファレンスの作成を捕まえる方法が
 ないためです。同じ問題は tied/magical 配列/ハッシュで存在しない
 インデックス/キーを切り取る場合にも影響を与えます。


perldocjp-cvs メーリングリストの案内
Back to archive index