2022/09,江端さんの忘備録

最近、長女が、ロシアによるウクライナ侵攻を見て、真剣に国防を考え出しているようで、大変、興味深いです。

It is very interesting that my senior daughter has recently started to seriously consider national defense after seeing the Russian invasion of Ukraine.

# 正確に言うと『国防』ではなくて『逃亡』ですが。

# To be precise, it's not 'national security' but 'escape'.

―― どこに逃げればいいの?

"Where to escape?"

と、真剣に心配しています。

She is seriously concerned.

-----

「我が国(日本)が、今後、どういう流れで戦争に巻き込まれていくか」 ―― というシミュレーションは、私にとっては、大好物のネタですので、そのいくつかのシナリオを長女に語りました。

Simulations of how our country (Japan) might be drawn into a war in the future are a favorite topic of mine, so I told her about some of the scenarios.

昨夜は、これに加えて、「ロシアから見た正義」と「中国から見た正義」についても解説してみました。

Last night, in addition to this, I also explained "justice from the Russian point of view" and "justice from the Chinese point of view".

―― 彼らには、彼らなりの、戦争をしかけるだけの正当な理由がある

"They have their own, justifiable reasons for starting a war"

という私の話が、長女を、さらに不安にさせているようです。

The stories of mine seemed to make her more anxious.

それはさておき。

Aside from that.

-----

以前、私は、長女と次女の近代歴史知識の乏しさを批判し、逆に論破されたことがあります。

I once criticized my daughters for their lack of modern historical knowledge, and was rebutted.

「いや、『四人組』とか『文革』とか、嫌な話がテンコ盛りでしょう?」(2017-04-15 の日記)

実際に、歴史の教師は「歴史が重要だ」と言い続けていますが、はっきり言います―― 「古代エジプトのファラオが誰であろうか、その国が滅びようが、それが何だと言うのか」

一方、嫁さんの方は、近年「忠臣蔵」のドラマが放送されていないことに、重大な危機感を感じているようです。

On the other hand, my wife feels a serious sense of crisis over the fact that no "Chushingura" dramas have been broadcast in recent years.

『日本人から、「忠臣蔵」の精神が失われたら、どうするんだ』と。

"What if the spirit of Chushingura is lost from the Japanese people?"

私は、こちらについては、心底"どーでもいい"と思っています。

I am truly "not concerned" about this.

しかし、以前『徒党を組んだ地方浪人による、テロ事件』と語った時に、もの凄く怒られたので、黙っています。

However, my wife was extremely angry with me when I told her that it was "a terrorist attack by local ronin who formed a clique," so I have kept my mouth shut.

-----

私たちは、自分なりの価値観で、その価値観を他人にも理解して欲しいと考えますが ――

We have our own set of values, and we want others to understand those values, but--

結局のところ、そういう試みの多くは、『無駄』に終わります。

After all, such attempts will be in vain.

未分類

In the sightseeing tour of Taiwan, we, whole family went to National CKS Memorial Hall.

私は、太平洋戦争末期の、台中のドタバタについては、興味があるので、とても楽しみにしてたのですが、滞在時間が ―― たったの30分。

Personally, I am very interested in a history of confusion between Taiwan and China in the of WW2. However the residence time was just half an hour.

I wanted to say

「3時間くれよ」

"Give me three hours"

というのは無理なんだろうなー、ということは分かっています。

But even I know that it might be impossible.

私のような人間の数は、少ないのだろうと、自分でも思いますから。

Persons like me, are few, I also think.

-----

中正紀念堂内での、長女との会話です。

In the hall, I talked to senior daughter.

江端:「このあたりの歴史については、受験勉強で詳しく勉強したのだろう?」

Ebata:"Did you study the history around this period for college exams?"

長女:「あんまり好きじゃないんだよね、この時代は」

Daughter:"I don't like this era and area."

江端:「ふーん、なんで」

Ebata:"Well why?"

長女:「いや、『四人組』とか『文革』とか、嫌な話がテンコ盛りでしょう?」

Daughter:" "Gang of Four" and "cultural revolution", there were a lot of bad stories in this era"

江端:「・・・は?」

Ebata:"What?"

長女:「いや、だから、"革命"を叫ぶ若者が国内を滅茶苦茶にしたという・・・」

Daughter: "Well, young people shouting" Revolution "made domestic messy ..."

