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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

I'm using the standard library

29 点作者 rly_ItsMe将近 11 年前

10 条评论

nemothekid将近 11 年前
To answer the OP&#x27;s objection clearly - the usefulness of a single binary that works anywhere trumps any benefit from having a smaller binary, especially in 2014 when we have 1TB harddrives and 10Gbe connections.<p>Having python installed as a pre-req on most OSes doesn&#x27;t even seem valid to me. For the project OP posted, any idiomatic python programmer today will most likely use the &quot;requests&quot; library, which isn&#x27;t part of the stdlib.
评论 #8120864 未加载
评论 #8120979 未加载
dpritchett将近 11 年前
As an entertaining counterpoint, here&#x27;s Kelsey Hightower&#x27;s &quot;Go for Sysadmins&quot; from Gophercon where he repeatedly touts the &quot;paste a link to your cross-compiled binary in an internal chatroom&quot; benefits of Go: <a href="https://www.youtube.com/watch?v=41GffiXhN6I" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=41GffiXhN6I</a><p>I understand what you&#x27;re saying and I&#x27;m a big fan of shell scripting myself, but dependency-free single-binary deployments are very, very convenient.<p>I upvoted this story because I find the topic interesting even though I don&#x27;t really agree.
评论 #8120548 未加载
Jemaclus将近 11 年前
I believe it was Benjamin Franklin that said [1], &quot;Those who would give up essential [Disk Space], to purchase a little temporary [Convenience], deserve neither [Disk Space] nor [Convenience]&quot;. [2]<p>[1] close enough<p>[2] <a href="http://en.wikiquote.org/wiki/Benjamin_Franklin#Quotes" rel="nofollow">http:&#x2F;&#x2F;en.wikiquote.org&#x2F;wiki&#x2F;Benjamin_Franklin#Quotes</a>
Monkeyget将近 11 年前
8Mb is less than a thousand of a percent of my hard drive. That space is well worth the convenience of not having to worry about installing a language&#x2F;checking version&#x2F;compiling&#x2F;whatever.
archagon将近 11 年前
Well, since technology grows non-linearly, so does our perception of resource usage. A megabyte is effectively meaningless when we talk about gigabytes of RAM or terabytes of hard disk space. Many <i>websites</i> nowadays require a megabyte download or more. I don&#x27;t think it&#x27;s odd that people treat 8MB as effectively &quot;free&quot;, and I think it&#x27;s a good thing because it allows us to liberally experiment with interesting new technologies (like Go) instead of hacking together obscure Unix commands like we used to.
ANTSANTS将近 11 年前
Does the go linker attempt any dead code elimination across libraries? Static linking is handy for distributing binaries but 8 megabytes does seem a bit excessive for a relatively simple program.<p>Then again, it isn&#x27;t so out of place nowadays when you see how big a statically linked C program can get when linked against glibc...
ewalk153将近 11 年前
This goes back to the argument between monolithic applications vs small single purpose utilities chained with pipes.<p>With a simple application that simply prints out the article titles, I get a 6.6M binary on my local machine.<p><a href="http://play.golang.org/p/iIsSMGlsaF" rel="nofollow">http:&#x2F;&#x2F;play.golang.org&#x2F;p&#x2F;iIsSMGlsaF</a>
bsg75将近 11 年前
I am willing to sacrifice a few MB per program for the convenience of copy-and-run.
revelation将近 11 年前
Go binaries are particularly braindead in that you can&#x27;t strip them. They just don&#x27;t work without the debug information.<p>(8MB is the size of the flash on a OpenWRT router running full blown Linux)
awakened将近 11 年前
You can strip and pack in many cases and reduce the size dramatically while still having a statically linked binary.