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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Yahoo Logo ASCII Animation in 462 bytes of C (2011)

247 点作者 emartinelli超过 9 年前

10 条评论

a1k0n超过 9 年前
Speaking of crazy ascii company logo animations, I never got a chance to golf these down, but I made some with color and signed distance field ray marching:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;a1k0n&#x2F;asciitracing" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;a1k0n&#x2F;asciitracing</a>
评论 #10430084 未加载
评论 #10430154 未加载
评论 #10430098 未加载
cantrevealname超过 9 年前
You can do super dense mathematical code in the ancient APL programming language[1]. I wonder how even more tiny this program could get at the hands of an APL expert if any still exist.<p>Here are some complete APL programs[2] to give a flavor of just how dense it can get:<p>Sum integers from 1 to 100:<p><pre><code> +&#x2F;ι100 </code></pre> Find all primes from 2 to a given number R:<p><pre><code> (∼R∈R◦.×R)&#x2F;R←1↓ιR </code></pre> Play Conway&#x27;s Game of Life:<p><pre><code> life←{↑1 ⍵∨.∧3 4=+&#x2F;,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵} </code></pre> [1] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;APL_%28programming_language%29" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;APL_%28programming_language%29</a><p>[2] <a href="http:&#x2F;&#x2F;www.vaxman.de&#x2F;publications&#x2F;apl_slides.pdf" rel="nofollow">http:&#x2F;&#x2F;www.vaxman.de&#x2F;publications&#x2F;apl_slides.pdf</a>
评论 #10430246 未加载
inoop超过 9 年前
My personal favorite is Viznut&#x27;s classic signature:<p><pre><code> #include &lt;math.h&gt; &#x2F;* outputs 8 kHz 8-bit unsigned pcm to stdout *&#x2F; main(v,i,z,n,u,t){for(v=-1;;)for(n=pow(&#x2F;* gcc -lm sig.c;.&#x2F;a.out&gt;&#x2F;dev&#x2F;dsp *&#x2F; 1.06,&quot;`cW`g[`cgcg[eYcb^bV^eW^be^bVecb^&quot;[++v&amp;31]+(v&amp;64)&#x2F;21),i=999;i;putchar( 128+((8191&amp;u)&gt;i?0:i&#x2F;8)-((8191&amp;(z+=n))*i--&gt;&gt;16)))u+=v&amp;1?t&#x2F;2: (t=v&amp;6?t:n&#x2F;4);} </code></pre> edit: fixed copy&#x2F;paste error
评论 #10430528 未加载
评论 #10429772 未加载
onion2k超过 9 年前
That&#x27;s very cool.<p>You can do something similar using Chrome&#x27;s console output. There used to be an intro that worked by rendering a canvas as ascii but it&#x27;s broken in newer Chrome - <a href="http:&#x2F;&#x2F;sandbox.photonstorm.com&#x2F;console.log&#x2F;" rel="nofollow">http:&#x2F;&#x2F;sandbox.photonstorm.com&#x2F;console.log&#x2F;</a> (it may work for other people). I figured out how it works and made a little animation to explore the principle - <a href="http:&#x2F;&#x2F;ooer.com&#x2F;console&#x2F;i.html" rel="nofollow">http:&#x2F;&#x2F;ooer.com&#x2F;console&#x2F;i.html</a> (You&#x27;ll need to change the height of the console to fit 16 lines of output)
dheera超过 9 年前
Wonder if someone can create a startup to do Obfuscated-C-Code-as-a-service.
评论 #10430767 未加载
hliyan超过 9 年前
Perhaps we should consider replacing line count with something like &quot;parameter weighted statement count&quot; as a measure of software size?
z3r0d4v3超过 9 年前
if you have some time to kill...<p><a href="http:&#x2F;&#x2F;mnml.is&#x2F;hn&#x2F;jslinux.jpg" rel="nofollow">http:&#x2F;&#x2F;mnml.is&#x2F;hn&#x2F;jslinux.jpg</a>
cheeze超过 9 年前
I always love these things. &quot;X in Y lines of $language!&quot;<p>Then you look at it and realize that a &quot;line&quot; is actually 20 different statements minified.<p>I found jquery implemented in a single line![1]<p>[1] <a href="https:&#x2F;&#x2F;jquery.com&#x2F;download&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jquery.com&#x2F;download&#x2F;</a>
评论 #10429540 未加载
评论 #10429855 未加载
评论 #10429559 未加载
评论 #10430055 未加载
评论 #10431186 未加载
评论 #10430075 未加载
评论 #10430163 未加载
评论 #10429500 未加载
swiley超过 9 年前
Maybe it would be better to just specify the length of the source file in bytes, so we don&#x27;t have these weird arguments about line length.
评论 #10429676 未加载
seyfulislam超过 9 年前
Everything is six lines when you have semicolon.