2021/03,江端さんの忘備録

(昨日の続きです)

(Continuation from yesterday)

そうだ、この機会に、「私の心を"折り"に来た方々」も纏めておきたい ―― 私が、忘れないように。

Well, I would like to take this opportunity to summarize the people who came to "break" my heart -- before I forget.

■東京高検の 黒川弘務 検事長 → 外出自粛や「3密」回避の要請に反して賭博(マージャン)行為

Tokyo High Public Prosecutor's Office Chief Prosecutor Hiromu Kurokawa → Gambled against requests to refrain from going out and avoid "three secrets".

■菅義偉首相 → 4人以上の会食制限要請をしつつ、8人での会食を実施

Prime Minister Yoshihide Suga → While requesting to limit the number of diners to four or more, he held a dinner with eight people.

■自民党の二階俊博幹事長 → 同上

Toshihiro Nikai, Secretary General of the LDP → Same as above

■橋本聖子五輪担当相 → 6人での会食を実施

Minister of State for the Olympic Games Seiko Hashimoto → Dinner with six people

■自民党の石破茂元幹事長 → 大人数で「ふぐ会食」を実施

Shigeru Ishiba, former secretary general of the Liberal Democratic Party (LDP), holds a fugu dinner for a large group of people.

■山崎拓元自民党副総裁 → 同上

Takumoto Yamazaki, Vice President of the LDP → Same as above

■公明党の 遠山清彦 衆院議員 → 緊急事態宣言下2021年1月22日、深夜まで東京・銀座のクラブに滞在

Kiyohiko Toyama, a member of the House of Representatives from the New Komeito Party, stayed at a club in Ginza, Tokyo until midnight on January 22, 2021, under a declared state of emergency.

■自民党の 松本純 元国家公安委員長 → 深夜に銀座のクラブを訪ねていた

Jun Matsumoto, former National Public Safety Commissioner of the Liberal Democratic Party, visited a club in Ginza late at night.

■自民党の 大塚高司 衆院議院運営委員会理事 → 深夜に銀座のクラブを訪ねていた

Director of the House of Representatives Steering Committee, Takashi Otsuka of the Liberal Democratic Party → He was visiting a club in Ginza late at night.

■自民党の 田野瀬太道 文部科学副大臣 → 深夜に銀座のクラブを訪ねていた

Vice Minister of Education, Culture, Sports, Science and Technology Taido Tanose of the Liberal Democratic Party (LDP) → visited a club in Ginza late at night.

ちょっと調べてみたら、まだまだ出てきました。

I did a little research and found a lot more.

■飯泉嘉門 徳島県知事 → 県議ら46人で会食

Kamon Iizumi, Governor of Tokushima Prefecture → Dinner with 46 members of the prefectural assembly

■埼玉県議会の自民党議員団 → 埼玉県議会の自民党県議団約30人が、12月18日の夜、さいたま市内のホテルで打ち上げ

The LDP members of the Saitama Prefectural Assembly → About 30 members of the LDP members of the Saitama Prefectural Assembly were launched at a hotel in Saitama City on the night of December 18.

■愛知県西尾市の自民党会派「市民クラブ」に所属する市議14人 → 12月18日に市議の経営する旅館で12月議会の打ち上げと称し、女性コンパニオン3人を呼んで大々的に宴会をしていました。

Fourteen city councilors belonging to the "Citizen's Club," a faction of the LDP in Nishio City, Aichi Prefecture → On December 18, they invited three female companions to a large banquet at an inn run by the city councilor, calling it the launch of the December assembly.

・・・もう面倒になったのでやめますが、つまるところ、この人たちも『"一人だけ欠席"するのが怖くてたまらない』という『ヘタレ』なんですよ。

I'm going to stop now because it's getting tedious, but the bottom line is that these people are also "badasses" who are afraid of being the only one absent.

もう少し丁寧に説明すると、

Let me explain it a little more carefully.

『頭の悪いな陽キャが、"コロナなんか大丈夫だよ、俺たち若いのは関係ないべ"、と騒いで、在学中のクラスの有志の集まりを企画して、そこに、"一人だけコロナを理由に欠席"することでヘタレ扱いされるのが怖くて、出席してしまう真のヘタレ』

