未分類

Ubuntu 22.04にdockerをインストールする

を参考にして頂きつつ、インストール実施中。

私は、根拠なく、

$ sudo apt-get install docker-ce=5:24.0.4-1~ubuntu.22.04~jammy

を選びました。

ラズパイ4、Ubuntu22.04、で"docker compose"も動いているようです ーー "docker-compose"は動きません。

 

2023,江端さんの忘備録

別に、日本全国の銀行振り込みシステムでなくとも、「システム障害」というのは血の気が引くものです。

Even if it is not a Japan-wide bank transfer system, a "system failure" is still a bloody good thing.

先程、私のメインのPCのドメインネームシステムが動かなくなり、青冷めていました。

I was blue-cold just now when the domain name system on my main PC stopped working.

最後の手段として、「ルータの再起動」を実施したのですが、人生でもっとも長い40秒の一つでした。

As a last resort, I implemented a "router reboot," which was one of the longest 40 seconds of my life.

『不調になった機械が、再起動で完全に動かなくなる』 ―― これまで、こんな修羅場に何度立ち会ってきたことか。

I can't tell you how many times I've been in the situation of "a machine that malfunctions and then completely stops working after a reboot.

-----

という訳で、私は病的なまでにバックアップを取るようにしているのですが、この「バックアップ」というのも、あまり当てになりません。

This is why I try to make morbid backups, but this "backup" is also unreliable.

OSを丸ごとイメージコピーしても、日進月歩でハードウェアのスペックも変化していくからです。

This is because even if the entire OS is image-copied, hardware specifications change ever-evolvingly.

「バックアップ」の有効期間というのは、私の感じでは、半年が限界。その後は、単なるハードディスクを消費するだけのファイルに成り果てます。

My feeling is that the maximum "backup" lifetime is six months. After that, they become mere complex disk-consuming files.

-----

それにしても訳が分からんのは、OSのバージョンを上げる度に、これまで問題なく動いてきたシステムファイルの構成を変えるOSSの開発者の頭の中です。

What is still incomprehensible to me is the mind of the OSS developers who change the configuration of system files that have been working without problems every time they upgrade the OS version.

- /etc/resolve.confを、dhcpの設定ファイルの方に寄せる必要って何?

- What is the need to move /etc/resolve.conf to the DHCP configuration file?

- GUIで提供するなら、全部一括できるようにデザインしておいて欲しい

- If you're going to provide it as a GUI, I'd like to see it designed so that it can all be done at once.

- というか、レガシーな設定を、OSのバージョンアップする度に変更していくバカは、一体どこの誰?

Who in the world is stupid enough to change legacy settings every time the OS is upgraded?

- DockerがマルチOS対応というのは結構ウソです(使ってみれば分かります)し、OSのバージョンによっては全く動かないし。

- It's pretty much a lie that Docker is multi-OS compatible (you'll see if you try it), and some OS versions don't work at all.

- ラズパイはチップを変更されただけで、問題がボロボロ出てくるし。

- And the Raspberry PI is just a chip that's been changed, and the problems are ragged out.

-----

私、自信をもって言えますが、システムへの脅威は「サイバーアタック」よりも、「システムリプレース」だと思っています。

I can confidently say that the threat to the system is more of a "system replacement" than a "cyber attack."

「システムリプレース」すれば、システムは高い確率で障害をおこします。

When a system is "replaced," there is a high probability that the system will fail.

あなたが、どれだけ怒号を撒き散らそうとも、動かんものは、動かん ―― コンピュータシステムとはそういうものです。

No matter how much you throw a tantrum, what doesn't work doesn't work -- that's how computer systems work.

これからも、銀行システムは停止し、飛行機は飛ばなくなり、コンサートチケットは取れなくなり、あなたの診療カルテが消えてなりなります。

The banking system will continue to shut down, airplanes will stop flying, concert tickets will not be available, and your medical records will disappear.

『デジタル化社会』というのは、つまるところそういうことであり、私たちは、そういう、システム停止を前提とした社会で生きることを覚悟しなければならない、ということです。

This is what a "digitalized society" is all about, and we must be prepared to live in such a society based on the premise that the system will stop working.

----

私は、『締切直前のシステムは止まる』『長期休暇明けのシステムは、必ず障害を起こす』と思って日々を生きています。

I live daily thinking, 'The system stops just before the deadline' and 'The system always fails after a long vacation.

この程度のことは、デジタルシステムの初歩の初歩です。

This level of detail is elementary to digital systems.

社会インフラに打撃を与えるのは、これまでは「地震」「火災」「台風」「洪水」などの天災でしたが、今や、ここに「サイバアタック」と「システムリプレース」の脅威が追加されているのです。

