2024,江端さんの忘備録

NHKの「日ユ同祖論」を取り扱っている番組がでてきて ―― 『NHKも、ついに終ったか』と思いました。

When NHK's program dealing with the “theory of Japanese-Yu Doyukagaku” came on -- I thought, “NHK has finally come to an end.

日ユ同祖論(にちゆどうそろん)とは、日本人とユダヤ人が共通の祖先を持つという仮説や主張を指します。

Nichiyu Dosoron refers to the hypothesis or assertion that the Japanese and Jews share a common ancestry.

この説は19世紀後半から20世紀初頭にかけて広まったもので、特に歴史学や宗教研究、民族学の一部で議論されてきましたが、現在では科学的な証拠に基づくものとは見なされていません。

This theory, popularized in the late 19th and early 20th centuries, has been debated, especially in some parts of history, religious studies, and ethnology, but is not currently considered to be based on scientific evidence.

言うまでもありませんが、私、この手の主張を、心底から『バカにして』います。

I, for one, am sincerely “making fun” of these kinds of claims.

この私のマインドをセットしたのは、自己をイザヤ・ベンダサンなどと称呼していた、山本七平の『日本人とユダヤ人』に関する論争だったと思います。

I think what set this mindset of mine was the controversy about “The Japanese and the Jews” by Shichihei Yamamoto, who referred to himself as Isaiah Bendasan and others.

----

NHKの視聴全面停止(当然、受信料不払いを含む)を考えていたのですが、番組を見終えて、私の思い違いが確定しましたので謝罪します。

I was considering a total suspension of NHK viewing (including non-payment of subscription fees), but after watching the program, my mistake was confirmed, and I apologize.

『すみません、私の勘違いでした』

'I'm sorry, I was mistaken.

この番組は、私の予想と真逆の内容(日ユ同祖論(にちゆどうそろん)の荒唐無稽さ)を展開していました。

This program was the opposite of what I expected (the ridiculousness of the Nichiyu Doso theory).

言語の類似性の否定、宗教的シンボルの独自性、歴史的な矛盾など ―― なるほど、学会で真面目なネタにならないほど、ショボイ論証の数々が上げられて、番組の結論として、「日ユ同祖論」は史実ではなく思想に過ぎないと断じており、その根拠とされる事例は科学的・歴史的に検証すると成り立たない、という結論になっていました。

The denial of language similarity, the uniqueness of religious symbols, historical contradictions, etc., caused so many shabby arguments that they could not be serious material at the conference. The program concluded that the “theory of Japanese-Yu syncretism” is not a historical fact but an idea. The program concluded that the “Japan-Yu Doyugyo Theory” is not a historical fact but an idea and that the cases used as the basis for the theory are not valid when examined scientifically and historically.

番組を見終って、正直、ホっとしました。

I was honestly relieved when I finished watching the program.

----

番組を見て、終始、私が理解できなかったことは、「自分のルーツを、神秘的なものに求めようとする人々の願望」そのものです。

From the beginning to the end of the program, I could not understand people's desire to seek their roots in something mystical.

そりゃ、まあ、日本人が、旧約聖書の流れを組むユダヤ民族との繋りがある、というストーリは、魅力的な話だろうとは思います(正直、私は、"旧約聖書"の内容すら疑っているのですが、それについては割愛します)。

