ときどきの雑記帖 RE* (新南口)
Trust you forever
ガンダム@テレ玉
コンスコン強襲
- ブラウ・ブロ
- 若者をいじめないでいただきたい
- ミライ少尉はホワイトベースのおふくろさん
- ベルガミノ
- 12機のリックドムが全滅
TV版の1stではナレーターの永井一郎が 劇中で何役も声を当てていたのは有名なところだけど、 この回はコンスコンとベルガミノを演じている。 さらに言えば前の回に出ていたドレンもそうだったり。
次回、「宿命の出会い」
笑わない数学
パンサー尾形の「笑わない数学」新作SP放送、テーマは微分・積分(コメントあり) - お笑いナタリー
パンサー尾形が出演する「笑わない数学」(NHK総合)の1年ぶりとなる新作が12月29日(日)に放送される。テーマは「微分・積分」。
moleskin
結局、2025年はLarge sizeのを止めて、pocket sizeだけにした。 10年ほど前にMoleskinのweeklyを使い始めたときはLarge sizeだけで、 何年か前からpocket sizeも使うようになったんだけど、 いい加減値段が高くなったのと Largeの方はそれに見合った使い方してないよなあ ということで。
みんなビンボがわるい
-
Zshの謎コマンド「 - 」(ダッシュコマンド, ハイフンコマンド) #シェル - Qiita
ドキュメントを調べてソースコードまで見てえらい
カレンダー
たとえばDate (Java Platform SE 8 ) の
月は0 - 11の整数で表されます。0は1月、1は2月、そして11は12月を意味します。
という仕様はよく文句の対象になってたりするけど、 最近あるプログラムで 「0月から11月になっていればいいのに」と思った状況に遭遇した。 もう少し詳しく書くと ある月の前の月を求めたい、つまり下の表の左から右を求めたいということで
A | B |
---|---|
1 | 12 |
2 | 1 |
3 | 2 |
4 | 3 |
5 | 4 |
6 | 5 |
7 | 6 |
8 | 7 |
9 | 8 |
10 | 9 |
11 | 10 |
12 | 11 |
もちろんif文やらconditional operatorを使うという手が「素直」なんだろうけど、 使うのはVBAなので後者はなく、前者も「面白くない」。 で、月が0始まりであれば
(m + 11) % 12
のように剰余を使えば
A | B |
---|---|
0 | 11 |
1 | 0 |
2 | 1 |
3 | 2 |
4 | 3 |
5 | 4 |
6 | 5 |
7 | 6 |
8 | 7 |
9 | 8 |
10 | 9 |
11 | 10 |
すっきり求めることができるのに。と。 で、結局
(m+10) % 12 + 1
のような式を使ったのだけど、
そのあとでDateAdd
というものがあるのに気がついて以下略
wscript.echo "date = " & date
wscript.echo "DateAdd(""m"", -1, date)=" & DateAdd("m", -1, date)
wscript.echo "date = " & Now()
wscript.echo "DateAdd(""m"", -1, Now())=" & DateAdd("m", -1, Now())
これは(もうすぐなくなる)VBSでの例。
DateAdd 関数 (Visual Basic for Applications) | Microsoft Learn
MAT
これは、できないと思います。
— はけた@できるExcel2024 (@excelspeedup) December 9, 2024
今は、配列演算をするなら、ワークシート関数のほうが、はるかに楽なんですよね。 https://t.co/jPzG8qQYPc
実は元々のBASICにはMAT命令というそのための命令があったりした。
More important to the language’s future, CARDBASIC added the MAT commands that worked with numerical matrices.
Full BASICにもあるし、十進BASICにも実装されている模様。
Dartmouth BASIC had introduced matrix operations relatively early in its evolution, and these were part of Full. These overload the existing math functions, so one can multiply two arrays using MAT A=A*B or multiply the contents of an array by a scalar if the B parameter is not an array.
ところで Dartmouth BASIC - Wikipedia にはこんな文章もあった。
There was a further problem in the exponent function that treated -X^2 as (-X)^2 as opposed to the correct order of operations -(X^2), which was not corrected until the third release.
There is one anomoly: a leading minus sign is treated as unary, and has higher precedence that exponentiation, which is contrary to the usual practive. That is
-x^2 is understood to be (-x)^2
(This was repaired in later versions.)
とあるので、BASICでは途中で演算子の優先順位が変わっていたということ?
ついでに見つけたこれ
JOSS uses a suffix notation to indicate conditional evaluation, “do this if this is true”, in contrast to most languages which place the condition in front in prefix notation, “if this is true, do this”.
1.1 Type "Hello, World!" if X=5.
新刊近刊
よつばと!
お待たせしました。「よつばと!」4年ぶりの新刊、2025年2月26日に発売決定です!
— よつばとエックス (@428and_tweet) December 13, 2024
各通販サイトでも取り扱いが始まりました。https://t.co/r8xS9qV68F(amazon予約ページ)
お楽しみに!
2025年度版カレンダーも好評発売中!https://t.co/5UMVJ3C7qW pic.twitter.com/UGhngdopVF
連載開始から20年以上経っているというのに思わず遠い目
「よつばと日めくり」は復活しないのかなあ… (毎回買っていた)
ポッドキャスト
「バッタを倒すぜポッドキャスト」始まりました!
— 光文社新書 (@kobunsha_shin) December 14, 2024
アフリカ モーリタニアに滞在中のバッタ博士こと、前野ウルド浩太郎さんにお話をうかがい、後半では、新刊『バッタを倒すぜアフリカで』のオーディオブックの一部を抜粋、紹介していきます。 #光文社新書
【spotify】https://t.co/UXSukTkhqT
awk
FORTRAN Compiler on IBM 704
Hugo メモ
C
— Meme For Programmers || Mathematicians (@MathRestaurant) December 13, 2024