"If you're the only one who's absent because of Corona, you're afraid of being treated like a slacker, so you attend.

という感じですかね ――

like this one.

-----

私、冒頭の「東京高検の 黒川弘務 検事長」が、世間からの批判がどうあれ、自責と自罰の念から、自殺をしてしまうのではないかと、かなり心配していました。

I was quite worried that the chief prosecutor of the Tokyo High Public Prosecutors Office, Hiromu Kurokawa, would commit suicide out of remorse and self-punishment, regardless of the criticism from the public.

東京高検といえば、国家権力の闇を暴く正義の組織であり、検事長は、東京地検を含む、地方検察庁及び区検察庁の職員を指揮監督する、正義の組織のトップです。

The Tokyo High Public Prosecutors Office is an organization of justice that exposes the darkness of state power, and the chief prosecutor is the head of the organization of justice, directing and supervising the staff of the District Public Prosecutors Office and the District Public Prosecutors Office.

やはり、私の世代で思い出すのは「ロッキード事件」です。

After all, what my generation remembers is the Lockheed case.

東京高検(が管轄する東京地検特捜部)は、私達のヒーローでした。

The Tokyo District Public Prosecutors Office Special Investigation Department, under the jurisdiction of the Tokyo High Public Prosecutors Office, was our hero.

この職位の人が、「コロナ渦での賭けマージャン」をすることは―― 顔の見えない国民や、法律の規定うんぬんはどうあれ、組織や自分の部下に対して、顔向けができない恥辱の行為のはずです(よね?)。

For a person in this position to play "betting mah-jongg in the Corona vortex" should be a disgrace to the faceless public, to the organization and to one's own subordinates, regardless of what the law says (right?). It's a shame that you can't face the organization or your subordinates.

そして、これまで多くの日本人が、このような「恥」に対して、自決(自殺)という方法で、自分の組織や家族への謝罪を試みるということをやってきました。

And many Japanese have tried to apologize to their organizations and families for such "shame" by committing suicide.

ですから、私は、本当に心配していました。

So I was really worried about it.

故に、この件については一切触れませんでしたが ―― どうやら、杞憂だったようです。

That's why I didn't mention any of this -- apparently, my fears were unfounded.

安心しました。

I was relieved.

-----

『腹掻き切って、国民に詫びて見せろ』―― てな、時代錯誤的なバカげたことを書いてみてもよかったかな、とか、今なら思っています。

Now I wonder if it would have been better to write something anachronistic like, "Cut your belly open and show your apologies to the people.

2021/03,江端さんの忘備録

くだんの「轢断のシバタ先生」から、くだんの「衝撃のメール」を頂いた時から、一年が経過しました。

It's been a year since I received that shocking email from my "Dr. Shibata of the Run-Over".

あのメールを読んだのが、日帰り一人スキーのスキー場のロッジで、ランチを食べている時でした。

I was eating lunch at the lodge of a ski resort for a one-day solo skiing trip when I read that e-mail.

夢中で読み続けて、スプーンからおかずを落としたことに気がつかないくらいでした。

I was so engrossed in reading that I didn't even notice that I dropped a side dish from my spoon.

私にとっては、あのメールが、「新型コロナ」と関わるターニングポイントとなりました。

For me, that e-mail was the turning point in my involvement with the "new Corona".

-----

なんか、日々のニュースに追い立てられる感じで、全体像がぼやけてきている気がしますので、新型コロナに関する大きな動きを、月単位で纏めてみました。

I feel like I'm being overwhelmed by the daily news, and the whole picture is getting blurry. So, here is a monthly summary of the major developments related to the new Corona.

2019/12 中国武漢で原因不明の肺炎患者の発生

2019/12 Outbreak of pneumonia patients with unknown cause in Wuhan, China

2020/01

2020/01

2020/02 ダイヤモンド・プリンセス号事件、小中高休校要請

2020/02 Diamond Princess incident, request to close elementary, junior high and high schools

