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

Let's write a program, /prog/...

Name: Anonymous 2008-04-01 13:07

Forget about header files. Just write.


int main(int argc, char *argv[]) {

Name: Anonymous 2008-04-01 13:09

return 1;

Name: Anonymous 2008-04-01 13:09


}


I guess that's the limit of /prog/'s coding ability.

Name: Anonymous 2008-04-01 13:10

;_;

Name: Anonymous 2008-04-01 13:11

Fine then, we'll start again.

int main(int argc, char *argv[]) {

Name: Anonymous 2008-04-01 13:12

return EXIT_FAILURE; }

Name: Anonymous 2008-04-01 13:12

}

Name: Anonymous 2008-04-01 13:12


   system("ghc");

Name: Anonymous 2008-04-01 13:13

int tmain(void) {

Name: Anonymous 2008-04-01 13:14

#define return NIGGERS
int main(int argc, char *argv[]) {

Try again.

Name: Anonymous 2008-04-01 13:19

    NIGGERS 0;
}

Name: Anonymous 2008-04-01 13:21

Maybe ..

Name: Anonymous 2008-04-01 13:33

Since >>11 would fail to compile:

}

Name: Anonymous 2008-04-01 17:34

int main(int argc, char *argv[]) {
int i = 0;

Name: Anonymous 2008-04-01 17:53

for(i = 0; argv[0][i] != 0; ++i) {

Name: Anonymous 2008-04-01 18:07

--i;

Name: Anonymous 2008-04-01 18:17

sleep(i);

Name: Anonymous 2008-04-01 18:50

++i; ++i;
int j = i+2;
std::cout<<("SICP SUCKS");

Name: Anonymous 2008-04-01 18:54

:edit take out the ()


// not in loop
class Faggot {
public:
int EncapsulationSucks;
int encapsulationsucks2;
}

// in loop
Faggot progFagProgrammer;
progFagProgrammer.EncapsulationSucks = 1336;

Name: Anonymous 2008-04-01 19:31

Name: Anonymous 2008-04-01 19:31

#include <stdio.h>

int main(int argc, char *argv[])
{
  int i;
  for(i=1;i<argc;i++)
    {
      printf("%s",&argv[i][0]);
      if(!(i+1==argc))
    {
      printf(" ");
    }
    }
  printf("\n");
}

Name: Anonymous 2008-04-01 19:47

Believe it or not, [spoiler]REchan's /prog/ has written twenty-something actual programs.

Name: Anonymous 2008-04-01 20:20

What has /prog/ done, aside from the hilarious AnonChat?

That's all I found in the old posts

Name: Anonymous 2008-04-01 20:22

>>23
have you seen my implementation of factorial in scheme, because,

Name: Anonymous 2008-04-01 20:32

>>24

no

is that from the cips mook?

Name: Anonymous 2008-04-01 20:32

>25

sipc book, sorry

Name: Anonymous 2008-04-01 20:32

>>23
have you seen my implementation of factorial in haskell

Name: Anonymous 2008-04-01 20:39

i did that exersise in the yhbt book

Name: Anonymous 2008-04-01 21:37

nums = range(2, 100)
for i in range(2, 10):
    nums = filter(lambda x: x == i or x % i, nums)
print nums

Name: Anonymous 2008-04-01 21:41

>>22
Do you mean this rechan?
http://rechan.da.ru/prog/

Because their ``20-something programs'' are just 8-line bastardizations of Coreutils implementations.

Name: Anonymous 2008-04-01 21:46


while(true){
}

Name: Anonymous 2008-04-01 22:55

>>30
All written by the same person, no less.

http://rechan.da.ru/prog/kareha.pl/1205724708/69

That said, I think it would be ``kind of interesting'' to have some kind of public /prog/ svn repository for a communal project of some sort. This, unfortunately, lends itself to serious abuses (unless Anonymity is sacrificed, something that I personally am unwilling to do).

I dunno lol.

Name: Anonymous 2008-04-01 23:16

shitty rechan is shitty

Name: Anonymous 2008-04-02 2:11

Srsly though

I wanna see the stuff that /prog/ has come up with

I can only find Anonchat

Name: Anonymous 2008-04-02 2:18

>>34
well there is also that kanji javascript translator, and i think someone here made fychan, so basically we should all be very ashamed of ourselves and we're all loosers

Name: Anonymous 2008-04-02 3:46

>>30
Have you seen the coreutils source? Something like "link" which only needs to do basic error checking and make a syscall takes 98 lines of GNU, but the Anon version does the same thing in 14 lines. The GNU project's aims are good, but their code has gotten too ENTERPRISE.

>>32
There IS a /prog/git repo created recently, search the threads here.

Name: Anonymous 2008-04-02 4:10

GNU is designed to be free and usable and then it gets refactored to be superior. Though I can't say the same about the Hurd.

Name: Anonymous 2008-04-02 6:51

>>34
What about that guy who reverse engineered a bunch of Ragnarok Online 2 files after some idiot posted a rapidshare of it (without saying what the contents were)?

Name: Anonymous 2008-04-02 7:29

while(true) {
   printf("סּ_סּ ");
}

Name: Anonymous 2008-04-02 8:26

/* link utility for GNU.
   Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */

/* Written by Michael Stone */

/* Implementation overview:

   Simply call the system 'link' function */

#include <config.h>
#include <stdio.h>
#include <getopt.h>
#include <sys/types.h>

#include "system.h"
#include "error.h"
#include "long-options.h"
#include "quote.h"

/* The official name of this program (e.g., no `g' prefix).  */
#define PROGRAM_NAME "link"

#define AUTHORS "Michael Stone"

/* Name this program was run with.  */
char *program_name;

void
usage (int status)
{
  if (status != EXIT_SUCCESS)
    fprintf (stderr, _("Try `%s --help' for more information.\n"),
         program_name);
  else
    {
      printf (_("\
Usage: %s FILE1 FILE2\n\
  or:  %s OPTION\n"), program_name, program_name);
      fputs (_("Call the link function to create a link named FILE2\
 to an existing FILE1.\n\n"),
         stdout);
      fputs (HELP_OPTION_DESCRIPTION, stdout);
      fputs (VERSION_OPTION_DESCRIPTION, stdout);
      printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
    }
  exit (status);
}

int
main (int argc, char **argv)
{
  initialize_main (&argc, &argv);
  program_name = argv[0];
  setlocale (LC_ALL, "");
  bindtextdomain (PACKAGE, LOCALEDIR);
  textdomain (PACKAGE);

  atexit (close_stdout);

  parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
              usage, AUTHORS, (char const *) NULL);
  if (getopt_long (argc, argv, "", NULL, NULL) != -1)
    usage (EXIT_FAILURE);

  if (argc < optind + 2)
    {
      if (argc < optind + 1)
    error (0, 0, _("missing operand"));
      else
    error (0, 0, _("missing operand after %s"), quote (argv[optind]));
      usage (EXIT_FAILURE);
    }

  if (optind + 2 < argc)
    {
      error (0, 0, _("extra operand %s"), quote (argv[optind + 2]));
      usage (EXIT_FAILURE);
    }

  if (link (argv[optind], argv[optind + 1]) != 0)
    error (EXIT_FAILURE, errno, _("cannot create link %s to %s"),
       quote_n (0, argv[optind + 1]), quote_n (1, argv[optind]));

  exit (EXIT_SUCCESS);
}


I don't really see anything wrong with this (except maybe faggot indentation).
If you think this is ENTERPRISE, you've been too long on /prog/.
Does your little program support localization, >>36-kun, huh? no? oh

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