工具与资源bellard.org
直接在浏览器中启动 Linux 内核
Boot a linux kernel right inside your browser.
2011 — 2025,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
这是 Fabrice Bellard 的 JSLinux 页面,用 JavaScript 在浏览器里启动一个 Linux 内核,并提供一个可交互的终端环境。它曾因展示浏览器中运行完整系统(包括编辑器和编译器)而多次登上 Hacker News。
为什么经久不衰:它用纯 JavaScript 把完整 Linux 终端塞进浏览器,且作者 Fabrice Bellard 的传奇作品履历让每次重读都像见证一次工程极限演示。
HN 评论精选
认为 JSLinux 展示了 typed arrays 等低层 API 的价值,浏览器应提供更底层能力以支撑高性能复杂系统。
这体现了 JavaScript 新增的低层 API 在处理二进制数据方面的优势。Fabrice 用它们实现了一个 x86 解释器——没有 typed arrays 就无法高效做到。但它仍然慢——想象一下,如果建立一个通用字节码,由 JS VM JIT 编译,并能由模拟器直接输出,会带来多大进步。这就是为什么这么多人希望浏览器执行环境提供更完整的低层 API,而不是锁定在 HTML/CSS 和遗留浏览器技术上的高层 API。高效支持高性能、高复杂度的系统(如 x86 模拟器、视频游戏、自定义字体渲染,甚至应用框架)绝对需要高效的低层 API。
nupark2查看英文原文
This is demonstrative of the advantages of the new low-level APIs being added to JavaScript to work efficiently with binary data. Fabrice uses this to implement an x86 interpreter -- it could not be done efficiently without typed arrays. However, it is still slow -- imagine what kind of advances could be made if a common bytecode was established that would be JIT'd by the JavaScript VM, and could be output directly by the emulator. This is why so many people want to see the browser execution environment offer more complete, low-level APIs instead of high-level APIs locked to HTML/CSS and legacy browser technology. Efficiently supporting high-performance, high-complexity systems such as an x86 emulator (or a video game, or custom font rendering, or even an application framework) absolutely require efficient low-level APIs.
感叹作者履历惊人,JSLinux 是又一疯狂作品。
在 FFmpeg(很可能用于你所有电视和小设备)、QEMU(也被 Xen、VBox 等使用)、tcc 及其 IOCC 作品、用 ATI 卡做 DVB-T 发射之后,Fabrice 又一次带来了疯狂的东西……他真令人印象深刻……
jbk查看英文原文
After FFmpeg (used in all your TVs and gadgets, very likely), QEmu (used also by Xen and VBox and other), tcc and his IOCC entries, the DVB-T emission with an ATI card, Fabrice comes, once again with something crazy... He is really impressive...
震惊于浏览器内 Linux 不仅有 emacs 还能用 tcc 编译运行 C 程序。
我彻底惊呆了。它不仅启动,还带有 emacs 和编译器。Welcome to JS/Linux ~ # emacs test.c ~ # cat test.c void main(void) { printf("Hello World!\n"); } ~ # tcc test.c -o hello ~ # ./hello Hello World! [编辑:刚意识到目录里已有 hello.c 展示同样内容,措辞更好。]
nkurz查看英文原文
I'm utterly dumbfounded. Not only does it boot, it's got emacs, and a compiler. Welcome to JS/Linux ~ # emacs test.c ~ # cat test.c void main(void) { printf("Hello World!\n"); } ~ # tcc test.c -o hello ~ # ./hello Hello World! [Edit: just realized that there is already a 'hello.c' in the directory that shows just this with better diction.]
用 fork bomb 测试,浏览器内 shell 受限但令人震撼。
我刚把我的浏览器 forkbomb 了。再也没有什么是神圣的了。 ~ # f(){ f|f & };f sh: can't fork sh: can't fork sh: can't fork ...
shazow查看英文原文
I just forkbombed my browser. Nothing is sacred anymore. ~ # f(){ f|f & };f sh: can't fork sh: can't fork sh: can't fork sh: can't fork ...
历次讨论
同类还值得读
Hacker News 未公开功能与行为清单(2018)
A List of Hacker News's Undocumented Features and Behaviors (2018)
数据科学家 Max Woolf 整理的 Hacker News 未公开功能与行为清单,涵盖投票机制、排名算法、账号惩罚等社区运作细节。
工具与资源上首页 5 次 · 2019–2025github.comMapSCII:在终端中用盲文和 ASCII 渲染地图
MapSCII – Braille and ASCII map renderer for the console
MapSCII 是一个在命令行终端里渲染地图的开源工具,用盲文字符和 ASCII 字符把地理数据画成可交互浏览的字符地图。
工具与资源上首页 5 次 · 2017–2025github.com顶尖大学的免费在线课程
Free Online Courses from Top Universities
Open Culture 整理的一份免费在线课程合集,汇集了全球顶尖大学(如 MIT、斯坦福、耶鲁等)向公众开放的网络课程资源,涵盖音频、视频等多种形式。
工具与资源上首页 5 次 · 2010–2022openculture.com淘气字符串:容易引发用户输入问题的字符串清单
Naughty Strings: A list of strings likely to cause issues as user-input data
一个 GitHub 仓库,收录了大量容易让程序出问题的用户输入字符串,如特殊字符、emoji、SQL 注入片段、系统命令等,供开发者用于测试输入处理逻辑。
工具与资源上首页 4 次 · 2015–2020github.com探索不到 1 美元的各类微控制器
Exploring different microcontrollers less than $1
Jay Carlson 对单价 1 美元以下的数十款微控制器(涵盖 8 位 AVR/PIC、16 位 MSP430、32 位 ARM、ESP8266 等)所做的系统横向评测:逐一…
工具与资源上首页 4 次 · 2017–2022jaycarlson.net