ときどきの雑記帖 RE* (新南口)
Improve
「や」める
こういう 8年くらいしてたTwitter辞めて1週間たった のをわりと見かけるけど、 「はあ。Twitterにお勤めだったんですか」 とまぜっかえしたくなる今日この頃。
新宿
あそこも再開発の対象だったのか。ここしばらく行ってないから知らなかった。 数ヶ月前に一度新宿西口方面には行ったけど行きも帰りも地下道を通ったからなあ。
新宿駅西口で始動、渋谷に続く「大改造」の行方 | 駅・再開発 | 東洋経済オンライン | 経済ニュースの新基準
スバルビル同様、西口駅前広場に面している明治安田生命新宿ビルも再開発の予定であり、2021年に入ると解体作業が始まった。
で、関連記事をみるとわりと大きな話だった>再開発
新宿駅西口で始動、渋谷に続く「大改造」の行方 | 駅・再開発 | 東洋経済オンライン | 経済ニュースの新基準
さらに西武新宿駅とJR・東京メトロ新宿駅、小田急・京王・都営地下鉄新宿駅と長距離バスターミナルのバスタ新宿との乗換通路を拡げるとともに、 京王線ホームを北側に移動させ、ホーム階に改札を新設することも公表されている。この再開発では唯一ホームの位置が動く事例になる。
Nullish Coalescing
10 New JavaScript Features in ES2020 That You Should Know - DEV Community
JavaScriptにもこの種の演算子が追加されたみたいなんだけど、 これも「~合体演算子」みたいな訳語になるんかねえ。 ってすでになっていたか Null 合体 (??) - JavaScript | MDN
- Nullish Coalescing
Nullish coalescing adds the ability to truly check nullish values instead of falsey values. What is the difference between nullish and falsey values, you might ask?
In JavaScript, many values are falsey, like empty strings, the number 0, undefined, null, false, NaN, and so on.
However, you might want to check an immense number of times if a variable is nullish – that is if it is either undefined or null, like when it’s okay for a variable to have an empty string or even a false value.
In that case, you’ll use the new nullish coalescing operator, ??
–
(GNUスタイルの)ロングオプションを指示する--
がなぜそうなったのかというオハナシ。
2019年の記事のようだけど気がつかなかった(今週Hacker News経由で知った)。
読んでみて、自分の記憶が間違ってなかったことを確認😄 (知らなかったこともあった)
Why Do Long Options Start with Two Dashes? | D-Mac’s Stuff
Around 1990, Richard Stallman (RMS) and I were writing the GNU C library getopt() and he wanted to extend it to support long (multi-character) option names for user-friendliness. He considered Unix inferior in this regard to other operating systems such as TOPS-20 which supported long options (that could be abbreviated). He wanted GNU to be better than Unix while still compatible. There were a few programs that ran on Unix systems and used long option names starting with either - or no prefix at all, such as find, but those syntaxes were not compatible with Unix getopt() and were parsed by ad-hoc code.
言われてみれば納得だけど、源流はTOPS-20だったのね(よく知らんけど)。
- TOPS-20 - Wikipedia(日)
- TENEX - Wikipedia(日)
- TOPS-20 - Wikipedia(英)
- TENEX (operating system) - Wikipedia(英)
Long options needed a prefix that wouldn’t clash with the Unix conventions, so programs could support both types of options without ambiguity. Richard chose +, since logically if - (for a small number mathematically) is for short options then + would be for long options, and it’s no additional typing. We created an extended interface called getopt_long() to support specifying long options.
But when the IEEE POSIX shell and utilities standard was published in 1992, the + syntax was disallowed. GNU developers discussed what to do over email. We considered -+ as the long options prefix, but that was hard to type, so we settled on –, which wouldn’t violate POSIX or Unix compatibility and wasn’t hard to type.
but that was hard to type
のニュアンスがよくわからないけど、
確かに -+
よりは --
の方がタイプしやすくはある。
For a few months, GNU getopt() supported both + and – to allow time for people to transition their scripts. I’m pretty sure support for + during that transition could be disabled by setting the environment variable POSIX_ME_HARDER (RMS’s exasperation with standards showing there), later changed to the more polite POSIXLY_CORRECT, which also disables recognizing options intermixed with positional arguments.
Because GNU software was popular and the solution was logical, everyone else adopted the – prefix and implemented variations of it in their own argument parsers. Perl was probably one of the first.
POSIX_ME_HARDER
はfuck me harder
から来たんでしょうねえ。たぶん。
Why do long options start with two dashes? (2019) | Hacker News にも面白いやり取りがあって、
Why did POSIX disallow +options? | Hacker News
Why did POSIX disallow +options?
という質問に対して(自分も良くは知らなかった。dateコマンドに関連して…というのは見たことがあったけど)、
You could ask Richard Stallman himself, who is well known for responding to rand… | Hacker News
You could ask Richard Stallman himself, who is well known for responding to random inquiries from people.
Presumably it was rejected because the whole point of POSIX was to consolidate, regularize, and simplify pre-existing practice. Adding “+” as an additional standard option signifier would take a huge step in the complete opposite direction. The only precedence for “+” would have been the
set
shell builtin, and AFAIU the committee only begrudgingly grandfathered that syntax.Someone elsethread mentioned the
date
utility, but if you look at the BSD implementation “+” isn’t used as an option marker, per se, but rather to disambiguate operand strings. The 2001 standard only defined the following:date [−u] [+format] date [−u] mmddhhmm[[cc]yy]
It’s splitting hairs, but POSIX was at least able to shoehorn the legacy syntax into a more regularized base interface.
AFAIU ってなんだ? AFAIKみたいだから、As far as I ナントカだろうか?
Uで始まる単語…と悩んだが As far as I understand
の略らしい。なるほど。
- AFAIU AFAIU - Wiktionary
- begrudgingly begrudginglyの意味・使い方・読み方 | Weblio英和辞書
- grandfathered grandfatheredの意味・使い方・読み方 | Weblio英和辞書
Basuke’s Tech Talk
iPhoneを初代SEから二代目SEに乗り換えたあとなぜか如実にpodcastを聴く時間が減ったのだけど、 それはそれとして、最近聴いた Basuke’s Tech Talk - NeXTの話 with @nagasawa144 は面白かった。とくに
- Lotus Improv - Wikipedia
- 新川崎のツインタワー
- NeXTSTEP for Intel
- 5インチMO
辺りがツボ(ってなんですか)に。
5インチMOはわたしも一時期会社で使っていた(確かに「ガッコンガッコン」うるさかった)。 すぐになくなったと思っていたのだけどわりと「長生き」していたっぽい (ASCII.jp:ソニー、9.1GBの5.25インチMOメディアとドライブを発売)。
Lotus Improv
で、Lotus Improv。 これ についてはやっぱり最近 Scripting News: The lost apps of the 80s 経由で Why Improv didn’t succeed | by Pito Salas | Pito’s Blog | Medium という記事を読んだばかりで、 「おお、ここでも『シンクロニシティ』か」 と思ったり。
使ってみたかったんだよねえ当時。