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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: Servasm – Literate web server in x86 assembler

117 点作者 zrkzrk将近 10 年前

9 条评论

marktangotango将近 10 年前
If anyone finds this interesting, and would like to drill down into this type of low level code, I highly recomment &quot;Programming from the Ground Up&quot; by Jonathan Bartlett [1]. It is an excellent introduction to assembler, and programming in general.<p>[1] <a href="http:&#x2F;&#x2F;freecomputerbooks.com&#x2F;Programming-from-the-Ground-Up.html" rel="nofollow">http:&#x2F;&#x2F;freecomputerbooks.com&#x2F;Programming-from-the-Ground-Up....</a>
评论 #9749640 未加载
pointernil将近 10 年前
That&#x27;s really fascinating and interesting and educating.<p>Now every other http server implementation should need to explain every byte it is larger and every ms it is slower it terms of &quot;why?&quot; and &quot;what for?&quot; and &quot;who gains from this?&quot; ;)<p>I don&#x27;t know, for longer already I don&#x27;t buy this tales about &quot;it needs to be this large because...&quot; ... mostly legacy, abstractions and ease of code maintenance etc. This took us all into the world in which the very smallest app on the phone reacting to a click with a &quot;beep&quot; takes how much memory? And the software development craft accepts unbelievable inefficiencies. Memory, Cpu manufactures for long time added to this fires by essentially mis-nurturing devs by optimizing in the background and by creating an environment of limitless virtual resources. I like how &quot;battery-life&quot; enforces, brings back some old ideas on efficiency and software craftsmanship.<p>Humanity starts to deal with limits of its planet, its own limits and maybe this kind of thinking will bring back some level of limits into the virtual realms as well? I think we would gain from it.
评论 #9750210 未加载
e12e将近 10 年前
Very nice.<p>However, I wonder who started this trend of bundling &quot;better commented code&quot; with &quot;literate programming&quot; though?<p>I appreciate the layout and hyperlinks etc - but this really is just a well-structured assembly program laid out in a way that it won&#x27;t assemble until after it&#x27;s been through a pre-processor (I&#x27;m talking about the program as presented with html&#x2F;css etc). It&#x27;s pretty far from &quot;literate programming&quot;.<p>I suppose one could argue that if you manage to simplify the structure of your program to the point that it reads like prose, one has a &quot;literate program&quot;. But it&#x27;s a strange use of the term. The core idea is to have the code be incidental to the commentary, so that, among other things, one would update the commentary whenever one change the program.<p>Laying out the comments in a funny way doesn&#x27;t quite do that. I first saw this with the &quot;literate&quot; re-write of coffee script, but perhaps it&#x27;s older?<p>Perhaps the difference between &quot;old&quot; literate programming, and this style (&quot;prose programming&quot;?) is similar to the difference between unit testing and TDD, or between TDD and BDD?
评论 #9749296 未加载
mlitchard将近 10 年前
At first I was thinking &quot;For the love of bog why?&quot;, but then I started reading, and couldn&#x27;t stop reading.
vmorgulis将近 10 年前
It is very interesting.<p>I like the simplicity of the system calls.<p>With DynASM (a subproject of LuaJIT), it is possible to target more platforms with this kind beauty.<p><a href="http:&#x2F;&#x2F;luajit.org&#x2F;dynasm_features.html" rel="nofollow">http:&#x2F;&#x2F;luajit.org&#x2F;dynasm_features.html</a>
vezzy-fnord将近 10 年前
Annotations aside, this is actually more readable than a lot of C code I&#x27;ve seen.
评论 #9747691 未加载
Ellipsis753将近 10 年前
Interesting read and I like it. I&#x27;ll have to read it more on my Desktop. I get a HTTPS error on my android phone however.<p>You might be missing an intermediate certificate. (Just a heads up.)
评论 #9747452 未加载
elmar将近 10 年前
Simply beautiful and elegant, probably very fast and with a very small memory footprint.
dingdingdang将近 10 年前
Would love to see benchmark on this versus nginx for fun!
评论 #9749034 未加载