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

hay look at my recursive pow

Name: Anonymous 2009-03-04 20:14


#include <stdio.h>
#include <stdlib.h>

unsigned long long rpow(int n, int p) {
  return p ? p==1 ? n : n * rpow(n,p-1) : 1;
}

int main(int argc, char **argv) {
  if(argv[1])
    if(argv[2]) {
      int n = atoi(argv[1]);
      int p = atoi(argv[2]);
      printf("%llu\n",rpow(n,p));
    }
  return 0;
}

Name: sage 2009-03-04 22:07

Fucking pig.

Name: Anonymous 2009-03-05 1:25

I thought /prog/ was slightly more experienced than this. Take this pig disgusting shit to /pr/.

Name: Anonymous 2009-03-05 2:32

rpow.exe 5 -1

Name: Anonymous 2009-03-05 3:30

>>3
Shh, Recursion is great.

Name: Anonymous 2009-03-05 4:38

>>5
TAIL recursion.

Name: Anonymous 2009-03-05 6:11

uintmax_t rpow_aux(uintmax_t, uintmax_t, uintmax_t) __attribute__ ((const, always_inline));
uintmax_t rpow_aux(uintmax_t n, uintmax_t p, uintmax_t a) {
 return p == 0 ? a : rpow_aux(n, p - 1, a * n); }

uintmax_t rpow(uintmax_t n, uintmax_t p){
 return p < 1 ? 1 : rpow_aux(n, p, 1); }

Name: Anonymous 2009-03-05 7:21

size_t strlen(const char * str)
  strlen(str, 0);

size_t strlen(const char * str, size_t a)
  if (!*str)
    return a;
  else
    return strlen(++str,a+1);

Name: Anonymous 2009-03-05 8:31

>>8
genius

Name: Anonymous 2009-03-05 8:32

>>5
RECURSION is for SATORI

Name: Anonymous 2009-03-05 9:02

uintmax_t pebkac(void){
 for(;;) fork() || abort();
}

uintmax_t rpow_aux(uintmax_t, uintmax_t, uintmax_t) __attribute__ ((const, always_inline));
uintmax_t rpow_aux(uintmax_t n, uintmax_t p, uintmax_t a)
 return p < 0 ? pebkac() :
        p == 0 ? 1 * a :
        p == 1 ? n * a :
        rpow_aux(n * n, p / 2, a + n * (p % 2)); }}

uintmax_t rpow(uintmax_t n, uintmax_t p){
 return rpow_aux(n, p, 0); }

Name: Anonymous 2009-03-05 10:22


OH WOW LOOK AT MY RECURSIVE PUTS

#include <stdio.h>

void rputs(const char *s) {
  if(*s) {
    putchar(*s);
    rputs(++s);
  }
}

int main(int argc, char **argv) {
  int n = 1;
  while(argv[n]) {
    rputs(argv[n++]);
    putchar('\n');
  }
  return 0;
}

Name: FrozenVoid !.FrOzenBUA 2009-03-05 14:08

#include <stdio.h>

static int f(const char *const s) {
    return
        *s ? putchar(*s), f(s + 1) :
        putchar('\n')
    ;
}

static int g(const char *const *const v) {
    return
        *v ? f(*v), g(v + 1) :
        0
    ;
}

int main(const int argc, const char *const *const argv) {
    return ((void)argc), g(argv + 1);
}

Name: Anonymous 2009-03-05 17:22

>>13
Invalid javascript.

Name: FrozenVoid 2009-03-06 5:10

>>14
I dislike C and its idiosyncrasies like type system and various restrictions on syntax.
It harms productivity in favor of speed. Programs full of bugs(which in C are security risk) and subtle syntax errors.

_________________________________________
I have become my own version of an optimist. If I can't make it through one door, I'll go through another door - or I'll make a door.

Name: Anonymous 2009-03-06 5:14

>>15
10/10
just as painfully ignorant & annoying as the real thing

Name: FrozenVoid 2009-03-06 5:17

>>16
What is that “real thing”?

_______________________________
A strange neurosis, evidently contagious, an epidemic mass hysteria. In two weeks, it spread all over town.

Name: Anonymous 2009-03-06 5:20

>>17
the original FrozenVoid.
the immature autistic 13yearold 1337 javascript ``programmer'' that claimed he was going to destroy /prog/ on more than one occasion

Name: FrozenVoid 2009-03-06 5:26

>>18
I can run the script again and destroy all current threads. Just give me a reason.


___________________________________
Well, as tragic as all this is, it's a small price to pay for countless hours of top-notch entertainment!

Name: Anonymous 2009-03-06 5:26

>>19
Go ahead you homo

Name: Anonymous 2009-03-06 5:27

>>19
do it, faggot.
you're a pathetic loser.
you don't scare anyone, and nobody likes you.
kill yourself

Name: Anonymous 2009-03-06 5:30

>>19
i've got the current threads' numbers saved.
i'll simply bump them back up after you're finished crying like a little baby

Name: Anonymous 2009-03-06 5:32

http://userscripts.org/scripts/show/40523
Whatcha gonna do against that, KIKE?

Name: Anonymous 2009-03-06 5:34

oh wow fvhbt

Name: Anonymous 2009-03-06 5:37