Until now, it was natural disasters such as "earthquakes," "fires," "typhoons," and "floods" that dealt a blow to social infrastructure, but now the threat of "cyberattacks" and "system replacements" have been added to this list.

まずは、これを義務教育過程で教える必要があると思います。

First, I think this must be taught in compulsory education.

あるいは、やれることはやって、それでも壊れる時には壊れるという『諦観』をするしかない、とも言えます ―― システム障害も自然災害も。

2023,江端さんの忘備録

「今回の旧統一教会に対する解散請求は、日本国政府における憲政上の汚点である」という、旧統一教会の主張を、私は認める。

I accept the former Unification Church's assertion that "this request for dissolution against the former Unification Church is a constitutional disgrace in the Japanese government."

100%同意する。

I agree with you 100%.

本来、こんなことはあってはならない。

This should never have happened.

民主主義社会において、宗教の自由に対する公権力の発動など、本当にあるべきことではない。

In a democratic society, there really should be no such thing as an invocation of public power against religious freedom.

-----

だが、これまで(数十年間)、何度も、何度も、何度も、『そういうことはやめろ』と言い続けたにも関わらず、全く改善しなかったお前たちが、この『憲政上の汚点』を許した。

But you people, who have not improved at all despite my telling you over and over and over again (for decades) to 'stop doing that kind of thing,' have allowed this 'constitutional disgrace.'

全ての宗教の自由に対する脅威を、お前たちが作った。

You have created a threat to the freedom of all religions.

この恐るべき罪深さを ―― 今こそ、思い知れ。

This horrendous sinfulness -- now, think of it.

----- 参考文献 -----

----- References -----

(A)統一教会の独自かつ斬新な解釈

(A)Unique and novel interpretation by the Unification Church

(B)統一教会の教義

(B)Doctrine of the Unification Church

(C)教団から脱退させないメソッド

(C)Methods to keep believers from leaving the cult

(D)統一教会の"霊感商法"の考え方

(D)The Unification Church's "Inspirational Commerce" Concept

結論:『統一教会の運営は、(自分の全財産を自分の意思で差し出せるような)狂信的な信者を”作り出せる”か否かにかかっている』

Conclusion: "The Unification Church's operation depends on whether or not it can "create" fanatical believers (who are willing to give up their entire wealth).

「統一教会」というワードが含まれる最近の江端の日記一覧

2023,江端さんの忘備録

『やりたいことがあることは、多分、それだけで人を不幸にするなぁ』と思います。

I think, 'Having something you want to do probably makes you unhappy.'

うん、私(江端)は今、精神状態が良くない ―― そう思って読んで下さい。

Yeah, I (Ebata) am not in a good state of mind right now -- please read it as such.

読むと、うつが伝染るかもしれないので、読むのを止めるのも良いかと思います。

It would be a good idea to stop reading it, as depression may be contagious.

----

やりたいことは、多くの場合、上手くいかないからです。

Because what I want to do often doesn't work.

やりたいことをやるためのプロセスで、色々苦労します。

I struggle a lot with doing what I want to do.

そして、やりたいことを、途中で断念するのは、もっとも苦しいことです。

And giving up on something I want to do in the middle of a project is the most painful thing I can do.

加えて、やりたいことをやりとげた後でも、それで幸せになれるわけでもありません。

In addition, even after I have done what I want, it does not mean I will be happy.

人間、やりとげたことは、簡単に忘れてしまうものです。

People quickly forget what they have accomplished.

そして、次のやりたいことが、自分を苦しめることになります。

And the next thing I want to do is torment myself.

無限ループの呪いのような気がします。

It feels like a curse of an endless loop.

―― うん、やっぱり、私(江端)は今、精神状態が良くないようです。

-- Yeah, I guess I (Ebata) am not in a good mental state right now.

-----

何が言いたいかというと、

What I'm trying to say is,

『自分のやりたいことが分からない』という方は、多分、ご自分のことを「不幸な人間」と思っているかもしれませんが ――

If you're saying, 'I don't know what I want to do,' you probably think you're unhappy," but....

『意外に、それは最高の人生なのかもしれないですよ』ということを、お伝えしたくて。

I wanted to tell you, 'Surprisingly, that may be the best life.

-----

こういうことを言い出す私(江端)は、珍しいと思いますので、ちゃんと記録に残して置くことにします。

It is unusual for me (Ebata) to say this, so I will properly put it on record.

あるいは、これからずっと、ネガティブ江端がデフォルトになるかもしれませんが、まあ、それならそれで、仕方ありません。