The story of the Japanese having a connection with the Jewish people that is part of the Old Testament is a fascinating one (to be honest, I am skeptical about the contents of the “Old Testament,” but I won't go into that).

ですけど「自分の先祖が何者であったか」より、「今の自分がどう生きるか」の方が重要だと思うのです。そして、私は、それだけで精一杯です。

But I think “how I live now” is more important than “who my ancestors were.” And that is all I can do.

正直、「お前ら、ヒマなんか?」と問いたくなるレベルです。

Frankly, it's to the point where I want to ask, “Do you guys have any free time?” I am tempted to ask.

----

ただ、その気持ちも、私は少しだけ分かるのです。

However, I know a little bit about that feeling, too.

以前、「江端家、『村上水軍』の末裔論」の話を書きました。

I have previously written about the “Ebata family, the descendant theory of the ‘Murakami Suigun.’”

―― 私たち姉弟は「『村上水軍』の末裔かもしれない」という大変眉唾な話

当然、私、こんなこと本気で信じていませんし、証明のしようもないし、そもそも「デタラメ」であると、自分自身が信じています。

Of course, I don't believe this, and I have no way to prove it, and I believe that it is “bullshit” in the first place.

が、それでも、こんな与太話でも、脳の一部に置いておくと、元気を出すきっかけにはなるのは事実なんですよ。

Still, it's true that even this kind of ruling speech, if kept in a part of the brain, can be a catalyst to cheer me up.

私は、この話、私、親戚同士の笑い話のネタとして持っているだけで、それを他人に信じさせようという気持ちは、1mmも持っていません。

I only have this story, me, as a funny story between relatives, and I don't have one mm of desire to make others believe it.

自分を自分で落しめるなんて、バカバカしい上に、恥もかきます。

It is not only ridiculous but also embarrassing to bring myself down.

『定年まぎわに起業した父と、村上水軍の末裔の母の、息子であるこの私が、こんなところで、くたびれていてどうする!』

-----

戦前に、「日本書記」が、日本の歴史や神話が教育の一環として教えられ、天照大神、神武天皇、国譲りなどの神話的エピソードを通じて、日本の建国や皇室の正統性を強調され、道徳的価値観(親孝行や忠義、公共心といった倫理的な教訓)や国家への忠誠心を育むための教材として、使われてきました。

Before World War II, the “Nihonshoki” was used as a teaching tool to foster moral values (ethical precepts such as filial piety, loyalty, and public spirit) and loyalty to the nation, as Japanese history and mythology were taught as part of education. The legitimacy of the Japanese founding and imperial family was emphasized through mythical episodes such as Amaterasu, Emperor Jimmu, and the handover of the country. The book has been used as a teaching tool.

「日ユ同祖論」のようなものは、国家主義者やカルト団体に、政治的に使われると、大変「たちが悪いもの」に変容します。

Things like the “Japanese-Yu syncretism” can turn into something very “bad” when used politically by nationalists and cults.

という訳で、本日の日記は、上記のような誤解と、その後の謝罪に至っている訳です。

Today's diary results from the above misunderstanding and subsequent apology.

2024,江端さんの忘備録

嫁さんが、一週間ぶりに実家から帰宅しました。

My wife came home from her parent's house for the first time in a week.

その間に義母が危篤状態になるなどのトラブルがあり、私も身構えていたのですが、無事その状態から脱して、予定どおり帰宅しました。

During that time, my mother-in-law was in critical condition, and I was also bracing myself, but she was able to get out of that state, and my wife returned home as planned.

-----

駅まで自動車でピッアップした後の、車の中での会話です。

The following was our conversation in the car after I picked up my wife from the station by car.

私:「今週は、世間も大変な事件があったよね」

Me: “I know the world has had some tough cases this week, too.”

嫁さん:「あったねぇ」

Wife: “There it is

私:「韓国の戒厳令」

Me: “Martial Law in Korea.”

嫁さん:「中山美穂の急死」

Wife: “Sudden death of Miho Nakayama

-----

両方とも「大変な事件」であるのは間違いないのですが、改めて反応するベクトルの違いを認識しました。

Both are undoubtedly “serious incidents,” but once again, I recognized the different vectors of reaction.

―― お前は、他人を多様性のある他人として認めることができず、すぐに「纏めよう」としたがる、低能で単純なバカだよな

2024,江端さんの忘備録

私は、インターフォンであれ、電話であれ、「お時間よろしいですか?」で始まる会話は、

Whenever I receive a phone call, whether over the intercom or on the phone, I say,

『今、死ぬほど忙しいです』とだけ言って、 相手に何も言わせないで、一方的に会話を打ち切る(所要時間:2秒)、

“I'm busy to death right now,” and terminate the conversation (time required: 2 seconds).

という対応をしています。

-----

ところが、このような「冷たい」対応をする人は、あまり多くないようです。

However, few people respond in such a “cold” manner.

「みんな、やさしいなぁ」と感心します ―― いや、本心からそう思っています。

I am impressed that everyone is so kind -- well, I mean it.

私のマインドの方が変なのかな、と心配になってきます。

I am beginning to worry that my mindset is more strange.

ちなみに、私は、繁華街での客引きされた経験がありません。

By the way, I have never experienced being touted downtown.

前をしっかと見据えて、拳を握って、等速で歩いている男に、声をかける人は滅多にいません。

People seldom talk to a man constantly walking, his eyes fixed firmly on the road ahead and his fists clenched.

それでも、客引きの動きを察知したら、一瞬停止した後(この"一瞬停止"が重要)、客引きのベクトルと別の方向に歩き出す(もっとも露骨なのは、後ろ向きに歩き出す)と、効果的です。

Nevertheless, suppose I detect a tout's movement. In that case, I should stop for a moment (this “momentary pause” is essential) and then start walking in a different direction from the tout's vector (most blatantly, walking backward).

-----

本日は、このような、客引きや電話セールスをする人の「動機」について考えてみました。

Today, I have been thinking about the “motives” of these touts and telemarketers.

繁華街での客引きや、電話での営業は、私のような人間から冷たい対応を受けることが多そうで大変そうです ―― 私には到底努まりそうにありません。

Touting downtown and sales over the phone seems like a lot of hard work, as I'm sure I'd get a lot of cold shoulder from people like me -- something I'm not likely to strive for.

報酬の観点から調べてみました。

I looked at it from the perspective of compensation.

  • 繁華街での飲食店誘導では、1人あたり数百円〜数千円程度の報酬
  • エステや脱毛サロンの契約で、1件あたり5,000円〜2万円の報酬
  • 高額な商品やサービスの場合、1件で数十万円の報酬が得られることもある

- In the downtown area, restaurants are being introduced, from a few hundred yen to a few thousand yen per person, to guide customers to restaurants in downtown areas.
- 5,000 yen to 20,000 yen per person for a contract at an esthetic salon or hair removal salon
- For high-value products and services, a single case can earn several hundred thousand yen.

今、東京都では、最低賃金が1000円を越えているので、「繁華街での飲食店誘導」なら、普通のアルバイトでも良さそうな気がします(地域にも因ります。青森県:時給853円、沖縄県:時給900円、鹿児島県:時給905円)。

In Tokyo, the minimum wage is now over 1,000 yen, so it would seem that a regular part-time job would be fine for “leading a restaurant in a downtown area” (depends on the area. Aomori Prefecture: 853 yen per hour, Okinawa Prefecture: 900 yen per hour, Kagoshima Prefecture: 905 yen per hour).

私は、いわゆる繁華街には行きませんが、秋葉原に部品の購入に行くことがあります(最近はAmazonの方が、早いので、滅多に行かなくなりましたが)。で、道を塞ぐメイドさんが、非常に邪魔です。

I don't go to the so-called downtown area, but I sometimes go to Akihabara to buy parts (although I rarely go there these days because Amazon is faster). And the maids blocking the way are very disturbing.

「繁華街での飲食店誘導」の収入なら、普通のアルバイトと同程度という気がしますが、普通のアルバイトにはないメリットとしては、以下のようなものがあるようです。

I feel that income from “downtown restaurant induction” is about the same as a regular part-time job, but there are some advantages that regular part-time jobs do not offer, including the following.

■頑張り次第で普通のアルバイト以上の収入を得られる可能性があり、短期間で高収入を目指す人には魅力的

Depending on how hard you work, you can earn more than a regular part-time job, making it attractive to those who aim for a high income in a short period of time.

■営業時間に合わせて夜間や週末のみ働ける場合が多く、特に学生や副業を探している人にとってスケジュールが調整しやすい

-Often work only evenings and weekends to accommodate business hours, making it easy to adjust schedules, especially for students and those looking for a second job

■接客や営業経験がなくても始められるため、未経験者にとって参入のハードルが低く、マニュアルや基本的なトークスキルさえ学べば即戦力で業務が可能

-Because you can start without any customer service or sales experience, the entry hurdle is low for inexperienced people, and you can work immediately as long as you learn the manual and basic talk skills.

その他、

Other,

■成果を上げるために自分の話し方やアプローチ方法を工夫できる仕事であり、クリエイティブな一面を活かせる可能性

-A job that allows you to devise your speaking style and approach to achieve results and possibly utilize your creative side.

というのも、魅力かもしれません。

This may also be an attractive feature of the job.

『参入障壁が低くて、高収入の可能性もある』というのは、確かに美味しい・・・というか、美味しく『感じられる』のかもしれません。

'Low barriers to entry and high-income potential' may taste ... or 'feel' delicious.

-----

『なるほど。客引きや電話セールスにも、ちゃんとメリットもあるのだな』と、納得しました。

I see. I was convinced that touting and phone sales have their own merits.

これで、私も、客引きや電話セールスに対して、これからも同様の「冷たい対応」を続けられる、と安心しました。

This reassured me that I could continue to be similarly “cold” to touts and phone salespeople.

これを見ても、なお、江端家のドアホンを押す勇気があることは、見上げたものだと思います。

未分類

韓国は、今、戒厳令に揺れています。

(1)戒厳令が国会で否決されるという憲法の規定が存在する理由が分かりません。戒厳令とは国会の停止を含んでいる思っていたので違和感を感じています。

(2)今回の韓国の事件で、国会議員が軍隊に邪魔されることなく国会議事堂に入れたことにも不思議に思っております。


これらについて教えて下さい。

----- ChatGPTここから -----

韓国の憲法第77条第5項は、国会が在籍議員の過半数の賛成で戒厳の解除を要求した場合、大統領はこれを解除しなければならないと定めています。

この規定は、戒厳令の濫用を防ぎ、民主的統制を維持するために設けられています。戒厳令は非常時において行政・司法機能を軍が代行する措置であり、権力の集中を伴うため、国会がその適切性を監視し、必要に応じて解除を求める権限を持つことが重要とされています。

戒厳令下でも、国会は解散されず、議員の活動も保障されています。憲法は、戒厳令下においても国会議員の逮捕を認めていません。

そのため、国会議員は軍の妨害を受けることなく議事堂に入る権利を有しています。今回の韓国の事例では、軍が国会議事堂への侵入を試みましたが、議員や職員がこれを阻止し、最終的に戒厳令の解除を求める決議案が可決されました。

このように、憲法上の規定により、国会の機能と議員の活動は戒厳令下でも維持されることが保障されています。

------ ChatGPTここまで -----

"軍が国会議事堂への侵入を試みましたが、議員や職員がこれを阻止し" って、何?

普通、逆だろう、これ。

驚くほど民主主義的な「戒厳令」の憲法の規定に、正直驚いています。

シュリ」とか「シルミド」とか「KT」のイメージを間に受け過ぎたのかもしれません。

日本の戒厳令の、"5.15"とか"2.26"とかとセットで記憶していることも原因かなぁ。

私なら ―― 国会の封鎖、放送局、警察庁、裁判所の占拠、野党党首を含めた国会議員の強制逮捕、あと閣僚の身柄拘束もします 。デモ隊への発砲もためらいません。で、<北>が休戦協定を破棄して、<南>の人民の開放を口実に、南下し首都ソウルを占領。在韓米軍の出動の隙を狙って、そのまま台湾紛争が勃発、と ―― まあ、それくらいのことを考えていたんですけどね(当然、日本も巻き込まれる(台湾紛争と、半島からの難民問題で))。

ともあれ、私のイメージしてきた「戒厳令」とは、全然違ったようです。

運が良かったのか、私の想像力が豊かすぎたのかは、まだ、判断できていませんが。

2024,江端さんの忘備録

ミシュラン三つ星レストラン ―― この称号がレストランにとっての栄誉であり、また私たちにとって美食を選ぶ基準であることは、揺ぎない事実です(まあ、高価な食事に無縁の私には、あまり関係がないのですが)。

A Michelin three-star restaurant -- it is an undeniable fact that this title is an honor for the restaurant and a criterion for our gastronomic choices (well, not so much for me, as I am not a big fan of expensive food).

ミシュランとはタイヤ製造会社です。

Michelin is a tire manufacturing company.

「タイヤ屋なら、タイヤの研究開発(R&D)に命を注いでいろ」という気持ちがあります。

Also, I feel that “if you are a tire maker, you should devote your life to tire research and development (R&D).

エンジニアとしての性(さが)として、「旨い店を探す金があるなら、『超長距離走行でもヘタれないタイヤ』や『凍結路面であっても通常路面と同様に急停止を担保するタイヤ』の開発に、命をかけろ」と言いたくなります。

As an engineer, it is my nature to say, “If you have money to spend on finding a good restaurant, spend it on developing tires that do not sag even over very long distances and that can stop as quickly on icy road surfaces as on standard road surfaces.

-----

とは言え、ミシュランのこのレストラン評価システムは、本業ともリンクしているのも事実です。

Nevertheless, it is also true that Michelin's restaurant rating system is linked to its core business.

ミシュランはフランスのタイヤ製造会社であり、ミシュランガイドは1900年にドライバー向けのガイドブックとして創刊されました。

Michelin is a French tire manufacturer, and the Michelin Guide was first published in 1900 as a guidebook for drivers.

当初はタイヤの使用方法や修理方法、自動車修理工場やガソリンスタンド、ホテル、レストランの情報などが掲載されていましたが、1926年からは、優れた料理を提供するホテルやレストランに星を付ける評価システムが導入されるに至ったという歴史があります。

Initially, the magazine included information on how to use and repair tires, auto repair shops, gas stations, hotels, and restaurants. Still, the magazine's history dates back to 1926, when a rating system was introduced to award stars to hotels and restaurants that served excellent food.

その一方、その歴史的経緯を考えると、私は、ミシュランが評価すべき対象は、道路沿いのラーメン屋、定食屋、ファストフード、またはドライブイン(道の駅を含み)ではないか、とも思うのですが ―― まあ、それはさておき。

On the other hand, given its historical background, I wonder if Michelin should be evaluating roadside noodle shops, set menus, fast food, or drive-ins (including roadside stations) -- well, let's put that aside.

-----

2024年12月5日、日本酒などの「伝統的酒造り」が国連教育科学文化機関(ユネスコ)の無形文化遺産に登録されました。

On December 5, 2024, the United Nations Educational, Scientific and Cultural Organization (UNESCO) registered “traditional sake brewing,” such as Japanese sake, as an intangible cultural heritage.

これによって、日本各地の酒造が、喜びの声を上げているようです。

This seems to have brought joy to sake breweries throughout Japan.

どの酒造も、経営が苦しく、後継者問題で頭を抱えている中、ユネスコのような権威のある機関から、「日本の酒づくりは、優れた文化遺産である」と認定されれば、元気が出てくるというものです。

While all sake breweries are struggling to manage their operations and are faced with the problem of successors, it is a great encouragement to have an authoritative organization such as UNESCO recognize that “Japanese sake brewing is a cultural heritage of excellence.

これは、『お前たちのやっていること/やってきたことは、素晴しい』と褒められたということです。

This means they were praised, saying, 'What you are doing/what you have done is terrific.

そして、このように褒めて貰えた、ということは、現場のエンジニア(ここでは、杜氏(とうじ)、蔵人(くらびと)ということになります)に、勇気を与えた、ということです。

This praise gave courage to the engineers on site (in this case, "to" and "Morabito," or brewers).

「褒める」ということで、前向きな気持ちになり、明日への活力が湧いてくるなら、それは本当に凄いことだと思うのです。

If “praise” makes you feel positive and gives you energy for tomorrow, that's great.

人を前向きにさせるのは「お金(報酬)」だけじゃ足りないのです。

Money (rewards) alone is not enough to make people think positively.

そこに「賞賛」と「敬意」が伴って、人は前向きに自分の意思で動き出すことができるのです。

When accompanied by “praise” and “respect,” people can move forward positively on their initiative.

ミシュランの"星"とは、この『お前たちのやっていること/やってきたことは、素晴しい』に他なりません。

A Michelin star means, “What you are doing and what you have been doing is terrific.

でも、その程度のことも分かっていない人間って、本当に多いですよね ―― 特に日本は。

But so many people don't even know that much -- especially in Japan.

日本の生産性がずっと低下しているのは、この「Let me say "Thank you"」ができていないからだと、私は本気で思っています。

-----

私、本当に仕事を一生懸命やっているつもりなのですが、それに対して何も言われずに、次の課題を言われるだけの日々に、心が疲弊していきます。

I work hard at my job, but the days of being told nothing about it, only to be told the next assignment, are exhausting.

私、仕事の途中で色々なアイデアが出てくるのですが、『どうせ、これを実装しても、スルーされて、さらに難しいことを言われるだけだろう』と思うと ―― 『何もせずに黙っていた方がマシだ』と思うようになります。

I get a lot of ideas in the middle of my work, but when I think, 'If I implement this anyway, I'll just be passed over and told to do something even more difficult,' I think, 'It's better to do nothing and keep quiet.'

そして、仕事への意欲も落ちてきます(で、最悪、抑うつになっていく、いうこともある)。

And, I am less motivated to work (or, worse, they become depressed).

さらに酷くなれば、『前向きにがんばっている人間の足をひっぱりたく』なってきます(本当) ―― それが嫌いな奴であれば、その気持ちは、さらに強いものになります。

If it gets worse, I will want to 'pull the leg of someone who is trying hard to be positive' (true) -- and if it's someone you don't like, the feeling will be even stronger.

こんなマインドが、国民全体に広がっているのであれば、我が国の生産性が低いのは当然と言えましょう。

If this kind of mindset prevails throughout the nation, it is no wonder that our country's productivity is low.

-----

こちらの日記でも、私は『目標を達成したエンジニアを、その上司ですら公に褒めようとしない。「プロジェクトX」では、徹頭徹尾、このような上司の振る舞いが「美徳」として取り扱われている』と記載しました。

In this diary, I also wrote, 'Even the supervisor of an engineer who achieves a goal does not want to praise him or her publicly.' This kind of boss behavior is treated as a “virtue” throughout Project X.

(7)総じて「プロジェクトX」は、「エンジニアの夢や希望を搾取」して「プロジェクトを完成させた」というストーリで構成されており、現在の若者への「やりがい搾取」と1mmも変わっていないように見える

我が国のエンジニア(と多分、他の分野にも)に継承されている、この『クソッタレな文化や慣習』は、本当にどうにかならないものでしょか?

Can we do something about this 'shitty culture and practice' that has been inherited by our country's engineers (and maybe other fields as well)?

会社にこそ「いいね!」のシステムを導入すべきであると。

ただ、私が見ている限り、「寡黙な男のほとんどは『低能』」 ―― とまで言わないものの、インプットされている知識量が圧倒的に少ない様に見えました。

2016,江端さんの忘備録

「部下を褒める」という本が出版されていることは、「部下は褒めないもの」というデフォルト設定があるからですよね。

The book titled "Praise subordinates" means that there is a default setting of "Do not praise subordinates."

これは、「叱責する」のが「褒める」よりコストが安いことを示しています。

This indicates that the cost of rebuking is cheaper than "praising."

で、残念ながら、それは事実だと思うのです。

Unfortunately, I think that's true.

それでですね、最近思うんですよ。

It is so, and I believe recently as follows,

会社にこそ「いいね!」のシステムを導入すべきであると。

"Like button" should be installed in a company IT system.

例えば、パワーポイントとかワードで良い資料を作ったら、その資料に「いいね!」を記録できるようにする、とか。

For example, if someone makes a good article in PowerPoint or Word, we can push the "Like button" on the materials.

良い内容の提案があれば、文章でリプライしなくても、「いいね!」が付けられるメールシステム、とか。

If there is a proposal of good content by e-mail, "I like it!" will be attached without replying in the sentence on the mail system.

定時退社したら「いいね!」を付けられる社員プロフィールのページ、とか。

If the worker leaves the office regularly, we can push the "Like" button on the employee profile website.

-----

まあ、こういうことをやると、組織が変な方向に動いていくだろうことは予想に難くないのですが、

Well, it is not difficult to predict the organization would move in a strange direction,

それでも ――

Still,

「褒める」ことの閾値を下げる効果は期待できると思うんですよ。

I think the effect can be expected to lower the threshold of that "praise."

2024,江端さんの技術メモ

注意点は、通信プロトコルのメトリクスが2以上あろうとも、
main()の開始近くで

GMainLoop *main_loop = g_main_loop_new(NULL, FALSE);
を1回、

main()の終了近くで

// 共有のイベントループを実行
g_main_loop_run(main_loop);

// メインループをクリーンアップ
g_main_loop_unref(main_loop);

を、それぞれ1回だけ発行すること。

g_main_loop_run(main_loop)でプログラムは無限ループに入ってロックするので、その下のプログラムは実行されないことにも注意。

(以下はイメージ。コンパイルしても稼動しません)

#include <glib.h>
#include <gst/gst.h>
#include <pthread.h>

typedef struct {
    GstElement *pipeline;
    GMainLoop *main_loop;  // 共有のイベントループ
} ArgsRtspRTSP;

typedef struct {
    GstElement *srtserversink;
    GMainLoop *main_loop;  // 共有のイベントループ
} Args;

void *print_rtsp_metrics_thread(void *arg) {
    ArgsRtspRTSP *args = (ArgsRtspRTSP *)arg;
    // RTSPメトリクス計測のロジック
    while (1) {
        g_usleep(1000000); // 1秒ごとに計測
        g_print("RTSP Metrics: Calculating...\n");
    }
    return NULL;
}

void *print_srt_metrics_thread(void *arg) {
    Args *args = (Args *)arg;
    // SRTメトリクス計測のロジック
    while (1) {
        g_usleep(1000000); // 1秒ごとに計測
        g_print("SRT Metrics: Calculating...\n");
    }
    return NULL;
}

void initialize_rtsp_pipeline(ArgsRtspRTSP *args) {
    // パイプラインの初期化
    args->pipeline = gst_pipeline_new("rtsp-pipeline");
    GstBus *bus = gst_element_get_bus(args->pipeline);
    gst_bus_add_watch(bus, (GstBusFunc)gst_bus_async_signal_func, args->main_loop);
    gst_object_unref(bus);
}

void initialize_srt_pipeline(Args *args) {
    // パイプラインの初期化
    args->srtserversink = gst_element_factory_make("srtserversink", "srt-sink");
    GstBus *bus = gst_element_get_bus(args->srtserversink);
    gst_bus_add_watch(bus, (GstBusFunc)gst_bus_async_signal_func, args->main_loop);
    gst_object_unref(bus);
}

int main(int argc, char *argv[]) {
    gst_init(&argc, &argv);

    // 共有のイベントループを作成
    GMainLoop *main_loop = g_main_loop_new(NULL, FALSE);

    // RTSP引数の初期化
    ArgsRtspRTSP rtsp_args;
    rtsp_args.main_loop = main_loop;
    initialize_rtsp_pipeline(&rtsp_args);

    // SRT引数の初期化
    Args srt_args;
    srt_args.main_loop = main_loop;
    initialize_srt_pipeline(&srt_args);

    // スレッドの作成
    pthread_t rtsp_thread, srt_thread;

    pthread_create(&rtsp_thread, NULL, print_rtsp_metrics_thread, &rtsp_args);
    pthread_create(&srt_thread, NULL, print_srt_metrics_thread, &srt_args);

    // 共有のイベントループを実行
    g_main_loop_run(main_loop);

    // メインループをクリーンアップ
    g_main_loop_unref(main_loop);
    return 0;
}

ようするに、開始と終了は、1回のみ宣言する、ということ。

g_main_loop_run(main_loop) の後は、プログラムがそこでロックされて、その後のプログラムコードに進まないことに注意。

未分類

q0713がイオン金沢シーサイド店である場合のq0707とq0714の値を0から24の値の数で表示させるSQL文を作成してcsvファイルで保存して下さい。添付したようなグラフを作成するためです。

 

CSVファイルへの保存(psql の場合)

結果をローカルにCSVファイルとして保存するには、以下のコマンドを使用します(1行で記載sにないと、\copy: parse error at end of lineと言われる)

\copy (WITH 時刻範囲 AS (SELECT generate_series(0, 24) AS 時刻) SELECT 時刻範囲.時刻, COALESCE(SUM(CASE WHEN e.q0707 = 時刻範囲.時刻 THEN 1 ELSE 0 END), 0) AS 出発時刻カウント, COALESCE(SUM(CASE WHEN e.q0714 = 時刻範囲.時刻 THEN 1 ELSE 0 END), 0) AS 到着時刻カウント FROM 時刻範囲 LEFT JOIN master_e AS e ON e.q0713 = '京急ストア富岡店' AND e.q0707 BETWEEN 0 AND 24 AND e.q0714 BETWEEN 0 AND 24 GROUP BY 時刻範囲.時刻 ORDER BY 時刻範囲.時刻) TO 'G:/home/ebata/output.csv' WITH CSV HEADER;

イント

  1. Windows環境では絶対パスを使用:
    • G:/home/ebata/output.csv の形式で絶対パスを指定してください。
  2. クエリ結果を手動で確認:
    • 上記SQLを実行後、クエリ結果を確認し、正確なデータが得られることを確認してください。
  3. グラフ作成:
    • このデータを元にPythonやExcelで出発時刻・到着時刻の折れ線グラフを作成できます。

2024,江端さんの忘備録

『提案なんぞいいから、"動くモノ"を持ってこい』

Many customers say, “Forget the proposals, just bring us something that works,”

と、おっしゃるお客さんは多いですが、私は「その言い分はもっともだ」と思っています。

and I think they have a valid point.

イラスト

(↑クリックすると、『10Mのイーサネットのイエローケーブル』と『20年前と完全同一のコントローラーを作って持ってこい』)の話が出てきます)