2020/03 WHOパンデミック宣言、マスク騒動

2020/03 WHO Pandemic Declaration, Mask Riots

2020/04 緊急事態宣言発令

2020/04 Emergency Declaration Order

2020/05 緊急事態宣言延長→解除

2020/05 Emergency declaration extended→released

2020/06 移動自粛要請解除、新規感染者100人越え(国内(×東京都))

2020/06 Request for voluntary restraint on movement lifted, over 100 newly infected (Japan (not only Tokyo))

2020/07 「Go Toトラベル」キャンペーン開始、新規感染者1000人越え(国内(×東京都))

2020/07 "Go To Travel" campaign started, more than 1,000 newly infected people (domestic (not only Tokyo))

2020/08

2020/08

2020/09

2020/09

2020/10 「Go Toトラベル」東京を追加

2020/10 "Go To Travel" Tokyo added.

2020/11 "Go To"札幌・大阪停止、東京都、飲食店時短要請再開

2020/11 "Go To" Sapporo and Osaka suspended; Tokyo Metropolitan Government resumes request for shorter hours at restaurants.

2020/12 医療体制が逼迫、ファイザーワクチン申請、変異株国内発見

2020/12 Healthcare system strained, Pfizer vaccine application filed, mutant strain found in Japan

2021/01 緊急事態宣言再発令、「Go Toトラベル」全面停止

2021/01 Recurrence of emergency declaration, complete suspension of "Go To Travel".

2021/02 緊急事態宣言延長、ワクチン接種開始

2021/02 Emergency declaration extended, vaccination started

2021/03 緊急事態宣言解除

2021/03 Emergency declaration lifted

-----

こうやって俯瞰してみると、2020年の1月と、8~9月に、大きな動きがなかったことが分かります。

Looking at it this way, we can see that there was no significant movement in January and August-September of 2020.

そして、1月の"油断"のツケを4~5月に、8~9月の"甘い見積り"のツケを11~12月に支払っていることが明白です。

And it is clear that the "carelessness" of January is being paid for in April and May, and the "loose estimates" of August and September are being paid for in November and December.

しかし、政府の対応は、システム屋の私から見れば、概ね妥当です。

However, the government's response is generally reasonable from my point of view as a system engineer.

スイッチのON/OFFを行いながら、系(システム)の全滅を防ぐのは、自宅のクーラー、産業用ロボット、交通管制システムに至るまで、制御システムの基本です。

Preventing the annihilation of a system while switching it on and off is the basis of control systems, from home air conditioners to industrial robots to traffic control systems.

そして、国家というのは国民というシステム要素からなる巨大システムです。

And a nation is a huge system made up of system elements called "citizens".

-----

2月17日から本日までのワクチン接種者(1回目)の最大は人数は、7万人/日です。

The maximum number of people vaccinated (1st dose) from Feb. 17 to today is 70,000/day.

これを、"3倍"程度まで増やせる(1日20万人)として、1億2600万人の一回目接種が完了するのに必要な日数は、630日、21ヶ月、1年9ヶ月必要です。

Assuming that this number can be increased to "triple" (200,000 people per day), the number of days required to complete the first round of vaccination for 126 million people would be 630 days, 21 months, or 1 year and 9 months.

ちなみに、政府は"6倍"と見積っているようです。『高齢者約3600万人の接種を、2カ月と3週間の完了』ということから、3600÷83日= = 43.3万人となるからです。

Incidentally, the government seems to be estimating a six-fold increase. This is because "the vaccination of 36 million elderly people will be completed in 2 months and 3 weeks", which means 3600/83 days = 433,000 people.

米国では200万人/日になっているようですので、もっとペースは上がるかもしれません。

In the U.S., it seems to be 2 million people/day, so the pace may be even higher.

----

年内の、国民の全員(希望者のみ)第1回のワクチン接種は可能かもしれませんが ――

It may be possible to vaccinate the entire population (only those who wish to be vaccinated) with the first vaccine before the end of the year, but--

オリンピックに間に合わないことだけは確実です。

The only thing we can be sure of is that we won't make it to the Tokyo Olympics.

