2023,江端さんの忘備録

私は、気にいったモノは、とことん使い倒すタイプで、腕時計など、同じモノを3つ購入しています。

I am the type of person who uses up things I like to the fullest, and I have purchased three identical watches and other items.

一つは、(亡き)父にプレゼントしましたが、 ―― そうだとしても、3つは数が合いません(2つなら分かるのですが)。

One was a gift to my (late) father, but -- even if so, three doesn't count (although two would make sense).

この時計、電波時計で、文字が大きく、なにより安い(4000円弱)です。

This clock is radio-controlled, has large letters, and, most importantly, is inexpensive (less than 4,000 yen).

しかし、電池交換をすると2000円以上、バンド交換をしても同程度のコストがかかりますので、それを考えると、『使い捨て』が正しい用途なのだと思います。

However, replacing the battery costs more than 2,000 yen, and replacing the band costs about the same, so considering this, I think "disposable" is the correct use.

------

話を戻しまして、上記の「2つ」と「3つ」の違いなのですが、『電池切れになったので購入したものの、自分で電池交換したら動いてしまった』あたりがオチではないか、と思い、過去の日記を調べてみました。

Back to the story, the difference between the "two" and the "three" above, I thought it might be around "I bought another watch because the battery of the first watch ran out, but it worked after I changed the battery of the first by myself," so I checked my past diaries.

当たりでした。

It was a hit.

で、今回 ―― 「自分で電池交換してみようかな」と思いました。

で、私が、自力で電池交換やら、バンド交換している理由も、すでに記載していました。

And I have already mentioned why I am replacing batteries and bands alone.

―― 空腹で、気を失っている

-----

先日、1つが電池切れになって、もう一つがバンド切れになりましたので、それぞれ電池交換とバンド交換をしました。

One recently ran out of battery, and the other ran out of band, so I replaced the battery and band.

ゴムのバンドは、1年くらいで切れてしまうので、今回は、布のバンドに挑戦してみました。

The rubber bands would break after about a year, so I tried fabric bands this time.

送付されてきたものを見た時、『誤発注した』と思ったのですが、カスタマレビューを読みながら、このベルトの仕組みを理解しました。

When I saw what was sent to me, I thought, 'I ordered the wrong belt,' but as I read the customer reviews, I understood how this belt works.

「こういう仕組みのバンドなんだ」と納得して、無事にバンド交換を完了することができました。

I was convinced that "this is how the band works," and I completed the band replacement successfully.

-----

ボロボロで、液晶表示も欠けていて、各所を瞬間接着剤補強されている、私の可愛い大切な腕時計たちです。

They are my precious watches that are battered, missing LCDs and have been reinforced with superglue in various places.

『100万円のブランド時計と交換してくれ』と言われても、『だが、断わる』と言い切れます。

Even If someone says, 'Trade me a million yen for a brand-name watch,' I can say, 'But I refuse.'

-----

私の寿命と、この時計たちの寿命 ―― どっちが長いか? 勝負です。

My lifespan or the lifespan of these watches -- which is longer? It's a game.

私が死ぬ時に、この時計がまだ動いていたら ―― 私の勝ちです。

If this clock is still running when I die -- It is my win.

2018,江端さんの忘備録

(昨日の続きです)

(Continuation from yesterday)

食費が高いからといって、長年お世話になった人をゴミとして廃棄する ―― これは人道的・・ではなくて、IoT的にどうだろうか。

Just because food costs are high, we discard people who have been indebted for many years as garbage. This is not for humanism but for IoT engineer.

で、今回 ―― 「自分で電池交換してみようかな」と思いました。

So, this time - "I thought I'd try to replace battery by myself".

仮に、電池交換に失敗して、時計を壊すことになっても、これが、長いこと、お世話になった時計に対する私なりの「恩返し」です。

Even if I fail to replace the battery and destroy my watch, this is my "gratitude" for my watch that I have taken care of for a long time.

-----

Amazonで電池(143円)を購入して、YouTubeで映像見ながら、電池交換を試みました。

I bought a battery (143 yen) at Amazon.com and attempted to change the battery by watching the video on YouTube.

映像通りには上手く交換できませんでした。

I could not replace it as I expected.

ほとんど無理矢理に金具を引き剥して、電池を引き抜き、新しい電池を差し込みました。

