HackerURLs

一次又一次被重新发现的经典。

同一个链接,相隔一年以上,一次又一次被人重新发现、再次冲上 Hacker News 首页。能经受住这种时间检验的,大多是值得一读再读的文章。每篇附中文标题,讨论最热的那些再加上中文导读和高赞评论翻译。

从名人堂开始
  • 4,700+篇经过时间检验的经典

Hall of fame

名人堂

在经典库里看全部精选

上首页次数最多、而且有中文导读的 30 篇。时间轴上每个黑点是一次上首页,空心点是一次没冲上去的投稿。

  1. 正在载入经典…

Archive

经典库

按第一次上首页的年份分布,点柱子筛选。

排序

    About

    这些经典是怎么挑出来的

    1. 01

      合并同一个链接

      读取 Hacker News 自 2006 年以来的全部链接投稿,把 http/https、www、跟踪参数等写法不同的同一篇文章合并成一条。

    2. 02

      只留经得起时间的

      同一链接至少两次拿到 50 分以上(约等于上首页),而且两次相隔一年以上;再由 AI 剔除状态页、产品首页和新闻事件。

    3. 03

      写导读、译评论

      上首页次数最多的 2,000 篇配上中文导读、"为什么经久不衰",并精选翻译 HN 高赞评论。导读由 AI 生成,可能有误。

    编程与软件工程github.com

    BootOS:512 字节 x86 机器码实现的完整操作系统

    BootOS: Monolithic operating system in 512 bytes of x86 machine code

    2次上首页
    2年跨度
    682累计得分
    135条评论

    2019 — 2021,它一次次回到首页

    黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。

    导读

    这是 nanochess(Óscar Toledo G.)写的 BootOS:一个完全塞进 512 字节 x86 机器码的单体操作系统,正好占满一个引导扇区,由 BIOS 载入后直接运行。它启动后提供一个极简的命令行界面,靠 BIOS 的 INT 13h 读写磁盘扇区、加载并执行小程序,本质上更像一个自举用的微型文件系统加壳层。作者出身墨西哥的 Familia Toledo 家族,长期自研计算机、操作系统和浏览器。

    为什么经久不衰:在 512 字节的硬性约束下把引导、命令行、磁盘读写和程序加载都做出来,是极端约束编程的经典范本,也让人直观理解 PC 启动链条最底层的运作方式。

    关键词 汇编引导扇区极简操作系统x86code golf

    HN 评论精选

    介绍作者所属的墨西哥 Familia Toledo 家族自研软硬件的传奇背景,以及他们长期被误认为骗子、鲜少公开源码的处境。

    不了解背景的人可能不知道:作者来自一个神秘的地下“巫师”家族 Familia Toledo,他们一家人四十多年来自己设计制造计算机(连回流焊炉这类配套设备都做),自己写操作系统和浏览器。可惜他们住在墨西哥城郊,而不是硅谷或波士顿,所以关于他们成就的公开报道多出自毫无编程和电子学基础的庸俗记者之手。他们大多保持低调,也许是因为每次公开细节,换来的都是“这不可能”“这显然是骗局”之类的评论——说这话的人往往靠装杀毒软件和盗版 Windows 谋生,却自以为懂计算机。这些讨论几乎全是用西班牙语进行的。他们基本从不公开操作系统和浏览器的源码甚至二进制,直到创始人之子 Óscar Toledo G. 以 Nanochess 程序赢得 IOCCC。

    kragen查看英文原文

    For those not aware of the background, the author is a wizard from a secretive underground society of wizards known as the Familia Toledo; he and his family (it is a family) have been designing and building their own computers (and ancillary equipment like reflow ovens) and writing their own operating systems and web browsers for some 40 years now. Unfortunately, they live on the outskirts of Mexico City, not Sunnyvale or Boston, so the public accounts of their achievements have been mostly written by vulgar journalists without even rudimentary knowledge of programming or electronics. And they have maintained their achievements mostly private, perhaps because whenever they've talked about their details publicly, the commentary has mostly been of the form "This isn't possible" and "This is obviously a fraud" from the sorts of ignorant people who make a living installing virus scanners and pirate copies of Windows and thus imagine themselves to be computer experts. (All of this happened entirely in Spanish, except I think for a small amount which happened in Zapotec, which I don't speak; the family counts the authorship of a Zapotec dictionary among their public achievements.) In particular, they've never published the source or even binary code of their operating systems and web browsers, as far as I know. This changed a few years back when Óscar Toledo G., the son of the founder (Óscar Toledo E.), won the IOCCC with his Nanochess program: https://en.wikipedia.org/wiki/International_Obfuscated_C_Code_Contest#Toledo_Nanochess and four more times as well. His obvious achievements put to rest — at least for me — the uncertainty about whether they were underground genius hackers or merely running some kind of con job. Clearly Óscar Toledo G. is a hacker of the first rank, and we can take his word about the abilities of the rest of his family, even if they do not want to publish their code for public criticism. I look forward to grokking BootOS in fullness and learning the brilliant tricks contained within! Getting a full CLI and minimalist filesystem into a 512-byte floppy-disk boot sector is no small achievement. It's unfortunate that, unlike the IOCCC entries, BootOS is not open source.

    解释 512 字节为何是硬约束——BIOS 只读一个扇区,并说明这类项目是自举链条的第一步。

    512 字节的意义在于它是 PC 存储设备的标准扇区大小(软件看到的大小;新硬盘物理扇区是 4KB,但仍可按 512 字节的逻辑扇区寻址)。传统 BIOS 把启动设备的第一个扇区读入内存并跳转过去,由此开始操作系统的启动过程。普通 OS 的引导扇区会接着找到并加载 OS 的下一部分,这可能需要理解 FAT 或 NTFS 文件系统。写一个能改内存、更重要的是能执行内存的小程序,是“自举朝圣”的第一步;这个项目看起来是刻意限制自己的,但以此为起点,你可以一次 512 字节地构建下一阶段的自举。

    userbinator查看英文原文

    The significance of 512 bytes is that it is the standard sector size for a PC storage device (the size seen by software; newer hard drives have 4KB physical sectors, but can still be addressed as if they had 512B "logical" sectors), and a traditional BIOS reads the first sector of the boot device into memory and jumps to it in order to begin the OS part of the boot process. A normal OS bootsector would then find and load the next part of the OS, which may involve things like understanding FAT or NTFS filesystems; here's a (rather enthusiastic) analysis of many boot sectors from different versions of DOS and Windows: https://thestarman.pcministry.com/asm/mbr/index.html Writing a tiny program that lets you modify memory, and more importantly execute it, is the first step in the "bootstrap pilgrimage" to creating your own environment and eventually OS, but this one seems deliberately limited; nonetheless, starting with this, one can use it to create the next stage of the bootstrap, 512 bytes at a time.

    同为 512 字节内核作者的实践经验:建议加函数表供程序调用内核,否则维护跳转地址很痛苦。

    我也写过一个 512 字节的极小内核,是很有趣的练习(这是个很老的项目,最初完成后很久才传到 BitBucket)。我很喜欢 BootOS,你能清楚看到这种体量的 OS 必须做的取舍。我建议 BootOS 像我那样塞一张函数表进去,让程序能调用内核里的函数;否则你要么在每个程序里重写这些函数,要么内核一改就得重编译所有程序,要么得手工维护跳转地址。另外,我正在大改 saxos,加入非常简单的多任务(已能用),目标是内核加载一个 512 字节的 GUI,程序在 GUI 里的终端中运行,之后再让程序能往窗口里绘图。

    bArray查看英文原文

    I have also developed a very small kernel in 512 bytes, it's a fun exercise [1] (this is a really old project that was uploaded to BitBucket long after it initially started). I quite like this BootOS project, you can of course see the compromises that any OS this size has to make. I would make a recommendation to the BootOS project which is to squeeze a function table as I have done in order to allow programs to call functions in the kernel. If not, you either end up re-writing these functions for each of your programs, you have to recompile your programs any time you change your kernel or you end up trying to maintain jump positions. For those still reading, I'm working on a large overhaul of saxos which includes very simple multi-tasking (currently working). The intention will be to have the kernel load a 512 byte GUI on top and then for the programs to have access to a terminal within the GUI. Once that's working I then want to move towards also allowing programs to draw to the Window, but that also brings its own issues. [1] https://bitbucket.org/danielbarry/saxoperatingsystem/src/master/KERNEL/KERN.ASM

    指出它其实依赖 BIOS 中断、更像极简文件系统,价值主要在极致的体积美学与怀旧。

    它比起操作系统,更像一个功能明显受限的极简文件系统,依赖 INT 13h——也就是说它假定 BIOS 里已有大量机器码可用。对新世代来说,这除了 code golf 之外似乎没什么实际用途。但从怀旧角度看,它把我带回了 demoscene 时代,我仍怀念 fr-041:debris 那种不到 199KB、却能看 7 分 20 秒的惊艳作品。

    ChrisCinelli查看英文原文

    It seems that this more than a OS is a minimal file system with a obvious limited feature set that relay on the https://en.wikipedia.org/wiki/INT_13H - It assumes that a BIOS that contains a lot more machine code is available. For the new generations this will seem not to have any real applications beyond code golfing. But from a nostalgic point of view, it brings me back to the demoscene era. I still fell a wistful longing for the old days thinking to fr-041:debris ( https://www.youtube.com/watch?v=tq2llbP52Zo ) 7:20 minutes of awesomeness in less than 199 Kb. BTW, I just google it and apparently there is plenty of events going on... Coming very soon: https://www.assembly.org/summer19/

    历次讨论

    同类还值得读

    1. 开源应用架构

      The Architecture of Open Source Applications

      《开源软件架构》(AOSA)是一本在线免费书,邀请知名开源项目的作者亲自剖析其内部设计,涵盖 SQLAlchemy、LLVM、Audacity、Apache、Bash 等系统。

      编程与软件工程上首页 9 次 · 2011–2024aosabook.org编辑精选
    2. 编程语言简史:简短、不完整且多半错误

      A Brief, Incomplete, and Mostly Wrong History of Programming Languages

      一篇以戏谑、故意不准确的方式回顾编程语言史的博客文章,用夸张轶事和讽刺定义串起 Lisp、C、C++、Java、JavaScript、PHP 等语言。

      编程与软件工程上首页 8 次 · 2009–2021james-iry.blogspot.com
    3. SQLite 是如何测试的

      How SQLite is tested

      SQLite 官方文档页,系统介绍 SQLite 的测试体系:多种测试方法(TCL 测试、模糊测试、回归测试、静态分析等)和海量测试用例,展示了这个小型开源项目如何靠极致测试获得…

      编程与软件工程上首页 8 次 · 2009–2025sqlite.org编辑精选
    4. 高级编程语言(2009)

      Advanced programming languages (2009)

      Matt Might 的经典文章,按用途推荐“高级编程语言”:如果追求就业就选主流语言,如果追求表达力、学术研究或创业,则推荐 Haskell、OCaml、Scala 等函数式语…

      编程与软件工程上首页 8 次 · 2009–2022matt.might.net
    5. 我的 Forth 与栈机器经历

      Yosefk - My history with Forth & stack machines

      作者以亲身经历回顾了使用 Forth 语言和栈式机器的历程:既赞叹其简洁优雅、代码量小、可自举的优点,也坦率指出栈操作在实际编程中的痛苦,以及 Forth 社区文化中的问题。

      编程与软件工程上首页 8 次 · 2010–2024yosefk.com编辑精选

    打赏支持

    打赏二维码

    觉得有用,请作者喝杯咖啡。

    WeChat

    关注向阳乔木

    微信公众号「向阳乔木推荐看」

    微信公众号「向阳乔木推荐看」二维码

    微信扫一扫;在微信里打开本页时,长按二维码识别。