-----

今回の緊急事態宣言の解除"OFF"のリバウンドが、いつ、どこに、やってくるのか。

When and where will the rebound from the "off" of the emergency declaration come?

こればかりは、誰にも分かりません。

No one can know this much.

2021/03,江端さんの技術メモ

https://www.meti.go.jp/meti_lib/report/H30FY/000677.pdf

 

マイクロトランジッド

 

Chariot (サンフランシスコ周辺など)
• フォードが買収した通勤者向けの乗合バスサービス
• 利用者数に基づく柔軟なルート設定に特徴
• 14人乗りのシャトルバスを利用し、1日当たり100を超える路線
でサービス提供
出所: Tech Crunch, Chariot
Via (ニューヨーク、ワシントン、シカゴ 等)
• 乗客と車両の座席とをリアルタイムに関連づけ、同一ルートで
移動できる乗客をグループ化して配車する乗合バスサービス
• 車両の最適なルートに合わせて、利用者の乗降車スポットを
自動的に指定する仕組み
• テキサス州アーリントン市と提携。市の補助で運賃3ドルで運行

2021/03,江端さんの忘備録

コールバックを作ることは、そんなに難しくないんですよ。同じ言語でしたらね。

It's not that difficult to create a callback. As long as it's in the same language.

でもね、GOとC++の間で共通するトリガーイベントを作る方法が ―― 今日、一日、世界中を探し回ったんですけど ―― 見つけられないんですよ。

But you know, I can't find a way to make trigger events common between GO and C++ -- I've been looking all over the world today -- and I can't find it.

ならば、UDPとかTCPとかで待ち受けすれば良い、と。うん、まあ、それは分かるのですけどね。実際にライブラリも作っちゃったし。

So, why don't I just use UDP or TCP to listen in? Yeah, well, I understand that. I've actually made a library for it.

でもね、稼動オブジェクト1万個を同時に接続するUDPなんぞをやったら、一瞬でソケットリソースが使い尽されてしまうでしょう。実際、先月、これでプログラムを落したし。

But I know, if I do a UDP connection with 10,000 active objects at the same time, I'll run out of socket resources in an instant. In fact, I had a program go down last month because of this.

で、一番いいのが、GOのチャネルを使う方法なんですけど、これを、C++に連携させる方法が ―― ない。

So, the best way to do this is to use the GO channel, but there is no way to link this to C++.

GOのライブラリをリンクしたC++のライブラリをリンクした、GOプログラムを動かせればいいんだけど、昨日の試作では、ことごとく失敗した訳です。

It would be nice to be able to run a GO program with a C++ library linked to the GO library, but yesterday's prototype failed at every step.

もちろん、ポーリングすればいいだけのことですよ。サンプリング1秒でも、大した負荷にはならないでしょう。

Of course, I will use "polling" methods. One second of sampling won't be much of a load.

でも、それって『かっこ悪い』よね?

But that's not 'cool', is it?

プログラムのコールをどう実装しようが、私以外の人は知り得ないことですよ ―― でも、『この私』が納得していないんです。

No one but me can know how to implement the calls in the program -- but 'I' am not convinced.

ここ重要です。

This is important.

-----

という訳で、昨日は、朝から深夜に至るまで、この機能を実現する為に、頭を抱え続けて、そして失敗しました。

So yesterday, from morning till late at night, I kept trying to figure out how to make this work, and I failed.

今日は、仕上げなければならない論文ドラフトがあるので、この問題を考えることは一旦中止します。

I have a draft paper I need to finish today, so I will stop thinking about this issue for now.

悔しいので、メモだけ残しておいて、後日の復讐戦に備えます。

It's frustrating, so I'll just leave a note and prepare for the revenge battle later.

2021/03,江端さんの技術メモ

C 言語から GO 言語の関数を呼ぶ方法

を参考にさせて頂いて、実験中です。

大変申し訳ありませんが、ほぼ丸パクりさせて下さい。これから、頻繁に見る必要があり、万一ページがexpiredされたら青冷めますので。