江端:「それは『大陸(中華人民共和国)』の話だ! 『島(台湾)』の方では、文化大革命など起きていない!!」

Ebata:"That was a story of the" Continent (People's Republic of China)". Cultural Revolution has not occurred in Island (Taiwan) ! "

長女:「え? 台湾って、中国でしょう?」

Daughter: "W-Taiwan, is China isn't it?"

-----

まさか、こんなローカル(江端家内部)で、こんな形の、こんなコテコテの、

No way, in such a local (inside the Ebata's), I didn't expect to face this stereotypical

―― 「二つの中国」問題

"Two Chinese" issues

に、遭遇するとは思いませんでした。

2022/09,江端さんの技術メモ

golangを使った、postgresqlのinsertの方法

/*

こんな感じで、DBとTableを作りました

create database agent_db;

create table LocMessage(
	ID     int,
	Lat    double precision,
	Lng    double precision,
	TYPE   varchar(10),
	POPUP  int,
	RealId int,
	PersonState      int,
	BikeState        int,
	StartStationLat  double precision,
	StartStationLng  double precision,
	GoalStationLat   double precision,
	GoalStationLng   double precision,
	StartStationName varchar(40),
	GoalStationName  varchar(40)
);

ちなみに、全部小文字になるみたいですねえ。
agent_db=# select * from locmessage;
 id |  lat   |  lng  |   type   | popup | realid | personstate | bikestate | startstationlat | startstationlng | goalstationlat | goalstationlng | startstationname | goalstationname
----+--------+-------+----------+-------+--------+-------------+-----------+-----------------+-----------------+----------------+----------------+------------------+-----------------

*/

package main

import (
	"database/sql"
	"log"

	_ "github.com/lib/pq"
)

func main() {

	db, err := sql.Open("postgres",
		"user=postgres password=password host=localhost port=15432 dbname=agent_db sslmode=disable")
	if err != nil {
		log.Fatal("OpenError: ", err)
	}
	defer db.Close()

	//_, err = db.Exec("insert into locmessage(id,lat,lng,type,popup,realid,startstationlng ) VALUES(1, 139.0, 38.0, 'PERSON',1,1,222.222);")
	// _, err = db.Exec("insert into locmessage(id,lat) VALUES(a, b);")
	//ins, err := db.Prepare("insert into locmessage(id,lat,lng,type,popup,realid,startstationlng ) VALUES(?,?,?,?,?,?,?)")
	ins, err := db.Prepare("insert into locmessage(id,lat,lng,type,popup,realid,startstationlng ) VALUES($1,$2,$3,$4,$5,$6,$7)")
	if err != nil {
		log.Fatal("db.Exec Error: ", err)
	}

	a := 1
	b := 139.02
	c := 38.02
	dd := "Tomoichi"
	e := 1
	f := 1
	g := 333.333

	//ins.Exec("1", "139.0", "38.0", "BIKE", "1", "1", "222.222")
	//ins.Exec(1, 139.01, 38.01, "BIKE", 1, 1, 222.222)
	//ins.Exec(1, 139.0, 38.0, 1, 1, 1, 222.222)
	ins.Exec(a, b, c, dd, e, f, g)

}

とりあえず、これでデータベースの書き込みはできるみたい。

2022/09,江端さんの忘備録

「オリジナル原稿購読希望」をされる方が、止まりません。

The "original manuscript subscription applicants" are coming even now.

―― 『とある宗教団体』を直撃する内容

今ごろになって、『もし、期待外れだったら、どうしよう』と心配になってきました。

By now, I'm starting to worry, 'What if it's a disappointment for them?'

私は、「この内容なら大丈夫」と勝手に判断したもので、そんなに、凄い内容とは思っていなかったものなのです。

I had judged on my own that the content would be OK. and I did not think it would be that great.

(但し、編集部は"削除"を、嫁さんは"休載"を、要求する内容ではあったようですが)

(However, it seems that the editorial department demanded "deletion" and the wife demanded "suspension of publication.)

―― この教団に関する本(教義も含む)を数冊読めば、誰でも分かる程度の内容

"Enough for anyone to read a few books on this cult (including its doctrines)"

です。

―― 宗教団体のネタにコメントすると、面倒くさいことになる

(応募者が0人が、連続2日を経過した段階で、配布を予定しております) の要件が満たさていません。

(After zero applicant after two consecutive days, I will publish it. ) is not satisfied now.

この週末に編集作業を進めますが、リリースはもう少しお待ち頂くかもしれません。

I will work on editing this weekend, but may have to wait a little longer for release.

悪しからずご了承下さい。

Please understand that I apologize.

2022/09,江端さんの技術メモ

(Step.1) vscodeでmarkdownを使って本文を書いて、PDF(A4サイズ)にする

vscodeに以下の拡張機能は絶対に入れる

Visual Studio CodeのMarkdown編集から、いきなりPDFを作ったり、目次を追加したりできる件

vscodeでMarkdownを使って文章を書いている時、図面のコピペを文書の中にサクっと入れることができるアドイン "Paste Image"

(Step.1) SAIやPowerPointを使って、表紙と裏表紙を描いて、PDF(A4サイズ)にする

(Step.3) ConcatPDF(GUI)を使って、上記をマージして、書籍の名前のファイル名に保存する

(Step.4) 「江端さんの本屋さん」へアップロードする

新しいファイルをドラッグして、完了

ちなみに、以前のバージョンを購入して頂いた方は、最新版を無料で御提供する旨を、メッセージに追加(現在は、『メールでご連絡下さい』としているが、自動的にやる方法があるのか? 現在調査中)。

 

2022/09,江端さんの忘備録

最近、自分が老害の側に立っているなぁ、と実感します。

Lately, I realize that I am standing on the side of the old man, that menas, problems caused by the elderly (esp. gerontocracy, and elderly people's control over the young)

なるべく、若い人の考える発想や感性に『手を出さないように』と心がけているのですが、これが、なかなか難しいです。

I am trying not to touch youth ideas and sensibility, however, it is hard for me.

ご存知とは思いますが、私は、社会的な正しさや、常識と言われているものに対して、『本当にそうだろうか?』と疑義を呈することを、仕事のネタにしています。

As you know, one of my businesses is to make questions against the social and political correctness.

そして、その正しさや常識を、『数字』を使ってひっくり返す、という趣旨のコラムの連載を続けています。

So I continue to write a series of columns with the aim of using "numbers" to to turn the correctness and common sense upside down.

つまり、

It means,

―― (主に、若い人の考えがちな)アイデアを、その場で叩き潰すことができるだけのネタが、頭の中に満載されている

"I have a lot of logics to knock down the ideas that young people tend in my mind"

のです。

しかも、そのネタとは、具体的な数値がスラスラ出てくる、という状況です。

To make the worst, I can show them using many specific numbers.

-----

私は、自慢をしている訳ではないのです。

I am not trying to brag.

「年齢を重ねる」ということは、こういう経験や計算をする時間が「長かった」という、それだけのことです。

"Getting older" menas that I have had "more time" to have these experiences and calculation. That is all.

シニアは、生きている期間が長いだけで『強い』のです ―― これが、権力です。

Senior is stronger, because of their life time. This is power.

-----

私は、若いころに、様々なアイデアや理想を、年上の人に叩き潰されてきました。

When I was youth, several ideas and ideals of mine had been broken by seniors.

年上の人のロジックは、常に完璧でした。ですので、私は常に挫折を続けてきました。

Their logics were always perfect, and I had to continue to lose.

それ故、私が、「人の言うことを聞かない能力」という観念に到達するまでには、随分時間がかかったものです。

Therefore, it took me a long time to arrive at the cencept of "the ability not to listen to others".

柔軟で、頭が良く、コミュニケーションが高い若者、いわゆる「有能な若者」は、簡単に『老害』の餌食にされる傾向が強いです。

Flexible, smart, and communicative young people, the so-called "competent young people", tend to be easily preyed upon by the "old".

私は、『潰される側』と『潰す側』の両方で、この事実を知っています。

I know this reality from the side of 'crushed side' and the 'crusher side'.

-----

ですから、今の私に必要なものは、

So, I think that what I have to have is

『知っていることを、沈黙し続ける能力』

'The ability to remain silent about what I know.'

です。

そして、その能力を最大限発揮する最も簡単なアプローチは『議論をしない』ということです。

And the easiest approach to maximize that ability is to 'not argue'.

今の私には、『"お互いに分かり合わない"努力』が求められていると、実感しています。

I realize that I am now required to make an effort to "not understand each other.

未分類

部屋に鉄棒を作ってみた

この鉄棒(正確には金属管)、ぶら下がっている最中に、回転してしまい、グリップで体を支えられない、という問題に気がつきました。

という訳で、鉄棒が回転しない方法を考えました。

アタッチメントを外して、ゴムなどを詰め込むという方法もありましが、アタッチメントを同じ木材の穴に取りつけると、強度が落ちると考えました。

そこで強制的に、アタッチメントと鉄棒(金属管)に穴を開けて、そこに、ネジを差しこむことにしました。

まず、センターポンチで小さい穴を開けて、そこに金属ドリルの先端を当てて、電動ドリルで穴を開けるのですが ―― 酷く苦労しました。

一つの穴を開けるのに20分間程度の時間がかかりました。

おまけに、ドリルが折れてしまったので、他のドリルを使いながら、何とか穴を貫通させて、ネジを差し込むことができました。

これは、ねじ山が折れてしまったケースです(結果として良くなりましたが)

微細な金属片が飛び回るので、メガネは必須でした(本当はスキーゴーグルを装着するべきだったと思います)。その後の部屋の掃除も大変でした。

-----

結果、鉄棒が回転しなくなり、ぶら下がりやすくなりました。

ちなみに、お世話になっている医療従事者の方から、以下のアドバイスを頂きました。

見た目はマヌケかもしれませんが、しっかりと安定した踏み台をおいて、足をつけた状態でぶら下がることからスタートすることをお勧めいたします。
このアドバイスは『とても』正しいです。
もし、天井の鉄棒にとびついて、ぶらさがったら、私は、高い確率で入院する自信があります(筋肉の裂傷とか、簡単に起きそう)。
そうなれば、家族だけでなく、担当されるお医者さんからも『バカ』と言われそうなので、当面は「ぶらさがり(仮)健康法」で、じっくりやっていきたいと思っております。
-----

ぶらさがり(仮)健康法」は、慣れてくると、なかなか気持ちが良く、スッキリした気分になります。

ぶらさがる」時に、体がコキコキと鳴って、正常な位置に骨が戻されているような感じもいいです ―― まあ、錯覚かもしれませんが。

2つめの鉄棒(木棒)を作りました。

2022/09,江端さんの忘備録

昨日、以前自分で作ったはずの、Go言語のFuzzy推論ライブラリを探していました。

Yesterday, I was searched "fuzzy reasoning library with Golang" that I had made before.

ついでに、Go, Fuzzyでサーチエンジンをかけたのですが、"Go"、"Fuzzing"というWordで大量ヒットして、驚いています。

In addition, I ran a search engine, and I was surprised to find a large number of hits on the word "Go", "Fuzzing".

―― ここに至って、まさかのファジィ推論の復権? それもGolangで?

"Returning to 'Fuzzy Reasoning' ? with Golang? Now?"

と、思ったのですが、全く違う話でした。

I was foolish to think even for a moment.

-----

GolangのFuzzing機能とは、『プログラムの機能が想定していない入力を与える事でバグを発見するアプローチ』で、「プログラムのバグ発見用テストツール」ということのようです。

Golang's Fuzzing function is "an approach to finding bugs by providing input that is not expected by the program's functionality," and it is a "testing tool for finding bugs in programs.

fuzz: 警察(名詞)

fuzz: police (noun)

fuzzy: あいまいな(形容詞)

fuzzy: ambiguous (adjective)

名詞と形容詞で、これほど意味の変ってくる単語も珍しいなぁ、と思っています。

I think it is rare to change the meanings of word just between noun and adjective like this.

2022/09,江端さんの忘備録

私の未来予想は、これまで、ダイナミックに外れてきました。

My future predictions has been out of mark dynamically.

ですので、皆さんは、私の言うことは、あまり信じない方がいい、と、かなり本心から思っています。

So I am sorry that you don't have to believe what Ebata says no much from the bottom of my heart,

と逃げをうった上で申し上げますが、

And I'm going to say this with an evasive answer.

―― ロボットによる介護は、(少なくとも、私のフェーズでは)ダメなんじゃないかな

"I think robotic caregiving is a no-go (at least in my phase)"

と、思うのです。

もっとも、これは「完全人型ロボット」という意味で、パワードスーツの方向は希望はあると思っていますが。

However it is the case of "full humanoid robot", on the other hand, I think that "powered suite" has a little hopes.

-----

最近、私がショックを受けたパラダイムは、『マッチョ介護』です。

The paradigm that has shocked me recently is 'macho caregiving'.

『ITや制御やロボットがナンボのもんだ。これが正解だ』

"IT, control, and robot are meaningless. The 'macho caregiving' is right answer".

と、頭をぶん殴られるほどの衝撃を受けました。

I was so shocked that I was hit over the head.

父と母が亡くなり、今後の介護フェーズは、私たち夫婦の問題に移行します。

Through the death of my father and mother, the caregiving phase is going to move to my wife and me.

その準備としては、お金や設備などもありますが、介護をする側になることを考えれば「マッチョ」は分かりやすく、おそらくはかなりコストパフォーマンスなアプローチです。

For the preparation, we will need money and devices, however, for the side of the caring , "macho" is easy to understand and a cheaper strategy.

被介護者になるリスクを減らすという観点でも、良いアプローチと思います。

From the viewpoint of risk management to avoid being a care receiver, this is a good approach.

-----

こういう考え方が出て来たのは、これを作ってからです。

This paradigm has come to me, since I made the following device.

部屋に鉄棒を作ってみた

今の私は、(ずるい方法の)懸垂20回、ぶらさがり時間は60秒を軽く越えることができます。

Now I can do 20 sneaky pull-ups and keep my body hanging over 60 seconds.

さらに、最近は、他のメニューも加えて、全身運動に工夫をするようにしています。

These days, I have added new menus for full body exercise.

―― まだ間に合うかもしれない

"It might be not too late"

と思い、現在は、筋トレ専用のスポーツジムなどの巡回ツアーを開催しています。

So, I am organizing a tour of gyms and other facilities for muscle training.

-----

ただ、月額費用、2万円/月は、ちょっと高いんですよね。

However, \20K yen/month is too expensive for me.

普通のフィットネスセンターは、人数が多いし、市民運動センターは遠い。

Ordinal fitness club has many members, and the civic exercise center is far from my house.

モチベーションも「介護」一択です。

My motivation of muscle training is just for "caregiving".

マッチョな体になって、女性にモテたい、という心理は、私の人生で、1ナノ秒も登場したことがありません。

I have never wanted to have a macho body and be popular with the woman at all in my life.

(そもそも、私は、"マッチョ = バカ"という、酷い偏見を持っていた人間でした。今は、"尊敬"、"有用"にパラダイムシフトしています)

(To begin with, I thought "Macho is stupid" that is terrible prejudice. Now I change my mind to "respect" or "useful")

加えて、私は「"引きこもり"大好き人間」です。

In addition, I am a "recluse lover".

-----

先ずは、人間を運搬できるだけの筋力と、ぎっくり腰対策ができる程度のトレーニングを、『自宅』でできないものか模索しています。

So, I am searching how to get muscle to move a person, and avoid "strained back" just in my house.

上記の鉄棒のように、自宅を加工するのはことはO.K.で、工作は大好きなので、その方向から、皆さんのアドバイスを頂けると、大変助かります。

Like the the above "iron bar", I love DIY making or modifying my house, so I appreciate if you give me some advices.

よろしくお願い致します。

Thank you for your help in advance.

2022/09,江端さんの技術メモ

最近、スペルチェックをvscodeにやらせていて、emacsでのリロードを何度もやっているのだけど、これが中々に面倒で、これを一発でできないものか、色々調べた結果です。

方針: 面倒なので、".emacs" だけの記載で終了したい
操作:<F5>押すだけ
判ったこと: ".emacs"の最後に追記すると動かない(私の環境だけかもしれないが) → ".emacs"の真ん中あたりに突っ込んだ。

;;;; バッファを一発でリロードする (.emacsの最後に記載したら動かなかったので、真ん中くらいに移動)

(defun revert-buffer-no-confirm (&optional force-reverting)
  (interactive "P")
  ;;(message "force-reverting value is %s" force-reverting)
  (if (or force-reverting (not (buffer-modified-p)))
      (revert-buffer :ignore-auto :noconfirm)
    (error "The buffer has been modified")))

;; reload buffer
(global-set-key (kbd "<f5>") 'revert-buffer-no-confirm)
;;(global-set-key "\C-c\C-r" 'revert-buffer-no-confirm)
;;(global-set-key "\M-r" 'revert-buffer-no-confirm)
;(global-set-key "\C-c\C-m" 'revert-buffer-no-confirm)