ときどきの雑記帖 RE* (新南口)
Brightness Falls from the Air
雪
どうなるかとちょっと心配したが、電車が止まるような降りにはならずやれやれ。
在宅勤務にした人や休みにした人も結構いたようで、わたしのいるフロアでは いつにもまして人影がまばらだった。それはともかくこういうときは 社食の業者も数を読むのが大変だろうなあと思ったり。
雪と言えば、大学受験のときや卒研の発表会など やたらと雪の日に当たってたような気がするなあ。
ボールペンの芯(の寿命)
外れを連続して引いてしまったという可能性はあるけど、 とある芯だけ入れ替える方式のボールペンで 三色入れているうちの特定の一色だけ インクが大部分残っているのに書けなくなるという 状態になっていて ひょっとして色によって寿命に違いが出るのか? と不思議に思っている。
書けなくなった芯をよく見ると どうも空気が入ったっぽいのだけど (使用前にはなかったはず)、 はて?
五反田
五反田も駅周辺が結構変わってるよなあ と思って記事を見たら 大崎駅と五反田駅の中間あたりの話だったでござる。
大崎・五反田の再開発 約1.6ヘクタールに住宅や複合施設:2027年度竣工 - ITmedia ビジネスオンライン
事実上標準
GitHubユーザーが1億人に到達。約16年でソースコード管理の事実上標準に | テクノエッジ TechnoEdge
「デファクトスタンダード」とか 「事実上の標準」ではないんだ。
絶滅メディア博物館
そいや夕方のNHKの番組(の一コーナー)でも取り上げていた> 絶滅メディア博物館
東京「大手町の絶滅メディア博物館」を訪問 思い出を記録してきた品々がズラリ | おたくま経済新聞
まだ行ってないす😄
We’ll soon configure Google Analytics 4 for you
前回書いたGoogle Analyticsの話 のつづき。 Googleさんからメールが来た。
We’ll soon configure Google Analytics 4 for you
Hello.
Universal Analytics standard properties will stop processing data on July 1, 2023. (略)
For any customer who does not set up a GA4 property with basic settings, starting in March, we will configure one with a few basic settings consistent with the existing Universal Analytics property; (略)
For Universal Analytics customers whose websites are tagged with gtag.js or analytics.js (including through tag management systems like Google Tag Manager), we will create a connected site tag that will reuse existing tags when possible to send traffic to the new GA4 property. (略)
何もせんで待っていればよかった?
addressable
GitHubが開発中の新しいコード検索エンジン「Blackbird」とは? | TECH+(テックプラス)
GitHubのデータの場合、Gitが使用するContent Addressable Hash(コンテンツアドレス可能ハッシュ)がインデックス化に利用できることと、 GitHubには多数の重複コンテンツがあるということの2つの特性があり、 この特性を利用することで現実的な時間でのインデックス構築を可能にしているという。
「コンテンツアドレス可能ハッシュ」とはなんのこっちゃい という状態になったので調べてみると
連想メモリ(れんそうメモリ、Content Addressable Memory、CAM)は、コンピュータなどの記憶装置(メモリ)の一種で、 たいていの一般的なメモリは整数値などでアドレスを指定してその内容を読み書きするものであるのに対し、 内容(の一部)を指定して、そのアドレスあるいは内容全体を読み出すことができる、というメモリである。
ということらしい>Content Addressable
カタカナまみれの日本語書きにしないでそのまま英語で書いてくれてた方がよっぽどいいような。
Content-addressable storage - Wikipedia
Content-addressable storage (CAS), also referred to as content-addressed storage or fixed-content storage, is a way to store information so it can be retrieved based on its content, not its name or location. It has been used for high-speed storage and retrieval of fixed content, such as documents stored for compliance with government regulations. Content-addressable storage is similar to content-addressable memory.
double free
- OpenSSLに複数の重大な脆弱性、ただちに更新を - JPCERT/CC | TECH+(テックプラス)
- OpenSSH Pre-Auth Double Free – Writeup and Proof-of-Concept | Hacker News
- CVE-2023-25136 OpenSSH Pre-Auth Double Free Writeup & PoC
この手の話題は大好物なので記事を追いかけてみるとこんなコードに遭遇。
/* Always returns pointer to allocated memory, caller must free. */
char *
compat_kex_proposal(struct ssh *ssh, char *p)
{
char *cp = NULL;
if ((ssh->compat & (SSH_BUG_CURVE25519PAD|SSH_OLD_DHGEX)) == 0)
return xstrdup(p);
debug2_f("original KEX proposal: %s", p);
if ((ssh->compat & SSH_BUG_CURVE25519PAD) != 0)
if ((p = match_filter_denylist(p,
"curve25519-sha256@libssh.org")) == NULL)
fatal("match_filter_denylist failed");
if ((ssh->compat & SSH_OLD_DHGEX) != 0) { [1]
cp = p; [2]
if ((p = match_filter_denylist(p,
"diffie-hellman-group-exchange-sha256,"
"diffie-hellman-group-exchange-sha1")) == NULL)
fatal("match_filter_denylist failed");
free(cp); [3]
}
debug2_f("compat KEX proposal: %s", p);
if (*p == '\0')
fatal("No supported key exchange algorithms found");
return p;
}
こう切り出して書かれると、「あー」となるけど 実際書いているときには気がつかないものなんですかね (自分のことは棚上げ)。
0.1+0.2
Why does 0.1 and 0.2 = 0.30000000000000004? | Hacker News
定期的に出る話題だよなあ と思いつつ眺めていたら興味深い発言があった。
Numbers (from Apple) returns TRUE for both expressions you list
Objective-C has a really nice decimal math library. Last I looked (it’s been a while), Swift didn’t. It might have one by now. Years ago, I had a few apps in the App Store that made extensive use of it. It really was very nice to work with.
Swift has the same functionality in the Decimal type.
Thanks! It looks like that was added in Swift 3. That was a long time ago. I guess I’m just really old ;)
Under the hood, modern Numbers stores values in Decimal128 (16 bytes)
へー。>modern Numbers stores values in Decimal128
pocketpy
PocketPy: わずか5000行ほどの組み込み用Pythonインタプリタ。モジュールは re, math, time, jsonなどが使用可能。Unityにも組み込めるらしい。追加機能として goto/label文や三項演算子もサポートされている。https://t.co/vruXbHWaND
— 新山祐介 (Yusuke Shinyama) (@mootastic) February 8, 2023
これは知らなかったのでリンクをたどって眺めてみた。
GitHub - blueloveTH/pocketpy: C++17 header-only Python interpreter for game engines.
readmeのページは英語版と中文(簡体字)版が切り替えられるのだけど
Features
の項で英語版にはある
Star Unpacking a, *b = [1, 2, 3] NO
に該当するものがが中文版にはないのはなにか深い意味があるんだろうか?
Release v0.8.4 · blueloveTH/pocketpy
Function Attributes
How to improve application security using _FORTIFY_SOURCE=3 | Red Hat Developer
void *my_allocator (size_t nmemb, size_t size) __attribute__ ((__alloc_size__ (1, 2)));
やら
void
__attribute__ ((__access__ (__read_write__, 1, 2)))
do_something (char *ptr, size_t sz)
{
...
// Get a copy size from somewhere else.
size_t setsize = get_size ();
memset (ptr, 0, setsize);
}
のアトリビュートが見慣れなかったので ちょっと調べてみた。
Common Function Attributes (Using the GNU Compiler Collection (GCC))
accessはページの先頭にある。 が、数を数えてはいないけど結構な数があるのねえ。
FORTRAN Compiler on IBM 704
https://justine.lol/sectorlisp/ibm709.pdf
REM CB000/ CALLS=C0190X,C0190,DIAG. 4F11733
REM CB000 CLASSIFIES STATEMENT AS ARITHMETIC OR NON-ARITHMETIC. 4F11734
CB000 LXA L(1),1 カッコのバランスチェックの初期化
TSX C0190X,4 一文字取得サブルーチンの初期化
CB001 TSX C0190,4 一文字取得
CAS AEQUAL =か?
TXI CB005,0 NO
TXI CB200,0 =ならカッコの数をチェック
CB005 CAS ALPAR (か?
TXI CB006,0 NO
TXI CB001,1,1 カウンター操作
CB006 CAS ARPAR )か?
TXI CB007,0 NO
TXI CB500,0 カッコのバランスチェック
CB007 SUB ENDMK 文の終わり?
TNZ CB001 NO→次の文字のチェックへ
TXI CC000,0 =が出てこなかったので算術文ではない
* =が出てこないとここ(CB200)には来ない
CB200 TIX CC000,1,1 カッコの中に=があれば算術文ではない
CB201 TSX C0190,4 次の文字取得
CAS ALPAR (か?
TXI CB205,0 NO
TXI ARITH,0 YES→算術式
CB205 CAS ACOMMA ,か?
TXI CB206,0 NO
TXI CC000,0 YES→算術文以外
CB206 SUB ENDMK 文の終わり?
TNZ CB201 NO→次の文字のチェックへ
TXI ARITH,0 算術式
CB500 TIX CB001,1,1 )の方が多い→エラー
TSX DIAG,4
REM END OF PROGRAM CB000. 4F11763
ブライトバンド
東海のレーダー観測に「ブライトバンド」が現れています。これはレーダー設置場所を中心に円状にエコーが強まるもので、気温が0℃の高さ(融解層)で融けはじめた雪が電波を強く返すことが原因。円状に雨が強いわけではありません。円が小さくなると0℃の高さが低くなってきていると読めます。 pic.twitter.com/vVeE2jXzmh
— 荒木健太郎 (@arakencloud) February 10, 2023
お天気レーダー見てたらなんか妙な円があるなと思ったのだけど これだったのか。
渋ゼミ
1989(平元) 数日で打ち切りになったCM pic.twitter.com/5hv3oeTD2V
— 和丸号 (大塚和之) (@kazumarugou) February 8, 2023
懐かしい。 東横線の線路のすぐそばにあったんだよねこの予備校(の渋谷校舎)。 とはいえとうの昔に閉校しているし、再開発で周囲を含め当時の面影は微塵もないはず。
- 学習塾・予備校の一覧 - Wikipedia
- 【ホームメイト】個別指導塾の学習塾ドリーム・チーム 渋谷ゼミナール
- おちたぞおちたぞのCMを流していた渋谷ゼミナールは、今ありますか? … - Yahoo!知恵袋
閉校したのがだいぶ前のせいなのかうぃきぺの一覧には見当たらないし、 「渋谷ゼミナール」で検索すると関西にある学習塾が引っかかる?
A brief interview with Tcl creator John Ousterhout
HNから。
A brief interview with Tcl creator John Ousterhout | Hacker News
JO might be interested to see that Tcl is now implemented in Go. Not a clone, but the actual Tcl code: https://gitlab.com/cznic/tcl
Tk too! https://gitlab.com/cznic/tk
A brief interview with Tcl creator John Ousterhout
Hassam: What is unique about tcl?
Dr. Ousterhout: I would highlight 2 things:
- The first thing is its embeddable nature: I designed Tcl so that the library could be embedded in applications, with Tcl providing generic scripting features and the application adding its own commands to the built-in command set. The boundary between Tcl and the application is extremely fluid, and applications can extend Tcl in very powerful ways, such as adding new control structures to the language. I don’t think any other scripting language has achieved embeddability to the degree that Tcl did.
- The second thing is Tcl’s “everything is a string” philosophy. This played a big role in Tcl’s embeddability and made it easy to extend Tcl in a variety of ways. But, it also carried a performance penalty; even with a lot of work, Tcl has never become as efficient as other languages with more traditional types, such as Python. The string focus is also responsible for Tcl’s unusual command syntax, which some people love and some people hate.
Hassam: As a long time educator, What do you predict the next paradigm shift in programming languages will be?
(略) PL researchers tend to create languages that are useful for PL researchers: they have interesting theoretical and conceptual properties (e.g., ML) but aren’t usually useful for real systems. Systems people create languages that are useful for systems builders, so they get widely adopted. Examples are C, C++ (I think?), Perl, Java, and Go. I would put Tcl in this category as well, and perhaps Python also?