Or maybe the negative Ebata will always be the default, but it cannot be helped.

ポジティブ江端 vs ネガティブ江端 ―― どっちが勝つかな?

-----

なんか、こういう「よわよわ江端」は、読者の皆様に、評判良いようです(応援メール、ありがとうございます)。

This kind of "Weak Ebata" seems well accepted by our readers. (Thank you for your supportive emails.)

喜んでもいられませんが、それでも、私の日記が、誰かの心を軽くしているなら、こんな私でも役にたっているのですよね。

I can't be happy about it, but if my diary has lightened someone's heart, even me, like this is useful, isn't it?

2023,江端さんの忘備録

テレビを見ている嫁さんに、

I said to my wife, who was watching TV,

江端:「なんで、VIVANTは、北朝鮮拉致被害者の救出作戦を行わないんだろう」

Ebata: "Why doesn't VIVANT conduct rescue operations for North Korean abductees?"

と言ったところ

And she just replied, watching TV,

嫁さん:「そうだね」

"Yes, they do."

と、生返事をされました。

-----

フィクションの「イリーガル」を描くのであれば、ここまで振りきってもいい思う。

They can swing so far if they depict "illegal" in fiction.

ただ、裁判所は、「VIVANT」や「スケバン刑事」の活動を、絶対に認可しないと思います(高度な政治的圧力があれば別かもしれませんが)。

ロケ地は<北>の平壌(まあ、当然、北朝鮮は拒否するでしょうが)。

The location is Pyongyang (well, North Korea will refuse).

韓国<南>との共同制作で(あの国こそ、拉致の最大被害国です(500人近くにおよぶそうです))。

It will be a joint production with South Korea (that country is the biggest victim of abduction (nearly 500 people are said to have been abducted)).

この「VIVANT:拉致被害者奪還作戦編」の、日本国内視聴率は、史上最高になるでしょう。

The domestic viewership of "VIVANT: Operation to Retrieve the Kidnapped Victims" will be the highest in Japan.

もちろん、前例のない「もの凄い外交問題」にもなるような気がしますが ―― 下手すると核ミサイルが飛んでくるかもしれません。

Of course, I feel it will be an unprecedented "tremendous diplomatic problem" -- if we are not careful, nuclear missiles may be launched at us.

-----

でも、映画で「シュリ」や「シルミド」があるし、日本でも「KT」とか上映されていたんだから ―― 悪くない企画だと思うのです。リスクも凄いけど。

But we know "Suri" and "Silmido" in Korean movies, and "KT" and others were shown in Japan -- I think it's not a bad project. The risk is significant, though.

2023,江端さんの技術メモ

今回の実験のケースでは、

192.168.11.232/ 255.255.248.0 / 192.168.11.1 あたりにすれば良いのであろう(多分)。

 

2023,江端さんの忘備録

本日、家族でアイスクリームを食べていた時のことです。

When I was eating ice cream with my family today,

娘から、

my daughter said

『ジャニーズに、自分の子どもを入所させた親たち』

"Parents who have enrolled their children at Janny's."

という観点を提示されて ―― 衝撃を受けました。

I was presented with the perspective that -- I was shocked.

はじめて、この事件を『自分の視点から見えた』と思えました。

I could 'see' the case from my view for the first time.

-----

もちろん、この事件は「ジャニーズなんとか」という名前の、運よく鬼籍に入って逃げ切った、鬼畜の所業です。

Of course, this case is the work of a demon named "Johnny's Something," who was lucky enough to get away with his death.

被害者、そして被害者の保護者に、1mmの過誤も瑕疵もありません。

There was not a single millimeter of error or defect on the victim's or guardian's part.

ですが、被害者当人はもちろんですが、その親たちの、悔しさ、悲しさ、そして、その怒りは、私には想像もできません。

However, I cannot imagine the parents' frustration, sadness, and anger, not to mention the victims themselves.

もし、嫁や娘が、こんな形で陵辱されたら ―― 多分、私は『私を止めない』。

If my wife or daughter were to be humiliated this way -- maybe I wouldn't 'stop me.'

-----

この本の中に、古代中国、春秋時代の呉の政治家であり軍人でもあった、伍子胥の話が出てきます。

In this book, there is a story about Corporal Castle, a politician and soldier of the Wu Dynasty in ancient China during the Spring and Autumn period.

彼は、父と兄が楚の平王によって処刑されたため、楚を逃れて呉に亡命しました。

He fled Chuxing and went into exile in Wu after his father and brother were executed by King Ping of Chuxing.

