News for hackers. Stuff that matters.
Re:C, The Beautiful Language by angusgr on Monday March 14, 2011 @09:02PM (#2325333)
This is a nicely written tribute, but there are two generalisations that I feel are worth pointing out.

Many parts of Linux kernel are really, really nice C code. Sadly, in my experience most C code is not especially nice. I don't know how this extends to the football metaphor, but certainly I wish most of the C code I have encountered (not to mention written) in my career to date was one tenth as neat.

On balance, I'd say there are other languages (Erlang, Python) where I've personally found the median quality, and level of expression, to be substantially higher (for the random subset of code I've read and my own standards, clearly YMMV.)

The other generalisation is "other languages". Which "other languages" are they? What other projects (despite the Linux kernel) are they reading, and in what contexts?

You can find beautiful or precise code is almost any language if you try hard enough. You can find ugly or obfusticated code in nearly every language without barely trying at all.

Re:C, The Beautiful Language by paulsmith on Monday March 14, 2011 @09:41PM (#2325434)
What are some specific examples of beautiful C code in your view? Asking for a friend.
Re:C, The Beautiful Language by dxq on Monday March 14, 2011 @10:36PM (#2325575)
After finding the documentation and guides for writing nginx modules woefully inadequate, I did a lot of poking around in the nginx internals to better understand how things worked.

The code is very readable, follows good style guidelines, and has its fair share of brilliant workings. I found that the source code served as much better documentation than a lot of _actual_ documentation that I've read.

Re:C, The Beautiful Language by cpeterso on Tuesday March 15, 2011 @12:37AM (#2325980)
You beat me to it! I was just about to suggest the nginx internals. :)
Re:C, The Beautiful Language by uxp on Tuesday March 15, 2011 @12:48AM (#2326015)
I like poking around FreeBSD's code, specifically some of the drivers and userland. I find a lot of code that rpaulo commits to be particularly clean and understandable. Some of rdivacky's work on boot2 and clangbsd is also inspiring to me.

http://svn.freebsd.org/base/user/rpaulo/

Re:C, The Beautiful Language by dchest on Monday March 14, 2011 @11:23PM (#2325696)
Plan 9 code is beautiful http://plan9.bell-labs.com/sources/plan9/sys/src/

Although there are a few extensions in its C compiler http://plan9.bell-labs.com/sys/doc/compiler.html

Re:C, The Beautiful Language by silentbicycle on Tuesday March 15, 2011 @09:51AM (#2327413)
Lua, SQLite, the OpenBSD/FreeBSD userland utilities.
Re:C, The Beautiful Language by burgerbrain on Tuesday March 15, 2011 @02:22AM (#2326286)
The Busybox project.
Re:C, The Beautiful Language by angusgr on Tuesday March 15, 2011 @06:48PM (#2329836)
I'm glad. Somewhere on my mental "code I'd like to read list" is the busybox code, because I don't understand how it does so much with so little. If it does it and looks good, I'm doubly impressed. :)
Re:C, The Beautiful Language by Turing_Machine on Monday March 14, 2011 @10:30PM (#2325559)
As the old joke has it, you can write FORTRAN in any language.