ときどきの雑記帖 倒行逆施編

最新ページへのリンク
目次ページへのリンク

一つ前へ 2015年2月(中旬)
一つ後へ 2015年3月(上旬)

ホームへ

2015年02月28日

■_

■_

■_

Autoconf の History 最後。

21.5 Deuteronomy 申命記

A long wish list for major features had accumulated, and the effect of several years of patching by various
people had left some residual cruft. In April 1994, while working for Cygnus Support, I began a major revision
of Autoconf. I added most of the features of the Cygnus configure that Autoconf had lacked, largely by adapting
the relevant parts of Cygnus configure with the help of david zuhn and Ken Raeburn. These features include
support for using config.sub, config.guess, --host, and --target; making links to files; and running configure
scripts in subdirectories. Adding these features enabled Ken to convert GNU as, and Rob Savoye to convert
DejaGNU, to using Autoconf.


major features の長い wish list がまとめられました。そして、さまざまな人たちによる数年のパッチ当ての結果として、
some residual cruft が残りました。Cygnus Support のために働いていた期間中の1994年4月にわたしは Autoconf の a
major revision を開始しました。Cygnus configure にはあって Autoconf には欠けていた機能の大半を、ほとんどは
Cygnus configure の relevant parts を david zuhn と Ken Raeburn の手を借りて adapt することで Autoconf に追加
しました。そこで追加された機能にはconfig.sub、config.guessのサポート、--hostおよび--targetの追加、
ファイルへのリンク作成のサポート、サブディレクトリにおける configure スクリプト実行のサ
ポートといったものが含まれます。これらの機能の追加によって、Ken が GNU as の、Rob Savoye
が DejaGNU の、 Autoconf を使うための convert ができるようになりました。
#cruft→ジャーゴン
#Cruft - Wikipedia, the free encyclopedia
#http://en.wikipedia.org/wiki/Cruft


I added more features in response to other peoples' requests. Many people had asked for configure scripts to
share the results of the checks between runs, because (particularly when configuring a large source tree, like
Cygnus does) they were frustratingly slow. Mike Haertel suggested adding site-specific initialization scripts. 
People distributing software that had to unpack on MS-DOS asked for a way to override the .in extension on the
file names, which produced file names like config.h.in containing two dots. Jim Avera did an extensive
examination of the problems with quoting in AC_DEFINE and AC_SUBST; his insights led to significant improvements. 
Richard Stallman asked that compiler output be sent to config.log instead of /dev/null, to help people debug the
Emacs configure script.


そのほかの人たちのリクエストにこたえてさらに機能を追加しました。多くの人が configure script に実行した際のチェッ
ク結果を共有できるようにすることを求めました。それは、彼らが(特に Cygnus がそうしていたような large source tree
の configuring 時に) 遅いことに不満を持っていたからです。Mike Haertel は site-specific な initialization scripts
の追加を提案しました。MS-DOS上で unpack しなければならないソフトウェアを配布している人たちは、config.h.in のよう
にドットを二つ持っている produced file のファイル名の拡張子 .in をオーバーライドする方法を求めてきました。Jim
Avera は AC_DEFINE および AC_SUBST におけるクォーティングに関する問題の extensive examination を行いました。彼の
洞察は大きな改良につながりました。Richard Stallman は Emacs の configure スクリプトのデバッグを容易にするために、
コンパイラーの出力を /dev/null ではなく config.log に送るよう求めてきました。


I made some other changes because of my dissatisfaction with the quality of the program. I made the messages
showing results of the checks less ambiguous, always printing a result. I regularized the names of the macros
and cleaned up coding style inconsistencies. I added some auxiliary utilities that I had developed to help
convert source code packages to use Autoconf. With the help of Francois Pinard, I made the macros not interrupt
each others' messages. (That feature revealed some performance bottlenecks in GNU M4, which he hastily corrected!) I reorganized the documentation 
around problems people want to solve. And I began a test suite, because experience had shown that Autoconf has a
pronounced tendency to regress when we change it.