(↑Click here to see the story of “10M Ethernet yellow cable” and “Make and bring a controller that is the same as it was 20 years ago.”)

-----

私、標準化活動というものに2~3年ほど携わったことがあるのですが、その時実感したのは、―― 『標準化活動とは、先行して自社開発した製品の仕様を、その開発前の会社に押しつける活動』だということです。

I have been involved in standardization activities for a couple of years, and I realized then that “standardization activities are activities to impose the specifications of a product developed by the company ahead of the company on the company that created it before the company.

もちろん、美辞麗句で固めるのであれば、「業界全体の互換性や効率性を高め、顧客にとって利便性を向上させる役割を果たすこと」とかも言えます。

Of course, if we speak in rhetoric, we could also say that it “increases compatibility and efficiency throughout the industry and improves customer convenience.

しかし、ここで重要なのは、『実際に動いているものが、すでにある』という事実なのです。

But what is important here is that 'what is working is already there.

私、以前、標準化活動の団体にドラフトを提出したことがあるのですが、その内容の良し悪しはともあれ、そのドラフトの内容に不安はありませんでした。

I, for one, have submitted a draft to a standards activity organization before, and I had no concerns about the content of that draft, good or bad.

その仕様の通信プロトコルは、実際に私がコーディングして、ちゃんと動いていたからです(実験室レベルで、ですが)。