I pulled the metal fitting almost, forcibly pull out the battery, and inserted a new battery.

-----

2台の時計は、今、元気よく動いています。

The two clocks are moving cheerfully now.

毎日電波を受信して時刻合わせもしていますし、バックライトもちゃんと点滅するようになり、アラーム音も確実に鳴るようになりました。

They can receive the radio waves everyday and adjust the correct time. the backlight also flashes properly, and the alarm sound is clear.

両方とも、今回の電池交換ではかなり無茶をしましたので、次は動かないかもしれませんが、

Both of them did considerably unreasonable in this battery exchange, so it may not do well,

こうやって、自分で動かし直した時計というのは、そうでない時計よりも、何倍も「可愛い」のですよ。

In this way, the watch I have fixed by oneself is many times "cute" than a watch that I have not.

2018,江端さんの忘備録

私は、"CASIO 腕時計 WAVE CEPTOR 電波時計 MULTI BAND5 デジタルモデル WV-58J-1AJF メンズ"を愛用しております。

I always use a watch, ""CASIO Watch WAVE CEPTOR Radio Watch MULTI BAND 5 Digital Model WV-58J-1AJF for Mens".

先ほど、Amazonで過去の履歴を調べたら、私は全く同じ時計を3台購入していました。

After examining past history at Amazon, I have already bought three same watches.

1台は父用に、あとの2台も、すでにバンドの結合部が欠落しています。

One for my father, the others for myself, the junction of the band has already been lost.

時計屋に持っていくと、「修理するより購入した方が安い」と言われます ―― 残念ですが、これは事実です。

Taking it to the watch shop, the clerk tells me "it is cheaper to purchase than to repair". Unfortunately, it is true.

ですから、Amazonで、結合部品(10本入り180円)を購入して、接着剤で強制的にバンドを結合しています。

So, I purchased bonded parts (180 yen for 10 pieces) at Amazon, and forcibly join the band with glue.

最近、その2台が、立て続けに電池切れとなりました(なんどか、2005年1月1日にリセットされ、そして全く表示が出てこなくなった)

Recently, the two batteries have run out of batteries in a row.(It was reset on January 1, 2005, and no display came out at all)

電池切れとなったら、買い替えをしようと思っていました。

When the battery runs out, I was planning to replace it.

