TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Servasm – Literate web server in x86 assembler

117 pointsby zrkzrkalmost 10 years ago

9 comments

marktangotangoalmost 10 years ago
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 未加载
pointernilalmost 10 years ago
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 未加载
e12ealmost 10 years ago
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 未加载
mlitchardalmost 10 years ago
At first I was thinking &quot;For the love of bog why?&quot;, but then I started reading, and couldn&#x27;t stop reading.
vmorgulisalmost 10 years ago
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-fnordalmost 10 years ago
Annotations aside, this is actually more readable than a lot of C code I&#x27;ve seen.
评论 #9747691 未加载
Ellipsis753almost 10 years ago
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 未加载
elmaralmost 10 years ago
Simply beautiful and elegant, probably very fast and with a very small memory footprint.
dingdingdangalmost 10 years ago
Would love to see benchmark on this versus nginx for fun!
评论 #9749034 未加载