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

実家の亡き父の自動車の廃車に伴って、今回の帰省からレンタカーを借りることにしました。

With the scrapping of my late father's automobile, I decided to rent a car from this trip home.

2200円/日、という格安のレンタカーです。保険フル対応にしても、2日で7700円なので、かなり安いです。

This is a cheap rental car that costs 2200 yen/day. Even with full insurance, the price is 7700 yen for two days, which is quite cheap.

ただ、レンタルした軽自動車は、喫煙車(そっちの方が安かったので)で、ヤニの匂いはしましたが、私は、煙の匂いが嫌いなだけですので、問題はありませんでした。

However, the mini-car I rented was a smoking car (because it was cheaper) and it smelled of nicotine, but I just don't like the smell of smoke, so it was not a problem.

外装の傷も、そこらにあり、説明の際にも「まあ、ちょっとくらい傷つけても構いません」とまで言われました。

There were also a number of exterior scratches on the body of the car, and when explaining the situation, he even said, "Well, we don't mind if you damage it a little bit.

乗り心地は、『今、カブールで走っている日本車って、こんな感じかもしれんなあ』というくらいでした ―― が、別段文句はありません。

I thought the ride was about the same as a Japanese car driving in Kabul right now -- but I have no complaints.

熱射病にならずに、買い物したり、病院に行けるのであれば、何の文句もありません。エアコンもついていましたしね。

If I could go shopping or to the hospital without getting heatstroke, I would have no complaints. It even had air conditioning.

先程、レンタカーの返却に行ってきたのですが、事務所に鍵がかかっていました。

I just went to return the rental car, but the office was locked.

ドアに『ここに電話してくれ』と記載されていたので、連絡して、暫く待っていたら、コールバックがきて、言われました。

The sign on the door said, 'Call me here,' so I called, waited a while, got a callback, and was told.

―― 鍵を自動車に差したままにして、立ち去って下さい

"Please leave the keys in the car"

と言われて、びっくりしました。

I was surprised to hear that.

『本当にいいんですか』(盗難されてもしらんぞ)

