ときどきの雑記帖 RE* (新南口)
浮気なぼくら
Hiden Figures
3/12深夜にNHK総合で 「ドリーム」を放送していたので(録画して)観たのですが 本筋とは全く関係ないところで気になる点が一つ。
ラスト近辺、フレンドシップ7(アトラス6号)の回収のナレーションで 字幕では「空母ノア」とあったんだけど、 アメリカ海軍にそんな名前の空母はなかったはずだし 音声でも「USS ノア」(USSはアメリカ海軍の艦船だということ)と言っていた。 のでどこから「空母」が湧いて出たのかと。
で、実際のところはどうなのよととりあえずうぃきぺ。 確かにマーキュリー計画では空母が回収したものもあるんだけど、問題のアトラス6号はと言うと
マーキュリー・アトラス6号 アメリカ初の地球周回飛行[205]。逆噴射ロケットを装着したまま大気圏に再突入[206][n 27]。フリゲート艦ノア (Noa) が回収[208]。
ふむ。「フリゲート」でもなんか引っかかるものを感じたので 英語版のうぃきぺで艦名から探すと
あった。問題のミッションのことも書いてあって、その最後の方に
Col. Glenn remained aboard Noa for three hours before a helicopter transferred him to the Randolph (CV-15), the primary recovery ship.
とあってこの艦から(primary recovery shipであるところの)空母へ移乗しているので それであの字幕になった?
しかし、DDって(第二次大戦型の)駆逐艦じゃん。 日本語版のうぃきぺの記述は英語版の翻訳かもと Project Mercury - Wikipedia を見たが該当する記述はなし(編集履歴をチェックする元気はない)。
そして Mercury-Atlas 6 - Wikipedia には
The spacecraft splashed down in the North Atlantic at coordinates near 21°20′N 68°40′W, 40 miles (64 km) short of the planned landing zone.[19] Retrofire calculations had not taken into account spacecraft weight loss due to use of onboard consumables. USS Noa, a destroyer code-named “Steelhead”, had spotted the spacecraft when it was descending on its parachute. The destroyer was about 6 miles (9.7 km) away when it radioed Glenn that it would reach him shortly. Noa came alongside Friendship 7 seventeen minutes later.
USS Noa, a destroyer code-named "Steelhead"
のように駆逐艦(destroyer)ってありますわね。
とある広告で見かけた問題
7 | 8 | 4 | ||||||
6 | 5 | 2 | 9 | |||||
3 | 9 | 6 | 4 | |||||
4 | 6 | 7 | ||||||
9 | 1 | 7 | ||||||
8 | 2 | 4 | 3 | |||||
4 | 9 | |||||||
4 | 2 | 5 | 8 | |||||
3 | 2 |
markdownのテーブルで書くのはだいぶ無理があるな😄
Eテレ
本日公表されたNHKの「2022年度(令和4年度)国内放送番組編成計画」の「字幕放送、解説放送等」の「教育テレビジョン(Eテレ)」の「字幕放送」の項目に、継続扱いで「テキシコー」「天才てれびくんhello,」の名前があります。https://t.co/Av1L3oll01
— 和牛についてツイートするアカウント (@wagyu_info_east) February 9, 2022
「テキシコー」と「考えるカラス~科学の考え方~」もあるな。 考えるカラスは今度こそ見逃さないようにせねば😄
今週のしずえさん
ポスト
25th
Visual Studioも25周年らしい。
- Happy 25th birthday Visual Studio! - Visual Studio Blog
- 「Visual Studio」がリリース25周年、記念のオンラインイベントが開催へ - 窓の杜
一瞬、C++ Builderよりも後? と思ったけど「Visual C++」と「Visual Studio」は別物ということか。
C23
With the upcoming C23 standard, the memset() function will not only be deprecated, it will be disabled. Alternatives are available, including the non-standard memset_s() variation. #cprogramminghttps://t.co/h9GE9Ac6MA
— Dan Gookin (@dangookin) March 12, 2022
え?>memset() function will not only be deprecated, it will be disabled.
と思ってざっと探してみたけど、
コンパイラーが最適化で消したりしないことを保証する
memset_s()
などの導入云々はあっても
memsetをどうこうというのは見当たらなかった
(探し方の問題?)。
- The Perils of the memset() Function | C For Dummies Blog
- WG 14 Document log
memset_explicit
- N2485: Add explicit_memset() as non-optional part of <string.h> to C2X
- WG 14 Document: N1381
- C2X Liaison: Removal of Deprecated Functions
- WG 14 N2528
UUOC
その二つは動作が異なります。左側は無駄なcat(UUOC)パターンでパフォーマンスが悪くパイプの右側がサブシェルになるという違いがあります
— Koichi Nakashima (@ko1nksm) March 15, 2022
読みやすさの話なら while部分を抽象化≒関数にするだけで
func <data.txt や
<data.txt func と
簡潔に書くことができテストもしやすくなります https://t.co/zaqUsqukDV
UUOC てなんぞ。 と思ったがうぃきぺにもあった。
UUOCは「無駄なcatの使用(Useless Use of cat)」の略である。 Usenetのcomp.unix.shellに投稿された賢者の観察によると, " catの役割はファイルを連結することである。もしファイルが1つしかないのであれば、何かと連結しようとするのは時間と手間の無駄でしかない " 。 にも関わらず、次のような使用をよく見かける。
ふむ。 そしてその投稿とはこの記事のことらしい、
Yes, it's that time of the week again. This week's winner of my frequently awarded "useless use of cat award" goes to jay, as in: >>>>> "Jay" == Jay Sherman <usai...@dawn.mmm.com> writes: Jay> Here's a quick example that should do what you want: Jay> #--------------------- cut here ------------------------------------------- Jay> #!/bin/ksh Jay> # Replaces more than one space between words with one, and puts two spaces on Jay> # the end of each line. * selects every file in that dir, so watch out where Jay> # you test it. Jay> for file in * Jay> do Jay> cat $file | sed "s/ */ /g" | awk '{print $0" "}' > /tmp/file.tmp This one here. sed can read $file just fine. Jay> cat /tmp/file.tmp > $file Jay> done Jay> #--------------------- cut here ------------------------------------------- Remember.... "cat something | blah blah" is almost always not needed. Just another Unix hacker (since 1977), -- Name: Randal L. Schwartz / Stonehenge Consulting Services Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying Email: <mer...@stonehenge.com> Snail: (Call) PGP-Key: (finger mer...@ora.com) Phrase: "Welcome to Portland, Oregon ... home of the California Raisins!"
おお、Randal L. Schwartz。
そしてジャーゴンファイルにも項目として存在してたんだけど 全然記憶になかった。
[from the comp.unix.shell group on Usenet] Stands for Useless Use of cat; the reference is to the Unix command cat(1), not the feline animal. As received wisdom on comp.unix.shell observes, “The purpose of cat is to concatenate (or ‘catenate’) files. If it’s only one file, concatenating it with nothing at all is a waste of time, and costs you a process.” Nevertheless one sees people doing
- Useless Use of Cat Award
- linux - grepコマンドでのファイル指定について - スタック・オーバーフロー
- cat (Unix) - Wikipedia
- Useful use of cat(1)
- command line - What is the general consensus on “Useless use of cat”? - Super User
Hugoメモ
v0.94.0
意外と早く0.93→0.94へのバージョンアップが来た。 そして矢継ぎ早のbug fixリリース。
Release v0.94.0 · gohugoio/hugo
Continuing on the performance theme, @satotake has implemented a new hybrid static filesystem for Hugo’s development server, which is great for sites with lots of static content, as it greatly reduces memory consumption while still keeping the fast render times by writing dynamic content to memory (the definition of static content in Hugo is all files mounted in /static and all files in /content that’s not content files or a member of a content bundle). With this update, there are now 3 filesystem options when starting the server:
- hugo server (default), renders to and serves all files from memory.
- hugo server –renderToDisk, renders to and serves all files from disk.
- hugo server –renderStaticToDisk (the new hybrid mode), renders to and serves static files from disk, dynamic files from memory.
もうひとつ。この機能前からなかったっけ?と思ったが 仕様がちょっと変わってるのね。
A final note goes to the new linkifyProtocol option in the Goldmark Configuration (see #9639). The linkify extension is enabled by default. It turns www.example.org and similar into clickable links. But before this release, the default protocol used was http. This is in line with the CommonMark spec, but that doesn’t make much sense in 2022, so now you get https as the default.
v0.94.1
Release v0.94.1 · gohugoio/hugo
There are 2 fixes in this release. The first is a fix for a regression in Goldmark related to HTML comments in Markdown (see #9650). The other is that we have reverted the –renderToStatic feature and flag, as it didn’t work on Windows. We didn’t find any easy fix so that feature gets pushed to the next release, and then with proper cross-platform tests.
v0.94.2
Release v0.94.2 · gohugoio/hugo
This is a bug-fix release that fixes a bug introduced in the bug fix release yesterday (some HTML comments in Markdown that made the parser panic):