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

    x86 裸机编程示例集

    x86 Bare Metal Examples

    2次上首页
    2年跨度
    792累计得分
    76条评论

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

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

    导读

    这个 GitHub 仓库收集 x86 裸机编程示例,展示在没有操作系统的情况下运行的最小低层代码,常配合 QEMU 等模拟器实验。它面向想从代码层面理解启动、中断和硬件交互的开发者,评论也围绕学习路径、32/64 位差异和现代平台复杂性展开。

    为什么经久不衰:因为它把抽象的裸机概念落实为可运行的小例子,是低层编程少见而实用的入口,多年后仍适合拿来动手实验。

    关键词 x86bare-metal汇编操作系统

    HN 评论精选

    呼吁提供更多关于现代 x86 平台事务路由、MSI/DMA 等机制的系统性概览,而不只讲遗留接口。

    这些例子很好,可能有点离题:我希望有更多资源讲现代 x86 平台实际如何工作,而不是这些遗留接口——它们要么在 SMM 中通过 IO 端口 trapping 模拟,要么得靠芯片组 hack 维持(如 PCI 规范里的 VGA 设备 hack,或芯片组遗留 IO 端口解码到 LPC bridge)。真正理解当今平台每个方面几乎不可能,但研究平台如何路由事务(uncore/芯片组如何用基址寄存器和解码窗口路由 TLP,无论是原始 PCIe 还是被 IF/HyperTransport/DMI/QPI 等包装)能建立很多直觉,也有助于理解现代 MSI 中断和 DMA。深入 PCI 配置、ACPI、UEFI、现代启动、DMA/中断重映射、DRAM、安全与电源管理等是多年功课,但核心思想不必分散各处才能让人熟悉。

    emily-c查看英文原文

    These are good examples and this might be slightly off topic but I wish that there were more resources on how modern x86 platforms actually work instead of using these legacy interfaces that are either emulated in SMM with IO port trapping or relegated to requiring chipset hacks to keep them working (such as VGA device hacks in the PCI spec or well known chipset legacy IO ports decoding to the LPC bridge). While it is essentially impossible to truly understand every aspect of todays platforms I think that one can build a lot of intuition about how things work by studying how transaction routing is handled in the platform, e.g. how the uncore and chipset routes TLPs (whether it's raw PCIe or packets essentially wrapped by other interconnect protocols like IF/HyperTransport/DMI/QPI/etc) through the system with various base address registers and decoding windows. This gives way to understanding how modern MSI interrupts and DMA works as well. While I understand that truly going into things like PCI configuration, ACPI, UEFI, chipset interfaces on bus 0, modern booting, DMA and interrupt remapping, DRAM, register locking and security, security processors, power management, various types of runtime firmware, etc is a a many-years-long exercise I think that the core ideas don't need to be spread around all over the place for one to get familiarity with the ideas and patterns that underpin our PCs. I think that a general conceptual overview on which one can hang more detailed knowledge acquired by reading specs is needed with the amount of complexity that exists today. There are some really good resources that I've collected over the years but there is still something missing. Maybe I or someone else will get around to it some day.

    建议直接学 x86_64,并提醒模拟器的简化行为会掩盖真实硬件复杂性。

    如今最好只用 x86_64。32 位 x86 有很多缺点,64 位在很多方面更干净更好:没有分段、平坦地址空间、更好的中断处理、更好的系统调用、更多寄存器等。另外,QEMU 等虚拟化技术可能掩盖一些硬件问题:每个硬件设备(键盘、USB、显示、磁盘等)都会被简化,如果在 x86_64 主机上模拟 ARM CPU,真实硬件上的缓存一致性会完全乱掉。

    andy_threos_io查看英文原文

    Nowadays, it's better to use x86_64 only. The 32 bit x86 has many drawbacks. The 64 bit is much cleaner and better in many many ways. -no segmentation, flat address space -better interrupt handling -better system call -more registers etc. Also we found that Qemu or other Virtualization technology may cover up some of the hardware issues. Eg. Beside, that every hardware device (keyboard, usb, display, disk etc.) will have some simplified behavior, if you emulate an ARM cpu on x86_64 host, than the cache coherency will totally messed up on real hardware.

    询问是否有 GRUB2 加载 64 位 ELF 长模式 Hello World 的最小示例。

    你有用 GRUB2 引导加载 64 位 ELF 内核的 hello-world 示例吗?不是 Linux 内核,我字面意思就是一个只打印“hello world”的简单程序,类似 [1] 但运行在长模式下。

    mammalutte查看英文原文

    Do you have any hello-world examples of how to load a 64bit ELF kernel with a GRUB2 bootloader? I don't mean Linux kernel, I literally mean a simple program that only prints "hello world". Something like this [1] but in long mode. [1] https://wiki.osdev.org/Bare_Bones

    底层编程初学者容易不知所措,向作者寻求入门建议。

    我看到 Ciro Santilli 在这里,所以提个问题。我想开始学习底层编程,但每次尝试都感到非常不知所措。你有什么建议吗?

    _chiliconcarne查看英文原文

    I'll drop a question since I see Ciro Santilli is around. I want to start learning low level programming. Yet, I feel awfully overwhelmed every single time I try. Any recommendations you might have?

    历次讨论

    同类还值得读

    1. TTY 揭秘(2008)

      The TTY demystified (2008)

      经典文章深入剖析了 Unix/Linux 中 TTY 子系统的工作原理,包括线路规程、终端驱动、信号与控制字符等机制。

      系统与基础设施上首页 11 次 · 2009–2025linusakesson.net编辑精选
    2. 为什么 GNU grep 这么快

      Why GNU grep is Fast

      FreeBSD 邮件列表上一篇广为流传的帖子,解释 GNU grep 为什么快:核心在于 Boyer-Moore 字符串搜索算法配合精心优化的内部循环和 I/O,让程序在搜索时“…

      系统与基础设施上首页 9 次 · 2010–2022lists.freebsd.org
    3. Xplain:为普通人讲解 X11

      Xplain – Explaining X11 for the rest of us

      《Xplain》是作者(HN 用户 Jasper_)写的一系列 X11 长文,用他在浏览器中重建的 X11 绘图模型做交互演示,讲解 X11 的绘图模型与窗口系统设计。

      系统与基础设施上首页 6 次 · 2013–2020magcius.github.io编辑精选
    4. 旋风教程:为 Linux 创建极小 ELF 可执行文件(1999)

      A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux (1999)

      breadbox 写于 1999 年的经典教程,主题是如何为 Linux 手工构造并裁剪出体积极小的 ELF 可执行文件。

      系统与基础设施上首页 6 次 · 2007–2025muppetlabs.com
    5. PostgreSQL 内部原理

      The internals of PostgreSQL

      《The Internals of PostgreSQL》是一本免费在线书籍,系统讲解 PostgreSQL 的内部实现,包括查询处理、并发控制、WAL、缓冲区管理等核心机制。

      系统与基础设施上首页 5 次 · 2017–2025interdb.jp编辑精选

    打赏支持

    打赏二维码

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

    WeChat

    关注向阳乔木

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

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

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