"Are you sure you want to do this?" (I don't care if it gets stolen.)

と返したのですが、

I said that, however he also said to me

『構いません』

"No problem."

と言われたので、言うがまま、立ち去ってきました。

So, I did as he told me and walked away.

-----

ただ、これは、ビジネスモデルとしては、なかなか良いところを攻めている、と思いました。

However, I thought that this was a good business model that was attacking a good point.

「カーブルで走っている」ランクの車が盗まれる可能性と、

The possibility that a car with the rank of "running on kerbals" could be stolen,

事務所を不定期にクローズするオペレーションを勘案すれば、

with the irregularity of the office closing operations,

損益分岐点は、意外なところにあるのかもしれない、と思いました。

the break-even point might be in an unexpected place, I thought.

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

(昨日の続きです)

(Continuation from yesterday)

全世界70億人全員参加の世界大戦 ――

A world war involving all 7 billion people in the world.

僅か1年間で"mRNAワクチン"を生み出した人類(米国の医薬会社)に対して、わずか1年で、感染力を数倍以上にして反攻を試みてきたウイルス。

In just one year, the virus has multiplied its infectious power several times over in an attempt to counterattack humanity (a U.S. pharmaceutical company), which has created an "mRNA vaccine" in just one year.

私達は、今、まさに、人類史上例のない、大規模な戦争の真っ只中にいる訳です。

We are in the midst of a war of unprecedented scale in human history.

そして、やつら(ウイルス)が、さらなる強毒化する変異株を作り出す前に、人類は、隔離予防ととワクチン接種で、やつらを殲滅しなければならないのですが ――

And humanity must eradicate them with quarantine precautions and vaccinations before they (the whistles) create even more virulent mutants.

そんな中にあって、

In the midst of all this,

ウイスル側の強毒化をサポートする人類も、一定数いる訳ですよ。それが、『感染予防を行わず、ウイルス接種を拒否する人間』です。

There are also a certain number of humans who support the virus in becoming more poisonous. That is the person who does not take precautions against infection and refuses to be vaccinated against the virus.

ワクチン接種がされていない人間の体は、変異株を作る最高の実験環境です。

The unvaccinated human body is the perfect laboratory environment for creating mutant strains.

それをウイルス側に差し出している訳ですから、彼ら(ウイルス)にとっては「素晴しい献体の提供」です。

Since they are offering their bodies to the virus, they are "wonderful donations" for them (the virus).

で、その「素晴しい献体」のおかげで、ついに、変異株は「子どもを殺す」フェーズに突入しつつあります(多分、時間の問題かと思います)。

Thanks to that "wonderful donation", the mutant strain is finally entering the "kill children" phase (maybe it's just a matter of time).

-----

ワクチン接種を拒否する人には、その人たちなりの理由ががあるでしょう。

People who refuse to be vaccinated have their own reasons for doing so.

「接種後の高熱等の副反応が辛そうだ」というのは、もっともだと思います。

"I think it's fair to say that "adverse reactions such as high fever after inoculation may be painful.

「科学的根拠のないフェイクニュースを信じる」のも結構です。

It's also fine to "believe fake news with no scientific basis."

また「健康に自信がある」といいって、インフルエンザンの1500倍の感染力と40倍以上の死亡率に立ち向うのも自由です ―― 私は、嗤っちゃいますけどね。

You are also free to claim to be "confident in your health" and stand up to a flu that is 1,500 times more contagious and 40 times more deadly. -- I'm going to laugh at you, though.

それどころか、もしかしたら、数年後に、mRNAワクチンに凄い副反応が発生して、接種した人の殆どが死亡して、70億人の人類が10億人になっているかもしれません。

On the contrary, maybe a few years from now, there will be a huge adverse reaction to the mRNA vaccine, and most of the people vaccinated will die, and the 7 billion human population will be reduced to 1 billion.

『誰もいなくなった新宿歌舞伎町の中で、一人高笑いする』という終末は、(私にとっても)見てみたい未来の一つです。

The end of the world, "I can laugh alone in the empty streets of Shinjuku Kabukicho" is one of the futures that I would like to see.

-----

確定できない未来を『盾』に取られれば(理由にされてしまうのであれば)、「ワクチン接種を拒否した人が正しかった」という未来は来ないとは、言えないでしょう ――

If an indeterminate future is used as a shield (or reason), it is hard to say that a future in which "those who refused to be vaccinated were right" will not come.

『人工知能が、人類を破滅させる』と信じている人を、私がどんなに事実と論理と実例で説得しても無駄だったように。

Just as no amount of facts, logic, and examples could persuade those who believe that artificial intelligence will destroy the human race.

個人的な信念(というか感情)に対して、ロジックや理論は、その受容体を持たない人には、全く無力です。

Logic and theory are completely powerless against personal beliefs (or rather, emotions) to those who do not have the receptors for them.

-----

ただ、それらを全て考慮したとしても、「隔離予防ととワクチン接種」を行わない人間の人体が、新型コロナウイスルの変異株の製造培養となっている ――

However, even if all of these factors are taken into account, the human body without "quarantine prophylaxis and vaccination" has become the manufacturing culture for the mutant strain of the new coronavirus.

これだけは、否定できない絶対的な事実です。

This much is an absolute fact that cannot be denied.

どのような未来が来ようとも、『その批判からは、絶対に逃げられない』ことだけは、覚悟しておいて下さい。

No matter what the future brings, just be prepared that you will never be able to escape the criticism.

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

Windows10のgolangのバージョンを上げる為に、古いバージョンをアンインストールして最新版(go version go1.17 windows/amd64)をインストールしました。

ところが、

// client.go

// Copyright 2015 The Gorilla WebSocket Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// +build ignore

package main

import (
        "flag"
        "log"
        "net/url"
        "os"
        "os/signal"
        "time"

        "github.com/gorilla/websocket"   ← ココ
)

var addr = flag.String("addr", "localhost:8080", "http service address")

で、こんなエラーが出てきます。

$ go run client.go
client.go:19:2: no required module provides package github.com/gorilla/websocket
: go.mod file not found in current directory or any parent directory; see 'go he
lp modules'

で、まあ、これは、いつものアレだな、と思い、

$go get github.com/gorilla/websocket

を対応したのですが、どういう訳か、このエラーが取れません。

ebata@DESKTOP-P6KREM0 MINGW64 ~/dummy/go_echo
$ go mod init go_echo  ← "go_echo"という名前にしたのは、ディレクトリ名に合わせただけ
go: creating new go.mod: module go_echo
go: to add module requirements and sums:
go mod tidy

で、

ebata@DESKTOP-P6KREM0 MINGW64 ~/dummy/go_echo
$ go get github.com/gorilla/websocket
go get: added github.com/gorilla/websocket v1.4.2

として、中を調べてみたら、こんな感じになっていました。

ebata@DESKTOP-P6KREM0 MINGW64 ~/dummy/go_echo
$ more go.mod
module go_echo

go 1.17

require github.com/gorilla/websocket v1.4.2 // indirect

で、まあ、以下のように動作を確認できました。

ebata@DESKTOP-P6KREM0 MINGW64 ~/dummy/go_echo
$ go run client.go
connecting to ws://localhost:8080/echo

よく分かりませんが、どうやら動かし方が変ったようです ―― 面倒くさいですけどね

さて、加えて、Visual Studio Code で、Golangのプログラムのデバッグですが、こっちも上手く動かなくなっていて、困っています。

で、今あきらかなことは、(1)上記のgo.modを作ることと、(2)1つのディレクトリに中には1goファイルを1つだけ入れること、そして、(3)setting.jsonを作ることです。

ebata@DESKTOP-P6KREM0 MINGW64 ~/dummy/go_test
$ more setting.json

{
    "go.gopath" : "C/go"
}

私の場合、C:\goにインストールしているので、上記のように記載しています。

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

私は、あらゆる、専制的、独裁的な国家が嫌い(×批判)です。

I hate (not "criticize") any, tyrannical, autocratic state.

その中でも、ポルポト、チャウチェスク、毛沢東、ナチス、が突出して嫌いです。

Among them, I dislike Pol Pot, Ceau Chesco, Mao Zedong, and the Nazis.

こいつらは、全部「子どもを利用した」からです。

Because these guys took advantage of the children.

ポルポトは、家族を引き裂いて、子どもを国家の施設にまとめて突っ込みましたし、チェウチェスクも同様のことをしました。

Pol Pot tore families apart and thrust their children together into state institutions, and Ceau Chesco did the same.

毛沢東は、文化大革命という「狂った内乱」を作り出し、思想的に未成熟な若者を暴徒(革命戦士(?))にすることで、自己の権力を保持しようとしました。

Mao Zedong tried to maintain his power by creating a "crazy civil war" called the Cultural Revolution and turning ideologically immature young people into mobs (revolutionary fighters?).

ナチスは、国内の子どもの洗脳によって、ヒトラーユーゲントという狂信的な少年兵を作り出しました。

By brainwashing children in Germany, the Nazis created a fanatical boy soldier named Hitlerjugend.

-----

家族とは、子どもを保護して、成人にさせるまでの養育プロセスを、金銭的利害とはかけ離れた観念『愛情』で行う実施主体です。

The family is the entity that carries out the process of protecting and nurturing a child to adulthood with a concept of "love" that is far removed from financial interests.

国家ごときに、ましてや、権力闘争に明け暮れる腐った為政者の手に、子どもを渡してなるものか ―― と、そう思っています。

I don't want my child to be in the hands of the state, much less corrupt politicians who spend all their time fighting for power.

-----

そう思ってはいるのですが ―― 『家族が子どもを殺している』という事実の前に、呆然と立ち竦みます。

I'm thinking it, however I'm stunned by the fact that family is killing their children.

児童虐待 昨年度“20万件超” 過去最多 厚労省まとめ

"Ministry of Health, Labor and Welfare reports record number of child abuse cases, over 200,000 last fiscal year"

「虐待死57人、約半数が0歳児」の前に声を失います。

I was stunned that "57 abusive deaths, about half of them of 0-year-olds.

-----

「育児のストレス」、特に「子どもに対する怒り」というのは、理解できます。

"I understand the stress of raising children, especially the anger towards them.

正直に言って、あれは『愛情』なんぞを100倍の係数で軽く越える『憎悪』です。

Honestly speaking, that is "hatred" that surpasses "love" by a factor of 100.

―― この子を殺して、ぐっすり眠りたい

"I want to kill my baby, and get a good night's sleep"

と、一度も思ったことがない親がいたとしたら、是非お目にかかりたいものです。

If there are any parents who have never thought about such things, I would like to meet them.

『育児は拷問である』は、『介護は地獄である』と同様に真実です。

"Parenting is torture" is as true as "Caregiving is hell".

ただ「育児拷問(睡眠系に限れば)」は、時限付きです。どんなに長くても2年。

However, "childcare torture (as long as it is sleep-related)" is timed. Two years at the most.

その日は、突然、靄(もや)が晴れるようにやってくきます。それは、お約束できると思います。

That day will come like a sudden clearing of the haze. I can promise you that.

どうか、その日を信じて、自分の子どもを殺す(あるいは虐待する)のは、留まって下さい。

Please believe in that day, and stay away from killing (or abusing) your own children.

-----

閉じられた密室の中で、子どもが殺されたり、虐待されている日常と比べれば

Compared to the daily life where children are killed or abused in a closed, locked room.

『まだ、ポルポトの方がマシなのか』

"Was Pol Pot still better?

などと、私に、一瞬でも思わせるようなことは、どうか勘弁して下さい。

Please don't make me think, even for a moment.

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

最近、次女がバイト先から持ち返ってくる、食料(パン、おにぎり、弁当)が、一人で自宅勤務を続ける私の食事(昼食)となっています。

Lately, the food (bread, rice balls, and lunch boxes) that my junior daughter brings back from her part-time job has become my meal (lunch) as I continue to work alone at home.

―― もう気分は、被介護人

"I'm already in the mood to be a  care-receiver"

私は、簡単な軽食なら、サクッと作ってしまいます。

I can make a light meal if it's simple.

江端:「で、持ち返らない弁当はどうなるんだ」

Ebata: "And what happens to the lunches that you don't bring back?"

次女:「ん? 普通に廃棄でしょ?」

Daughter:"The lunch will be discarded"

という一言が、決め手でした。

That's what made up my mind.

-----

「食材を捨てる」というのが、私は、どうにもダメでして。

I just can't get over the whole "throwing away food" thing.

最近は、フードロスのブームもありまして、野菜の皮を剥く作業も省略するようにしております。

Recently, there has been a boom in food loss, and I am trying to skip the process of peeling vegetables.

というか、そもそも「野菜の皮」は、本質的に『旨い』です。

I mean, to begin with, "vegetable skins" are essentially "delicious".

最近の私のブームは、じゃがいもやニンジンの皮を剥かずに、カレーに突っ込んでいますし、ネギやほうれんそうも、ヘタっている部分以外は、全部使い切ります。

My latest craze is to shove potatoes and carrots into curry without peeling them, and to use up all the leeks and spinach except for the sticky parts.

りんごは皮の部分が美味しいので、丸ごと食べますし、最近は、長女に、梨の丸かじりがイケていることを教えて貰いました。

I eat apples whole because the skin part is delicious, and recently, my senior daughter taught me that biting into a whole pear is a good idea.

料理の手が抜けて、かつ、美味しい。

The food is both easy to cook and delicious.

皮付き野菜、皮付き果物、是非お試し下さい ―― そもそも、「皮を向いて食べる」などという風習は、ごく最近(数百年間程度)の、ちょっとした「意識高い系」のトレンドです。

Vegetables with skins, fruits with skins, please try them -- to begin with, the custom of "eating with the skin on" is a very recent (a few hundred years or so) and somewhat "conscious" trend.

そのような軽佻浮薄(けいちょうふはく)な風俗は、今世紀中に終えてしまいましょう。

Let's end such frivolous customs in this century.

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

// position_log_sample.go

// position_logから座標情報を読み出すサンプル (要pq)

// go get github.com/lib/pq

package main

import (
	"fmt"
	"os"

	"database/sql"

	_ "github.com/lib/pq"
)

const port int = 8910 // DBコンテナが公開しているポート番号

func trackUser(db *sql.DB, userID int, dateIndex int) {
	// SQLステートメント
	sql := "SELECT id, to_char(time, 'HH24:MI:SS'), x, y, satisfaction FROM position_log "
	sql += " WHERE date_index = $1 AND user_or_bus = 'USER' AND id = $2;"
	prepared, err := db.Prepare(sql)
	rows, err := prepared.Query(dateIndex, userID)

	if err != nil {
		fmt.Printf("error : %v", err)
		os.Exit(1)
	}

	fmt.Printf("time, x, y, satisfaction (userID: %v)\n", userID)
	for rows.Next() {
		var id int
		var timestr string
		var x float64
		var y float64
		var satisfaction float64 // 満足度・現実装では、リクエスト発行直後に変化する
		rows.Scan(&id, &timestr, &x, &y, &satisfaction)
		fmt.Println("-", timestr, x, y, satisfaction)
	}
}

func trackBus(db *sql.DB, busID int, dateIndex int) {
	// SQLステートメント
	sql := "SELECT id, to_char(time, 'HH24:MI:SS'), x, y FROM position_log "
	sql += " WHERE date_index = $1 AND user_or_bus = 'BUS' AND id = $2;"
	prepared, err := db.Prepare(sql)
	rows, err := prepared.Query(dateIndex, busID)

	if err != nil {
		fmt.Printf("error : %v", err)
		os.Exit(1)
	}

	fmt.Printf("time, x, y (busID: %v)\n", busID)
	for rows.Next() {
		var id int
		var timestr string
		var x float64
		var y float64
		// var satisfaction float64  バスの満足度はNULL
		rows.Scan(&id, &timestr, &x, &y)
		fmt.Println("-", timestr, x, y)
	}
}

func main() {
	// db: データベースに接続するためのハンドラ
	var db *sql.DB
	// Dbの初期化
	dbParam := fmt.Sprintf("host=localhost port=%d user=postgres password=ca_sim dbname=ca_sim sslmode=disable", port)
	db, err := sql.Open("postgres", dbParam)
	if err != nil {
		fmt.Println("cannot open db")
		os.Exit(1)
	}
	dateIndex := 1 // 1日目
	busID := 8     // バス番号
	userID := 11   // ユーザ番号
	trackBus(db, busID, dateIndex)
	trackUser(db, userID, dateIndex)
}

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

PostgreSQLのデータベースは、全部Dockerの中に閉じ込めることにしたので、バージョン管理とかを忘れることができてストレスフリーです。

でも、Windows10から、ちょいちょいっと、DBの中を見たい時にpsqlがないのは不便です。

ですので、ここを参照させていただきpsqlだけインストールしました。

【PostgreSQL】Windows に psql コマンドだけをインストールする手順

ちなみに、どのシェルでも使えるように、私は、PATHはこっちに書き込みました。

 

 

以上

 

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

パラリンピックの開会式の演説を見ながら思ったのですが、

I had a thought while watching the opening ceremony speech of the Paralympics.

―― 演説者の横に、キッチンタイマーの大型版を用意する、というのはどうでしょうか。

"How about setting up a large version of a kitchen timer next to the speaker?"

というか、日本全国に用意しろ。

Or better yet, have them available all over Japan.

特に、プレゼン能力絶無の小中校の学校の校長の話。

Especially the principal of an elementary or middle school with no presentation skills.

この大型キッチンタイマーがあれば、生徒たちも『覚悟』ができます。

With this large kitchen timer, the students will be 'prepared'.

そして、自分の学校の校長の知性と技能の有無を、客観的に把握できます。

They can then objectively ascertain the intelligence and skills of their school's principal.

あるいは学術会議の方式を取り入れても、いいかもしれません。

Alternatively, they could adopt the method of academic conferences.

大体の学会の発表時間は『討議を含めて』15分間です(予鈴:10分;終鈴:12分;打ち切り鈴:15分)。

The presentation time at most conferences is 15 minutes "including discussion" (10 minutes for the preliminary bell; 12 minutes for the final bell; 15 minutes for the closing bell).

という訳で、夏休みの自由研究のネタで困っている子どもたちに、ネタを提供します。

So, for those children who are having trouble finding a topic for their free research during the summer vacation, I will provide the story.

『どうして、校長先生の話は、こんなに長くて、つまらないのか?』

"Why are the principal's stories so long and boring?

-----

私、以前、日本の障がい者数/雇用者数のスケール感をざっくり理解する、というのを試みたことがあります。

I once tried to get a rough idea of the scale of the number of people with persons with disabilities/employees in Japan.

で、65歳以上/以下で、身体の障がい者の数も比較もしてみました。

I also compared the number of people with persons with physical disabilities in the 65+/under age groups.

要するに

In short,

―― 人間、いずれは、全員が障がい者になる

"Humans, eventually, will all be disabled"

という、当たり前の事実に気がついて、ハッとしたことを覚えています。

I was startled that I noticed the natural fact.

江端:「パラリンピックというのは、つまるところ、『私たち全員に係わる舞台』と言える訳だ」

Ebata: "The Paralympics is, in essence, a stage that concerns all of us".

と、パラリンピックの開会式を見ながら私が呟いていると、嫁さんに言われました。

When I was muttering to myself while watching the opening ceremony of the Paralympics, my wife said to me

嫁さん:「いや、それは違うと思う。パラリンピックのアスリートの人たちの、あの物凄いパフォーマンスを、私たちの人生の一場面と見なすのには、無理がある」

Wife: "No, I don't think so. I don't think it's possible to watch those amazing performances of the Paralympic athletes as a scene from our lives."

と言われました。

一瞬で、納得してしまいました。

In a moment, I was convinced.

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

1000年単位のベストセラー、仏教の経典、コーラン、そして新約聖書に学ぶところは多いと思っています。

I believe there is much to be learned from the best seller of the millennium, the Buddhist scriptures, the Koran, and the New Testament.

例えば、ヨハネによる福音書第8章3~11節の中に、姦通罪で捕らえられた女性をめぐって、イエスと律法学者たちが対決する場面が出てきます。

For example, in the Gospel of John, chapter 8, verses 3-11, we can read a scene where Jesus and the scribes confront each other over a woman caught in adultery.

旧約の律法では、姦通罪は石打ちの死刑にされることになっていました。

In the Old Testament law, adultery was punishable by death by stoning.

判断を求められた主イエスは、次のように言いました。

When asked for his judgment, Jesus said

=====

あなたたちの中で

罪を犯したことのない者が

この女に、まず石を投げなさい

"All right, but let those among you who have never sinned throw stones at this woman"

=====

深い言葉です。

These are profound words.

-----

現代では、三権分立と言論の自由の保障のもと、政策実行の主体である「政府」または「地方自治体(例:東京都)」は、新型コロナ感染対策について、国民や県民等から、批判されています。

Today, under the separation of powers and the guarantee of freedom of speech, the government or local government (e.g., Tokyo Metropolitan Government), which is in charge of implementing policies, has been criticized by the public and prefectural residents for its measures against the COVID-19 infection.

コロナ禍の中、判断を求められた、エンジニアの江端は、次のように言いました。

Asked to make a decision in the midst of the COVID-19 disaster, Ebata, who is an engineer, said

=====

あなたたちの中で

不要不急の外出をしたことがない者が

政府または東京都に、まず石を投げなさい

"All right, but let those among you who have never gone out unnecessarily throw stones at the government or the Tokyo Metropolitan Government"

=====

-----

―― いやいや、そうじゃない

"No, no, no way!"

政府や地方自治体は、国民や住民の行動変容も含めて、その責任があります。

Governments and local governments have the responsibility to include behavioral change in their citizens and residents.

行政府に対する「批判」は、その批判そのものが価値があるものです(代替案を伴う必要もない)。

Any "criticism" of the executive branch is worthy of its own criticism (and need not be accompanied by an alternative).

それに、ヨハネによる福音書第8章3~11節を絶対正義と見なしてしまえば、「法治国家」の否定になります。

Besides, if we regard John 8:3-11 as absolute justice, it would be a denial of the "rule of law".

-----

とは言いつつ、私の身の上ならば、

Having said that, if it were up to me,

「路上飲みをしている奴」とか、「飲酒を伴う深夜をの宴会をしている居酒屋」に向けて、

To "street drinkers" and "taverns that host late-night drinking parties",

『軽石』か『ピンポン玉』くらいなら、投げつける権利はあるのかな、と思っています。

I think I have the right to throw "pumice stones" or "ping pong balls" at them.