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.

Interesting C code

225 pointsby geekzgalorealmost 14 years ago

8 comments

tintinalmost 14 years ago
<i>"in six lines of C"</i><p>I'm not impressed. It could be done in 1 line of C when he left out the line-breaks.<p>I don't think obfuscated code is interesting. It's unreadable. And therefore it's hard to learn something from it.<p>But it's nice he is explaining the code. Now that is interesting!
评论 #2743794 未加载
评论 #2742120 未加载
评论 #2742354 未加载
评论 #2743319 未加载
评论 #2742526 未加载
评论 #2744049 未加载
jsebanalmost 14 years ago
Interesting indeed. But weird that he uses obfuscated code when doing a piece of explaining how it's done. Or do people actually write for loops like those? :P
评论 #2743392 未加载
mrpolloalmost 14 years ago
the javascript port is awesome too<p><a href="http://jsfiddle.net/mrpollo/jeNau/" rel="nofollow">http://jsfiddle.net/mrpollo/jeNau/</a><p>tho i cant make it run yet on jsfiddle
评论 #2744961 未加载
johnx123-upalmost 14 years ago
My favorite is world map code by Brian Westley <a href="http://www.ioccc.org/1992/westley.hint" rel="nofollow">http://www.ioccc.org/1992/westley.hint</a><p><pre><code> main(l ,a,n,d)char**a;{ for(d=atoi(a[1])/10*80- atoi(a[2])/5-596;n="@NKA\ CLCCGZAAQBEAADAFaISADJABBA^\ SNLGAQABDAXIMBAACTBATAHDBAN\ ZcEMMCCCCAAhEIJFAEAAABAfHJE\ TBdFLDAANEfDNBPHdBcBBBEA_AL\ H E L L O, W O R L D! " [l++-3];)for(;n--&#62;64;) putchar(!d+++33^ l&#38;1);} </code></pre> BTW, how to convert C to JavaScript?
sirk390almost 14 years ago
Wow, impressive. And I love your humour about warnings :)
vegaialmost 14 years ago
I sometimes wonder if code golfing has the risk that some junior developers might confuse it as good code.
aralibalmost 14 years ago
Now I really want to learn ray tracing (and computer graphics in general).
xedariusalmost 14 years ago
'warnings which real programmers ignore' ... That tells me pretty much all I needed to know about that article.
评论 #2742172 未加载
评论 #2742223 未加载
评论 #2742497 未加载