プログラムの質に満足いかなかったので、わたしはほかにもいくつか変更を行いました。検査結果を表示するメッセージを
あいまいさの少ないものにし、常に結果を出力するようにしました。マクロの名前を regularizeし、一貫性のあるコーディ
ングスタイルでクリーンアップしました。Autoconfを使うようにソースコードパッケージをコンバートするのを援助するわ
たしが開発した補助ユーティリティをいくつか追加しました。Francois Pinard の助力の元、マクロがほかのメッセージを
interruptしないようにしました。(この機能はGNU M4にあった performance bottlenecks をいくつか明らかにしましたが、
それは即座に修正されました! ) わたしはユーザーが解決を望んでいるドキュメント周りの問題を認識しました。そして
test suite を始めました。それは、Autoconf には変更を加えたときに regress してしまうというはっきりとした傾向が
あったからです

Again, several alpha testers gave invaluable feedback, especially Francois Pinard, Jim 
Meyering, Karl Berry, Rob Savoye, Ken Raeburn, and Mark Eichin.

Finally, version 2.0 was ready. And there was much rejoicing. (And I have free time 
again. I think. Yeah, right.)

2015年02月27日

■_

壁一面のスライム見てきた。

2015年02月26日

■_

歴史群像はどうなってしまうんだろうか>学研の例のアレ

■_

■_

千言万語で紹介されてたプログラミング言語(のひとつ)だっけこれ。 Kvikkalkul: the secret programming language of the Swedish Navy? | Hacker News Kvikkalkul home page

Kvikkalkul home page

This Web site is devoted to Kvikkalkul, the secret programming language of the Swedish Navy. In October 1994,
the language was described in a Usenet message by an anonymous programmer who used Kvikkalkul in 1957 to
write submarine weapons guidance programs and an accounting program.

2015年02月25日

■_

やすみ。

■_

2015年02月24日

■_

【翻訳】D言語はデータサイエンスのためにある | POSTD これ、元記事のタイトル D is for Data Science — AdRoll なんですよね。 なんで翻訳記事のタイトルをこうしちゃうかなあ。 わざとかどうかわからんけど。 S Is for Space - Wikipedia, the free encyclopedia Amazon.co.jp: R is for Rocket 電子書籍: Ray Bradbury: Kindleストア D is for Digital

■_

■_

今日は(「も」?)ちょっとダメ

2015年02月23日

■_

Excel のファイルをネットワーク上において共有して云々てのを 「昭和のやり方」とか評してたのを見かけたけど、 昭和の間にはそれ無理じゃなかろうか。

Microsoft Windows - Wikipedia
発売年 	バージョン 	製品名
1985年 	1.01 	Windows 1.01
1986年 	1.03 	Windows 1.03
1987年 	2.03 	Windows 2.03
1988年 	2.1 	Windows 2.1
1988年 	2.0 	Windows/286 2.0
1988年 	2.1 	Windows/386 2.1
1990年 	3.0 	Windows 3.0
1992年 	3.1 	Windows 3.1
1992年 	3.11 	Windows For Workgroups 3.1

Windows 3.0 の時点でもう昭和じゃないし。

Microsoft Excel - Wikipedia, the free encyclopedia

5.2 Microsoft Windows

    5.2.1 Excel 2.0 (1987)
    5.2.2 Excel 3.0 (1990)
    5.2.3 Excel 4.0 (1992)
    5.2.4 Excel 5.0 (1993)
    5.2.5 Excel 95 (v7.0)

Excel 自体のバージョンもこう。

■_

■_

あとちょっと残った。

21.3 Leviticus レビ記

Since my configure scripts determine the system's capabilities automatically, with no interactive user
intervention, I decided to call the program that generates them Autoconfig. But with a version number tacked
on, that name would be too long for old Unix file systems, so I shortened it to Autoconf.

わたしの configure スクリプトは interactive な user intervation をせずにシステムの capabilities を自動的に
determine していたので、configure スクリプトを生成するプログラムを Autoconfig という名前にしました。しかし、
バージョン番号を付け加えた場合に古い Unix のファイルシステムには長すぎるものになってしまうので、名前を縮めて
Autoconf としました。