電池交換のコストも、結構な金額になるからです(特に防水処理を維持すると、はやり「修理するより購入した方が安い」ことになります。

The cost of replacing the batteries is also a reasonable amount(Especially when maintaining the waterproof treatment, it also becomes "it is cheaper to purchase than to repair".

-----

コスト的には、これらの時計を廃棄をして、新品を購入するのが正しい行動ですし、引いては、このような行動は、日本経済の景気にも資することになります。

Costly, it is correct behavior to discard these watches and purchase new items, In other words, such actions will also contribute to the economy of the Japanese economy.

しかし、この時計たちは、

But these watches were

―― 空腹で、気を失っている

fainting on hunger.

という状態とも言えます。

(続く)

(To be continued)

2017,江端さんの忘備録

以前、

Once I wrote a diary,

"Even if I antagonize the world ....? " The world includes the Armed Forces of the United States doesn't it?"

という日記を書きました。

-----

最近、もう一つ思いつきました。

In these day, I came to another phrase

「世界中を敵に回しても」・・・? 世界中って、<北>みたいに?

"Even if I antagonize the world ....? " like ?"

-----

あの国の

The goverment of the has an ideology of

"Any approch to collapse ourselves is all same, even if it is invation, civil war or counter nuclear attack"

と、いうような「腹のくくり方」もできないようなヤツ(歌手とか)が、、

If they, for example "singers", don't prepare themselves for the worst,

軽々しく「世界中を敵に回しても」などと口にすべきではない ―― と思っています。

they should not sing "even if I antagonize the world" lightly, I think.

2015,江端さんの忘備録

瀬戸口みづきさんの描かれている「初恋症候群(はつこいシンドローム)」という漫画イラストの、一つに次のコマがありました。

I happened to see a illustration of Setoguchi Mizuki-san's comic "First love syndrome", and found the next frame.

=====

瑠璃に借りたこの新曲の歌詞 「世界中を敵に回しても」・・・? 世界中って、米軍も?

=====

"This is a lyric sheet of new song I borrowed from Ruri, "even if I antagonize the world ....? " The world includes the Armed Forces of the United States doesn't it?"

ちょっとツボに入ってしまいました。

I happened to burst into laughter.

思わず、瀬戸口みづきさんの著作を、調べてしまいました。

Accidentally, I started to search Setoguchi Mizuki-san's works.

と同時に、

At the same time,

「世界中を敵に回しても」

I tried to search the songs which includes the phrase of "even if I antagonize the world", and I could find forty-two songs in Japan.

というフレーズを採用している歌詞も調べてみたところ、42曲見つけました。

------

日本には、アメリカ合衆国の第7艦隊や、イスラエル対外諜報機関と対決する気概のある、少くとも42人以上の歌手が存在するようです。

In Japan, there are more than forty-two singers who are with plenty of courage, fighting the seventh fleet of the United State, and Israeli intelligence agency.

2023,江端さんの技術メモ

ラズパイ4は、(○arm64 ×amd64)を採用しており、色々とトラブルとなっています。これも、その一つかどうか不明ですが、Chromeのインストールに失敗しています。

で、まあ、以下のことをごちゃごちゃしているうちに動きましたので、メモを残しておきます。

$ sudo snap refresh
$sudo snap install chromium
( $ sudo apt install -y chromium-browser は、失敗しました)
で、起動は、
$ chromium (× $ chromium-browser)
でした。

以上

 


2023,江端さんの忘備録

10年ほど前に、家族にGmailのシステムを説明した時、『メールの本体は、クラウドに配置されている』という説明では通じませんでした。

When I explained the Gmail system to my family about ten years ago, the explanation that 'the body of the email is located in the cloud' did not get through.

そこで、こんな説明に変えました。

So I changed the explanation to this.

(1)『メールは、サンノゼ(カリフォルニアのシリコンバレー)にある会社のパソコンの中にあって、この自宅のパソコンの中にはない』

(1) "Your email is in a computer in San Jose (Silicon Valley, California), not in this home computer."

(2)『このパソコンは、アメリカにあるパソコンの中の中身を写しているだけ』

(2) "This computer is just a copy of the contents inside the computer in the U.S."

(3)『だから、このパソコンでも、名古屋のパソコンでも、鹿児島のパソコンでも、スマホでも、同じメールを見ることができる』

(3) "So, I can see the same email on this computer, on a computer in Nagoya, on a computer in Kagoshima, and on my smartphone."

-----

つまり、「クラウドとは何か」と問われたら、いらんこと言わずに「外国にあるパソコンだ」と答えれば良いと思います。

In other words, if someone asks you, "What is the cloud?" you can answer, "It's a computer in a foreign country," without saying anything unnecessary.

東京リージョンだの、大阪リージョンだの、仮想化だの、コンテナだの、そういうことを『言わなこと』がコツです。

The trick is not to "say" Tokyo Region, Osaka Region, virtualization, containers, etc.

今、娘たちは、「クラウド」という言葉を日常的に使っていますが、多分、実態としての理解しているかは不明です。

My daughters now use the term "cloud" daily, but I am unsure if they understand it as a reality.

言語化することで、分かったような気になるのは、仕方がないことです。

By verbalizing it, we inevitably feel like we know it.

でも、時々は、ちゃんと考えてみる必要はあると思います。

But we need to think things through from time to time.

-----

この「クラウド」と似ているものが「AI」です。

Similar to this "cloud" is "AI.

「AI」が、なんでもできる凄いもの、と考えるのは仕方がないことですが、やはり時々は、ちゃんと考えてみる必要はあると思います。

It is inevitable to think of "AI" as a great thing that can do everything, but it is still necessary to think about it properly occasionally.

以前、私はAI技術についての連載をやっていました。

I used to write a series of articles on AI technology.

また先日は、ChatGPTについてのコラムを寄稿しました。

I also recently contributed a column on ChatGPT.

で、この結果分かったことは、

And what I found out as a result of this,

―― AI技術は、先生(人間)の言うことをきちんと聞いて、もの凄い時間(数億~数兆回の反復学習)をかけて『ガリ勉』をすることで、完成している

-- AI technology is perfected by listening to the teacher (human) and spending a tremendous amount of time (hundreds of millions to trillions of iterations) "studying hard."

という事実です。

近年のAI技術は、「優れたロジック」や「スマートなアルゴリズム」の効果として語られなくなりつつあります。

In recent years, AI technology is no longer considered the effect of "good logic" or "smart algorithms."

逆に、『真摯に指導を受ける姿勢』と『ガリ勉』のみが、最強AI技術の根幹であることを、力強く主張しています。

On the contrary, they argue that only a 'sincere attitude toward instruction' and 'skinny-dipping' are the foundation of the most powerful AI technology.

-----

こういう人生訓めいたことを、教えられるのは、正直愉快ではありませんが ――

I have to admit that I don't enjoy being taught this kind of life lesson, however,

『何かをなすためには"学習を繰り返し続けること"が必要である』

"To do something, I have to keep learning repeatedly."

ことを、私は、AI技術から教わりました。

I learned that from AI technology.

私の提案する方法は、我が国のお国芸である『同調圧力』です。

2023,江端さんの技術メモ

BFS-U3-89S6C-C(カメラ)を先ず動かす。

私が購入したときは、15K円くらいだったのですが、今、倍になっています。ラズパイって高価になっているんですね ―― それはさておき。

Raspberry Pi 4Bは、USB3対応のようですが、どちらのポートか分かりません。この写真を見ると右側のようです。

(出典 https://misoji-engineer.com/archives/raspberrypi-usb3.html)

まずは、ドライバのありかを探してみました。

https://www.flir.jp/support-center/iis/machine-vision/downloads/spinnaker-sdk-download/spinnaker-sdk--download-files/

あきらかに、これが当たりのように見えます。

ラズパイP4の石は、ARMのようです。

https://qiita.com/memakura/items/a77137856f91d6c4db43

何がどうなっているのかは分からないけど、

https://blog.csdn.net/weixin_42088912/article/details/118225949

を参考にして、/etc/udev/rule.d/40-flir-spinnaker.rules の

SUBSYSTEM=="usb", ATTRS{idVendor}=="1e10", GROUP="flirimaging"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1724", GROUP="flirimaging"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1e10", GROUP="flirimaging"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1724", GROUP="flirimaging"

SUBSYSTEM=="usb", ATTRS{idVendor}=="1e10",ATTRS{idProduct}=="4000", MODE="0777", GROUP="flirimaging"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1724", GROUP="flirimaging"

としたら、やっと"USB interface0"が出てきた

けど、映像が表示されないし、「SpinView_QTの応答がありません」、とか言われる。

sudo dmesg をやると

[ 533.947639] usb 2-1: Product: Blackfly S BFS-U3-89S6C
[ 533.947652] usb 2-1: Manufacturer: FLIR
[ 533.947663] usb 2-1: SerialNumber: 0126934F
[ 600.668167] usb 2-1: reset SuperSpeed USB device number 4 using xhci_hcd
[ 709.333799] xhci_hcd 0000:01:00.0: swiotlb buffer is full (sz: 16384 bytes), total 32768 (slots), used 32687 (slots)

のようなメッセージがでてくので、

https://zenn.dev/yonishi/scraps/e735a6ef11d8b5

を参考に対応。 改善なし。

https://wpitchoune.net/tricks/raspberry_pi3_increase_swap_size.html

の対応を実施

表示に成功! 詳しくは明日 ―― つかれはてました。

 

2023,江端さんの技術メモ

PythonからGo、GoからPythonを呼び出し合う

で、勉強させて頂いております。

私、今、超スケーラブルな高速の遺伝的アルゴリズムをGo言語で実装しようとしているのですが、計算ライブラリの充実度はPythonが圧倒しているからです。

# 私が、Go言語で計算ライブラリを自作する、というのは、却下です(面倒くさい)

まあ、これは、元を辿ると"ChatGPTの責任"とも言えるのですが(押しつけ)

『ChatGPTは、もの凄く真摯な言葉で、嘘をつく』

取り敢えず、参照させて頂いたページのコードを、自分の環境に合わせて(といっても、結構苦労した"Python3.h"の場所が分からなかった)、ここまで動きました。

/* 
   環境
   wsl -d Ubuntu-20.04

   実行結果
   ebata@DESKTOP-P6KREM0:/mnt/c/Users/ebata/go-efa$ go run main1.go
   Hello, World! and Ebata is great
*/

package main

// #cgo CFLAGS: -I/usr/include/python3.9
// #cgo LDFLAGS: -L/usr/lib/pytho3.9 -lpython3.9
// #include 
import "C"
// import "C"のうえに改行いれるとエラーになる(信じられないが)

func main() {
    //  最後にPythonインタプリタ終了
    defer C.Py_Finalize()
    // Pythonインタプリタの初期化
    C.Py_Initialize()
    // GoのstringをCのcharに型変換(変換しないとPyRun_SimpleStringに型合ってないよって怒られる)
    // cannot use "print(\"Hello, World!\")" (type string) as type *_Ctype_char in argument to _Cfunc_PyRun_SimpleString
    pyCodeStr := `print("Hello, World! and Ebata is great!")`
    pyCodeChar := C.CString(pyCodeStr)
    // Pythonコードを文字列として受け取ってインタプリタ上で実行
    C.PyRun_SimpleString(pyCodeChar)

}

ようするに、このプログラムは、Go言語を使って、Pythonのインタプリタに一行づつコマンドを打ち込むプログラムのようです。

pythonのライブラリを使えるという訳でないようです。

GoとPythonをマージする方法は、どうも調子がよくないようです。

GoとPythonとGrumpyの速度ベンチマーク ~Googleのトランスパイラはどれくらい速い?~

 

2023,江端さんの忘備録

「愚者は経験に学び、賢者は歴史に学ぶ」は、ビスマルクの格言ですが、

"Fools learn from experience, and wises learn from history" was Bismarck's maxim, however,

―― もはや、賢者も歴史から学ぶことはできないんじゃないかなぁ

"I wonder if the wise can no longer learn from history."

という気がしています。

I come to think so.

すぐに思う浮ぶのは「コロナ」と「ウクライナ」です。

The two that immediately come to mind are "Corona" and "Ukraine."

全く、予想もできない事態が起きて、私のような素人はもちろん、いわゆる専門家と言われている人ですら、予測の範囲内にないことが発生し続いてきましたし、続けています。

Unpredictable events that are not within the scope of prediction of even so-called experts, let alone laypeople like myself, have occurred and continue to happen.

例えば ―― 『我が国は、とっとと白旗を上げて降参していれば良かった』という、太平洋戦争における米国との戦争についての私の歴史認識は、今、現在進行形で『本当にそうだったのかな?』と思わせるに至っています。

For example -- "My historical perception of the war with the United States in the Pacific War, that 'Our country should have just raised the white flag and surrendered,' is now ongoing, leading me to wonder, 'Was that the case?'"

歴史に学ぶのであれば、こんな疑問は発生してこないはずです。

If I were to learn from history, such questions would not arise.

(まあ、軍事大国が必ずしも勝利しないことは、ベトナムやアフガニスタンでの米国を見れは明かですが)

(The military superpower doesn't always win, as evidenced by the U.S. in Vietnam and Afghanistan.)

まあ、現在のウクライナと当時の日本では、状況は違い過ぎますが、その状況も含めて、『経験からも歴史からも、正解は導き出せない』と思うのです。

The situation in Ukraine today is too different from that in Japan. Still, including that situation, I think 'the right answer cannot be derived from experience or history.

というか、『そもそも正解はあるのか?』

Or rather, 'Is there a right answer to begin with?'

-----

来年あたり、この日記を読み直して、『なんで、私は、こんな抽象的かつ哲学的な語りをしてりるんだ?』 と、頭の中に疑問符が浮んぶあるだろうと思い、一応、キーワードを残しておきます。

I'll leave you with a few keywords in case you reread this diary next year and wonder, "Why am I talking in such an abstract and philosophical way?" so I will leave some keywords here in case there will be a question mark in your mind.

"ワグネル反乱"

"The Wagner Rebellion."

"内乱に国際法は適用されるのか?"(*1)

"Does International Law Apply to Civil War?" (*1)

(*)https://www.cao.go.jp/pko/pko_j/organization/researcher/atpkonow/article063.html

どうやら、『現時点では、国家主権を超越する主体は存在しない(*2)』―― らしいです。

"At present, no entity transcends national sovereignty" (*2).

(*2)https://www.icrc.org/en/doc/assets/files/other/irrc-873-vite.pdf

-----

「世界中を敵に回しても」・・・? 世界中って、米軍も?

「世界中を敵に回しても」・・・? 世界中って、みたいに?