The reason is that I coded a communication protocol for that specification, and it worked (at the laboratory level, that is).

-----

「検討委員会を立ち上げて」「関係各所の合意を得て」「予算を確保して」「事業計画を精査して」「関連部署と調整して」「リスクアセスメントを実施して」「スケジュールを再調整して」「追加資料を作成して」「専門家の意見を再度取り入れて」「上層部の承認を仰いで」「さらなる意見交換会を開いて」....という場面に、このエンジニア人生において、どれだけ立ち合ってきたことか。

'Establish a study committee,' 'Obtain agreement from all concerned parties,' 'Secure a budget,' 'Scrutinize the business plan,' 'Coordinate with relevant departments,' 'Conduct a risk assessment,' 'Readjust the schedule,' 'Prepare additional materials,' 'Reinvite expert opinions,' 'Seek upper management approval,' and 'Further opinion meeting.” .... I can't tell you how many of these situations I have witnessed in my engineering career.

私は、もうウンザリしているんですよ。

I am sick and tired of it.

多分、お客さんも、同じ気持ちなのではないかと。

Perhaps the customers feel the same way.

-----

そんな中、

In the midst of all that,

『ちなみに、これ、もう動いています』と、だけ言って立ち去る ――

I would say, “By the way, this is already working,” and walk away.

