iPod、split, the if and ^

昨日はたまの電車通勤。車中で読む本が手元になかったので、旧世代 iPod にじっくり読みたかった記事を入れる事を思いつく。旧世代 iPod にはメモという機能があってテキストファイルを読めることを知った。
記事は Gauche Devlog 。英語で文字化けの心配もないし話題が Gauche だからちょうど良いだろうと。
記事を1つのテキストファイルにまとめ iPod の Notes ディレクトリにコピーする。結構見やすい。ただ残念な事に途中で切れてしまう。ググってみたところ 4096 byte 以上のファイルは読めないとの事。
じゃあテキストを分割しようと思ったのだが、さっと分割する方法が思いつかない。コードを書くほどでもない。どうしたもんか。Linux にはそういうコマンドがあるかもしれない。調べたらすぐに split コマンドを発見。 hige.txt を指定サイズで hige.txtaa, hige.txtab などと分割してくれる。これで無事読めるようになった。


電車で読んでいたら次のような文に遭遇。

The if is the problem in our open modules, since we don't know the complete set of names when we process import forms.
For example, except cannot be just a set-difference operation; if a new exported binding is added that is not listed in the except list later,
that binding should become visible in the importing module.

the if 。見慣れないのでびっくり。少し前を読み返すと分かった。

R6RS has a concept of import-set which is a set of names to import, and defines only, except, prefix and rename as operations on the sets; that is,
each option takes a set of names, and returns a modified set of names.
It is easy to explain, and straightforward to implement if you know all the names you are dealing with.

"if you know all the names you are dealing with" を指しているから the なのか。勉強になった。


Gauche Devlog - Shorter names
lambda を短く書くのに ^ を使おうという話が面白かった。Reader に手を入れずマクロで実現できそうなのが良い。