Amazon S3 二十年的公關稿

Amazon S3 二十年的公關稿:「Twenty years of Amazon S3 and building what’s next」,算是 AWS 第一個拉出差異化的服務,當時發表的論文「Dynamo: Amazon’s Highly Available Key-value Store」也影響了很多之後的軟體。

裡面比較重要的公開的數據:

看起來刻意不提總容量,只有提到 500T+ objects,所以是五百兆?另外要扛 200M+ reqs/sec 的數字也很驚人...

Claude 在接下來的兩個禮拜提供非尖峰時間兩倍的 session quota

Claude March 2026 usage promotion 這邊提到:

From March 13, 2026 through March 27, 2026, your five-hour usage is doubled during off-peak hours (outside 8 AM-2 PM ET/5-11 AM PT). Usage remains unchanged from 8 AM-2 PM ET/5-11 AM PT.

這邊沒有特別寫包不包括 weekend,但剛剛在 Claude 的網頁介面上有提到 peak hour 只算在 weekday 上 (重開又不見了),先當作是有好了... 已經是 Daylight saving time 內了,東岸時區的 peak hour 是 8am~2pm,對應到 +8 時區會是 8pm~2am 這段 (同樣的興一一到星期五),對於亞洲區的上班使用者來說應該是還不錯?

不過整個禮拜的 quota 還是沒變,所以總用量的上限不變...

歐盟對 TikTok 成癮性的出手

看到「Commission preliminarily finds TikTok's addictive design in breach of the Digital Services Act (via)」這篇,歐盟對電子毒品之一的 TikTok 成癮性開始有動作了。

這邊主要是出自 Digital Services Act 對大型平台的要求,包括了 Article 34 的 Risk assessment,以及 Article 35 的 Mitigation of risks:「Regulation (EU) 2022/2065 of the European Parliament and of the Council of 19 October 2022 on a Single Market For Digital Services and amending Directive 2000/31/EC (Digital Services Act) (Text with EEA relevance)」。

Risk assessment 這邊對應到的是 Article 34 的部分,提到 TikTok 設計成癮功能沒有充分評估對用戶造成的危害,這邊不是沒有評估,而是需要充分評估:

The Commission's investigation preliminarily indicates that TikTok did not adequately assess how these addictive features could harm the physical and mental wellbeing of its users, including minors and vulnerable adults.

這邊直接點名 infinite scroll 的成癮設計:

For example, by constantly ‘rewarding' users with new content, certain design features of TikTok fuel the urge to keep scrolling and shift the brain of users into ‘autopilot mode'. Scientific research shows that this may lead to compulsive behaviour and reduce users' self-control.

然後批評 TikTok 自己做的評估過於簡單,有很多重要的指標都沒有評估:

Additionally, in its assessment, TikTok disregarded important indicators of compulsive use of the app, such as the time that minors spend on TikTok at night, the frequency with which users open the app, and other potential indicators.

Risk mitigation measures 這邊則對應到 Article 35 的部分,提到 TikTok 沒有阻止這些成癮性功能的風險:

TikTok seems to fail to implement reasonable, proportionate and effective measures to mitigate risks stemming from its addictive design.

這邊提到的是目前 TikTok 自己評估螢幕時間管理工具與家長控制工具的效果不好:

For example, the current measures on TikTok, particularly the screentime management tools and parental control tools, do not seem to effectively reduce the risks stemming from TikTok's addictive design. The time management tools do not seem to be effective in enabling users to reduce and control their use of TikTok because they are easy to dismiss and introduce limited friction. Similarly, parental controls may not be effective because they require additional time and skills from parents to introduce the controls.

然後歐盟這邊提出應該終止 infinite scroll:

At this stage, the Commission considers that TikTok needs to change the basic design of its service. For instance, by disabling key addictive features such as ‘infinite scroll' over time, implementing effective ‘screen time breaks', including during the night, and adapting its recommender system.

歐盟這塊已經算是走的比較前面了,至少有法令可以用,但力道還是不夠... 這些 social network 就是在賣電子毒品,要他把成癮性降低跟要他的命一樣,看起來 TikTok 鐵定會拖個一年半載慢慢等。

分析軟體複雜度的 Cyclomatic complexity

在「decomplexification continued」這邊看到很久前有讀過,但已經忘記又重新看到的東西:「Cyclomatic complexity」。

