0207|09|
2007|09|10|12|
2008|01|02|03|
2009|01|05|08|10|11|12|
2010|01|02|03|04|09|11|12|
2011|01|02|03|04|05|06|07|08|09|10|11|12|
2012|01|02|03|04|05|06|07|08|10|11|12|
2013|01|02|03|04|05|06|07|08|09|10|11|12|
2014|01|02|03|04|05|06|07|08|09|10|11|12|
2015|01|02|03|04|05|06|07|08|09|10|11|12|
2016|01|02|03|04|05|06|07|08|09|10|11|12|
2017|01|02|03|04|05|06|07|08|09|10|11|12|
2018|01|02|03|04|05|06|07|08|09|10|11|12|
2019|01|02|03|04|05|06|07|08|09|10|11|12|
2020|01|02|03|04|05|06|07|08|09|10|11|12|
2021|01|02|03|04|05|06|07|08|09|10|11|12|
2022|01|02|03|04|05|06|07|08|09|10|11|12|
2023|01|02|03|04|05|06|07|08|09|10|11|12|
2024|01|02|03|

2021-03-19 でも、それって『かっこ悪い』よね? [長年日記]

コールバックを作ることは、そんなに難しくないんですよ。同じ言語でしたらね。

It's not that difficult to create a callback. As long as it's in the same language.

でもね、GOとC++の間で共通するトリガーイベントを作る方法が ―― 今日、一日、世界中を探し回ったんですけど ―― 見つけられないんですよ。

But you know, I can't find a way to make trigger events common between GO and C++ -- I've been looking all over the world today -- and I can't find it.

ならば、UDPとかTCPとかで待ち受けすれば良い、と。うん、まあ、それは分かるのですけどね。実際にライブラリも作っちゃったし。

So, why don't I just use UDP or TCP to listen in? Yeah, well, I understand that. I've actually made a library for it.

でもね、稼動オブジェクト1万個を同時に接続するUDPなんぞをやったら、一瞬でソケットリソースが使い尽されてしまうでしょう。実際、先月、これでプログラムを落したし。

But I know, if I do a UDP connection with 10,000 active objects at the same time, I'll run out of socket resources in an instant. In fact, I had a program go down last month because of this.

で、一番いいのが、GOのチャネルを使う方法なんですけど、これを、C++に連携させる方法が ―― ない。

So, the best way to do this is to use the GO channel, but there is no way to link this to C++.

GOのライブラリをリンクしたC++のライブラリをリンクした、GOプログラムを動かせればいいんだけど、昨日の試作では、ことごとく失敗した訳です。

It would be nice to be able to run a GO program with a C++ library linked to the GO library, but yesterday's prototype failed at every step.

もちろん、ポーリングすればいいだけのことですよ。サンプリング1秒でも、大した負荷にはならないでしょう。

Of course, I will use "polling" methods. One second of sampling won't be much of a load.

でも、それって『かっこ悪い』よね?

But that's not 'cool', is it?

プログラムのコールをどう実装しようが、私以外の人は知り得ないことですよ ―― でも、『この私』が納得していないんです。

No one but me can know how to implement the calls in the program -- but 'I' am not convinced.

ここ重要です。

This is important.

-----

という訳で、昨日は、朝から深夜に至るまで、この機能を実現する為に、頭を抱え続けて、そして失敗しました。

So yesterday, from morning till late at night, I kept trying to figure out how to make this work, and I failed.

今日は、仕上げなければならない論文ドラフトがあるので、この問題を考えることは一旦中止します。

I have a draft paper I need to finish today, so I will stop thinking about this issue for now.

悔しいので、メモだけ残しておいて、後日の復讐戦に備えます。

It's frustrating, so I'll just leave a note and prepare for the revenge battle later.