bump :-)

Name: Anonymous 2009-03-06 5:41

◔ヮ◔ invisible poster is shitty programmer.
he works out his frustration by necrobumping /prog/

Name: Anonymous 2009-03-06 5:44

Lol at the faggot trying to "destroy /prog/".

Name: Anonymous 2009-03-06 5:48

i wonder how long it took him to write that script?
probably 6 hours a day for three or four weeks; javascript is really hard, you know?

Name: Anonymous 2009-03-06 5:55

this little hissyfit just makes me penis harder.

Name: FrozenVoid 2009-03-06 6:30

Would you like to apologize or ask for forgiveness? 



_________________________________________________
Who dares not speak his free thoughts is a slave.

Name: Anonymous 2009-03-06 6:31

>>30
lol, who do you think you are?
i told you, i will simply bump up the threads when you're finished crying.
keep doing it you faggot, you're just proving how much of a butthurt retard you are

Name: Anonymous 2009-03-06 6:33

Haha oh wow, somehow you're finished just one minute after the greasemonkey script is updated.

YHBT YHL HAND

Name: Anonymous 2009-03-06 6:34

Name: Nick Palmer
DOB: April 10, 1990
Age: 18
Sex: Male
Location: Minnesota
Job: Student

am i getting closer, fv?

Name: FrozenVoid 2009-03-06 6:35

Allright. You chosen to suffer the consequences for far longer then i assumed.


______________________________
Uncertainty is the essential, inevitable and all-pervasive companion to your desire to make art. And tolerance for uncertainty is the prerequisite to succeeding

Name: Anonymous 2009-03-06 6:36

lol internet

Name: Anonymous 2009-03-06 6:37

>>34
what consequences?
here are the most recent threads:

hay look at my recursive pow<>Anonymous<><>1236215674<>21<>Anonymous<>1236335279
Myspace DIV Overlay<>Anonymous<><>1236333195<>3<>Anonymous<>1236335149
God = Martin Galway<>FrozenVoid<><>1236318807<>8<>Anonymous<>1236335191
leahculver &lt;3<>Anonymous<><>1236136935<>45<>FrozenVoid<>1236334521
is he gone?<>Anonymous<><>1236289431<>16<>Anonymous<>1236332794
Python<>Anonymous<><>1236094092<>55<>Anonymous<>1236331205
BBS Project<>Anonymous<><>1236006983<>28<>Anonymous<>1236329268
Instead of making this long....<>Anonymous<><>1236257660<>29<>Anonymous<>1236328970
So I watched the movie ``Hackers''<>Anonymous<><>1236264848<>20<>Anonymous<>1236323621
JavaScript OS<>FrozenVoid<><>1236149693<>108<>Anonymous<>1236310723
SICP exercise 1.11<>Anonymous<><>1236266652<>15<>Anonymous<>1236310418
Fuzzy matching a tree structure<>Anonymous<><>1236140086<>34<>Anonymous<>1236305688
BBCODE<><><>1186660795<>726<>Anonymous<>1236303848
Python OS Idea<>Anonymous<><>1236303742<>2<>Anonymous<>1236305369
Why is Java so popular<>If everybody hates Java<><>1236013371<>145<>Anonymous<>1236302236
/a/ in need of some dire help<>Anonymous<><>1235871510<>89<>Anonymous<>1236296780
SICP Fails<>Anonymous<><>1236265491<>14<>Anonymous<>1236286416
You Need to Read Your SICP Today<>Anonymous<><>1236275138<>11<>Anonymous<>1236286338
Kenny Tilton<>Anonymous<><>1236112706<>22<>Anonymous<>1236270067
This is how I see marriage<>Anonymous<><>1236190645<>18<>Anonymous<>1236268437

Name: Anonymous 2009-03-06 6:39

I am laughing extremely hard at his rage. I'm glad I didn't hide him once he went tripless or I would have missed this quality entertainment.

Name: Anonymous 2009-03-06 6:39

i'm laughing at you FV.
you are truly pathetic

Name: Some FV original emo poems 2009-03-06 6:43

you say your dissapointed
hell that must be true
now that i think about it
i should be dissapointed in you
you lecuture to me about my problems
and what i should do to solve them
but you get mad if the conflict is still there
But i guess you should after all
Im the rebel in your kingdom
And don't listen to what you say
And your the queen of this fucking world
So i might as well be dead today
i laugh when you try to tell me what to do
Because you know as well as me
that im not listening
Im just a little pawn
In this chess game you play
except i dont respond
to the queenies way
I say im sick
You say its fake
i say im in pain
you say its just an ache
i say im crying
you say its a whine
i say im bleeding
you say its a lie
you say your dissapointed
but i dont care any more
so lecture to the air
while i walk out the door

Name: Some FV original emo poems 2009-03-06 6:45

how many smiles can one person fake?
Well im out for all i can take.
everytime my heart breaks
a peice of my soul dies
i might aswell not be alive
My smile holds no happiness behind it
my eyes have no soul to guide it
People speak of true love
it fixes your heart and your soul
Where is my prince charming
my someone to hold me
My heart is still broken
my soul is still dead
yet i still smile at
the joke someone said
How long till they notice
my life is a lie
How long till they notice
i've already died

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