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

Programming - hard mode

Name: ||GASM 2011-04-09 20:12

Idea for a programming challenge. 2 rules

No fixing code you have already written, you must add more code to make up for the bugs in the existing code.

Write the first thing that comes to mind. No rethinking an implementation in your head.

Let's see what we can create.

Name: Anonymous 2011-04-09 20:15

Let's just build off each others code


#include <stdio.h>

int main() {
  printf('/prog/');
  return(0);
}

Name: Anonymous 2011-04-09 20:21


#include <stdio.h>
#include <lisp.h>
#define loop for

int main() {
 puts("/prog/");
 loop(;;)print(eval(read()));
 return;
}

Name: Anonymous 2011-04-09 20:30


#include <stdio.h>
#include <lisp.h>
#define loop for

int main() {
 puts("/prog/");
 int nope = 0;
 loop(;;nope)print(eval(read()));
 printf("Disaster averted...\n");
 return;
}

Name: Anonymous 2011-04-09 20:36

#include <stdio.h>
#include <lisp.h>
#define loop for

int main() {
 puts("/prog/");
 int nope = 0;
 goto saved;
 loop(;;nope)print(eval(read()));
 saved:
 printf("Disaster averted...\n");
 return;
}

Name: Anonymous 2011-04-09 20:37

>>5

#include <stdio.h>
#include <lisp.h>
#define loop for
#define dicks 12
int main() {
 puts("/prog/");
 int nope = 0;
 goto saved;
 loop(;;nope)print(eval(read()));
 saved:
 printf("Disaster averted...\n");
 return dicks;
}

Name: Anonymous 2011-04-09 20:37

>>5
wrap it in [code] tags, bro

Name: Anonymous 2011-04-09 20:41


#include <stdio.h>
#include <lisp.h>
#define loop for
#define dicks 12
int main() {
 puts("/prog/");
 int nope = 0;
 goto saved;
 loop(;;nope)print(eval(read()));
 saved:
 printf("Disaster averted...\n");
 return factorial(dicks);
}

int factorial(n)
{
 if (n==0)
  return 1;
 else if (n > 0)
  return n * factorial(n - 1);
}

Name: Anonymous 2011-04-09 20:43


#include <stdio.h>
#include <lisp.h>
#define loop for
#define dicks 12
#define BEGIN {
#define END }
int main()
BEGIN
 puts("/prog/");
 int nope = 0;
 goto saved;
 loop(;;nope)
    BEGIN
        print(eval(read()));
    END
 saved:
 printf("Disaster averted...\n");
 return factorial(dicks);
END

int factorial(n)
BEGIN
 if (n==0)
    BEGIN
       return 1;
    END
 else if (n > 0)
    BEGIN
        return n * factorial(n - 1);
    END
END

Name: Anonymous 2011-04-09 20:48


#include <stdio.h>
#include <lisp.h>
#define loop for
#define dicks 12
#define BEGIN { lolwut();
#define END }
int main()
BEGIN
 puts("/prog/");
 int nope = 0;
 goto saved;
 loop(;;nope)
    BEGIN
        print(eval(read()));
    END
 saved:
 printf("Disaster averted...\n");
 return factorial(dicks);
END

int factorial(n)
BEGIN
 if (n==0)
    BEGIN
       return 1;
    END
 else if (n > 0)
    BEGIN
        return n * factorial(n - 1);
    END
END
int lolwut()BEGIN
 int x = 0;
 int* xstar = &x;
 for(;;)BEGIN
   xstar = xstar*dicks;
 END
 return dicks;
END

Name: Anonymous 2011-04-09 20:49

>>10
also known as
"teh segfault machine"

Name: Anonymous 2011-04-09 20:51

>>11
It still stops at ``loop''.

Name: Anonymous 2011-04-09 20:53

#include <stdio.h>
#include <lisp.h>
#define loop for
#define dicks 12
#define BEGIN { lolwut();
#define END }
#define RET return
#define JMP goto

int main()
BEGIN
 puts("/prog/");
 int nope = 0;
 JMP saved;
 loop(;;nope)
    BEGIN
        print(eval(read()));
    END
 saved:
 printf("Disaster averted...\n");
 RET factorial(dicks);
