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.

The Binary Language of Moisture Vaporators

21 pointsby geospeckover 3 years ago

5 comments

disasover 3 years ago
&gt; But to build a compiler, you need to be able to see the output. A disassembler had to be built along with the compiler.<p>Until very recently the dominant paradigm, at least for ahead-of-time compilers on Unix, was to emit textual assembler code and run a separate assembler on it behind the scenes. No disassembler needed, you can ask GCC or LLVM based compilers to just give you the intermediate data with -S.<p>&gt; But running obj2asm is a separate process, and the output is filled with all the boilerplate needed to create a proper object file. The boilerplate is rarely of interest, and I’m only interested in the generated code for a function.<p>Sounds like a bug in obj2asm. GNU objdump, for example, has handy -d and -D flags for disassembling only the code for one or all symbols.<p>&gt; One would think that the way to do this would be to have the compiler generate the assembler source code, which would then be run through an assembler like MASM or gas to create the object file. I figured this would be slow and too much work.<p>It was fast enough even for the very first C compilers... &lt;checks calendar&gt; 40 years ago. For actual compilations. Not to mention that when you as a human want to read the assembly code, it doesn&#x27;t matter how &quot;slow&quot; the -S flag&#x27;s output is. No matter how &quot;Alpha&quot; you are, the bottleneck will be you, the human.<p>&gt; Instead, the disassembler logic actually intercepts the binary data being written to the object file and disassembles it [...] I am not aware of any other compiler that does this in the same way.<p>The HotSpot JVM has -XX:PrintAssembly and -XX:CompileCommand=ClassName.methodName flags that do this in the same way.<p>Just like the author, I am not aware of any other, other compiler that does this in the same way. Because just like the author I haven&#x27;t bothered to check. But if I had to bet, I would bet that all major just-in-time compilers do this in the same way.
评论 #30064442 未加载
评论 #30065067 未加载
yusefnaporaover 3 years ago
One of my first jobs was programming binary load lifters, very similar to your vaporators in most respects!
StrictDabblerover 3 years ago
My job is literally speaking the binary language of cooling and dehumidification systems.<p>I hadn&#x27;t realized&#x2F;noticed that Luke bought C-3PO to do my job.<p>Not sure how to feel about it.
Zababaover 3 years ago
I don&#x27;t understand what &quot;moisture vaporators&quot; in that article refers to.
评论 #30062111 未加载
评论 #30063054 未加载
WalterBrightover 3 years ago
Walter here, AMA!