In the fall of 1991 I called together a group of fellow questers after the Holy Grail of portability (er, that
is, alpha testers) to give me feedback as I encapsulated pieces of my handwritten scripts in M4 macros and
continued to add features and improve the techniques used in the checks. Prominent among the testers were
François Pinard, who came up with the idea of making an Autoconf shell script to run M4 and check for unresolved
macro calls; Richard Pixley, who suggested running the compiler instead of searching the file system to find
include files and symbols, for more accurate results; Karl Berry, who got Autoconf to configure TeX and added
the macro index to the documentation; and Ian Lance Taylor, who added support for creating a C header file as an
alternative to putting -D options in a makefile, so he could use Autoconf for his UUCP package. The alpha
testers cheerfully adjusted their files again and again as the names and calling conventions of the Autoconf
macros changed from release to release. They all contributed many specific checks, great ideas, and bug fixes.

1991年の秋にわたしは group of fellow questers after the Holy Grail of portability (つまりはαテスターです) を、
わたしが encapsulate していた手書きの M4 マクロのスクリプト群に対するフィードバックを得るためと機能の追加や
チェックで使っていた技法の改良を続けるために招集しました。その tester たちの中でも傑出していた人物には、
M4 を実行して unresolved な macro calls の検査を行う Autoconf シェルスクリプトを作るというアイデアを出した
Francois Pinard、より accurate な結果を得るために include するファイルやシンボルをファイルシステムから検索する
のではなくコンパイラーを実行することを提案した Richard Pixley、TeX を configure するのに Autoconf を
採用しドキュメントを index するためのマクロを追加した Karl Berry、makefile に -D オプションを追加することの代
替として C のヘッダーファイルの生成のサポートを追加した Ian Lance Taylor、それにより彼は自分の UUCP パッケージ
に Autoconf を使えるようになりました。こういった αテスターたちは Autoconf のマクロがリリースごとにその名前や
呼び出し規約を変えていくのに何度も繰り返し cheerfully adjusted  しました。
彼らは皆、多くの specific checks、great ideas、bug fix に貢献しました。


21.4 Numbers 民数記

In July 1992, after months of alpha testing, I released Autoconf 1.0, and converted many GNU packages to use it.
I was surprised by how positive the reaction to it was. More people started using it than I could keep track of,
including people working on software that wasn't part of the GNU Project (such as TCL, FSP, and Kerberos V5). 
Autoconf continued to improve rapidly, as many people using the configure scripts reported problems they
encountered.

数ヶ月のαテストを経て、わたしは 1992年7月に Autoconf 1.0 をリリースし、Autoconf を使うように多数の GNU
パッケージを convert しました。わたしはそれに対する反応がとても positive であったことに驚きました。
わたしが追いかけきれないほど多くの人が Autoconf を使い始めましたが、その中には Tcl や FSP, Kerberos V5 といった
GNU プロジェクトに属していないソフトウェアのために作業している人たちもいました。
Autoconf は多くのユーザーが configure スクリプトを使って遭遇した問題を報告することで急速に改良が進み続けました。


Autoconf turned out to be a good torture test for M4 implementations. Unix M4 started to dump core because of
the length of the macros that Autoconf defined, and several bugs showed up in GNU M4 as well. Eventually, we
realized that we needed to use some features that only GNU M4 has. 4.3BSD M4, in particular, has an
impoverished set of builtin macros; the System V version is better, but still doesn't provide everything 
we need.

Autoconf は M4 の実装に対する good torture となりました。Unix の M4 は Autoconf が定義するマクロ群の長さが原因
でコアダンプを起こし、GNU M4 でもいくつかのバグが表面化しました。最終的には GNU M4 だけが持っているいくつかの
機能を使う必要のあることをわたしたちは認識しました。特に 4.3BSD の M4 は貧弱な組み込みマクロのセットしか持って
いませんでしたし、System V の M4 はそれよりはましであったもののわたしたちが必要としたもののすべてを持ってはい
ませんでした。

