ときどきの雑記帖 RE* (新南口)
悉く書を信ずれば則ち書なきに如かず
エレベーター
今の職場は割と高いフロアにあって結構エレベーターを使うわけなんですが、 ある階に止まるや否や「開ボタン」を連打する御仁にそれなりに遭遇するんですね。 あれ、そうやるとほんの少しでも早く扉が開くと思ってやってんですかね。
あと降り際に「閉ボタン」を押しながら降りるのも意図が良くわからない。
『システムエンジニアのエレベータの乗り方』に対し、勝手に追記する - いろいろやってみるにっき
SQLite
ゼロからはじめるPython(71) Excelで読めないSQLiteデータをPythonで読んでExcelに差し込みたい | マイナビニュース という記事に
SQLiteというのは、パブリックドメインの軽量組み込みの小型データベースだ。
という部分をみつけ、え、パブリックドメイン?と疑問に思ったので公式サイトを見てみると
SQLite source code is in the public-domain and is free to everyone to use for any purpose.
All of the code and documentation in SQLite has been dedicated to the public domain by the authors.
おお、確かに「public domain」とある。 zlibのようなライセンスだろうとばかり思い込んでいたわ。
plugin_is_GPL_compatible
C 言語の変数 plugin_is_GPL_compatible は、ダイナミックモジュールが GPL 互換のライセンスで提供されていることを 宣言するためのシンボルです。ご存知の通り Emacs は GPL なソフトウェアです。ダイナミックモジュールは共有ライブラリですから、 Emacs がロードすると動的リンクすることになります。GPL 非互換の共有ライブラリを GPL なソフトウェアとリンクしたら ライセンス的にマズいので、Emacs は共有ライブラリに plugin_is_GPL_compatible というシンボルがあった場合だけロードするようになっています。
これはgawk(の拡張)も一緒で、マニュアルの記載はこう。
Every dynamic extension must be distributed under a license that is compatible with the GNU GPL (see section GNU General Public License).
In order for the extension to tell gawk that it is properly licensed, the extension must define the global symbol plugin_is_GPL_compatible. If this symbol does not exist, gawk emits a fatal error and exits when it tries to load your extension.
The declared type of the symbol should be int. It does not need to be in any allocated section, though. The code merely asserts that the symbol exists in the global scope. Something like this is enough:
int plugin_is_GPL_compatible;
bash のloadble module は違う? Search · plugin_is_GPL_compatible
call 5
CALL 5 って CP/M 互換システムコールで使われているのですが、なんでこんな変なアドレスなんでしょうか? よくわかりませんでした。
5バイトのうち3バイトはジャンプ命令だけど残り2バイトは記憶になかったので調べてみた。 CPM Operating System Internals によるとこう。
Starting at the bottom of the memory map, the first three bytes of code contain the machine language instruction JMP F200h (or whatever address is the start of the BIOS).
1~3バイト目はやはりジャンプ命令で、問題の4バイト目と5バイト目は以下の通り。
The following byte is the IO Byte. In good CP/M implementations (many computer vendors were sloppy in using this functionality), you can re-assign the real devices to CP/M virtual devices.
Byte 04h logs the current default drive (in bits 0-3, 0 being A: and 1 being B:, etc) and the current user (in bits 4-7).
ついでに6バイト目(から3バイト)。
Bytes 05h-07h contain the machine language instruction JMP E400 (i.e., Jump to BDOS). Calling address 05h is the standard way in which programs use the services of CP/M.
日本語で読める資料はこの辺りを CP/M資料メモ - neko Java Home Page
Hugo メモ
現在の設定では同じ日付の記事を二つ書けない
以前書いたように雑記帖のエントリ命名規則はこうなっていて、
post = "/post/:year/:month/:day/"
元ファイル中の記述にある date エントリの記述に従って 実体がこのディレクトリに (index.htmlとして)置かれる。
ということで同じ日付のエントリを二つ作ってしまうと競合してしまって どちらかしか置かれないという結果になってしまう。 これを避けるには slug やらを使えということになるのだろうけど 全体に影響するのでそれはやりたくない。
まあ今でもきっちりその日にアップロードしたりはしていないので、 適当に日付をずらすなりして対処するか。
aliases
どこかで使うことになるかもしれないのでメモ。
Hugo内で古いURLから新しいURLにリダイレクトさせる - My External Storage
Hugo内でリダイレクトする場合は該当記事のFront Matterにaliasesを設定する。 (Front MatterというのはJekyllなどにもある概念らしい。初めて知った。) aliasesにリダイレクトを設定したい昔のURLを記載しておくだけで新しいURLへリダイレクトできる。
link to prev / next
次のページ、前のページへのリンクを表示する | まくまくHugo/Goノート
を参考に雑記帖のエントリに前後のエントリへのリンクをつけたのだけど表示され具合がイマイチ。
もうちょっとHugoのことを知らないといかんなあ。
to 2021
さてどうしましょうかねえ。