ときどきの雑記帖 RE* (新南口)
Tales of The Future
Walter Bright
Walter BrightをまたHNで目撃 (なりすまし、ではないだろう。たぶん)。
- C isn’t a programming language anymore | Hacker News
- > You can’t actually write a C parser Actually, you can. I added one to the D co… | Hacker News
WalterBright
Actually, you can. I added one to the D compiler, and dubbed it ImportC. With ImportC, in your D code you can write:
訃報
Fred P. Brooks has passed away: https://t.co/hAGoj2fAUZ Comments: https://t.co/KyrfLpo8sg
— Hacker News (@HNTweets) November 18, 2022
日本語圏では全然話題に上ってないようすな (タイミングの問題もあるんだろうけど)。
Languages Pre-Fortran
あとで読む。と思ったが 元記事の元ネタのPDF は以前ちょっとだけ読んだやつだな。 改めて(最後の方まで)読んでみるか。
history
readline はGPLなのでzshがそのまま使っていることはないだろうと思ってちょっと調べたところ、 自前のライブラリを使っているらしい。
Chapter 4: The Z-Shell Line Editor
The zsh line editor is probably the first part of the shell you ever used, when you started typing in commands. Even the most basic shells, such as sh, provide some kind of editing capability, although in that case probably just what the system itself does — enter characters, delete the last character, delete the entire line. Most shells you’re likely to use nowadays do quite a lot more. With zsh you can even extend the set of editor commands using shell functions.
4.1: Introducing zle
ばっさり略
Note that unlike bash’s line editor, readline, which is an entirely separate library, zle is an integral part of the shell. Hence you configure it by sticking commands in your .zshrc — as it’s only useful for an interactive shell, only /etc/zshrc and .zshrc make sense for this purpose.
One tip if you’re looking at the zsh manual using info, either with the command of that name or \C-h i within Emacs, which I find the most convenient way: the entry for zle is called
Zsh Line Editor', in full, not just
Zle’. Have fun looking forShell Builtin Commands' (not
Builtins’) while you’re at it.
じゃあタブキー押下での動作は どうなっているのかと調べるたが どうもよくわからない。
Completion
accept-and-menu-complete
In a menu completion, nsert the current completion into the
buffer, and advance to the next possible completion.
complete-word
Attempt completion on the current word.
delete-char-or-list (^D) (unbound) (unbound)
Delete the character under the cursor. If the cursor is at the
end of the line, list possible completions for the current word.
expand-cmd-path
Expand the current command to its full pathname.
expand-or-complete (TAB) (unbound) (TAB)
Attempt shell expansion on the current word. If that fails,
attempt completion.
expand-or-complete-prefix
Attempt shell expansion on the current word up to cursor.
expand-history (ESC-space ESC-!) (unbound) (unbound)
Perform history expansion on the edit buffer.
expand-or-complete
という名前からするとヒストリからの補完もやっても不思議はないけど。
さすがにソースコード追いかける元気はない。
FORTRAN Compiler on IBM 704
継続行
継続行かどうかはこの辺で見ているっぽい。
CA113 CAL FT IF NOT BLANK, 4F13147
ARS 30 EXAMINE FIRST 4F13148
SUB L(C) CHARACTER TO 4F13149
TZE CA100 TEST FOR COMMENT CARD. 4F13150
TRA 1,4 * EXIT IF NEITHER BLANK NOR COMMENT, 4F13151
inrel vs motorola
なぜAT&T記法アセンブリは使うべきでないのか:
— 新山祐介 (Yusuke Shinyama) (@mootastic) November 19, 2022
- 混乱しやすい表記: 28, $28, ($28) で意味が違う
- オペランドの左右が逆
- $とか%の多用、Perlじゃないんだから
- movq, movl, movsbl, movzbl, movb
- どっちがわかりやすい? [edi + 8*ebx + 3] と 3(%edi,%ebx,8)https://t.co/Vl4GnylAXf
ちょっと前に
というのを見ていたのでこれを拾ったのかと思ったのだけど 元記事読んだら別物だった。
たぶん AT&T syntax is broken (2021) | Hacker News からかな。
んで色々書いてあったわけだけど
Why no one should use the AT&T syntax ever, for any reason, under any circumstances
AT&T is backwards
Having eaten the proverbial elephant, it is time to start addressing the smaller fry. Smaller fry: you have done an admirable job of thorning my side. Reader: following are reasons why the AT&T operand order is backwards.
x86限定の話ならわからんでもないけど
モトローラ(68000)は move.l src, dst
だったし
他にもあったよなあ(少数派ではあるだろうけど)。
他の主張も引っかかるところがあるけど、結局のところ
Intel is ubiquitous
Everybody uses Intel! And I mean, everybody. Every assembler, every disassembler, every reverse-engineering tool, every debugger. Documentation from Intel and AMD’s official manuals, as well as most of the unofficial ones. Inline assemblers for the D, Rust, and Zig reference compilers, and Microsoft’s C compiler.
この視点からの主張なのね。
the inventor of assembly language
アセンブリ言語つながりで。 実はあまり気にしたことがなかったのだけど、 アセンブリ言語にも発明者がいたわけで つい先日その方が亡くなったと。
アセンブリ言語の発明者、キャスリーン・ブースが死去 via Hacker Newshttps://t.co/hxZuRYB4fh
— 角 征典/Masanori Kado (@kdmsnr) October 29, 2022
- Computing Pioneer Who Invented the First Assembly Language Dies at Age 100 - Slashdot
- RIP: Kathleen Booth, the inventor of assembly language : programming
- RIP: Kathleen Booth, the inventor of assembly language - The Register
- programming - Who is credited for the creation of Assembly Language? - Retrocomputing Stack Exchange
とほほの8ビットアセンブラ入門
もう一つ。このツイートの数日前に同じ記事を見つけていたのだけど (書かれたのはずっと以前)
めも:とほほの8ビットアセンブラ入門 https://t.co/c3VGMw44gj
— sava (@lpproj) November 18, 2022
Simple 8-bit Assembler Simulatorというのがあるのか…
とほほの8ビットアセンブラ入門 - とほほのWWW入門 で紹介されているCPUのレジスタ構成(と名前)を見ると
名称 | ビット数 | 説明 |
---|---|---|
A | 8ビット | Aレジスタ。別名アキュムレータ。 |
B | 8ビット | Bレジスタ。ベースと呼ばれることも。 |
C | 8ビット | Cレジスタ。カウンターとして使われることが多い。 |
D | 8ビット | Dレジスタ。データを示す値として使われることが多い。 |
IP | 8ビット | インストラクションポインタ。 |
SP | 8ビット | スタックポインタ。 |
なんとなく8086っぽい名前と役割。
おまけ
All of the IBM assemblers for System/360, by default, have a label in column 1, fields separated by delimiters in columns 2-71, a continuation indicator in column 72 and a sequence number in columns 73-80. The delimiter for label, opcode, operands and comments is spaces, while individual operands are separated by commas and parentheses.
72桁縛りはここにも。
神奈川県民には分かる pic.twitter.com/vJ02GGYVdD
— 大神奈川 (@GreaterKanagawa) November 15, 2022
ええい、あっちへいけ。邪魔だ。うるさい。痒い。なんで俺ばかりこんな目にあわねばならない。畜生め。みんな死んじまえ。/加藤伸郎中尉 第七巻「豹鬼奮迅」
— レッドサンブラッククロスbot (@RSBC_bot) October 30, 2022
途中までまとめたものがいくつかあるんだけど、なんとなく調子が出ない。 季節のせいですかねえ…