ときどきの雑記帖 RE* (新南口)
Footfall
仕事猫
ふと気になって調べてみたら、 着ぐるみ仕事猫はデビューしたばかりだったようだ。
羽田空港でヨシ! “仕事猫”きぐるみが国土交通省のイベントに初登場決定 「フェスティバルをにぎやかしたい」(1/2 ページ) - ねとらぼ
9月30日に国土交通省が羽田空港で実施する「空の日」フェスティバルに、“仕事猫”のきぐるみが初登場します。空港の現場でもヨシ!
そんな仕事猫は2022年から国土交通省や農林水産省とコラボしたグッズの配布などを行っており、 今回はついにきぐるみ化が決定。国土交通省のイベントへ参加する運びとなりました。 初めての参加となり、「空の日フェスティバルをにぎやかしたい」としています。
羽田→川崎→横浜で次は? というのは 国土交通省 関東地方整備局 港湾空港部(@mlit_kanto_port)さん / X を追いかければいいんだろうか。
工事安全啓発ポスターから1年。
— 国土交通省 関東地方整備局 港湾空港部 (@mlit_kanto_port) September 21, 2023
イラストでないリアル?!の #仕事猫 が #くまみね さん監修で登場!!
工事安全啓発活動やイベントなどにも登場しますので、フォローや応援お願いします!
YouTube動画では動いていますので是非ご覧下さい。ヨシ!👈🐱✨#国土交通省https://t.co/IJLQlqCRzJ
A Long Goodbye
Mediumからのメールで
A Long Goodbye to C and C++, And Hello To A Rusty Future
という記事を紹介され
My first serious programming language was C. Before this, I had copied BASIC code from computer magazines…
というので面白そうとは思ったものの、 有料会員でないと読めなかった😓
ruby
123.45
浮動小数点数。 .1 など “.” で始まる浮動小数点数は許されなくなりました。0.1 と書く必要があります。
>ruby -e "printf %Q!%22.20f\n!, .124"
-e:1: no .<digit> floating literal anymore; put 0 before dot
printf %Q!%22.20f\n!, .124
-e:1: syntax error, unexpected '\n'
printf %Q!%22.20f\n!, .124
知らなかった😓
Mojo
Modular: Mojo 🔥 - A systems programming language presented at LLVM 2023
全銀
これ関連でまたてきとーぶっこいて 失笑(失望)をかっていた御仁がいたみたいだけど
その後、断片的に出てきた(よくわからない)情報で 「断言」していた人がちらほら(たくさん(?))いたようだけど以下略。
こういうときtnozakiさんが健在だったら そういった手合いを一刀両断してたかな と思ったり思わなかったり。
vector
Decimal BASIC | Hacker News を見てみたら言及先が co.jp な vector Decimal BASIC でびっくりした。 そして試しに(?)読みに行ったら英語で書かれたページだったので もう一回びっくりした😄
Decimal BASIC is a programming environment for those who write programs for their own investigation.
Decimal BASIC adopts ANSI/ISO Full BASIC as its syntax, because Full BASIC has suitable facilities for those who are unacquainted with the peculiar knowledge about computers.
Decimal BASIC has the feature of readability to communicate algorithms with others.
新刊近刊
笑わない数学
12月上旬新刊
— 書泉_MATH (@rikoushonotana) October 15, 2023
『笑わない数学』1980円(KADOKAWA)
「素数」「無限」「四色問題」「フェルマーの最終定理」「確率論」「ガロア理論」番組で取り上げられなかった内容を追加し、数学者を苦しめた難問に更に迫る! pic.twitter.com/PlZH4WHnOI
メモメモ。
Manning
Classic Game Programming on the NES
日本じゃこういう本は出ないかねえ。
ChatGPT
大型書店ではないけどそこそこの大きさの書店の 棚一つをChatGPT関連の本が埋め尽くしていたのを見て以下略
Leading Quality
Leading Quality Ronald Cummings-John(著・文・その他) - ドワンゴ | 版元ドットコム
「品質とは何か」「品質をどう測るか」を説明した書籍は山積しているのに「品質の大切さをいかに組織に広め、 品質文化を醸成するか」を解説したものは皆無である。本書は、それらを解説した画期的な書籍である。
Buddha In Testing
Buddha In Testing: Finding Peace In Chaos | Soundararajan, Pradeep | Testing
A tester’s mind is never at rest. It is constantly searching over populated with information and continually discovering changes to context.
新山さん
「移住」してからも追いかけているけど 取り上げられてかつ自分は知らなかったところを見に行っているかというと あまりそういうことはなく(興味はあるんだけど)
と言った中で
- 新山祐介 (Yusuke Shinyama): “生成AIによる「プログラミング言語が人だったら」画像集。 …” - Mastodon 🐘
- 新山祐介 (Yusuke Shinyama): “つづき。 https://www.reddit.com/ga…” - Mastodon 🐘
- https://www.reddit.com/gallery/176ts0b
- https://www.reddit.com/gallery/176w0ic
これには大ウケした😄 なぜそういう絵になったのかや 絵だけを見てそれがなんのプログラミング言語を表現したものかを 想像するのが楽しかった(わかりやすいものもあり。そうでないものもあり)。
- 新山祐介 (Yusuke Shinyama): “C言語でメモリ管理を簡単におこなう Arenaアロケータの説…” - Mastodon 🐘
- 新山祐介 (Yusuke Shinyama): “Oracle Database 12.2の中の人のストーリー…” - Mastodon 🐘
- 新山祐介 (Yusuke Shinyama): “関連: Windows NTカーネル開発者による愚痴 (20…” - Mastodon 🐘
- 新山祐介 (Yusuke Shinyama): “StackOverflowで最も多くコピペされたコードには実…” - Mastodon 🐘
- 新山祐介 (Yusuke Shinyama): “WinDbgの元開発者による、デバッガをRustで0から作る…” - Mastodon 🐘
- 新山祐介 (Yusuke Shinyama): “プログラミング言語 Uiua - すべての演算子が1文字で表…” - Mastodon 🐘
- 新山祐介 (Yusuke Shinyama): “「安いから」という理由でオープンソースを推進するのは間違いで…” - Mastodon 🐘
- 新山祐介 (Yusuke Shinyama): “いろいろなSQLにおける予約語 (= クォートなしにはテーブ…” - Mastodon 🐘
- 新山祐介 (Yusuke Shinyama): “PushとPull。「~すべし」という要求 (push) だ…” - Mastodon 🐘
gawk
次バージョンのリリースも近そう?
- Updates in NEWS
- Next test tarball
- Add some items to TODO
- Add a quote to “Gory Details” in the manual
+ I collect spores, molds, and fungus.
+ — _Dr. Egon Spengler (“Ghostbusters,” 1984)_
ゴーストバスターズ?
GNU C Language Intro and Reference
Release 0.0. c-intro-and-ref.git - GNU C Language Intro and Reference
one true awk
awk: regular expression too big: out of space in set_gototab...
・ Issue #199 ・ onetrueawk/awk- Correctly reset the goto table for a state. by millert ・ Pull Request #200 ・ onetrueawk/awk
つづき。
awk/awk.h at d8e4368964e4471a54a755823004f2b1aabc0f80 · onetrueawk/awk
/* structures used by regular expression matching machinery, mostly b.c: */
#define NCHARS (1256+3) /* 256 handles 8-bit chars; 128 does 7-bit */
/* BUG: some overflows (caught) if we use 256 */
/* watch out in match(), etc. */
#define HAT (NCHARS+2) /* matches ^ in regular expr */
#define NSTATES 32
typedef struct rrow {
long ltype; /* long avoids pointer warnings on 64-bit */
union {
int i;
Node *np;
uschar *up;
int *rp; /* rune representation of char class */
} lval; /* because Al stores a pointer in it! */
int *lfollow;
} rrow;
typedef struct gtt { /* gototab entry */
unsigned int ch;
unsigned int state;
} gtt;
typedef struct fa {
gtt **gototab;
int gototab_len;
uschar *out;
uschar *restr;
int **posns;
int state_count;
bool anchor;
int use;
int initstat;
int curstat;
int accept;
struct rrow re[1]; /* variable: actual size set by calling malloc */
} fa;
問題のNCHARSはこれか。 1256+3 というのは確かによくわからん数字であるなあ。
200/86400
Excelの時刻比較には罠がある。Excelは時刻を小数点以下で表す。1日は24x60x60=86400秒なので、1秒はExcelで1/86400で表す。
— Excel VBA Diary (ENOWA Diary) (@excelvba_diary) October 11, 2023
例えば、200秒なら、=200/86400と式で入力して表示形式を時刻にするか、0:03:20 と直接時刻表記で入力すればよい。
ところが、前者と後者を比較すると一致しないのである。 pic.twitter.com/lYSWnT7VGc
ちょっと気になって、Excelで=200/86400
や
0:03:20
が入力されたセルの書式を数値にして
小数点以下の桁数を思いっきり大きくしてみると
=200/86400 | 0.00231481481481481000 |
0:03:20 | 0.00231481481481482000 |
だいぶ下の方で違いが出た。 後者はさておき、前者はふつーの計算だよなということで Rubyで計算してみると
>ruby -e "printf %Q!%22.20f\n!, 200.0/86400"
0.00231481481481481469
あれ?🤔
ビットパターンは…
>ruby -e "printf %Q!%a\n!, 200.0/86400"
0x1.2f684bda12f68p-9
ということはこうか
0x1. 2 f 6 8 4 b d a 1 2 f 6 8p-9
0010111101101000010010111101101000010010111101101000
=200/86400 | 0.00231481481481481000 |
0:03:20 | 0.00231481481481482000 |
0.00231481481481481469 | |
0x1.2f684bda12f68p-9 |
どうもよくわからんなあ。
typedef
調べた感じ、C で
— めるぽん.c (@melponn) October 17, 2023
struct Hoge;
typedef struct Hoge Hoge;
を1行で書く方法は無いっぽい?構造体の定義と一緒なら typedef できるのに、宣言と同時に typedef できないのは不思議だなぁ…
とりあえず構文的にはどうなんだろうかと
調べ始めたけど、ちょっと考えたら「構文的」にはエラーにはならんわな。
ということでc language semantics typedef
といったところで検索してみる
(ISOの規格書を参照するのがいいんだろうけどPaywallの向こうだしねえ)と
typedef 宣言を使用して、既に C で定義されている型や、宣言した型に対して、より短い、またはわかりやすい名前を作成できます。
というのがひっかかった。 規格上どうなっているかはわからないけどこの一文から判断すると、 「(構造体の)宣言」とtypedefを同時に行おうとすることは まだ宣言も定義もされていない型に対して名前を付けるということだから それはできない(エラーになる) ということだろうか?
gccのマニュアル The GNU C Reference Manual では
old-type-name is the existing name for the type, and may consist of more than one token (e.g., unsigned long int).
という記述があり、existing name
であることが要求されていることから
やはり初出の名前をここでいうold-type-name
として
使うことはできないということなのだろう。
もうひとつ Type - cppreference.com から。
typedef declaration does not introduce a distinct type, it only establishes a synonym for an existing type, thus typedef names are compatible with the types they alias. Typedef names share the name space with ordinary identifiers such as enumerators, variables and function.
Notes
typedef name may be an incomplete type, which may be completed as usual:
- C Language V2 - Product Standard
- Standards (Using the GNU Compiler Collection (GCC))
- C– Language Specification
- typedef - Wikipedia
- Typedef declaration - cppreference.com
- Incomplete types - cppreference.com
規格書でどうなっているのかは任せた😄
新宿
新宿地下街が…!!
— ロボ石丸 (@robo1954) October 18, 2023
例のCMですね!すごい迫力!!#仮面ライダー pic.twitter.com/5DLEpzbRP1
東西自由通路かな?
「材料」はあるんだけど 「完成」まで持っていく 時間というか余裕がなっしんぐ。