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

    UP:带即时预览编写 Linux 管道的工具

    UP: A tool for writing Linux pipes with instant live preview

    3次上首页
    3年跨度
    1,091累计得分
    306条评论

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

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

    导读

    up 是一个交互式命令行工具:把任意命令的输出接给它后,可以即时输入后续管道命令并实时预览结果,边试边拼出完整的 Linux 管道。它用 Go 编写,旨在让构建和调试 shell 管道变得更快、更直观。

    为什么经久不衰:它把『试错式』拼管道的过程变成即时反馈,这个痛点多年不变,所以 2018 到 2021 反复登上首页,至今仍是学习 shell 管道的实用工具。

    关键词 命令行工具Linux 管道交互式预览shell

    HN 评论精选

    实时预览工具中逐字输入危险命令可能造成灾难性后果

    小心 rm:逐字输入 r、rm、rm -、rm -rf、rm -rf ~、rm -rf ~/、rm -rf ~/tmp——我的文件去哪了?

    ptman查看英文原文

    Careful with rm: r rm rm - rm -rf rm -rf ~ rm -rf ~/ rm -rf ~/tmp # where did my files go?

    赞赏工具的同时建议加沙箱保护,并顺带学到了新的 shell 技巧

    这工具看起来有趣又实用!最好别以 root 运行,也许可以加个 --safe 标志,用 Docker 沙箱跑命令。我还第一次见到 paste - - 和 foo |& bar,工作这么多年还能学到新技巧真难得。

    pjungwir查看英文原文

    This looks like a fun and helpful tool! (Perhaps best to ignore the notice from lshw and not run it as root, ha ha. Maybe even only in some kind of sandbox. I bet they could add a --safe flag so it would make an on-the-fly Docker image with a copy of your cwd, and run the commands in there. Then you have different problems I suppose, but still....) I've never seen `paste - -` before, but that is amazing too! I can't count how many times I've wanted something like that. Surely that will help my own shell pipelines in the future. Also I've never seen `foo |& bar` before. What a neat idea! The surprisingly-valid creativity of it reminds me of Duff's Device. Has anyone else ever found uses for that idiom? After so many years working in the shell, it's such a rare and delightful treat to learn new tricks. Thank you for sharing this with us!

    担心交互式执行带来的副作用风险

    工具自带警告:写入 rm 或 dd 之类的命令可能像拿着电锯乱跑。副作用对我来说总像潜在的灾难。

    crvdgc查看英文原文

    > WARNING: Please be careful when using it! It could be dangerous. In particular, writing "rm" or "dd" into it could be like running around with a chainsaw. But you'd be careful writing "rm" anywhere in Linux anyway, no? Side effects always seems like potential disasters for me.

    分享不依赖该工具的替代方案:watch 加文件迭代,以及管道中间日志技巧

    为了快速迭代管道,我把命令写进文件用 watch -n1 运行,容易修改、可临时注释部分内容。还写了个 plog 函数,用 tee 在管道中间步骤打印日志查看发生了什么。

    rgrau查看英文原文

    For fast iteration with pipes, using only basic unix tools, and arguably less risky to fat-fingering, I write it in a file, and use watch -n1. Easy to modify, temporarily comment parts of it, etc... Also, I wrote this plog function (for pipe-log, or something): plog() { local msg=${1:-plog} tee >(sed -e "s/^/[$msg] /" | cat 1>&2 ) } That allows me to see what's happening in the middle steps of the pipeline. I ended up compiling a list of tricks like that in https://raimonster.com/scripting-field-guide/ , in case anyone is interested (and feedback is appreciated)

    历次讨论

    同类还值得读

    1. 直接在浏览器中启动 Linux 内核

      Boot a linux kernel right inside your browser.

      Fabrice Bellard 的 JSLinux 页面,用 JavaScript 在浏览器里启动一个 Linux 内核,并提供一个可交互的终端环境。

      工具与资源上首页 5 次 · 2011–2025bellard.org
    2. Hacker News 未公开功能与行为清单(2018)

      A List of Hacker News's Undocumented Features and Behaviors (2018)

      数据科学家 Max Woolf 整理的 Hacker News 未公开功能与行为清单,涵盖投票机制、排名算法、账号惩罚等社区运作细节。

      工具与资源上首页 5 次 · 2019–2025github.com
    3. MapSCII:在终端中用盲文和 ASCII 渲染地图

      MapSCII – Braille and ASCII map renderer for the console

      MapSCII 是一个在命令行终端里渲染地图的开源工具,用盲文字符和 ASCII 字符把地理数据画成可交互浏览的字符地图。

      工具与资源上首页 5 次 · 2017–2025github.com
    4. 顶尖大学的免费在线课程

      Free Online Courses from Top Universities

      Open Culture 整理的一份免费在线课程合集,汇集了全球顶尖大学(如 MIT、斯坦福、耶鲁等)向公众开放的网络课程资源,涵盖音频、视频等多种形式。

      工具与资源上首页 5 次 · 2010–2022openculture.com
    5. 淘气字符串:容易引发用户输入问题的字符串清单

      Naughty Strings: A list of strings likely to cause issues as user-input data

      一个 GitHub 仓库,收录了大量容易让程序出问题的用户输入字符串,如特殊字符、emoji、SQL 注入片段、系统命令等,供开发者用于测试输入处理逻辑。

      工具与资源上首页 4 次 · 2015–2020github.com

    打赏支持

    打赏二维码

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

    WeChat

    关注向阳乔木

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

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

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