TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Exploring pre-1990 versions of wc(1) (2023)

58 点作者 henry_flower8 个月前

4 条评论

shric8 个月前
A fun read on word count optimization can be found in Abrash&#x27;s Black Book:<p><a href="https:&#x2F;&#x2F;www.jagregory.com&#x2F;abrash-black-book&#x2F;#lessons-learned-in-the-pursuit-of-the-ultimate-word-counter" rel="nofollow">https:&#x2F;&#x2F;www.jagregory.com&#x2F;abrash-black-book&#x2F;#lessons-learned...</a><p>You can gloss over the asm if you wish, the tricks that are explained around it are worth it imho.
评论 #41576837 未加载
tripdout8 个月前
Those `goto`s between two different for loops is crazy.
评论 #41577317 未加载
评论 #41578342 未加载
Joker_vD8 个月前
&gt; A word is a maximal string of characters delimited by spaces, tabs or newlines.<p>And then the <i>actual</i> code explicitly filters out and ignores every character larger than 0x7F. Just why.
评论 #41577070 未加载
评论 #41576896 未加载
评论 #41576074 未加载
dexen8 个月前
The brevity carried over to Plan 9. Re-posting my older comment (<a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4023385">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4023385</a>):<p><a href="http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Plan_9_from_Bell_Labs" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Plan_9_from_Bell_Labs</a> follows the Unix philosophy. A lot of legacy has been shed. I can count 13 options to ls, 11 options to sed and just 5 to sed.<p>The standard Plan 9 shell, Rc, is described in mere ~500 lines of manpage, while Bash takes whooping ~5400 lines.<p>Oh, and there is no `dll hell&#x27; in P9 :-)