ときどきの雑記帖 RE* (新南口)
The Ship who sang
時間よ、とまれ
テレ玉での今週の放送。 12話でランバ・ラルが登場しているんだけど、 16話まで出番なし(そのあと18話も出番なし)
第12話 | ジオンの脅威 |
第13話 | 再会、母よ… |
第14話 | 時間よ、とまれ |
第15話 | ククルス・ドアンの島 |
第16話 | セイラ出撃 |
第17話 | アムロ脱走 |
第18話 | 灼熱のアッザム・リーダー |
第19話 | ランバ・ラル特攻! |
第20話 | 死闘! ホワイト・ベース |
13話(再会、母よ…) は劇場版一作目に組み込まれたし 15話(ククルス・ドアンの島) は独立した映画になったり(オリジンベースだけど) してるけど この話に陽が当たることはない…かなあ。
8話の「ここが一年前までセント・アンジェのあった所です」もそうだけど、 それがなくなった(作中で明確に書かれなくなった)ことで 全体を見たときの印象がだいぶ変わるよねえ(とは話を広げすぎ)
ところで高校野球(予選)の特番が入るので 三週間お休みらしい。 で、 アニメ | テレ玉/地デジ3ch を見て知ったのだけど来週(7/12)から ビッグオー放送と。
ビッグオー
【放送情報】
— サンライズ (@SUNRISE_web) July 5, 2024
『THE ビッグオー』#テレビ埼玉 にて
7/12(金)より放送スタート!
毎週金曜日23:30~24:00
テレビ放送25周年作品 この機会をお見逃しなく!https://t.co/o03ArVALCC#テレ玉 pic.twitter.com/xbvTs74IiQ
サンライズ公式も投稿していた。 のだけど そのリプライにあった
WILDCHALLENGERは聞けますか!?
— miku (@miku16) July 5, 2024
が通じる人がどのくらいいるのかと😄
しかしビッグオーも25周年とか遠い目になっちゃうねえ…
Final
Python業務歴1年目から5年目でコードはこう変わった #Python - Qiita
の、Afterのスクリプトで
class DBClient:
PATH: Final[str] = "hoge/fuga"
なんじゃこれ? となったので調べたら結構前からあるものらしい。
具体的な働きはこう
typing — 型ヒントのサポート — Python 3.12.4 ドキュメント
typing.Final
Special typing construct to indicate final names to type checkers. Final names cannot be reassigned in any scope. Final names declared in class scopes cannot be overridden in subclasses.
新刊近刊
ナットとボルト
ナットとボルト 世界を変えた7つの小さな発明 | Kindleストア
別の本を探しに行ったときに 見かけたのでちょっと眺めてみたけど 予想通りなかなか面白そうだった (がまだ買ってない)
awk
FORTRAN Compiler on IBM 704
Hugo メモ
Release v0.128.2 · gohugoio/hugo
Cのアレ(のつづき)
そもそもプログラミング言語の配列の起源は…というと
array
Array (data structure) - Wikipedia
History
The first digital computers used machine-language programming to set up and access array structures for data tables, vector and matrix computations, and for many other purposes. John von Neumann wrote the first array-sorting program (merge sort) in 1945, during the building of the first stored-program computer.[6] Array indexing was originally done by self-modifying code, and later using index registers and indirect addressing. Some mainframes designed in the 1960s, such as the Burroughs B5000 and its successors, used memory segmentation to perform index-bounds checking in hardware.[7]
Plankalkül - Wikipedia にも配列はあったらしいけど これはちょっと別格というか離れ小島というか そんな感じだよねえ
んで、こんなプログラムを書いて ちょこちょこ変えながらコンパイルしてみると
#include <stdio.h>
#include <stdlib.h>
int
main()
{
char *p = "hello,world";
int v = 3; //double v = 3;
printf("%c, %c\n",v[v], p[p]);
return 0;
}
>gcc hoge.c
hoge.c: In function 'main':
hoge.c:9:24: error: subscripted value is neither array nor pointer nor vector
printf("%c, %c\n",v[v], p[p]);
^
hoge.c:9:30: error: array subscript is not an integer
printf("%c, %c\n",v[v], p[p]);
>gcc hoge.c
hoge.c: In function 'main':
hoge.c:9:24: error: subscripted value is neither array nor pointer nor vector
printf("%c, %c\n",3[3], 3[p]);
まあそのくらいは見るよね。 昔からそうかどうかはわからないけど。
んでvをdoubleにしてみると
>gcc hoge.c
hoge.c: In function 'main':
hoge.c:9:24: error: array subscript is not an integer
printf("%c, %c\n",p[v], v[p]);
^
hoge.c:9:30: error: array subscript is not an integer
printf("%c, %c\n",p[v], v[p]);
ソースコードではどうなのかを見てみると pccでは
v7unix/v7/usr/src/cmd/mip/cgram.y
term:
| term '[' e ']' {
$$ = buildtree( UMUL,
buildtree( PLUS, $1, $3 ), NIL );
正確なところはbuildtreeの中まで追いかけないといけないけど
ブラケットの前の部分と
ブラケットに囲まれた部分を
PLUS
で繋いでいるということで
まあ可換にしてるっぽい。
pccでない方のv7のCコンパイラーでは v7unix/v7/usr/src/cmd/c/c01.c
/*
* a[i] => *(a+i)
*/
if (op==LBRACK) {
build(PLUS);
op = STAR;
コメントがすべてを表してますな😄
さらに古いCでも legacy-cc/prestruct/c01.c
if (op==4) { /* [] */
build(40); /* + */
op = 36; /* * */
}
dope = opdope[op];
この時期のCにはプリプロセッサーがないので 数値がそのままで書かれているけど、 まあv7のと同じでしょう
ところでv7のCコンパイラーのコードを見ていてこんなのを見つけた
v7unix/v7/usr/src/cmd/c/c03.c at master · v7unix/v7unix · GitHub
case LBRACK:
if (dimp->rank>=5) {
error("Rank too large");
配列の次元の制限?
Cでの話はこれくらいにして そのご先祖へ
B
まずはB
Thompson’s B Manual 4.1 Primary Expressions
- A vector is a primary expression followed by any expression in [] brackets. The two expressions are evaluated to rvalues, added and the result is used as an lvalue. The primary expression can be thought of as a pointer to the base of a vector, while the bracketed expression can be thought of as the offset in the vector. Since E1[E2] is identical to *(E1+E2), and addition is commutative, the base of the vector and the offset in the vector can swap positions.
3.3 Vectors
Surprising though it may seem to those used to other languages, you can write exactly the same thing as
i[a]
6.3 Unary Operators
The following are exactly equivalent everywhere:
a[b] *(a+b) b[a]
For example, a[0], *a, and 0[a] are completely equivalent in B.
Cと同じ。のようで。
続いてさらに遡ってBCPL
BCPL
BCPLはよくわからない部分があって、
全ての値の判断は値を処理するのに利用した演算子によって決定された (例えば+は2つの値を両方とも整数として加算し、!は間接的に値を参照するポインタとして扱った)。
The interpretation of any value was determined by the operators used to process the values. (For example, + added two values together, treating them as integers; ! indirected through a value, effectively treating it as a pointer.) In order for this to work, the implementation provided no type checking.
いくつか亜流(?)があるのか、 vector(配列)とその添え字の組を表す表記が
E1 | E2
E1 ! E2
E1*[E2]
のように複数あって どれが元祖でどれが本家なのやらよくわからない
- TX-2_BCPL_Reference_Manual_May69.pdf
- BCPL Reference Manual (1967)
- Microsoft Word - bcpl.doc - bcpl.pdf
- bcplman.pdf
- BCPL言語 - ゲンゴロウプロジェクト
んで、ここでいうE1
とE2
を入れ替えても
大丈夫なのかはわからなかった
(が、ダメそうな気はする)
CPL
History of C
変遷
何で不正解?と思ってリプ見たら、今の通説は吉田じゃなくて卜部が濃厚、そもそも徒然草は出家後だから兼好法師が適切なんだと。
— さなろーま?@実タイの中の人 (@sanarome) July 4, 2024
教わった当時から研究が進んで、実はこうでした、みたいなことが増えたなぁ。 https://t.co/bBXe4C15gb
卜部 兼好(うらべ の かねよし / うらべ の けんこう)は、鎌倉時代末期から南北朝時代にかけての官人・遁世者・歌人・随筆家。 日本三大随筆の一つとされる『徒然草』の作者。私家集に『兼好法師家集』。出家後は俗名を音読みした兼好(けんこう) を法名としたことから、兼好法師(けんこうほうし)とも呼ばれる。
治部少輔・卜部兼顕の子。鎌倉および京都に足跡を残す。吉田神社の神官の家系である吉田流卜部氏は後に吉田氏を名乗ったため、 江戸時代以降は吉田 兼好(よしだ けんこう)とも称される。しかし、現在では吉田流卜部氏の一族であること自体が吉田兼倶 による捏造であるとの見解がある。
へー。
そう言えばわしらがガキンチョのころは 「歌川広重」が 「安藤広重」だったよね
倍分
約分の逆、分子分母に同じ数をかける操作を「倍分」と呼ぶことを初めて知った。
— ロボ太 (@kaityo256) July 6, 2024
倍分(ばいぶん)とは? 意味・読み方・使い方をわかりやすく解説 - goo国語辞書
へー(本日2回目)