Interesting C code
11–20 of 31 posts
Re: Interesting C code
#12"in six lines of C" I'm not impressed. It could be done in 1 line of C when he left out the line-breaks. I don't think obfuscated code is interesting. It's unreadable. And therefore it's hard to learn something from it. But it's nice he is explaining the code. Now that is interesting!
/rant
I think compressed (edit: golfed - new word of the day :) code in general is pretty cool, though.
Re: Interesting C code
#13Interesting 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
Re: Interesting C code
#14"in six lines of C" I'm not impressed. It could be done in 1 line of C when he left out the line-breaks. I don't think obfuscated code is interesting. It's unreadable. And therefore it's hard to learn something from it. But it's nice he is explaining the code. Now that is interesting!
Obfuscation alone is not interesting, but 'code compression' (to achieve something using as few characters as possible) is a very interesting puzzle for the brain I think.
Someone ought to make a quiz page - "is this perl golf, or a cat walking on a keyboard".
Re: Interesting C code
#15Earlier quoted context omitted.
Obfuscation alone is not interesting, but 'code compression' (to achieve something using as few characters as possible) is a very interesting puzzle for the brain I think.
It's called "code golf", and from what I can tell, perl is the undisputed king of golfing languages. Someone ought to make a quiz page - "is this perl golf, or a cat walking on a keyboard".
Re: Interesting C code
#16Re: Interesting C code
#17"in six lines of C" I'm not impressed. It could be done in 1 line of C when he left out the line-breaks. I don't think obfuscated code is interesting. It's unreadable. And therefore it's hard to learn something from it. But it's nice he is explaining the code. Now that is interesting!
Yes, the aim was compression (golfing), not obfuscation. Compression of silly ASCII things has been sort of a hobby of mine for a while and I intend to blog about that in particular. Another little compressed snippet is my "email signature" at the bottom of my site root. Try clicking on it.
Re: Interesting C code
#18"in six lines of C" I'm not impressed. It could be done in 1 line of C when he left out the line-breaks. I don't think obfuscated code is interesting. It's unreadable. And therefore it's hard to learn something from it. But it's nice he is explaining the code. Now that is interesting!
Re: Interesting C code
#19http://jsfiddle.net/mrpollo/jeNau/
tho i cant make it run yet on jsfiddle