END

int factorial(n)
BEGIN
 if (n==0)
 BEGIN
    RET 1;
 END
 else if (n > 0)
 BEGIN
    RET n * factorial(n - 1);
 END
END
int lolwut()BEGIN
 int x = 0;
 int* xstar = &x;
 for(;;)BEGIN
   xstar = xstar*dicks;
 END
 RET dicks;
END

Name: Anonymous 2011-04-09 20:54

>>13

#include <stdio.h>
#include <lisp.h>
#define loop for
#define dicks 12
#define BEGIN { lolwut();
#define END }
#define RET return
#define JMP goto

int main()
BEGIN
 puts("/prog/");
 int nope = 0;
 JMP saved;
 loop(;;nope)
    BEGIN
        print(eval(read()));
    END
 saved:
 printf("Disaster averted...\n");
 RET factorial(dicks);
END

int factorial(n)
BEGIN
 if (n==0)
 BEGIN
    RET 1;
 END
 else if (n > 0)
 BEGIN
    RET n * factorial(n - 1);
 END
END
int lolwut()BEGIN
 int x = 0;
 int* xstar = &x;
 for(;;)BEGIN
   xstar = xstar*dicks;
 END
 RET dicks;
END

Name: Anonymous 2011-04-09 20:54

>>12
are you stoned?
explain yourself.

Name: Anonymous 2011-04-09 20:55

/* Starting the optimizer...
  Lexical analysis... done.
  Optimizing... done.
  Haxing anii... done. */

main() { main(); }

Name: Anonymous 2011-04-09 20:58

>>16

#ifdef UNIX
#include <stdio.h>
#endif

main() {
#ifdef UNIX
puts("Segmentation fault");
return 127
#else
main()
#endif
;
}

Name: Anonymous 2011-04-09 20:59

>>16
Well played.

Name: Anonymous 2011-04-09 21:03

.data
    Test:
        .ascii "Hello World\n"

.text

    .globl _start

    _start:
        movl $4, %eax
        movl $1, %ebx
        movl $Test, %ecx
        movl $11, %edx
        int $0x80       

        movl $1, %eax
        movl $0, %ebx
        int $0x80

Name: Anonymous 2011-04-09 21:05

>>17
Good sir, that is classy

Name: Anonymous 2011-04-09 21:12

Good heavens I had the first reply to this thread. What happened to my program?

Name: ||GASM 2011-04-09 21:13

>>21
Sorry bro. That is a hello world program after 4chans.

Name: Anonymous 2011-04-09 21:18


#include <stdio.h>
#include <lisp.h>
#define loop for
#define dicks 12
#define BEGIN { lolwut();
#define END }
#define RET return
#define JMP goto

int main()
{
 puts("/prog/");
 int nope = 0;
 JMP saved;
 loop(;;nope)
    {
        print(eval(read()));
    END
 saved:
 printf("Disaster averted...\n");
 printf("NOW TYPE YOUR NAME:");
 int c;
 while ( (c=getchat()) != EOF){
  puts(c);
 }
 printf("\n\nTHAT IS A SHIT NAME!\n\n");
 RET factorial(dicks);
END

int factorial(n)
{
 if (n==0)
 {
    RET 1;
 END
 else if (n > 0)
 {
    RET n * factorial(n - 1);
 END
END
int lolwut(){
 int x = 0;
 int* xstar = &x;
 for(;;x==1){
   xstar = xstar*dicks;
 END
 RET dicks;
END

Name: Anonymous 2011-04-09 21:26

RET factorial(dicks);

That is a lot of dicks...

Name: Anonymous 2011-04-09 21:46

OP's name... -_-

Name: Anonymous 2011-04-09 23:17

>>25
barbargasm?

Name: Anonymous 2011-04-10 0:08

>>26
Gozintagozintagasm.

http://catb.org/jargon/html/A/ASCII.html

jesus christ what are you children

Name: NIGGERFUCK 2011-04-10 1:05

#include <stdio.h>
#define NIGGERFUCK "niggerfuck"

int main() {
  printf("Hi %s", NIGGERFUCK);
  return 0;}

Name: Anonymous 2013-03-18 18:59


#include <lisp.h>

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