Name:
Lambda A. Calculus!!wKyoNUUHDOmjW7I2013-04-20 13:08
Let's get down to business. You hate me, /prog/, and I hate you. Being a Calculus, I am unsatisfied with my programming skill and seek improvement. I challenge any of you who take pride in your skill with C to engage in the following game:
- Put down a challenge. A criteria for a program that both of us shall implement with C.
- Wait for me to accept your challenge. I don't accept those stupid challenges you find on that project euler website. Math doesn't interest me, "such that there exists"-boys. The exercises in K&R2 and, perhaps simple Unix programs, are good examples of the kinds of programs that interest me. You know, useful ones.
- Post your code.
- Wait for me to post my code.
If your program is fancier than my own and yields little criticism from one Lambda A. Calculus, I shall leave /prog/. I'm open to other stakes as well.
I await your challenges and, if any stupid stack boys want to challenge me, go for it.
Name:
Anonymous2013-04-21 21:56
>>120
POST A COMPILABLE PROGRAM YA FUCKING RETOID. AND WHAT DA FUCK IS DAT rnd SHIT? TAKE SOME TIME TO GET IT TO COMPILE.
...it's almost the 'Holy Grail' sort ^^ O(2n) in-place sort right there.. =D
Name:
Anonymous2013-04-22 0:08
>NO FUCKING SIMULATORS
>...
>EMULATORS FOR SIMPLE CHIPSETS
Name:
Anonymous2013-04-22 1:32
>>124
NO FUCKING BANANA IN THE ASS SIMULATIONS. CHIPSET EMULATORS ARE FINE, THEY'RE BASICALLY THE SAME AS INTERPRETERS, MEANING THAT THEY'RE ACTUALLY USEFUL.
YAINT RED DA STANDARD. GOTTA #include stdlib.h FOR rand. GOTTA TERMINATE stdout WITH A NEWLINE OTHERWISE THE C IMPLEMENTATION CAN CHOP OFF YOUR LAST LINE. GOTTA TERMINATE YOUR C SOURCE FILE WITH A NEW LINE ELSE YA GOT UNDEFINED BEHAVIOUR; DON'T WANT THAT. EITHER WAY, GOOD JOB ON GETTING UR PROGRAM DONE.
OH NEVERMIND 'BOUT THAT NO NEWLINE AT THE END OF THE SOURCE FILE SHIT, ideone'S JUST RETARDED.
Name:
Anonymous2013-04-22 2:37
CHOPS DAT SHIT OFF AUTOMATICALLY
Name:
Anonymous2013-04-22 2:39
OR DOESN'T ADD IT OR SOME SHIT, IDUNNO FUK
Name:
Anonymous2013-04-22 3:03
>>130 If your program is fancier than my own and yields little criticism from one Lambda A. Calculus, I shall leave /prog/
Bye OP!
Name:
Anonymous2013-04-22 3:18
>>134
GET FUCKED. I'M LAMBDA A. CALCULUS AND MY CRITICISM'S RIGHT IN >>130. AND HOW DA FUCK IS DAT KID'S PROGRAM FANCIER? MY PROGRAM'S DA BEST THING SINCE SLICED BREAD. ACTUALLY #includeS stdlib.h. HOW DA FUCK DO U LIKE DAT?
Name:
Anonymous2013-04-22 3:19
>>134
PROVIDE SOME ARGUMENTS FOR HOW HIS PROGRAM'S ANY BETTER THAN MY OWN AND I MIGHT CONSIDER LEAVING. I HAVEN'T LEARNED SHIT FROM HIS PROGRAM THOUGH, SO IT KINDA DEFEATS THE PURPOSE.
Well you use typedefs, which makes maintenance more doable. That is a positive point. A negative point is that you mix statements and expressions:
...
a[r = rand() / (RAND_MAX / NELEMS)]++;
...
This is horrible of course. It is a minor point, but I gives me some sure headache. I didn't like the misuse of the enum for some constants. An enumeration should be something countable. The objects in an enumeration should belong to one class. Like red, green blue or lowest, lower,low etc.
On the whole, I found your code more readable. More noise free.
Name:
L. A. Calculus2013-04-22 4:29
>>137 A negative point is that you mix statements and expressions
DAT ENTIRE LINE IS AN EXPRESSION YA RETOID.
I didn't like the misuse of the enum for some constants. An enumeration should be something countable.
A fair point, I suppose. I'm not too happy using enums myself, but I don't think there's anything better in C for this situation.
One option is to use a regular const-qualified integer type, but the disadvantage of that is that it doesn't give you a proper constant integer expression. A consequence of that, which is relevant for this program, is that you'll have a variable length array if you use it to specify the size of one.
The other, more commonly used option, is a macro. That doesn't have the disadvantage of the const-qualified integer types, but its problem is that it's more of a syntax thing. If you do the following:
#define NELEMS MAXVAL - MINVAL + 1
Whenever NELEMS is encountered it will simply be replaced with that text. It doesn't take evaluation order into account, so you need to do some yucky stuff with parentheses to account for that.
References like The Practice of Programming encourage the use of enums in favour of the other two methods (check out section 1.5 if you have that reference), and I agree that they're generally the better choice for defining magic numbers, specfically for the two reasons listed above.
Name:
Anonymous2013-04-22 4:35
>>138 DAT ENTIRE LINE IS AN EXPRESSION YA RETOID.
WELL, OK, IT'S AN EXPRESSION STATEMENT 2 B MORE SPECIFIC, BUT SO IS "a = 10;", SO WAT DA FUCK IS WRONG WITH DAT?
...i have another challenge, but i doubt its any harder..
implement synthetic sort (mark II) - which should return a sorted index rather than the sorted values..
...i'm pretty lazy, so another 24h deadline ^^ unless a better challenge(/r) comes along..?
Name:
Lambda A. Calculus!!wKyoNUUHDOmjW7I2013-04-22 14:47
>>147
UR ON PARTNER AND, AS USUAL, MY CODE'S DONE AND UPLOADED. ALL ON U NOW.
>>138
U DROPPED OUT OF CHARACTER IN THIS POST YA FUCKIN RETOID
Name:
Anonymous2013-04-22 17:21
I got one for you.. You say that you are a master programmer, correct?
Go write an Artificial Intelligence program that can do the following, but before this:
-Don't bullshit and start writing in all caps like the little baby and refuse challenges, no math and shit.
-Don't whine about, it can already be done.
-Just do it faggot.
The AI will need to do the following:
-Self-learn video capturing whenever a video plays on the computer or streamed.
-Able to upload the recording to a file server and cough up a link of said URL where the recording of the video is found.
-Able to find similar videos of ones it recorded, if only it's a partial recording, it still should be able to get links by analyzing / self-learning.
Prove /prog/ you are a master programmer, faggot. Don't start the fucking caps, just accept and fucking do it.
Name:
Anonymous2013-04-22 18:31
>>151
I DON'T TALK LIKE A RETOID WEN I'M RESPONDIN TO INTELLIGENT SHIT.
>>152
I GOT NOTHIN TO PROVE TO U, YA FUCKIN RETOID.
-Self-learn video capturing whenever a video plays on the computer or streamed.
WAT KIND OF RETOID IN A MONKEY HAT TAUGHT U ENGLISH? DA SAME ONE WHO TAUGHT YA COMPUTER SCIENCE?
-Able to upload the recording to a file server and cough up a link of said URL where the recording of the video is found.
WAT RECORDING ARE U TALKIN ABOUT U FUCKIN RETOID? SOUNDS LIKE UR THEORETICAL AI HAS A COLD OR SUM SHIT, I'D GET DAT CHECKED OUT IF I WERE U.
-Able to find similar videos of ones it recorded, if only it's a partial recording, it still should be able to get links by analyzing / self-learning.
SIMILAR BY WAT CRITERIA, YA FUCKIN RETOID?
REED >>1 BEFORE MAKING A FUCKING CHALLENGE AND AFTER LEARNING SUM BASIC LITERACY SKILLS. MY GAME IS WRITING PROGRAMS WITH C. IF UR GONNA CHALLENGE ME, U NEED TO POST A FUNCTIONING PROGRAM THAT U WROTE BEFORE I POST MINE. NO LARGE PROGRAMS, NO SHITTY MATH PROBLEMS. NOW GO REED A FUCKIN BOOK YA RETOID.
FUNNY HOW PEOPLE ON HERE ARE TOO FUCKING STUPID TO REED. NO WONDER THIS PLACE IS FILLED WITH RETOIDED STACK BOYS.
Name:
Anonymous2013-04-22 18:34
>>153
You amuse me. You fucking little spineless piece of shit. Resorting to caps again, calling every programmer on /prog/ a retoid. TOPLEEEEEEEL!
Name:
Anonymous2013-04-22 18:44
DA POINT IS USING C TO WRITE SIMPLE YET USEFUL PROGRAMS. NOT SO SIMPLE THAT THEY'RE FUCKING STUPID, BUT SIMPLE LIKE FUCKING cat, sort AND grep. IF U CAN SOLVE LIL BOY'S BANANA IN THE ASS PROBLEM, I DON'T GIVE A FLYING FUCK. YOUR SHITTY PROGRAM'S STILL GONNA SEG FAULT, FAIL TO COMPILE ON A NUMBER OF ARCHITECTURES, AND RUN LIKE A PIECE OF BREAKY SHIT ALL BECAUSE UR TOO FUCKIN RETOIDED TO REED STANDARDS.
I'VE MADE DA INTENTION OF DIS CHALLENGE CRYSTAL FUCKING CLEAR THROUGHOUT DIS THREAD, SO I DUNNO WHY UR ALL STILL MISSING DA FUCKING POINT. IT'S LIKE SOMEONE GOING TO UR YARD SALE AND ASKING FOR A FUCKING TOILET WHEN THEY KNOW DAMN WELL THAT ALL UR SELLING IS UR LARGE COLLECTION OF TOILET BRUSHES. SHOW ME SOMEONE WHO CAN USE C BETTER THAN ME AND I'LL LEAVE /prog/. SHOW ME SOMEONE WHO CAN SIMULATE BANANA BOY'S MATH CHALLENGE, WRITE A FANCY AI PIECE OF SHIT, OR SOME OTHER PIECE OF SHIT AND I'LL TELL THEM TO FUCK OFF.
NOW, IS THAT CLEAR ENOUGH FOR YOU ILLITERATE, IMBECILIC, IDIOTIC, DIMWITTED MOROOOOOONS TO UNDERSTOOOOOOOOND? HUHHH?
Name:
Anonymous2013-04-22 18:44
>>154
You're the /g/ monkey "top lel" take your newfag memes with you.
Name:
Anonymous2013-04-22 18:46
>>154
CMON YA FUCKIN WIMP. GIMME THE CHALLENGE I ACTUALLY ASKED FOR.