ときどきの雑記帖 RE* (新南口)
The Cable Guy
訂正
哀戦士
まあ哀戦士ではズゴックは降下部隊にはいなかった(たぶん)けど。
こう書いていたけど
#音楽との相性が抜群すぎる映画
— コバキンCG(kobakinCG) (@kobakin1967) March 23, 2024
ジャブローでの「哀戦士」の使い方は秀逸 pic.twitter.com/YyJTTRkYdK
「機動戦士ガンダムII 哀戦士編」
— PAL🇯🇵 (@bar_trek) August 25, 2024
昨日のアニメ・特撮恥ずかしい&カッチョエエ歌ナイト、思てた以上に盛り上がったのだが、俺が無茶苦茶上がるジャブロー降下シーン、皆しれ~ッとしとるねん。
世代の違いか。。。。
新作カット殆ど無いのにコノ演出クオリティの高さよ。… pic.twitter.com/Bg8UA7TuXj
降下部隊にズゴックいました (「降りられるのかよ」のちょっとあと)。
3199
3199での
そのあんちゃんが乗るやっぱり暗黒星団帝国らしくない 戦艦とかその戦艦が繰り出す謎の超兵器とか 謎のワザとか。
どっちも「永遠に」で登場してたようです。 すっかり忘れていた
ガンダム@テレ玉
ザンジバル、追撃
- スレッガーさん
- フラミンゴ
- Gブル・イージー
- ビグロ
- リック・ドム
演じている声優が違うというのもあるんだろうけど、 劇場版とかなり印象が違う>スレッガーさん
次回は「強行突破作戦」
タッチ決済
みなとみらい線全駅でタッチ決済などによる乗車の実証実験 - 12月4日からスタート | マイナビニュース https://news.mynavi.jp/article/20241128-3073266/
同実証実験については、みなとみらい線と相互直通運転を行う東急電鉄と連携しており、2社の路線を相互に跨り利用することが可能。
そういや東急でのクレジットカードを使ったタッチ決済は以前からも使えていたけど 「東急線内に限る」みたいな但し書きがあって気になっていたんだよね。 相互乗り入れ先も対象にするのは大変だろうしな (結構前にSUICA等のデバッグ云々で話題になったアレ)とは 思っていたけど、みなとみらい線もダメだったんか?
確かに別の会社の別路線ではあるけど
誤訳
スクリプトのユーザー入力を取得する - Office Scripts | Microsoft Learn
入力の制限
最後のパラメーターは ExcelScript.Workbook の型にする必要があります。 パラメーター名は関係ありません。
Get user input for scripts - Office Scripts | Microsoft Learn
Type restrictions The first parameter must be of type ExcelScript.Workbook. Its parameter name doesn’t matter.
なんでこうなった
Hyrum’s Law
I recently stumbled upon an intriguing comment while exploring the Go codebase. “Due to Hyrum’s law, this text cannot be changed.”
Hyrum’s Lawってなんじゃ? と思って調べた。 言ってる内容はごもっとも。
- Hyrum’s Law (The Law of Implicit Interfaces) について - A Memorandum
- ハイラムの法則 Hyrum’s Law についてのつぶやき
- ハイラムの法則とそれにまつわる私の経験|Naoki SASAKI
dumpster fire
dumpsterはアメリカでよくある(?)でかいゴミ箱で、 それが燃えているということで 大惨事とか大混乱といった意味だそうな
- Python dependency management is a dumpster fire : r/programming
- Niels Cautaerts - Python dependency management is a dumpster fire
- dumpster fire | アメリカ新語 | 情報・知識&オピニオン imidas - イミダス
LR
- Optimising LR Automata : r/programming
- Optimising LR Automata
- Optimising Recursive Ascent Parsing | Whatever
- Optimising Recursive Ascent Parsing, Part 2 | Whatever
- Optimizing directly executable LR parsers | SpringerLink
- Even faster lr parsing - Horspool - 1990 - Software: Practice and Experience - Wiley Online Library
- even_faster_lr_parsing.pdf
自動修正
【セキュリティ ニュース】文字列関数のバグを自動修正する技術 - NTTと早大が共同開発(1ページ目 / 全1ページ):Security NEXT
開発者がプログラム内の関数で検索や置換をはじめとする文字列操作において、 正規表現の指定をはじめとするパラメータ設定全般におけるバグを分析し、修正する技術を開発したもの。
従来より正規表現の修正に特化し、正規表現の処理でサービス拒否に陥る「ReDoS」の修正技術について研究を進めてきたが、 文字列関数を対象として修正できるようカバレッジを拡大した。
早大での発表のページがここかな
インジェクション攻撃による被害を防ぐためのソフトウェア修正技術を 世界にさきがけて実現 – 早稲田大学 研究活動
んで、前にも同様の発表をしていなかったっけ? と調べてみると
この辺か
Sort order
Xユーザーのふじた_🐱♨️💻雑用係さん:
なにごと?と思ったら、ja_JP.utf8 な照合順序が US-ASCII にシンボリックリンクで、ASCII外ソート壊滅と😨https://t.co/thu1Y6eFyI https://t.co/3lbazTNWNZ
— ふじた_🐱♨️💻雑用係 (@nfujita55a) November 20, 2024
- [B! mac] macOS の sort コマンドでカタカナとひらがなのソート順が崩れる原因は?
- command line - macOS の sort コマンドでカタカナとひらがなのソート順が崩れる原因は? - スタック・オーバーフロー
文字列の長さで~というのがちょっと引っかかったので(ry
この動作はstrcollの実装からだよなあとまずはcoreutilsのsortのソースを見たら
coreutils/src/sort.c at master · coreutils/coreutils · GitHub
else
{
/* Locale-dependent string sorting. This is slower than
C-locale sorting, which is implemented below. */
if (tlena == 0)
diff = - NONZERO (tlenb);
else if (tlenb == 0)
diff = 1;
else
diff = xmemcoll0 (ta, tlena + 1, tb, tlenb + 1);
}
coreutils/src/sort.c at master ・ coreutils/coreutils ・ GitHub
else if (hard_LC_COLLATE)
{
/* xmemcoll0 is a performance enhancement as
it will not unconditionally write '\0' after the
passed in buffers, which was seen to give around
a 3% increase in performance for short lines. */
diff = xmemcoll0 (a->text, alen + 1, b->text, blen + 1);
}
ちょっと違っていた。 もっともその実装を追いかけていくと結局strcollに行きつくんだけど
gnulib/lib/xmemcoll.c at master · coreutils/gnulib
/* Compare S1 (with length S1LEN) and S2 (with length S2LEN) according
to the LC_COLLATE locale. S1 and S2 do not overlap, and are not
adjacent. Temporarily modify the bytes after S1 and S2, but
restore their original contents before returning. Report an error
and exit if there is an error. */
int
xmemcoll (char *s1, size_t s1len, char *s2, size_t s2len)
{
int diff = memcoll (s1, s1len, s2, s2len);
int collation_errno = errno;
if (collation_errno)
collate_error (collation_errno, s1, s1len, s2, s2len);
return diff;
}
/* Compare S1 (a memory block of size S1SIZE, with a NUL as last byte)
and S2 (a memory block of size S2SIZE, with a NUL as last byte)
according to the LC_COLLATE locale. S1SIZE and S2SIZE must be > 0.
Report an error and exit if there is an error. */
int
xmemcoll0 (char const *s1, size_t s1size, char const *s2, size_t s2size)
{
int diff = memcoll0 (s1, s1size, s2, s2size);
int collation_errno = errno;
if (collation_errno)
collate_error (collation_errno, s1, s1size - 1, s2, s2size - 1);
return diff;
}
gnulib/lib/memcoll.c at master · coreutils/gnulib · GitHub
/* Compare S1 (with size S1SIZE) and S2 (with length S2SIZE) according
to the LC_COLLATE locale. S1 and S2 are both blocks of memory with
nonzero sizes, and the last byte in each block must be a null byte.
Set errno to an error number if there is an error, and to zero
otherwise. */
static int
strcoll_loop (char const *s1, size_t s1size, char const *s2, size_t s2size)
{
int diff;
while (! (errno = 0, (diff = strcoll (s1, s2)) || errno))
{
/* strcoll found no difference, but perhaps it was fooled by NUL
characters in the data. Work around this problem by advancing
past the NUL chars. */
size_t size1 = strlen (s1) + 1;
size_t size2 = strlen (s2) + 1;
s1 += size1;
s2 += size2;
s1size -= size1;
s2size -= size2;
if (s1size == 0)
return - (s2size != 0);
if (s2size == 0)
return 1;
}
return diff;
}
/* Compare S1 (with length S1LEN) and S2 (with length S2LEN) according
to the LC_COLLATE locale. S1 and S2 do not overlap, and are not
adjacent. Perhaps temporarily modify the bytes after S1 and S2,
but restore their original contents before returning. Set errno to an
error number if there is an error, and to zero otherwise. */
int
memcoll (char *s1, size_t s1len, char *s2, size_t s2len)
{
int diff;
/* strcoll is slow on many platforms, so check for the common case
where the arguments are bytewise equal. Otherwise, walk through
the buffers using strcoll on each substring. */
if (s1len == s2len && memcmp (s1, s2, s1len) == 0)
{
errno = 0;
diff = 0;
}
else
{
char n1 = s1[s1len];
char n2 = s2[s2len];
s1[s1len] = '\0';
s2[s2len] = '\0';
diff = strcoll_loop (s1, s1len + 1, s2, s2len + 1);
s1[s1len] = n1;
s2[s2len] = n2;
}
return diff;
}
/* Compare S1 (a memory block of size S1SIZE, with a NUL as last byte)
and S2 (a memory block of size S2SIZE, with a NUL as last byte)
according to the LC_COLLATE locale. S1SIZE and S2SIZE must be > 0.
Set errno to an error number if there is an error, and to zero
otherwise. */
int
memcoll0 (char const *s1, size_t s1size, char const *s2, size_t s2size)
{
if (s1size == s2size && memcmp (s1, s2, s1size) == 0)
{
errno = 0;
return 0;
}
else
return strcoll_loop (s1, s1size, s2, s2size);
}
よく考えたら、collation orderが決まってない文字同士は同じorderになるだろうから 結局文字列の長さで比較結果が決まるということかと納得
新刊近刊
awk
今週も特に動きはなし。 あ、goawkにあったか
GNU Shepherd
GNUのリポジトリ眺めていたらGNU Shepherdという 見慣れない名前を見かけたので どんなものかと README - shepherd.git - GNU Shepherd を読むと
The GNU Daemon Shepherd or GNU Shepherd is a service manager written in Guile that
なるほど。それでShepherd。
FORTRAN Compiler on IBM 704
Hugo メモ
lint
あー、プログラミングの ‘lint(er)’ って、なんで「毛玉(取り機)」なんだろう、なんとなくイメージは分かるけど…… くらいの理解だったんだけど、起源を調べると ‘yacc’ のデバッグのために作ったからなんだって。 ‘yak ’ (ヤク)の毛玉取りってことね。洒落てんな!
— 石橋秀仁 (@zerobase) November 29, 2024
yaccのデバッグのためというのは初耳な気がしたので調べてみると うぃきぺの英語版に記述があるっすな
Stephen C. Johnson, a computer scientist at Bell Labs, came up with the term “lint” in 1978 while debugging the yacc grammar he was writing for C and dealing with portability issues stemming from porting Unix to a 32-bit machine.[5][2] The term was borrowed from the word lint, the tiny bits of fiber and fluff shed by clothing, as the command he wrote would act like a lint trap in a clothes dryer, capturing waste fibers while leaving whole fabrics intact. In 1979, lint programming was used outside of Bell Labs for the first time, in the seventh version (V7) of Unix.
んで
Lint trapって、洗濯機のくず取りネットから来てるということですhttps://t.co/glsNaLNYWf
— Ryuichi KUBUKI 久富木 隆一 (@ryukbk) November 29, 2024
もとはlint trapだったのが略されたというのは自分にも聞いた覚えがあって、 例によって(謎)jargon file辺りだろうと lint を見てみたら全然違っていたでござるの巻。
どこで見た(聞いた)んだろうか
ゴジラ対サガ
佐賀県庁新館展望ホールに登ると外からゴジラが覗いていて割とビックリする#ゴジラ対サガ #ゴジラ #GODZILLA pic.twitter.com/LU6nuri4TC
— まなしな (@soundwave0628) November 30, 2024
後ろ姿
三毛猫の後ろ姿 pic.twitter.com/UcVxkrXvP9
— おあげ🍘 (@oage_cat) November 30, 2024