ときどきの雑記帖 RE* (新南口)
Protector
Mermaid
flowchart描かせたときに、例えば分岐の線が直線じゃなくて曲線になるのが どうにも受け入れがたいのだけど、世間的にはそうじゃないんだろうか
J
Jも使える(書ける)ようになりたいと思ってはいるのだけど以下略
- Understanding-j: An introduction to the J programming language that gets to the | Hacker News
- bugsbugsbux/understanding-j: An introduction to the J programming language that gets to the point.
- [J (プログラミング言語) - Wikipedia](https://ja.wikipedia.org/wiki/J_(%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0%E8%A8%80%E8%AA%9E%29)
enshittification
The enshittification of tech jobs : r/programming
日々知らん単語に出会うなあ(元からあまり知らんけど😓)
- Enshittification - Wikipedia
- メタクソ化するTiktok:プラットフォームが生まれ、成長し、支配し、滅びるまで » p2ptk[.]org
- enshittificationの意味・使い方|英辞郎 on the WEB
WG 14
たまに眺めているのだけど、いくつか気になったものをメモ。
N3545 Allowing in ICE floating literals immediately converted to int
The only place floating, named, or compound literal constants of arithmetic type are allowed in integer constant expressinos is as immediate operands of casts. There are other operations that immediately convert the value to bool (or behave “as if”). Thus, those at the left are not allowed as ICE, while those at the right are:
! 1.0 ! (bool)1.0 1.0 && 0 (bool)1.0 && 0 1.0 || 0 (bool)1.0 || 0 1.0 ? 1 : 0 (bool)1.0 ? 1 : 0
左側の書き方は明確には許されていなかった?
Preserving LC_CTYPE at program start for UTF-8 locales
That problem has been identified, and sometime around 2014, some distributions started to ship a ”C.UTF-8” locale that has the same properties as the C locale (including in terms of character classification) except that the associated locale encoding is UTF-8.
That practice was upstreamed in GlibC 2.35 (in 2022). Both MUSL and Bionic (Android’s C library implementation) use a UTF-8 locale by default (in fact, that’s the only locale supported by Bionic).
C.UTF-8を公式のもの(?)にすると。
frexp and double-double (updates N3357
If value is not a floating-point number or if the integral power is outside the range of int, the results are unspecified.*)
double-doubleの意味するところがよくわからんのだけど、 frexpの第一引数の大きさがintで表せる範囲を超えたら? というのは確かに。
関数
最近xyzzy用に書いたもの(謎)
(defun todays-column ()
(nth (+ 4
(nth 3
(multiple-value-list (get-decoded-time))))
'("" "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M"
"N" "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z"
"AA" "AB" "AC" "AD" "AE" "AF" "AG" "AH" "AI")))
(defun todays-column2 ()
(nth
(nth 3
(multiple-value-list (get-decoded-time)))
'("" "E" "F" "G" "H" "I" "J" "K" "L" "M"
"N" "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z"
"AA" "AB" "AC" "AD" "AE" "AF" "AG" "AH" "AI")))
Perlで文字列をincrementすると面白い(謎)動作をするのだけど、
>perl -e "$v='Z'; print ++$v"
AA
一度に2とか3とかは増やせないのよね。
>perl -E "$v='E'; say($v++) for (1..31)"
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
AA
AB
AC
AD
AE
AF
AG
AH
AI
isNaN
数値判定 isNaNの罠に注意せよ! #JavaScript - Qiita
!isNaN(…):数値に変換できるか確認
罠。というかisNaNがどんな関数か誤解しているような…
awk
目的にもよるが、とにかく区切りたいだけなら自分は
— まじかんと (@tnacigam) May 5, 2025
head -n 999999 https://t.co/Js480VaSuE
それawkで(ry
>gawk -vsep="-----\n" "FNR==1 && NR>1 { print(sep) } 1" foo.txt bar.txt foo.txt
foo
-----
bar
-----
foo
printが自動的に最後に改行を付けるので指定時には不要っちゃ不要
新しめのgawkだとBEGINFILE/ENDFILEというルールを使う手もあるけど
>gawk -vsep="-----\n" "BEGINFILE {if (NR>1) print(sep)} 1" foo.txt bar.txt foo.txt
今回はあまりうれしくないなあ😓
ところでこれは上記の「グッズ」を作る途中での投稿かな?
ウエーン 実装します・・・(ちなみにBSDには標準ライブラリで便利関数があるっぽい https://t.co/JqoZ9l1gNM )
— Windymelt💀(めるくん)🚀❤️🔥 (@windymelt) May 5, 2025
便利関数とはどんな? とリンク先を見ると
The unvis(), strunvis() and strunvisx() functions are used to decode a visual representation of characters, as produced by the vis(3) function, back into the original form.
The unvis() function first appeared in 4.4BSD. The strnunvis() and strnunvisx() functions appeared in NetBSD 6.0 and FreeBSD 9.2.
ふむ。
Hugoメモ
排
図書館業界にかなり長い事いたけど。
— 庫ノ林 (@konobayashi) May 3, 2025
「本の排架が的確に素早く出来る」って、結構な技術だとわかった。
誰でも出来る作業じゃないんだ。
人手が足りなくて、事務の人にも、やり方を説明して手伝ってもらっていたんだけど、中には、「排架は苦手。つらい」って異動希望を出した人もいたんだ。😥
本題とずれますが「排」という字にこういう意味があるのを初めて知り驚きました。
— irf:.t (@nfdrtcknl7sl3ut) May 4, 2025
しかもどうやら中国語ではこっちの意味ばかりのようで、日本語で主になっている排斥などの意味では使ってなさそう?!
そういや配列(array)も中文表記だと排列だったような
からの
バレーボールは漢字で「排球」と書きますね。テニスの「庭球」、バスケットボールの「籠球」はフィールドや用具をイメージしやすいですが、「排球」はピンときません。語源を検索したら、選手が櫛の歯のように列を作ったようすを「排」と表現するようです。「ハイキュー‼︎」のハイが列だったとは…
— S4noS (@s4no_s) May 4, 2025
へー。 バレーボールが排球なのは知っていたけど そういうところから来た名前だったのか
360
正確に360度スキャンするための装置です(プラレール) pic.twitter.com/8cnonGorRz
— 鮪田カツオ (@maguroda_k) May 2, 2025
50
ニミッツ級原子力空母が就役してから50年
— ミリレポ (@sabatech_pr) May 5, 2025
1番艦のニミッツ(CVN-68)は1975年5月3日に就役した。
ニミッツは2026年5月に退役する予定pic.twitter.com/17G2gNE3bw
原子炉の炉心交換やらのタイミングでもっと新しい艦が 先に退役するかもしれないと聞いた覚えがあるけど、 結局順当(?)に1番艦が最初すか。 にしてもニミッツで艦齢50年…(遠い目
就役 | 1945年9月10日 |
退役 | 1992年4月11日 |
除籍 | 1997年3月17日 |
ミッドウェイより現役の期間長いんだ>ニミッツ