cURL 這邊拿來當作目標,但看起來應該不是直接 optimize 這個指標,而是透過這個指標來找哪些 function 過於複雜的問題 (這邊有個經典的 Goodhart's law 可以參考)。

去年開始看 Cyclomatic complexity 的時候有超過 100 的 function:

In May 2025 I had just managed to get the worst function in curl down to complexity 100, and the average score of all curl production source code (179,000 lines of code) was at 20.8. We had 15 functions still scoring over 70.

十個月的努力,最大的降到 59,然後平均也降下來了:

Almost ten months later we have reduced the most complex function in curl from 100 to 59. Meaning that we have simplified a vast number of functions. Done by splitting them up into smaller pieces and by refactoring logic. Reviewed by humans, verified by lots of test cases, checked by analyzers and fuzzers,

The current 171,000 lines of code now has an average complexity of 15.9.

翻了一下好像可以掛到 CI 裡面去過濾真的太大的 function?

Meta 的 jemalloc 宣言

Lobsters 上看到「Investing in Infrastructure: Meta’s Renewed Commitment to jemalloc」這篇,這讓我馬上想到 Jason Evans (就是發明 jemalloc 的人,je 取自他的名字縮寫) 在去年寫的「jemalloc Postmortem」這篇,文章最後提到 Meta 的制度設計使得不會有資源投入 jemalloc。

不確定是有什麼變化,目前比較成熟的領先群應該是 mimalloc,最近記憶體變得很貴...?這好像有點牽強...

找到 Meta 文章署名的三個人的 LinkedIn

看完後還是沒看到比較明顯的脈絡,就突然冒出來說要繼續投入...

GitHub Copilot CLI 突然從 0.0.423 進到 1.0.2 了

剛剛更新的時候發現 GitHub Copilot CLI 突然從 0.0.423 進到 1.0.2 了:「https://github.com/github/copilot-cli/releases/tag/v1.0.2」。

最近一直在測不同的 coding agent 與 model,GitHub Copilot CLI 的計價方式與其他人不太一樣,是算 premium requests 的 quota,而不是看 token 的數量,所以如果可以一包講多一點讓他一次處理的話,就會比較省... (?)

另外一個特點是 GitHub Copilot CLI 的 model 支援的蠻多的,目前是這些,後面的倍數表示 premium requests 消化的速度:

  Claude Sonnet 4.6 (default)         1x
  Claude Sonnet 4.5                   1x
  Claude Haiku 4.5                 0.33x
  Claude Opus 4.6 ✓                   3x
  Claude Opus 4.5                     3x
  Claude Sonnet 4                     1x
  Gemini 3 Pro (Preview)              1x
  GPT-5.3-Codex                       1x
  GPT-5.2-Codex                       1x
  GPT-5.2                             1x
  GPT-5.1-Codex-Max                   1x
  GPT-5.1-Codex                       1x
  GPT-5.1                             1x
  GPT-5.1-Codex-Mini (Preview)     0.33x
  GPT-5 mini                          0x
  GPT-4.1                             0x

剛好幾家大的都有支援,包括 AnthropicClaude 系列,GoogleGemini 系列,以及 OpenAI 的各種 model。

另外還有不用錢的 GPT-5 mini 與 GPT-4.1,不過實際在 coding agent 幫不到什麼忙...

另外一套免費的 GeoIP database

上禮拜看到的:「IP66 — Free IP Geolocation Database (via)」,後面的公司是 Cloud 66

提供的是 mmdb 格式,所以常用的 library 應該都可以直接吃,然後用 GitHub Copilot CLI (Opus 4.6) 寫了個 mmdb-comparison 分析 mmdb 檔案,這邊用到 Jaccard index 來分析相似度 (其實就是交集大小除以聯集大小)。

本來預期網路上 dataset 的相似度會蠻高的,但看起來有點微妙... 如果要用這些 dataset 的話,可能要用比較寬鬆的邏輯來處理?像是存在在任何一個 dataset 都算你屬於該區。

以下的 MMDB1 是 dbip-country-lite-2026-03.mmdb,而 MMDB2 是 ip66.mmdb

台灣的還 OK:

=== IPv4 ===
Country       Jaccard      MMDB1      MMDB2    Intersection           Union
------------------------------------------------------------------------
TW           0.955107      37.7M      36.2M           36.1M           37.8M

=== IPv6 ===
Country       Jaccard      MMDB1      MMDB2    Intersection           Union
------------------------------------------------------------------------
TW           0.974660       211N       207N            206N            212N

日本的 IPv6 差蠻多的:

=== IPv4 ===
Country       Jaccard      MMDB1      MMDB2    Intersection           Union
------------------------------------------------------------------------
JP           0.915855       206M       190M            189M            207M

=== IPv6 ===
Country       Jaccard      MMDB1      MMDB2    Intersection           Union
------------------------------------------------------------------------
JP           0.674178       808N       819N            655N            972N

香港的則是在 IPv4 這邊有狀況:

=== IPv4 ===
Country       Jaccard      MMDB1      MMDB2    Intersection           Union
------------------------------------------------------------------------
HK           0.663378      23.3M      16.7M           16.0M           24.0M

=== IPv6 ===
Country       Jaccard      MMDB1      MMDB2    Intersection           Union
------------------------------------------------------------------------
HK           0.817247      66.6N      56.8N           55.5N           67.9N

然後是新加坡的 IPv4:

=== IPv4 ===
Country       Jaccard      MMDB1      MMDB2    Intersection           Union
------------------------------------------------------------------------
SG           0.450384      20.1M      17.1M           11.5M           25.6M

=== IPv6 ===
Country       Jaccard      MMDB1      MMDB2    Intersection           Union
------------------------------------------------------------------------
SG           0.934360      2.89D      2.75D           2.73D           2.92D

而美國的 IPv6 算是不同的時空了...?

=== IPv4 ===
Country       Jaccard      MMDB1      MMDB2    Intersection           Union
------------------------------------------------------------------------
US           0.707644      1.47G      1.30G           1.15G           1.63G

=== IPv6 ===
Country       Jaccard      MMDB1      MMDB2    Intersection           Union
------------------------------------------------------------------------
US           0.126030      89.3D      11.4D           11.3D           89.4D

中文版的維基百科從 {{lang-en|...}} 改用 {{langx|en|...}}

前幾天在編輯的時候出現 {{lang-en|...}} 的語法被 deprecated 了,在「模板:Lang-en」可以看到提示:

裡面有連結指到「提議以langx模板取代lang-xx系列模板」這個:

近日翻譯條目時留意到英文維基百科已經基本全面停用{{lang-xx}}系列的模板,而改為使用{{langx}}模板。我翻查了一下英文維基百科當時的討論,他們認為改用{{langx}}模板能使需要維護的語言模板數量大幅減少,因此會更便利社羣管理,而這點對於現時與此前的英文維基百科同樣擁有大量語言模板的中文維基百科社羣來説也是適用的。因此,我提議將所有沒有特殊情況的{{lang-xx}}系列模板一律替換為{{langx}}模板,以增進語言模板的維護效率。此外,我相信大家已經發現中文維基百科本地是存在{{langx}}模板的,然而由於Module:Lang欠缺對應{{langx}}模板的代碼,本地的{{langx}}模板並未能起任何作用,因此無論以{{langx}}模板取代{{lang-xx}}系列模板的提案通過與否,我希望能有人盡快把對應{{langx}}模板的代碼引入Module:Lang,以使{{langx}}模板在本地能正常使用。Sanmosa 新朝雅政 2025年2月13日 (四) 13:15 (UTC)

看了一下 Template:Lang-en 的修改記錄,看起來是一月的時候更新上去的,要把編輯習慣換掉了...

macOS 上用 sandbox-exec 隔離

上上禮拜看到「sandbox-exec: macOS's Little-Known Command-Line Sandboxing Tool (via)」這個感到興趣,主要是因為有跑 coding agent 的需求,在 Linux 上可以透過 bubblewrap 隔離 (參考「Linux 下用 bubblewrap (bwrap) 跑 Claude Code」),但 macOS 上沒有 bubblewrap,所以需要另外找工具,看起來就是這個了。

Hacker News 上有人提到 deprecated 的問題,從 2017 年就已經是 deprecated 了,但實際上大家還是繼續用得很兇,尤其是各家 coding agent 還是會 sandbox-exec:

The sandbox-exec command is DEPRECATED. Developers who wish to sandbox an app should instead adopt the App Sandbox feature described in the App Sandbox Design Guide.

另外語法上懶得另外再重頭寫,就請 coding agent 翻譯 bwrap 的版本,轉成 macOS 上的版本,另外包括路徑的對應也請 coding agent 一起轉,第一次跑起來有遇到一些錯誤訊息,把錯誤訊息丟回去給 coding agent 修正後看起來就沒什麼太大的問題了。

另外這邊提到的 App Sandbox Design Guide,查了一下看起來跟 sandbox-exec 很不一樣,能處理的東西也差很多,不算是替代品,看起來還是得窩在 sandbox-exec。