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

Name: Anonymous 2008-04-02 8:29

Also, >>40 here; >>36, have you seen my implementation of factorial in haskell?

Name: Anonymous 2008-04-02 9:21

>>38
That was me, I was rather bored that afternoon and felt like a challenge.

Name: Anonymous 2008-04-02 9:40

>>41
I uploaded my Haskell factorial to the Git repository, have you seen it?

Name: Anonymous 2008-04-02 12:51

Simply call the system 'link' function
Simply
What irony.

lol @ "localization", when more and more of the world knows English now. Also, look at the excessive comments.

compare and contrast with anoncoreutils' link.c:
#include <unistd.h>
#include <stdio.h>
#include <errno.h>

int main(int argc, char **argv) {
 if(argc<3) {
  fprintf(stderr,"Usage: link file1, file2\n");
  return 1;
 }
 if(link(argv[1],argv[2])) {
  fprintf(stderr,"%s: could not create link: %s\n",argv[0],strerror(errno));
  return 1;
 }
 return 0;
}


some people prefer excessive verbosity and bureaucracy. others, simplicity.

HEY MICHAEL STONE, NOONE CARES THAT YOU WROTE SOMETHING SO TRIVIAL EVEN THOUGH YOU TRIED TO MAKE IT SEEM NONTRIVIAL.

Name: Anonymous 2008-04-02 13:03

>>44
Hey fuckface n00b cuntface arse motherfucker
You use strerror() but you forgot to include <string.h>

Moreover, 1 is not portable to return from main. It does not guarantee a meaningful value to the OS.
tl;dr you are not experienced.
Fuck the anoncoreutils.
See you when you write grep or ed. You can't code for shit moron.
All your programs have bugs.

Name: Anonymous 2008-04-02 13:07

>>44
I really do hope you're trolling and not actually that fucking retarded

Name: Anonymous 2008-04-02 13:10

And yes, localization is important, whether you want it or not.

Name: Anonymous 2008-04-02 13:10

>>44
Lol anoncoreutils. Such stupidity. Only /b/ cares for the "Anonymous is legion" mindset.

Not to mention this is just the re implementation of Busybox, only without the nifty single executable feature.

Name: Anonymous 2008-04-02 13:16

>>48
Yeah, what the hell, if it was called Sussmancoreutils or SICPcoreutils I would install it no problem, but Anon?  I think not!

Name: Anonymous 2008-04-02 13:17

>>45
do it better. (i only read >>45-48)

Name: Anonymous 2008-04-02 13:23

>>50
1. Your program is worse
2. Only you care about "ANONYMOUS CREATED THIS LOL"
3. We already have busybox (and I couldn't care less about gpl)
4. Please die

Name: Anonymous 2008-04-02 13:29

>>44
link(argv[1],argv[2])
Where's my symlink flag anoncoreutils? EH?

Name: Anonymous 2008-04-02 13:33

anoncoreutils: public domain considered harmful (just ask sqlite)

Name: Anonymous 2008-04-02 14:16

>>52
what

http://www.opengroup.org/pubs/online/7908799/xcu/link.html

>>45
You use strerror() but you forgot to include <string.h>
Add it yourself. In fact, let's see your version of link.c

Moreover, 1 is not portable to return from main. It does not guarantee a meaningful value to the OS.
RTFS. Anything >0 means an error occurred, now are you going to argue that 1<=0 ?

in b4 IHBT

Name: Anonymous 2008-04-02 14:30

>>54 is an obvious troll, please don't argue with him
>>54 is an obvious troll, please don't argue with him
>>54 is an obvious troll, please don't argue with him
>>54 is an obvious troll, please don't argue with him
>>54 is an obvious troll, please don't argue with him
>>54 is an obvious troll, please don't argue with him

Name: Anonymous 2008-04-02 14:33

>>54
Prelude> :ihbt
 Commands available from the prompt:

   <statement>                 evaluate/run <statement>
   :                           repeat last command
   :{\n ..lines.. \n:}\n       multiline command
   :add <filename> ...         add module(s) to the current target set
   :browse[!] [[*]<mod>]       display the names defined by module <mod>
                               (!: more details; *: all top-level names)
   :cd <dir>                   change directory to <dir>
   :cmd <expr>                 run the commands returned by <expr>::IO String
   :ctags [<file>]             create tags file for Vi (default: "tags")
   :def <cmd> <expr>           define a command :<cmd>
   :edit <file>                edit file
   :edit                       edit last module
   :etags [<file>]             create tags file for Emacs (default: "TAGS")
   :help, :?                   display this list of commands
   :info [<name> ...]          display information about the given names
   :kind <type>                show the kind of <type>
   :load <filename> ...        load module(s) and their dependents
   :main [<arguments> ...]     run the main function with the given arguments
   :module [+/-] [*]<mod> ...  set the context for expression evaluation
   :quit                       exit GHCi
   :reload                     reload the current module set
   :type <expr>                show the type of <expr>
   :undef <cmd>                undefine user-defined command :<cmd>
   :!<command>                 run the shell command <command>

Name: Anonymous 2008-04-02 14:36

>>56
HUHHH?
What version of ghc is this?

Name: Anonymous 2008-04-02 14:36

Oh nevermind, ihbt

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