そして、16年後、呉の将軍となった伍子胥は、楚の都郢を陥落させました(紀元前506年)。

Sixteen years later, Corporal Castle, now a general of Wu, fell the capital city of Chu (506 B.C.).

平王は既に死んでいたので伍子胥は王墓を暴き、平王の死体を300回に及び鞭打って恨みを晴らした ―― これが、「死者に鞭打つ(死屍に鞭むちうつ)」の語源になっています。

Since Ping Wang was already dead, Corporal Castle uncovered the royal tomb and whipped Ping Wang's corpse 300 times to settle his grudge -- this is the origin of the phrase "whipping the dead."

-----

同じようなことが、今の我が国で起こったとしても、私は驚きません。

I would not be surprised if something similar happened in our country today.

―― 驚くことに、あの学校は組織的な"ジャニーズ(児童性虐待)"をしていました。

2023,江端さんの忘備録

本当に一所懸命やっているんだけど、法律で定められている時間内では、仕事の量と質から考えても絶対に間に合わない ――

I am working hard, but I will never make it within the legal time frame, given the quantity and quality of the work I have to do.

これって、誰のせい?

Whose fault is this?

私(の無能)のせい?

Is it my (incompetence) fault?

-----

10年前、30年前、そして、有史以来、人類がずっと問い続けてきたことを、リタイアをスコープに入ってきている今でさえ、自分の問題として、自問していることに腹が立ちます。

I am angry that even now, as I am scoping my retirement, I am asking myself the same question humanity has been asking since ten years ago, 30 years ago, and since the beginning of time, as my problem.

もしかしたら、『人間って、本質的にバカなの?』と思ってしまいます。

Perhaps, 'Are humans inherently stupid?' I think.

太陽にブラックホールが突っ込んでくる日が、明日やって来たとしても、今の私は歓迎します(by さよならジュピター(故小松左京先生))。

Even if the day when a black hole crashes into the sun comes tomorrow, I would welcome it now (by Byebye Jupiter (the late Sakyo Komatsu)).

さよならジュピター

2023,江端さんの忘備録

今日、丸一日かけて苦労して実装したプログラムが

Today, after a full day of hard work, the program that I implemented,

- 予想通りに、動いたのだけど、

- As expected, it worked,

- 予想通りのパフォーマンスを発揮しませんでした。

- It did not perform as expected.

残念ながら、この実装は却下になりました。

Unfortunately, I have had to dismiss the implementation.

時間のない中での、こういう一日は ―― 本当に痛い。

In the absence of time, a day like this really hurts.

2023,江端さんの技術メモ

Go言語で、redisを使って2つの型の異なるデータをブロードキャストしている場合、その受信している部分を1つのswitchで受けとるにはどうしたら良いですか

を、異なるエージェントで、異なるメッセージを受信できるか試してみた件。

 

// C:\Users\ebata\tomioka3B\src\others\main28.go
// 2つのクロック(goroutine)を用意して、異なるエージェントで受けとれるかどうかの実験

package main

import (
	"encoding/json"
	"fmt"
	"sync"
	"time"

	"github.com/gomodule/redigo/redis"
)


type Clock_Info struct {
	VirtualTime time.Time
	RealTime    time.Time
}

type SubClockInfo_2 struct {
    // 異なるデータ型のフィールドをここに追加
    SomeField string
    AnotherField int
}

func BaseClock() {

	// 接続
	conn, err := redis.Dial("tcp", "localhost:6379")
	if err != nil {
		panic(err)
	}
	defer conn.Close()

	// スタート時刻を指定
	startTime := time.Date(2023, 10, 1, 7, 0, 0, 0, time.UTC)

	// 1秒値を保持する変数
	seconds := 0

	var ci Clock_Info

	// ループを開始
	for {
		// 現在の時刻を計算
		ci.VirtualTime = startTime.Add(time.Duration(seconds) * time.Second)
		ci.RealTime = time.Now()

		// 現在の時刻を表示
		// fmt.Println("シミュレータの時刻:", ci.VirtualTime.Format("2006/01/02 15:04:05"))
		// fmt.Println("現在の時刻:", ci.RealTime.Format("2006/01/02 15:04:05")) // "2006/01/02 15:04:05"はフォーマットの形を真似るもので、内容に意味なし

		// パブリッシュ
		json_ci, _ := json.Marshal(ci)
		r, err := redis.Int(conn.Do("PUBLISH", "ClockInfo_1", json_ci))
		if err != nil {
			panic(err)
		}
		fmt.Println(r)

		// 5秒待つ (実際は、0.05秒くらいだが、確認用に長くしている)
		time.Sleep(5000 * time.Millisecond)

		// 1秒値を増加させる
		seconds++
	}
}


