ときどきの雑記帖 RE* (新南口)
Ce qui ne passe pas dans ce qui passe
BackSpace
Firefox を使い続けているのは以前も書きましたが、
ついにこの日が…BackSpaceキーによる「戻る」操作、メジャーブラウザーから完全消滅【やじうまWatch】 - INTERNET Watch
BSキーで「戻る」のを結構多用していたので、 今回のアップデート後にBSキーを押下して 「あれ? 反応しない?」となることがここ数日で何回も。
慣れるまでにはしばらくかかりそう
ヘウレーカ!
終わってしまった。
『又吉直樹のヘウレーカ!』は、NHK Eテレで2018年4月4日から2021年3月24日まで放送されていた教養バラエティ番組で、又吉直樹の冠番組である。
わりと番組開始すぐから観ていたんだなあ>2018年4月放映開始
新年度からEテレの朝の番組の放送時間が変わります! |NHK_PR|NHKオンライン
お、「デザインあ」と「ピタゴラスイッチ」の時間も変わるのか。
gigazine
毎度のことだけど、元記事からの「抄訳」をそう書いていないのはいただけない。
[B! 開発] 世界中で利用される「D3.js」の開発者が10年間で学んだこととは? - GIGAZINE
世界中で利用される「D3.js」の開発者が10年間で学んだこととは? - GIGAZINE
◆「使用例」がツールの普及に役立つ ◆コミュニティとの交流はツールの改善に役立つ ◆90%のバグは10%のコードによって引き起こされる ◆インターネットは気分を害す ◆楽しい時間を過ごす
というのが挙げられているけど、元記事では倍の10項目ある。
10 Years of Open-Source Visualization / Mike Bostock / Observable
- Teaching is the most impactful aspect of tool building.
- Support is a powerful means of research.
- Beware bells and whistles: interaction, animation, and other technical whizbangery have a cost. 🧙♂️
- Visualization is a spectrum: from exploratory to explanatory.
- In most cases, working with data should be 80% of the work of visualization.
- Don’t commit to a specific visual form before seeing your data in it.
- 10% of code causes 90% of bugs.
- The internet will make you feel bad.
- Don’t go it alone.
- Try to have a good time.
各項目の本文の翻訳にも色々指摘はあるけど略。
システムコール
64-Bit Linux Return-Oriented Programming | Hacker News 経由で64-bit Linux Return-Oriented Programmingから。
この記事にある、Linuxシステムコールでの32bitと64bitの違いなんだけど
32-bit syscall | 64-bit syscall | |
---|---|---|
instruction | int $0x80 | syscall |
syscall number | EAX, e.g. execve = 0xb | RAX, e.g. execve = 0x3b |
up to 6 inputs | EBX, ECX, EDX, ESI, EDI, EBP | RDI, RSI, RDX, R10, R8, R9 |
over 6 inputs in RAM; | EBX points to them | forbidden |
example | mov $0xb, %eax | mov $0x3b, %rax |
lea string_addr, %ebx | lea string_addr, %rdi | |
mov $0, %ecx | mov $0, %rsi | |
mov $0, %edx | mov $0, %rdx | |
int $0x80 | syscall |
システムコールの番号が違うとか、呼び出しに使う命令が違うのは知っていたけど、
over 6 inputs
のところ64bitではforbidden
なんですな。
32bit版ではできるっぽいけど、7個以上の引数をとるシステムコールってなんだろう?
64ビット版はこういう
Linux System Call Table for x86 64 · Ryan A. Chapman
ページを見つけられて、6個の引数をとるシステムコールがわかったけど。
「見境なく」
アーキテクチャーによっては、ここに記載されていない他のレジスターが見境なく上書きされる場合もある。
syscall(2) - Linux manual page
some architectures may indiscriminately clobber other registers not listed here.
その訳にちょっとウケた>「見境なく上書き」
grep
確かにGNU拡張なしのBREで書くのは大変だけど
grep --only-matching '[Tt]he [^ ][^ ]*' /COPYRIGHT
これはともかく
grep --only-matching 'http[s]*://[^ ]*' /etc/motd
これはどうなんだろう… (入力を考えれば期待通りの結果は得られるし、他に書きようもなさそうだしなあ)
それと元記事 Practice using the Linux grep command | Opensource.com ではERE使っているっぽいんだけど、デフォルトでそうする設定とかあったっけ?
The . wildcard can be modified to represent more than one character with these notations:
? matches the preceding item zero or one time
* matches the preceding item zero or more times
+ matches the preceding item one or more times
{4} matches the preceding item up to four (or any number you enter in the braces) times
あと、grepに渡すパターンをクォートしないとか、不必要なバックスラッシュをやたらとつけるのも 気に入らない😄 (-e オプションも使ってほしいところだけど見逃す)
Hugo メモ
Hugo Markdown でブロック要素にクラス属性を付与する | text.Baldanders.info
から。 リリースノート真面目に見ていなかった。
Release v0.81.0 · gohugoio/hugo
Attribute Lists after Markdown Blocks
Hugo already supports adding attribute lists (e.g CSS classes) after titles. We now also allow adding attribute lists after Markdown blocks, e.g. tables, lists, paragraphs etc.:
> foo
> bar
{.myclass}See Configure Goldmark.
New in v0.81 In Hugo 0.81.0 we added support for adding attributes (e.g. CSS classes) to Markdown blocks, e.g. tables, lists, paragraphs etc.
There are some current limitations: For tables you can currently only apply it to the full table, and for lists the ul/ol-nodes only, e.g.:
ふむ。