## MS-DOS v4.0 的程式碼以 MIT license 釋出

Hacker News 裡面的討論有拉出一些有趣的 source code 註解，不過我比較好奇為什麼是挑 v4.0 而不是其他版本，看說明應該是剛好遇到對的人與對的團體？

A young English researcher named Connor "Starfrost" Hyde recently corresponded with former Microsoft Chief Technical Officer Ray Ozzie about some of the software in his collection. Amongst the floppies, Ray found unreleased beta binaries of DOS 4.0 that he was sent while he was at Lotus. Starfrost reached out to the Microsoft Open Source Programs Office (OSPO) to explore releasing DOS 4 source, as he is working on documenting the relationship between DOS 4, MT-DOS, and what would eventually become OS/2. Some later versions of these Multitasking DOS binaries can be found around the internet, but these new Ozzie beta binaries appear to be much earlier, unreleased, and also include the ibmbio.com source.

## Golomb coding

Hacker News 上看到 id=40008133 這篇提到 Golomb coding 覺得很有趣，花了些時間把演算法以及使用的場景搞清楚...

Golomb coding 用在 input 是數字 (或是 fixed size 時硬當作一個數字處理)，而且大多數的資料都偏小的情境下，像是「I don't get Golomb / Rice coding: It does make more bits of the input, or does it?」這邊解釋 Golomb coding 時提到的：

they reduce the average length per encoded value compared to fixed-width encoding, if the encoded values are from a large range, but the most common values are generally small (and hence are using only a small fraction of that range most of the time).

Golomb coding 演算法上用到了兩個特殊的表達方式，Unary codingTruncated binary encoding

Unary coding 很簡單，把 n 表達成 n 個 bit 的 `1`，再加上一個 `0`，所以 3 表達成 `1110`，7 表達成 `11111110`

Unary coding 最主要就是要用到他只用一個 bit `0` 來表達 n = 0 的情況。

Truncated binary encoding (中文維基百科剛好有條目：「截斷二進制編碼」) 則是很有趣的一個 encoding 方式。先提到傳統的方式，在表示 n 種可能的組合 $(0, 1, ..., n-1)$ 時，會需要 $\lceil\log_2 {n}\rceil$ bit 表達，像是 $n = 5$ 時，會需要 3 個 bit 表達，從 `000``001``010``011``100`

Truncated binary encoding 則是找到一個方法，編碼成 `00` (對應到 0)、`01` (1)、`10` (2)、`110` (3)、`111` (4)，針對 n = 0～2 的部分只用 2 bits 表示，省下 1 個 bit。

Truncated binary encoding 的重點在於在可能性非 $2^n$ 的情況下，要怎麼省儲存空間。

$x = M * q + r$

## Simon Tatham 的遊戲庫

Hacker News 上看到「Simon Tatham's Portable Puzzle Collection (greenend.org.uk)」這個討論，會讓我注意到的點是看到 greenend.org.uk 這個網址，印象中這就是 PuTTY 官網用的 domain，而點進去看以後發現就是 PuTTY 作者 Simon Tatham 另外的小玩具：「Simon Tatham's Portable Puzzle Collection」。

## 北韓的動畫承包團隊

2023 年的時候在北韓的 internet 上發現一台沒有設定好的伺服器，於是就有人 dump 下來分析裡面的內容，然後就發現看起來是中國的團隊轉包給北韓團隊用的 server：「What We Learned Inside a North Korean Internet Server: How Well Do You Know Your Partners?」。

There is no evidence to suggest that the companies identified in the images had any knowledge that a part of their project had been subcontracted to North Korean animators. In fact, as the editing comments on all the files, including those related to US-based animations, were written in Chinese, it is likely that the contracting arrangement was several steps downstream from the major producers.

## 更激進的考慮使用者會混淆的問題

Any time that the ID might need to be communicated verbally or written down[.]

Assuming that you are going with case sensitivity, you have 53 characters to choose from (adjusted for visually ambiguous characters). On the other hand, if you decide to make your IDs case-insensitive, you have only 22 characters to choose from.

```[
"a",
"b",
"c",
"d",
"e",
"f",
"h",
"i",
"j",
"k",
"m",
"n",
"o",
"p",
"r",
"s",
"t",
"w",
"x",
"y",
"3",
"4"
]```

## Python 2.7 的延伸支援

Python 2 在大約四年前 2020/04/18 推出了最後一版 Python 2.7.18 後，後續的安全性更新就變成要找第三方支援了。

## LLL lattice basis reduction algorithm

Every time a block is broken in Minecraft versions Beta 1.8 through 1.12.2, the precise coordinates of the dropped item can reveal another player's location.

"Randar" is an exploit for Minecraft which uses LLL lattice reduction to crack the internal state of an incorrectly reused `java.util.Random` in the Minecraft server, then works backwards from that to locate other players currently loaded into the world.

LLL lattice reduction is the same algorithm that can be used for cracking PuTTY keys from biased nonces from the CVE a few days ago. 'tptacek explained a bit about the attack (and links to a cryptopals problem for it, which I can almost pretend to understand if I squint) https://news.ycombinator.com/item?id=40045377