ときどきの雑記帖 RE* (新南口)
迫る初夏
アカツメクサというのもあるのを初めて知った。 シロツメクサの漢字表記はちょっと前に。
和名のシロツメクサは、江戸時代にオランダからガラス製品を輸入する際
— キール・インペリアル@ロイヤルの本場 (@amberkiel1) May 8, 2026
ガラスを衝撃から守る為に、乾燥した葉を敷き詰めて輸入した事から「詰め草」
現在言うところ新聞紙ないしプチプチの代わりの緩衝材として使用され、「詰草」という日本語になりました
この種は白い花を付けるので白詰草ですね
赤詰草の白花もありますね
— ぽんポンぽん (@ponpon5ponpon) May 9, 2026
白詰草(クローバー)とは
かなり姿が違いますが
こちらも綺麗ですね
昔は物を搬送するときに
緩衝材としてこの植物を使ったので
「詰草」という名前があります
ツメクサには「爪草」と書く他の物もあります葉が切った爪のように細いのでこの名があります
レガシークエル
という言葉があるらしい (意味は各自で調べて😄)
メモ
- マンガ版『パトレイバー』ゆうきまさみ先生による32年ぶり完全新作読切 来週公開!(1/2 ページ) | マグミクス
- 天山広吉が現役引退を表明、新日本一筋35年「プロレスラーになれて良かった」8・15引退試合 モヒカン&強面で人気者「テンコジ」「蝶天」など名タッグ/ファイト/デイリースポーツ online
- PASMOのチャージ、16日夜不能に。再発行・払い戻しも - トラベル Watch
gnulib
コンパイラーによってあれやらこれの(謎) 置ける場所に違いがあったりするらしい。 めんどくせー
gnulib-common.m4 « m4 - gnulib.git - gnulib - GNU portability library
#ifdef __cplusplus
# define CC "C"
#else
# define CC
#endif
#define ND [[__nodiscard__]]
#define WUR __attribute__((__warn_unused_result__))
| gcc | clang | g++ | clang++ | |
|---|---|---|---|---|
| ND int foo (int); | ||||
| int ND foo (int); | warn | error | warn | error |
| int foo ND (int); | ||||
| int foo (int) ND; | warn | error | warn | error |
| gcc | clang | g++ | clang++ | |
|---|---|---|---|---|
| WUR int foo (int); | ||||
| int WUR foo (int); | ||||
| int fo1 WUR (int); | error | error | error | error |
| int foo (int) WUR; |
| gcc | clang | g++ | clang++ | |
|---|---|---|---|---|
| ND extern CC int foo (int); | error | error | ||
| extern CC ND int foo (int); | error | error | ||
| extern CC int ND foo (int); | warn | error | warn | error |
| extern CC int foo ND (int); | ||||
| extern CC int foo (int) ND; | warn | error | warn | error |
| gcc | clang | g++ | clang++ | |
|---|---|---|---|---|
| WUR extern CC int foo (int); | warn | |||
| extern CC WUR int foo (int); | ||||
| extern CC int WUR foo (int); | ||||
| extern CC int foo WUR (int); | error | error | error | error |
| extern CC int foo (int) WUR; |
| gcc | clang | g++ | clang++ | |
|---|---|---|---|---|
| ND EXTERN_C_FUNC int foo (int); | error | error | ||
| EXTERN_C_FUNC ND int foo (int); | ||||
| EXTERN_C_FUNC int ND foo (int); | warn | error | warn | error |
| EXTERN_C_FUNC int foo ND (int); | ||||
| EXTERN_C_FUNC int foo (int) ND; | warn | error | warn | error |
| gcc | clang | g++ | clang++ | |
|---|---|---|---|---|
| WUR EXTERN_C_FUNC int foo (int); | warn | |||
| EXTERN_C_FUNC WUR int foo (int); | ||||
| EXTERN_C_FUNC int WUR foo (int); | ||||
| EXTERN_C_FUNC int fo2 WUR (int); | error | error | error | error |
| EXTERN_C_FUNC int foo (int) WUR; |
#ifdef __cplusplus
# define CC "C"
#else
# define CC
#endif
#define BD [[__deprecated__]]
#define AD __attribute__ ((__deprecated__))
| gcc | clang | g++ | clang++ | |
|---|---|---|---|---|
| BD extern CC int var; | error | errorn | ||
| extern CC BD int var; | error | error | ||
| extern CC int BD var; | warn | error | warn | error |
| extern CC int var BD; |
| gcc | clang | g++ | clang++ | |
|---|---|---|---|---|
| AD extern CC int var; | warn | |||
| extern CC AD int var; | ||||
| extern CC int AD var; | ||||
| extern CC int var AD; |
| gcc | clang | g++ | clang++ | |
|---|---|---|---|---|
| BD extern CC int z[]; | error | error | ||
| extern CC BD int z[]; | error | error | ||
| extern CC int BD z[]; | warn | error | warn | error |
| extern CC int z1 BD []; | ||||
| extern CC int z[] BD; | warn | error | error |
| gcc | clang | g++ | clang++ | |
|---|---|---|---|---|
| AD extern CC int z[]; | warn | |||
| extern CC AD int z[]; | ||||
| extern CC int AD z[]; | ||||
| extern CC int z2 AD []; | error | error | error | error |
| extern CC int z[] AD; |
WG 14
| N3889 | 2026/05/10 | Meneide, _Any_func* - - A Universal Function Pointer Storage Type, r5 |
| N3888 | 2026/05/10 | Meneide, Expression Evaluation and Access in _Generic, r1 |
| N3880 | 2026/05/10 | Munger, Memory allocation with size feedback v3 |
why c function pointer is not compatible with void pointer
void *を関数ポインターにキャストするのは
その結果が保証されているわけではない。
というのはそこそこ知られていることではあるけれども、
なんでだろうと思ってえーあいに聞いたところ
「void *はオブジェクト(データ)を指し示すものだけど
関数ポインターはオブジェクトではないから」
みたいな回答が返ってきた。
それっぽい回答だなと思いつつもう少し突っ込んでみると、 POSIX のdlym(3)の項に そういう変換ができるようにすべし みたいなことが書いてあると。
EXAMPLES
The following example shows how dlopen() and dlsym() can be used to access either function or data objects. For simplicity, error checking has been omitted.
void *handle; int *iptr, (*fptr)(int); /* open the needed object */ handle = dlopen("/usr/home/me/libfoo.so", RTLD_LOCAL | RTLD_LAZY); /* find the address of function and data objects */ *(void **)(&fptr) = dlsym(handle, "my_function"); iptr = (int *)dlsym(handle, "my_object"); /* invoke function, passing value of integer as a parameter */ (*fptr)(*iptr);
RATIONALE
The ISO C standard does not require that pointers to functions can be cast back and forth to pointers to data. Indeed, the ISO C standard does not require that an object of type
void *can hold a pointer to a function. Implementations supporting the XSI extension, however, do require that an object of typevoid *can hold a pointer to a function. The result of converting a pointer to a function into a pointer to another data type (exceptvoid *) is still undefined, however. Note that compilers conforming to the ISO C standard are required to generate a warning if a conversion from avoid *pointer to a function pointer is attempted as in:fptr = (int (*)(int))dlsym(handle, "my_function");Due to the problem noted here, a future version may either add a new function to return function pointers, or the current interface may be deprecated in favor of two new functions: one that returns data pointers and the other that returns function pointers.
新刊近刊
[最速入門] ChatGPTに任せる Excelマクロ&VBA 面倒なプログラミングは秒で片づけよう
— 大村あつし@ChatGPTに任せるExcelマクロ&VBA (@ash_omurah) May 12, 2026
の予約が始まりました
本書は #ChatGPT の登場によって人の役割は「作業」から「目的の提示」に変わった事を実感できる画期的な1冊です(自画自賛ですみません😅)
そして #VBA #マクロ ×…
awk
CONVFMT
CONVFMTに数値と関係ない書式指定を設定するとどうなるか。 POSIX的にはどうなんだろうと調べてみると、 言及してはいても
The Open Group Base Specifications Issue 8
A numeric value that is exactly equal to the value of an integer (see 1.1.2 Concepts Derived from the ISO C Standard) shall be converted to a string by the equivalent of a call to the sprintf function (see String Functions) with the string “%d” as the fmt argument and the numeric value being converted as the first and only expr argument. Any other numeric value shall be converted to a string by the equivalent of a call to the sprintf function with the value of the variable CONVFMT as the fmt argument and the numeric value being converted as the first and only expr argument. The result of the conversion is unspecified if the value of CONVFMT is not a floating-point format specification. This volume of POSIX.1-2024 specifies no explicit conversions between numbers and strings. An application can force an expression to be treated as a number by adding zero to it, or can force it to be treated as a string by concatenating the null string ("") to it.
The result of the conversion is unspecified if the value of CONVFMT is not a floating-point format specification.
MinRX
パッチが出ていたけど
Subject: [PATCH] Fix bug in charset that caused incorrect firstbytes computation
diff --git a/charset.c b/charset.c
index 952828e..d2df563 100644
--- a/charset.c
+++ b/charset.c
@@ -8990,32 +8990,18 @@ charset_finalize(charset_t *set)
qsort(set->items, set->nelems,
sizeof(set_item), item_compare_for_sorting);
- // condense it
+ // coalesce adjacent items that have no gaps between them (or that actually overlap)
+ #ifndef MAX
+ #define MAX(A, B) ((A) >= (B) ? (A) : (B))
+ #endif
set_item *items = set->items;
- for (i = 0, j = 1; j < set->nelems; i++, j++) {
- bool need_shift = false;
- if (items[i].start == items[j].start && items[i].end == items[j].end) {
- need_shift = true;
- } else if (items[i].end + 1 == items[j].start) {
- items[i].end = items[j].end;
- need_shift = true;
- } else if (items[i].start < items[j].start && items[i].end > items[j].end) {
- need_shift = true;
- } else if ( items[i].start <= items[j].start
- && items[i].end > items[j].start
- && items[j].end >= items[i].end) {
- items[i].end = items[j].end;
- need_shift = true;
- }
- if (need_shift) {
- for (size_t k = j + 1; k < set->nelems; j++, k++)
- items[j] = items[k];
-
- set->nelems--;
- i--; // compensate for loop, continue checking at current position
- j = i + 1;
- }
- // otherwise, just continue around the loop
+ if (set->nelems != 0) {
+ for (i = 1, j = 1; j < set->nelems; j++)
+ if (items[i - 1].end + 1 >= items[j].start)
+ items[i - 1].end = MAX(items[i - 1].end, items[j].end);
+ else
+ items[i++] = items[j];
+ set->nelems = i;
}
set->nelems8bit = set->nelems;
for (size_t i = 0; i < set->nelems; i++) {
なんでこれで治るの?🤔
misc
- Re: spurious warning for exp() underflow
- split: allocate space for NUL terminator in CSV mode by millert ・ Pull Request #266 ・ onetrueawk/awk ・ GitHub
マ
こんばんは^^
— maru@mixi (@marumixi) May 10, 2026
初日に劇場で見ていましたが、観客全員、「えーっ」という声が囁かれました。(;^_^A
ざわざわしましたね。😅
ざわざわ…というか
「…マ?」
みたいな反応だったかなあ 自分の周りでは
あとイラストではジョリバを探した(笑)
全部やった事ある世代の方
— SUKEPAPA(すけぱぱ) (@sukesankoba) May 12, 2026
いますでしょうか? pic.twitter.com/cMfRuPihtg
全部やった😄 インベーダー以外の3代は家の近くにあった 駄菓子屋の店頭に置かれてたな
Q
昔のWindowsのCD-ROMとか光学ドライブって「Q:」ドライブだったことが多いと思うのだけど、何か理由があるのかな🤔 pic.twitter.com/zz6KimDl09
— 倉津ゆえ (@YueKuratsu) May 11, 2026
mermaid
railroad diagrams have come to mermaid!https://t.co/0XN9T0QJKh
— Yudai TAKADA / ydah (@ydah_) May 11, 2026
偉業だ… これで次のバージョンからMermaidだけでこういうのが書ける… https://t.co/p8m8cJp0IV pic.twitter.com/d0V4HSIRXx
— にゃんだーすわん (@tadsan) May 11, 2026
フローチャートの分岐もどうにかならんかなあ(他人頼み)