hoge.goというファイル名のPrintHoge関数を C 言語から呼べるようにします。

  1. Cをインポートする
  2. C 言語から呼びたい関数に//export XXXXを書く (普通、//とするとコメントなんだけどなぁ)
  3. コンパイルする
package main

import (
    "C"
    "fmt"
)

//export PrintHoge
func PrintHoge() {
    fmt.Println("hoge")
}

func main() {}

main関数がないとエラーになるので、空で良いので書いておきます。

-buildmode=c-archiveオプションをつけてgo buildします。

$ go build -buildmode=c-archive hoge.go

すると、hoge.aアーカイブとhoge.hヘッダが生成されます。

生成されたヘッダをインクルードして、Go 言語の関数を呼びます。

#include <stdio.h>
#include "hoge.h"

int main() {
    PrintHoge();
    return 0;
}

生成されたアーカイブと一緒にコンパイルします。

$ gcc -o hoge hoge.a main.c

ところが、

$ gcc -o hoge hoge.a main.c
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w6
4-mingw32/bin/ld.exe: C:\Users\ebata\AppData\Local\Temp\cc1F3Mbe.o:main.c:(.text
+0xe): undefined reference to `PrintHoge'
collect2.exe: error: ld returned 1 exit status

が出てきて、「変だなー」と思いつつ、色々調べてみたのですが、hoge.aを一番最後にしたら、動きました。

$ gcc -o hoge main.c hoge.a
$ ./hoge
hoge
以上

2021/03,江端さんの技術メモ

■外部から強制的に書き込もうとすると失敗します

ubuntu@ip-172-26-7-19:~/codes/xxxxxxx_ride_hailing_go$ docker ps

095fe60f02cc nginx:1.15-alpine "nginx -g 'daemon of…" 8 weeks ago Up 22 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp xxxxxxx_ride_hailing_go_nginx_1

でもって、

ubuntu@ip-172-26-7-19:~/codes/xxxxx_ride_hailing_go$ sudo docker cp fullchain.pem 095fe60f02cc://etc/nginx/conf.d/

Error response from daemon: Error processing tar file(exit status 1): unlinkat /etc/nginx/conf.d/fullchain.pem: device or resource busy (失敗します)

しかし、dockerの中に入って、

ubuntu@ip-172-26-7-19:~/codes/xxxxxx_ride_hailing_go$ docker exec -i -t xxxxx_ride_hailing_go_nginx_1 sh

で内側から、killすると、dockerごとダウンして、なんとも悩ましい、にわとりと卵の関係になってしまいます。

■解決方法

ubuntu@ip-172-26-7-19:~/codes/xxxxxxx_ride_hailing_go$ sudo docker cp fullchain.pem 095fe60f02cc://etc/nginx/conf.d/fullchain.pem.new

ubuntu@ip-172-26-7-19:~/codes/xxxxxxx_ride_hailing_go$ sudo docker cp privkey.pem 095fe60f02cc://etc/nginx/conf.d/privkey.pem.new

でもって、 (今後は、new2, new3, new4 とか、どんどん増やしていく)

ubuntu@ip-172-26-7-19:~/codes/xxxxxxx_ride_hailing_go$ vi nginx.conf

をして、

———————————————————

ssl_certificate /etc/nginx/conf.d/fullchain.pem.new;

ssl_certificate_key /etc/nginx/conf.d/privkey.pem.new;

———————————————————

と書き換える。

さらに、

docker-compose.yml の最後の行に、

volumes:

- "./nginx.conf:/etc/nginx/conf.d/default.conf"

- "./fullchain.pem:/etc/nginx/conf.d/fullchain.pem.new"

- "./privkey.pem:/etc/nginx/conf.d/privkey.pem.new"

も変える。

でもって、 docker-compose stop; docker-compose start をすれば、新しい鍵で動き出します。不細工ではありますが、プログラムは動くようになります。

■ところで今思いついたんだけど、いい方法がありました。

現在は、fullchain.pem.new と、privkey.pem.new で動いているのだから、fullchain.pem と、privkey.pemは、rm できるはず。

で、cp fullchain.pem.new fullchain.pem, cp privkey.pem.new privkey.pem として、さらに、nginx.confの設定を元に戻せば、fullchain.pem と、privkey.pem の名前を使えるはずです

(まあ、動いているので、今は、このままにしています)

■もっと、いい方法がありました。

docker-compose.yml の最後の行に、

volumes:

- "./nginx.conf:/etc/nginx/conf.d/default.conf"

- "./fullchain.pem:/etc/nginx/conf.d/fullchain.pem"

- "./privkey.pem:/etc/nginx/conf.d/privkey.pem"

の3行を加えれば、Dockerの外側に、最新の"fullchain.pem"と、"privkey.pem"を置いておけば、自動的にDockerコンテナの中に取り込まれます(今、そうなっている)

2021/03,江端さんの技術メモ

Go言語をVSCodeを使ってデバッグをしようとするとすると以下のメッセージが出てきて、困っていました。

"Failed to continue: Check the debug console for details."

が消えなくて、困っていたのですが、

// +build ignore
package main

の "// +build ignore"を消したら、消えました。

 

 

2021/03,江端さんの忘備録

BS世界のドキュメンタリー「ヒトラーの子どもたち」を見ました。

I watched the BS World Documentary "Hitler's Children".

一言で言えば、「特定人種(アーリア民族)の子ども量産計画」です。

In a word, it is a "plan to mass-produce children of a specific race (Aryan race).

かの独裁者の理念『第三帝国の千年王国』に基づく(特定民族の絶滅計画と同時に実施された)計画の一つです。

This is one of the plans (implemented at the same time as the plan for the extermination of certain ethnic groups) based on the dictator's idea of the "Thousand Year Kingdom of the Third Reich.

-----

かなり前に、このようなイラストを描きましたが、その番組では、本当にこのイラストそっくりの映像が出てきて、軽い嘔吐感を覚えました。

A long time ago, I drew an illustration like this one, and in that program, I really saw an image that looked exactly like this illustration, which made me feel mildly nauseous.

もちろん、1940年の当時は、「試験管ベイビー」も「クローン」の技術もありませんでした。

Of course, back in 1940, there were no "test tube babies" or "cloning" technology.

ですので、、生身の男女を生殖させる場所「レーベンスボルン(生命の泉)」をドイツ国内、そしてフランスに設けて、子どもを「生産」していました。

Therefore, "Ravensborn" (fountain of life) were established in Germany and France to "produce" children, where reproduction took place between living men and women.

-----

日本でも、戦前・戦中の出産数は多いです。

In Japan, the number of births before and during the war is also high.

衛生、社会インフラ、医療技術で死亡リスクが高く、また、「富国強兵」の観点から、出産が「産めよ、殖やせよ」と国策的に奨励されていたことが要因です。

This was due to the high risk of mortality in terms of sanitation, social infrastructure, and medical technology, as well as the fact that childbirth was encouraged by national policy to "give birth and reproduce" from the perspective of a "wealthy nation with a strong military.

『平均5児以上をもうける』("平均"というところが凄い)

"Have an average of five or more children" (the "average" part is amazing)

という、現在では「夢物語か?」というようなことが政策として組込まれ、そして、律儀な日本国民は、これを達成していました。

"Is this a pipe dream?" of today, was incorporated as a policy, and the Japanese people, who were disciplined, had accomplished this.

そして、当時の政府は、多子家庭に対しての優遇策を、無子家庭や独身者には冷遇策を課していました。

And the government at that time imposed preferential treatment for families with many children, and cold treatment for families with no children and single people.

-----

正直、「レーベンスボルン(生命の泉)」も「産めよ、殖やせよ」も、私はゴメンです。

To be honest, I like neither "Ravensborn" (the fountain of life) nor "Give birth, breed.

「国家権力の圧力で、子どもを量産する社会」なんぞを目にするくらいなら ――

I don't want to see a society that mass-produces children under the pressure of state power.

「個人の自由意志で、少子高齢化で朽ちていく国家」に立合い続ける方が、私はいいです。

I would rather continue to watch the nation decay with declining birthrates and aging population at the free will of individuals.