|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Why I hate c
If you really want to see some obfuscated C code, there's actually a contest for it. http://www.ioccc.org/ - The International Obfuscated C Code Contest.
Winning entries can be found at http://www1.us.ioccc.org/years.html If you want a language that is very easy to program in and makes sense, check out Ruby at http://www.ruby-lang.org For example, to run a command 3 times in C, you would do this: for (int i=3; i<=0; i--) { command(); } In Ruby, it would look something like this: 3.times { command } Ruby is also loosely-typed, meaning you don't have to worry about the size of the variable that's holding your data, the interpreter will determine that for you. Note that you can't use Ruby on the robot, this is just for hobbyist programmers. |
|
#2
|
|||||
|
|||||
|
Re: Why I hate c
Thanks for that pointer to IOCCC -- I think that's where that bit of code came from, many years ago.
And now I'm reminded of another language, "whitespace,", wherein all code is composed entirely of three characters: space, newline, and tab. Here's a example bit of code: Code:
This is a comment.
End of code example.
|
|
#3
|
|||||
|
|||||
|
Re: Why I hate c
Quote:
By the way, what does your program do? |
|
#4
|
||||
|
||||
|
Re: Why I hate c
Quote:
Code:
short main[] = {
277, 04735, -4129, 25, 0, 477, 1019, 0xbef, 0, 12800,
-113, 21119, 0x52d7, -1006, -7151, 0, 0x4bc, 020004,
14880, 10541, 2056, 04010, 4548, 3044, -6716, 0x9,
4407, 6, 5568, 1, -30460, 0, 0x9, 5570, 512, -30419,
0x7e82, 0760, 6, 0, 4, 02400, 15, 0, 4, 1280, 4, 0,
4, 0, 0, 0, 0x8, 0, 4, 0, ',', 0, 12, 0, 4, 0, '#',
0, 020, 0, 4, 0, 30, 0, 026, 0, 0x6176, 120, 25712,
'p', 072163, 'r', 29303, 29801, 'e'
};
this is from the first IOCCC competition in 1984 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| I Hate It When... | sanddrag | Chit-Chat | 77 | 25-12-2003 10:57 |
| I hate the BCS and i really ha te KANSAS ST. | Jon Reese | Chit-Chat | 10 | 11-12-2003 12:09 |
| GRRr.... I hate webpages... | XRaVeNX | Chit-Chat | 4 | 15-03-2002 12:28 |
| Why I hate Logic | EnderofDragon | Chit-Chat | 2 | 19-02-2002 21:02 |