More development occurred as people put Autoconf under more stresses (and to uses I hadn't anticipated). Karl
Berry added checks for X11. david zuhn contributed C++ support. François Pinard made it diagnose invalid
arguments. Jim Blandy bravely coerced it into configuring GNU Emacs, laying the groundwork for several later 
improvements. Roland McGrath got it to configure the GNU C Library, wrote the autoheader script to automate the
creation of C header file templates, and added a --verbose option to configure. Noah Friedman added the
--autoconf-dir option and AC_MACRODIR environment variable. (He also coined the term autoconfiscate to mean
“adapt a software package to use Autoconf”.) Roland and Noah improved the quoting protection in AC_DEFINE and
fixed many bugs, especially when I got sick of dealing with portability problems from February through June, 1993.

ユーザーが Autoconf に一層ストレスをかけたことで (また、わたしが予期していなかった使い方をしたことで) さらなる
開発が行われました。Karl Berry は X11 向けのチェックを追加しました。david zuhn は C++ のサポートに contribute
しました。Francois Pinard は configure が invalid arguments の diagnose を行うようにしました。
Jim Blandy はあとで行う改良のための準備として
GNU Emacs の configuring に bravely coerced しました。
Roland McGrath は GNU C Library に configure を適用し、C のヘッダーファイルのテンプレートの生成を自動化する
autoheader スクリプトを書き、そして configure に --verbose  オプションを追加しました。Noah Friedman は
--autoconf-dir オプションと AC_MACRODIR 環境変数を追加しました (彼はまた、“adapt a software package to use
Autoconf”(あるソフトウェアパッケージが Autoconf を使うようにすること) という意味の autoconfiscate という言葉
を造語しました)。Roland と Noah は、AC_DEFINE にあった quoting protection の改良と多くのバグ修正、とりわけ
1993年の二月から六月までわたしを悩ませていた移植問題の修正を行いました。

group of fellow questers after the Holy Grail of portability なんかはなにか特別な意味がありそうなんだけど(「聖杯」だし) 面倒なので調べない。

2015年02月22日

■_

What is Nuitka | Nuitka Home Python compiler とな? Nuitka is a Python compiler. It's fully compatible with Python 2.6, 2.7, 3.2, 3.3, and 3.4.

Unix V5, OpenBSD, Plan 9, FreeBSD, and GNU Coreutils Implementations of Echo.c | Hacker News で、結構前(Created on 19 Jul 2011)のこれが話題になってんだけど UNIX V5, OpenBSD, Plan 9, FreeBSD, and GNU coreutils implementations of echo.c 他にこういう比較に使えるユーティリティってないすかね。 V5 があるとキツイかなあ(せめてV7?)

こんなことやってたのかw 見たかった 「機動警察パトレイバー」イングラム出動! 東京マラソンを警備 - ねとらぼ

■_

■_

コードの評価基準?は大事な方から Correct → Secure → Readable → Elegant → Altruist と。 Charlax — Maslow's pyramid of code review

■_

アレの続きは中途半端な状態なので今日はなし

2015年02月21日

■_

大阪だったかー Windowsでの自動化について考える会 - connpass

■_

■_

Autoconf のドキュメントの History のところ。 色々見直さないと行けない部分があるけどとりあえず。

21 History of Autoconf

This chapter was written by the original author, David MacKenzie.

この章は Autoconf の original author である David MacKenzie が書きました。

You may be wondering, Why was Autoconf originally written? How did it get into its present form?
(Why does it look like gorilla spit?) If you're not wondering, then this chapter contains no information
useful to you, and you might as well skip it. If you are wondering, then let there be light...

そもそもなぜ Autoconf は作られたのか? そしてどのようにして今のようなかたちになったのか
(Why does it look like gorilla spit 訳さないよ:P )? そういった疑問をあなたは持っているかもしれません。
そういった疑問がないのなら、この章にはあなたの訳に立つような内容はないでしょうから
スキップしてしまってもよいでしょう。
If you are wondering, then let there be light...

    Genesis: Prehistory and naming of configure
    Exodus: The plagues of M4 and Perl
    Leviticus: The priestly code of portability arrives
    Numbers: Growth and contributors
    Deuteronomy: Approaching the promises of easy configuration 

21.1 Genesis 創世記

In June 1991 I was maintaining many of the GNU utilities for the Free Software Foundation. As they were ported
to more platforms and more programs were added, the number of -D options that users had to select in the
makefile (around 20) became burdensome. Especially for me—I had to test each new release on a bunch of
different systems. So I wrote a little shell script to guess some of the correct settings for the fileutils
package, and released it as part of fileutils 2.0. That configure script worked well enough that the next
month I adapted it (by hand) to create similar configure scripts for several other GNU utilities packages.
Brian Berliner also adapted one of my scripts for his CVS revision control system.

1991年の6月、わたしはFree Software Foundation のために数多くの GNU utilities  の保守をしていました。GNU
utilities がより多くのプラットフォームに移植されたりプログラムが追加されたりするにつれて、(20個ほどの) makefile
中に存在しユーザーが選択しなければならない -D オプションの数が burdensome になってきました。とりわけわたしにとっ
て苦痛だったのは、たくさんの different systems でそれぞれ新しいリリースのテストをしなければならなかったことです。
そこでわたしは fileutils パッケージ向けのいくつかの correct settings を推測するため小さなシェルスクリプトを書い
て、それを fileutils 2.0 の一部としてリリースしました。その configure スクリプトは、翌月いくつかの other GNU
utilities packages 向けの類似の configure スクリプトを生成するために(手作業で)適用してみたところ充分な働きをし
ました。Brian Berliner もわたしのスクリプトの一つを彼の CVS revision control system に適用しました。

Later that summer, I learned that Richard Stallman and Richard Pixley were developing similar scripts to use
in the GNU compiler tools; so I adapted my configure scripts to support their evolving interface: using the
file name Makefile.in as the templates; adding ‘+srcdir’, the first option (of many); and creating
config.status files.

その夏の終わりに、わたしは Richard Stallman and Richard Pixley が開発し、GNU compiler tools で使われていた
類似のスクリプトから学びました。そして、自分の configure スクリプト群にその evolving interface を
適用しました。具体的には、テンプレートには Makefile.in というファイル名を使うこと、
adding ‘+srcdir’, the first option (of many);
config.status というファイルを生成すること。です。


21.2 Exodus 出エジプト記

As I got feedback from users, I incorporated many improvements, using Emacs to search and replace, cut and
paste, similar changes in each of the scripts. As I adapted more GNU utilities packages to use configure
scripts, updating them all by hand became impractical. Rich Murphey, the maintainer of the GNU graphics
utilities, sent me mail saying that the configure scripts were great, and asking if I had a tool for
generating them that I could send him. No, I thought, but I should! So I started to work out how to generate
them. And the journey from the slavery of hand-written configure scripts to the abundance and ease of Autoconf
began.

ユーザーからのフィードバックを得て、検索と置換、カットアンドペースト、各スクリプトに対する類似の変更といった
ことを行うために Emacs を使いわたしはたくさんの改良を行いました。さらに多くの GNU ユーティリティパッケージで
configure スクリプトを使うようにしたことで、それらのパッケージを手作業で更新することが impractical なものに
なってきました。GNU graphics utilities の maintainer だった Rich Murphey が、わたしに conigure スクリプト群が
素晴らしいものなのでそれを生成するツールがあったら送って欲しいというメールを送ってきました。そんなものはあり
ませんでしたが、わたしはこう考えたのです。(生成ツールは)あるべきものだ! と。そんなわけでわたしは configure
スクリプトを生成するための方法を考え始めました。
そして the slavery of hand-written configure scripts から
the abundance and ease of Autoconf への旅が始まったのです。

Cygnus configure, which was being developed at around that time, is table driven; it is meant to deal mainly
with a discrete number of system types with a small number of mainly unguessable features (such as details of
the object file format). The automatic configuration system that Brian Fox had developed for Bash takes a
similar approach. For general use, it seems to me a hopeless cause to try to maintain an up-to-date database
of which features each variant of each operating system has. It's easier and more reliable to check for most
features on the fly - especially on hybrid systems that people have hacked on locally or that have patches
from vendors installed.

同時期に開発されていた Cygnus configure はテーブル駆動でした。これは discrete numbers の system types を
少数の (オブジェクトファイルのフォーマットのような) unguessable features で扱うというものです。Brian Fox が
Bash 向けに開発した automatic configuration system も同様のアプローチを採用していました。しかし一般的な用途に
は、オペレーティングシステムごとの機能のバリエーションを納めたデータベースの up-to-date な保守をさせようとする
ことは hopeless なもののようにわたしには思われました。ことに、ユーザーが locally にハックしていたり複数のベン
ダーからのパッチを適用しているような hybrid system では、大部分の機能のチェックを on the fly で行う方が簡単か
つ信頼性の高いものです。

I considered using an architecture similar to that of Cygnus configure, where there is a single configure script
that reads pieces of configure.in when run. But I didn't want to have to distribute all of the feature tests
with every package, so I settled on having a different configure made from each configure.in by a preprocessor.
That approach also offered more control and flexibility.

実行時に configure.in の pieces を読みこむ single configure script があるという  Cygnus configure と同様のアー
キテクチャを使うことを考えましたが、すべてのパッケージにすべての機能テストを distribute しなければならないのは
避けたかったので、プリプロセッサーによってそれぞれの configure.in から異なる configure を作り出すようにしました。
そのアプローチでも more control and flexibility を offer しました。

I looked briefly into using the Metaconfig package, by Larry Wall, Harlan Stenn, and Raphael Manfredi, but I
decided not to for several reasons. The Configure scripts it produces are interactive, which I find quite
inconvenient; I didn't like the ways it checked for some features (such as library functions); I didn't know
that it was still being maintained, and the Configure scripts I had seen didn't work on many modern systems
(such as System V R4 and NeXT); it wasn't flexible in what it could do in response to a feature's presence or
absence; I found it confusing to learn; and it was too big and complex for my needs (I didn't realize then how
much Autoconf would eventually have to grow).

わたしは Larry Wall, Harlan Stenn, Raphael Manfredi による Metaconfig パッケージもざっと試してみましたが、い
くつかの理由で採用は見送りました。具体的には以下の通りです。Metaconfig パッケージ の Configure スクリプトは
わたしがとても不便だと考えていた対話的なスクリプトを生成すること。(ライブラリ関数のような)いくつかの機能に対
するチェックの方法が気に入らなかったこと。当時まだ保守が続いていたことをしらなかったこと。わたしの試した
Configure スクリプトが (System V R4 や NeXT のような) modern system の多くで動作しなかったこと。
ある機能のあるなしに対しての反応として行えることが flexible でなかったこと。
I found it confusing to learn;
そしてなにより、わたしのニーズには大きすぎ、複雑すぎるものだったからです
(Autoconf がどれほど大きなものになってしまうのかわたしには認識できていなかったのです)。

I considered using Perl to generate my style of configure scripts, but decided that M4 was better suited to the
job of simple textual substitutions: it gets in the way less, because output is implicit. Plus, everyone already
has it. (Initially I didn't rely on the GNU extensions to M4.) Also, some of my friends at the University of
Maryland had recently been putting M4 front ends on several programs, including tvtwm, and I was interested in
trying out a new language.

my style of configure scripts を生成するのに Perl を使うことも考えましたが、単純なテキスト置換作業を行うのには
M4 の方がより適切だろうと判断しました。
it gets in the way less, because output is implicit.
加えて 誰もがすでに M4 を持っていました (当初、M4 に対する GNU 拡張依存することは考えませんでした)。
また、その頃 University of Maryland にいた数人のわたしの友人たちが tvtwm を含む複数のプログラムに M4 front end
を put していて、新しい言語に try することにわたしは興味があったのです。

続く。 かな?


一つ前へ 2015年2月(中旬)
一つ後へ 2015年3月(上旬)

ホームへ


リンクはご自由にどうぞ

メールの宛先はこちらkbk AT kt DOT rim DOT or DOT jp