Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

The Challenge

Name: Lambda A. Calculus !!wKyoNUUHDOmjW7I 2013-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: Anonymous 2013-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.

Name: Anonymous 2013-04-21 22:14

is it rand()..? probably need to include math.h or something..
I don't actually have a C compiler installed at this instant =)

Name: Anonymous 2013-04-21 22:21

...it's almost the 'Holy Grail' sort ^^ O(2n) in-place sort right there.. =D

Name: Anonymous 2013-04-22 0:08

>NO FUCKING SIMULATORS
>...
>EMULATORS FOR SIMPLE CHIPSETS

Name: Anonymous 2013-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.

Name: Anonymous 2013-04-22 1:33

>>122
REED DA FUCKIN STANDARD WILL YA?

Name: Anonymous 2013-04-22 1:35

>>122
AND YOU CAN JUST USE FUCKIN ideone IF YOU DON'T HAVE A C COMPILER.

Name: Anonymous 2013-04-22 1:57

Name: Anonymous 2013-04-22 2:11

http://ideone.com/qs6scS (functioning)

Name: Lambda A. Calculus !!wKyoNUUHDOmjW7I 2013-04-22 2:30

>>128
lol@CuntNM -- that's pretty cool.

>>129

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.

HERE'S MINE:
#include <stdio.h>
#include <stdlib.h>

enum {
    MINVAL = 0,
    MAXVAL = 500,
    NELEMS = MAXVAL - MINVAL + 1,
    NUMBERS = 1000
};

typedef unsigned int Count;

int main(void)
{
    Count a[NELEMS] = { 0 }, j;
    int i, r;

    for (i = 0; i < NUMBERS; i++) {
        a[r = rand() / (RAND_MAX / NELEMS)]++;
        printf(" %d", r + MINVAL);
    }
    puts("");
    for (i = 0; i < NELEMS; i++)
        for (j = 0; j < a[i]; j++)
            printf(" %d", i + MINVAL);
    puts("");
    return 0;
}


FOR THE TIMESTAMP + SAMPLE RUN: http://ideone.com/S4vmkj

Name: Anonymous 2013-04-22 2:37

OH NEVERMIND 'BOUT THAT NO NEWLINE AT THE END OF THE SOURCE FILE SHIT, ideone'S JUST RETARDED.

Name: Anonymous 2013-04-22 2:37

CHOPS DAT SHIT OFF AUTOMATICALLY

Name: Anonymous 2013-04-22 2:39

OR DOESN'T ADD IT OR SOME SHIT, IDUNNO FUK

Name: Anonymous 2013-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: Anonymous 2013-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: Anonymous 2013-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.

Name: Anonymous 2013-04-22 3:56

>>136

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. Calculus 2013-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: Anonymous 2013-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?

Name: Anonymous 2013-04-22 5:04

>>138
ur mom is a magic number in be dlol

Name: Anonymous 2013-04-22 5:08

>>140
GIT OUTTA HERE YA FUCKIN STACK BOY. NEXT FUCKIN CHALLENGE PLEASE.

Name: Anonymous 2013-04-22 5:15

lol
ah you did alright.. i'll call it a draw (i think i helped a little too much though x)

Name: Anonymous 2013-04-22 5:16

>>142
UR PROGRAM DON'T EVEN INCLUDE DA RITE HEADER FILE

Name: Anonymous 2013-04-22 5:17

>>142
you're a cutie though <3

Name: Anonymous 2013-04-22 5:18

>>143
stdlib.h prolly just includes math.h ;D

Name: Anonymous 2013-04-22 5:21

EEEEEEEEH EEEEEEEEEEEEEEEH EEEEEEEEEEEEEEEEEEH EEEEEEEEEEEEEEEEEEEH

Name: Anonymous 2013-04-22 5:30

...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 !!wKyoNUUHDOmjW7I 2013-04-22 14:47

>>147
UR ON PARTNER AND, AS USUAL, MY CODE'S DONE AND UPLOADED. ALL ON U NOW.

Name: Anonymous 2013-04-22 15:03



    ░░░░▄▀░░░░░░░░░░░░░░░▀▀▄▄░░░░
    ░░▄▀░░░░░░░░░░░░░░░░░░░░▀▄░░░
    ░▄▀░░░░░░░░░░░░░░░░░░░░░░░█░░
    ░█░░░░░░░░░░░░░░░░░░░░░░░░░█░
    ▐░░░░░░░░░░░░░░░░░░░░░░░░░░░█
    █░░░░▀▀▄▄▄▄░░░▄▌░░░░░░░░░░░░▐
    ▌░░░░░▌░░▀▀█▀▀░░░▄▄░░░░░░░▌░▐
    ▌░░░░░░▀▀▀▀░░░░░░▌░▀██▄▄▄▀░░▐
    ▌░░░░░░░░░░░░░░░░░▀▄▄▄▄▀░░░▄▌
    ▐░░░░▐░░░░░░░░░░░░░░░░░░░░▄▀░
    ░█░░░▌░░▌▀▀▀▄▄▄▄░░░░░░░░░▄▀░░
    ░░█░░▀░░░░░░░░░░▀▌░░▌░░░█░░░░
    ░░░▀▄░░░░░░░░░░░░░▄▀░░▄▀░░░░░
    ░░░░░▀▄▄▄░░░░░░░░░▄▄▀▀░░░░░░░
    ░░░░░░░░▐▌▀▀▀▀▀▀▀▀░░░░░░░░░░░
    ░░░░░░░░█░░░░░░░░░░░░░░░░░░░░
    ░░╔═╗╔═╗╔═╗░░░░░║░║╔═╗║░║░░░░
    ░░╠═╣╠╦╝╠╣░░░░░░╚╦╝║░║║░║░░░░
    ░░║░║║╚═╚═╝░░░░░░║░╚═╝╚═╝░░░░
    ║╔═░╦░╦═╗╦═╗╦╔╗║╔═╗░░╔╦╗╔═╗╔╗
    ╠╩╗░║░║░║║░║║║║║║═╗░░║║║╠╣░╔╝
    ║░╚░╩░╩═╝╩═╝╩║╚╝╚═╝░░║║║╚═╝▄░

Name: Anonymous 2013-04-22 15:28

>>146
fuck this makes my dick hard

Name: Anonymous 2013-04-22 17:12

>>138
U DROPPED OUT OF CHARACTER IN THIS POST YA FUCKIN RETOID

Name: Anonymous 2013-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: Anonymous 2013-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: Anonymous 2013-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: Anonymous 2013-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: Anonymous 2013-04-22 18:44

>>154
You're the /g/ monkey "top lel" take your newfag memes with you.

Name: Anonymous 2013-04-22 18:46

>>154
CMON YA FUCKIN WIMP. GIMME THE CHALLENGE I ACTUALLY ASKED FOR.

Name: Anonymous 2013-04-22 18:47

>>155
i bet this guy is an atheist

Name: Banana Boy 2013-04-22 18:47

Can someone please fuck me gently with a banana~ :3

Name: Anonymous 2013-04-22 18:48

>>155
Calm the fuck down.

Implement diff. Don't say it's ``too simple'' or ``useless'' or I'll fucking kill you, ``faggot''.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List