func SubClock() {  // 実験用に追加(時間ではなく、単なる文字列と数値を送り込むだけ)

	// 接続
	conn, err := redis.Dial("tcp", "localhost:6379")
	if err != nil {
		panic(err)
	}
	defer conn.Close()


	// 1秒値を保持する変数
	seconds := 0

	var sci2 SubClockInfo_2

	// ループを開始
	for {
		// 現在の時刻を計算
		sci2.SomeField = "ebata is great"
    	sci2.AnotherField = seconds

		// パブリッシュ
		json_sci2, _ := json.Marshal(sci2)
		r, err := redis.Int(conn.Do("PUBLISH", "SubClockInfo_2", json_sci2))
		if err != nil {
			panic(err)
		}
		fmt.Println(r)

		// 7秒待つ (実際は、0.05秒くらいだが、確認用に長くしている)
		time.Sleep(7000 * time.Millisecond)

		// 1秒値を増加させる
		seconds += 1 
	}
}



func person_1(person_num int, wg *sync.WaitGroup) {
	defer wg.Done()
	// 接続
	conn, err := redis.Dial("tcp", "localhost:6379")
	if err != nil {
		panic(err)

	}
	defer conn.Close()

	psc := redis.PubSubConn{Conn: conn}
	psc.Subscribe("ClockInfo_1") // 2つに増やした

	for {	
		switch v := psc.Receive().(type) { // redisのメッセージを受けとると、ここでロックが外れる

		case redis.Message:

			switch v.Channel{

			case "ClockInfo_1":  // ブロードキャスト"ClockInfo_1"のメッセージは、こっちでキャッチ
				ci := new(Clock_Info) 
        		_ = json.Unmarshal(v.Data, &ci)
        		fmt.Println("Person_1:", person_num, "VirtualTime (ClockInfo_1):", ci.VirtualTime)

			case "SubClockInfo_2": // ブロードキャスト"SubClockInfo_2"のメッセージは、こっちでキャッチ
        		subClockData := new(SubClockInfo_2)
        		_ = json.Unmarshal(v.Data, &subClockData)
        		fmt.Println("Person_1:", person_num, "SomeField (SubClockInfo_2):", subClockData.SomeField)
         		fmt.Println("Person_1:", person_num, "AnotherField (SubClockInfo_2):", subClockData.AnotherField)


    	}
		
		case redis.Subscription:
			fmt.Printf("%s: %s %d\n", v.Channel, v.Kind, v.Count)

		case error:
			return
		}
	}

}

func person_2(person_num int, wg *sync.WaitGroup) {
	defer wg.Done()
	// 接続
	conn, err := redis.Dial("tcp", "localhost:6379")
	if err != nil {
		panic(err)

	}
	defer conn.Close()

	psc := redis.PubSubConn{Conn: conn}
	psc.Subscribe("SubClockInfo_2") // 2つに増やした

	for {	
		switch v := psc.Receive().(type) { // redisのメッセージを受けとると、ここでロックが外れる

		case redis.Message:

			switch v.Channel{


			case "ClockInfo_1":  // ブロードキャスト"ClockInfo_1"のメッセージは、こっちでキャッチ
				ci := new(Clock_Info) 
        		_ = json.Unmarshal(v.Data, &ci)
        		fmt.Println("Person_2:", person_num, "VirtualTime (ClockInfo_1):", ci.VirtualTime)

			case "SubClockInfo_2": // ブロードキャスト"SubClockInfo_2"のメッセージは、こっちでキャッチ
        		subClockData := new(SubClockInfo_2)
        		_ = json.Unmarshal(v.Data, &subClockData)
        		fmt.Println("Person_2:", person_num, "SomeField (SubClockInfo_2):", subClockData.SomeField)
         		fmt.Println("Person_2:", person_num, "AnotherField (SubClockInfo_2):", subClockData.AnotherField)
    	}
		
		case redis.Subscription:
			fmt.Printf("%s: %s %d\n", v.Channel, v.Kind, v.Count)

		case error:
			return
		}
	}

}


func main() {

	wg := sync.WaitGroup{}

	//wg.Add(1)
	//go BaseClock(&wg)
	go BaseClock()
	go SubClock()

	for i := 0; i < 5; i++ { // 5人
		wg.Add(1)
		go person_1(i, &wg)
	}

	for i := 0; i < 5; i++ { // 5人
		wg.Add(1)
		go person_2(i, &wg)
	}


	wg.Wait()
	fmt.Println("end of ... main()")
}

ちゃんと動くみたいです。