ときどきの雑記帖 RE* (新南口)
シロツメクサの花が咲いたら
磁気キップ
東武が「磁気きっぷ」あと1年で全廃へ 定期券はすでに廃止済み いよいよ本格化「QRきっぷ」への準備 | 乗りものニュース
ほかの私鉄にも広がっていくんだろうなあ。次はどこだろう (小田急か西武あたりか)?
パーフェクトストーム
「A perfect storm」の意味は?「完璧な嵐」って…?【1分英会話】 | Ray(レイ)
「パーフェクトストーム」ネタは何回か書いているけど
技術書ライブラリー
「技術書ライブラリー」へ行ってきた - Magnolia Tech
メモ
Mojo
ほう>1.0β
メモ
- 万国Excel事情(欧州)|石田ストーン
- 【Microsoft】AIに仕事を「丸投げ」できる時代へ! 新機能『Copilot Cowork』発表。PCを閉じてもタスクが完了、チーム独自のスキルを共有資産化する“自律型AI” | DXマガジン
- Excel自動化を AI に丸投げしたかった話 — openpyxl / Power Query / VBA でどこまで任せられたか
- 【PDFを1枚ずつ開いて中身確認してる人へ】「Alt」+「P」を押すだけで、開かなくても中身が読める|時短ラボ
- 「Claude Mythos」が15年前のバグも発掘、Firefoxの修正数が一挙に15倍超に - ITmedia AI+
- Behind the Scenes Hardening Firefox with Claude Mythos Preview - Mozilla Hacks - the Web developer blog
gm2
GNU のだけなのかはわからんけど、プラグマ(pragma)があるらしい>Modula-2
A Portable Pragma Specification and its Pragma Parser for Modula-2 and other Wirthian Languages.
ふむ
(Re)make Regexp in Ruby:
リポジトリ見ててもなんかプルリクエストもissue放置っぽいしなあ>鬼雲
- (Re)make Regexp in Ruby: Democratizing internals for the JIT
- GitHub - makenowjust/naraku: next Ruby Regexp engine - GitHub
WG 14
ちょっと(?)昔のから
N3781
N3781 2026/03/01 Meneide, Overview of Closures in C Presentation, r0
これまでの実装例(とそれらの長所短所)がいろいろ書かれていておもしろい。 PDFもあるけど Functions with Data - Closures in C an n3780 overview から
Four Distinct Existing Practices
- Plain C
- GNU Nested Functions (GCC-specific, Clang refuses to implement)
- Apple Blocks (Clang-specific, removed from GCC after NeXT Support died off slowly)
- Lambdas
Honorable Mention でBorland Cのclosureに言及している
Borland C’s closure function pointer annotation
- Lambdas: C++ Compatibility, Expression-Based, “Shorthand”
- Capture Functions: GNU Nested Function Familiarity, Declaration-Based, “Longform”
- Forward Parameter References through Retroactive Scoping
- N3811: #embed Synchronization
- N3810: _Any_func* - A Universal Function Pointer Storage Type
新刊近刊
火縄銃をめぐる驚異のリバースエンジニアリング
書店で見かけた(が買っていない)本。
SUPERサイエンス 火縄銃をめぐる驚異のリバースエンジニアリング | 齋藤勝裕 |本 | 通販 | Amazon
「ネジ」すら知らぬ時代、日本人はどうやって鉄砲を国産化したのか?
1543年の種子島銃伝来。それは単なる武器の輸入ではなく、日本独自の「リバースエンジニアリング」の幕開けでした。 本書は、顕微鏡も測定器もない時代に、職人たちが五感を研ぎ澄ませて構造を解析し、 西洋技術を「再創造」していった奇跡のプロセスを解き明かします。
刀剣鍛造で培われた高度な製鉄技術と、和算による数理的アプローチ、 そして藩を挙げた分業・量産システム。そこには現代のエンジニアリングにも通じる、 日本人の創造力のDNAが息づいています。戦国の工房から明治の工業化へと続く 「科学する心」の源流に迫る一冊です。
屋鋪
書店で見かけたような気もする(たぶん発売直後くらい)>ノーサインで走れ!
awk
gawk
COVFMTに数値と関係ない書式指定を入れると落ちるという話
FWIW, both Brian Kernighan’s awk and mawk also core dump on your example. :-)
ちょっと笑った。
新正規表現ライブラリでバグ
#!/bin/bash
set -e
PROG='match($0, /^.*[^0-9]/) { print substr($0, RSTART, RLENGTH); next
} { print "NO MATCH" }'
echo '12.4alpha9' | gawk "$PROG"
echo '12.4alpha9' | GAWK_GNU_MATCHERS=1 gawk "$PROG"
# macOS's /usr/bin/awk version 20200816
echo '12.4alpha9' | awk "$PROG"
# OUTPUT:
# NO MATCH
# 12.4alpha
# 12.4alpha
別の人の
$ echo '1a' | awk 'match($0, /.*[^0-9]/) { print substr($0, RSTART, RLENGTH) }'
a
$ echo '1a' | GAWK_GNU_MATCHERS=1 awk 'match($0, /.*[^0-9]/) { print substr($0, RSTART, RLENGTH) }'
1a
も見るに(マッチに失敗した後の)バックトラックでなにかミスってるんかな
_GL_ATTRIBUTE_COUNTED_BY
WG 14で何度か見かけたアレを使うようにしたらしい
よくみると dfa.h « support - gawk.git - gawk で
/* Needed when Gnulib is not used. */
#ifndef _GL_ATTRIBUTE_MALLOC
# define _GL_ATTRIBUTE_MALLOC
# define _GL_ATTRIBUTE_DEALLOC(f, i)
# define _GL_ATTRIBUTE_DEALLOC_FREE
# define _GL_ATTRIBUTE_RETURNS_NONNULL
# define _GL_ATTRIBUTE_COUNTED_BY(x)
#endif
と空になる定義。気になったのでgnulibを追いかけると
gnulib/m4/gnulib-common.m4
AH_VERBATIM([attribute],
[/* Attributes. */
/* Define _GL_HAS_ATTRIBUTE only once, because on FreeBSD, with gcc < 5, if
<config.h> gets included once again after <sys/cdefs.h>, __has_attribute(x)
expands to 0 always, and redefining _GL_HAS_ATTRIBUTE would turn off all
attributes. */
につづくところで
/* _GL_ATTRIBUTE_COUNTED_BY (C) declares that the number of elements of
the field is given by C, which must be another field in the same struct.
The programmer is responsible for guaranteeing some invariants; see
<https://gcc.gnu.org/onlinedocs/gcc/Common-Attributes.html> for details. */
/* Applies to struct fields of type array or pointer (to data). */
#ifndef _GL_ATTRIBUTE_COUNTED_BY
/* This attributes is supported
- for fields of array type: by gcc >= 16, clang >= 18,
- for fields of pointer type: by gcc when <https://gcc.gnu.org/PR125072>
will be fixed, clang >= 19. */
# if defined __clang__ && __clang_major__ >= 19
# define _GL_ATTRIBUTE_COUNTED_BY(c) __attribute__ ((__counted_by__ (c)))
# else
# define _GL_ATTRIBUTE_COUNTED_BY(c)
# endif
#endif
現状clangでないと空になるような定義だった
たぶん前回
あれ、コミットが消えた?
と書いたのに対応しているもの。
- [PATCH 8/8] regex: fix glibc bug 20381
- https://lists.gnu.org/archive/html/bug-gnulib/2026-05/msg00035.html
its use of re.fastmap is undocumented. Possibly this means my regex fix just lucked out and is not really a fix. I’ll look into it.
スレッドのやり取りを見ると表に出すべきでない内部情報を陽に使ったパッチなので物言いがついたぽい
coreutils/lib/mcel.h
/* Multi-byte characters, Error encodings, and Lengths (MCELs)
Copyright 2023-2025 Free Software Foundation, Inc.
release-6
[SCM] gawk branch, feature/release-6, updated. gawk-4.1.0-6526-g1f92152e
ブランチ名のfeature/release-6が気になったので遡って調べたら3月に作られたものだった
[SCM] gawk branch, feature/release-6, created. gawk-4.1.0-6278-g0584485d