こうして、「声がけ」連中の"メンツ"を潰すのは、エンジニアの醍醐味でもあります。

It is an absolute pleasure for an engineer to crush the “honor” of those who “call the shots” in this way.

詳細については省略します。私、まだ、サラリーマンエンジニアですから。

I'll skip the details. I am still a salaried engineer.

「世界は一人で動かす」

2024,江端さんの忘備録

ChatGPTが凄い奴、ということは、これまで申し上げてきた通りです。

As I have said, ChatGPT is a fantastic thing.

しかし、現在、私が唯一困っているのが「図面の作成」です。

However, the only thing I'm having trouble with now is “drawing up plans.”

私としては、ChatGPTに"線図"を描いて欲しいのですが、こんな図を描いてきます。

I want ChatGPT to draw a “line diagram” for me, but it draws diagrams like this.

『「売国機関」に登場する、チュファルテク合同共和国、クライス連邦、ガルダリケ王国の関係図を、簡単な線図で描いて下さい』とお願いすると、

When I asked them to draw a simple diagram showing the relationships between the Chufartek Union, the Kreis Federation, and the Gardalike Kingdom, which appear in the “Traitorous Organization,”

A simple diagram illustrating the relationships among three fictional countries: Chufartech Union Republic, Kreis Federation, and Gardarike Kingdom. The diagram uses arrows and labels to denote their connections: alliance, rivalry, and trade agreement. Each country is represented by a stylized symbol – a gear for Chufartech, a star for Kreis, and a crown for Gardarike. The background is plain white for clarity.

 

という図が出力されました(内容も間違っています)。

ChatGPT outputs the above figure (the content is also wrong).

ChatGPTと「売国機関」についての会話をした件

-----

仕様書の概要を記載して、線図の作成をお願いしました。

I asked ChatGPT to create a “line diagram” by writing an overview of the specifications.

私が期待していた線図は、こんな感じでした。

This is the kind of diagram I was expecting.

それが、

A detailed schematic diagram of a computer system with a central CPU labeled as '2' in the middle. The CPU is connected with arrows to the following components: Memory (5) for temporary storage, HDD (3) for long-term data storage, Network Interface (6) for external communication, and Monitor Controller (4), which is connected to a Display (7). Additionally, an Input/Output Controller (1) is placed connecting external devices like a keyboard and mouse to the CPU. The diagram shows clear directional arrows representing data flow between components, with a clean and organized layout on a white background.

なんで、こうなる。

Why is that?