Prolog の拡張子
ぼくはとうとう Prolog の拡張子を .pl にした。
これは一つの事件なのだ。:P
途中、.pro にしていたこともある。その後、昨日までの間は .swi として落ち着いていたのだが、今日の朝、.pl にしたのだ。
ぼくの PC には、ながらく Perl 5.8.8 をインストールしていたが、今日の朝、アンインストールしたのだ。もちろん、Perl はぼくにとって大切であり再インストールすることは間違いない。そのときの Perl のバージョンは 5.8.10 で拡張子は .prl にするつもりだ。
Prolog の拡張子を .prl にする人もいるようだが、.prl はぼくには Prolog のイメージがない。SWI-Prolog の拡張子としてもっとも常識的な選択は、おそらく .swi だと思う。sw というと、Flash のイメージがあるものの、これからの将来を考えても心配は不要だろう。とにかく、ぼくは SWI-Prolog の拡張子を今回あえて .pl にしたという次第なのだ。
今回の件は、結局ぼくにとって Prolog の存在が Perl を越えたということなのだ。もとはといえば Prolog の拡張子が先に存在していたわけだから Perl には .prl を使ってもらおう。
ぼくの LL(Lightweight Language)は、Perl と Python なのだが、最近ではどちらも使う機会が少ない。使う必要が生じたら Python でいいだろうと、この頃ではそう思うようになった。それに、ちょっとしたテキスト処理を Perl で書いていたが直近では AutoHotKey で書くようになったのだ。
・ プログラミング ① → Prolog、Lisp / Scheme
・ プログラミング ② → Python、PHP
・ プログラミング ③ → AutoHotKey
上のような体制だね。①でやりにくいことがあれば ②で、PHP はウェブ専用。サーバーに Lisp でもあれば Lisp で書いてもよいが、レンタルサーバーなのでね。Ruby があるのに Python がない。どういうこと? しかし、今の時代はどこのレンタルサーバーでも PHP なら対応している。
③は、簡単なテキスト処理から、GUI まで簡単だ。AutoHotKey はお勧めだよ。
【ちっさなニュース】SWI-Prolog が 7.1.5 になった。
FIXED: suboptimal deletion procedure in heaps Made heap operations run orders of magnitude slower than they should.
FIXED: Possible crash in put_dict/4 and get_dict/5.
FIXED: portray_clause/1 (listing/1): support name() and dicts.
MODIFIED: Changed the default value for the allow_dot_in_atom flag
ADDED: library(prolog_xref): process conditional compilation directives while searching for declarations for used modules.
ADDED: Allow for a key-path expression in the put/2 function dicts.
FIXED: Re-sorting the empty dict (_{}) when restoring state.
DOC: Fixed summary documentation: added get_dict/5, renamed map to dict
ADDED: get_dict/5
FIXED: put_dict/4 if the new value is an environment variable.
FIXED: csv_read_file_row/3 when the record separator is embedded in a quoted field. Matevž Kovačič.
DOC: Updated syntax notes section
DOC: Some small fixes to PceEmacs bluffers section
FIXED: library(prolog_codewalk): raise an error for meta-extended arguments that are not callable.
ADDED: must_be(dict, Term). Michael Hendricks.
FIXED: Two functor/compound issues introduced by previous patch
FIXED: predicate_property(name(), P).
FIXED: Handling of name() in colour generation
FIXED: Handling of name() in the cross-referencer
DOC: Fixed LaTeX typos
ENHANCED: Add comment to clarify type errors. Suggested by Michael Hendriks
FIXED: Error term for evaluating blobs
FIXED: Bug#149: Incorrectly allowed for plain head in module export list. Raivo Laanemets.
DOC: Enhanced docs for split_string/4 (Richard O'Keefe)
FIXED: No longer consider dicts as callable
その他は以下を参照のこと。
http://www.swi-prolog.org/ChangeLog?branch=development
以上。