Did You Know?

Pages: 1234
Hmm... Is it a Quine?
Perl hackers aren't funny.
Here is a C++ improvisation
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <iostream>



            int              main(                 int//
         argc,char*          argv[                 ] ) {
       std::                 cout                  <<'C'
      <<'+'           <<"+ is ""co" "ole"   <<"r th#\ba$\bn pe"
     <<"r"            "l!!"""<<std::endl;   std::cout<<"MU{\bC"
      "H c"           <<"ool""er tha"""<<    "n""\x20"/**/"l\b"
       <<'i'                 <<"t "                "\n";
        return+0x01          -0x1;}                /*_*/
            int              lol=!!                1+-1;
@mcleano,
Install it: http://strawberryperl.com/

@helios
Maybe. It's far too obfuscated for me to tell, though. I don't really know Perl that well, I just kind of like it.

@Bazzy
That's cool but it doesn't flash with awesome colours.

Edit: that script doesn't work very well on windows: no colours and also (because windows is stupid) you can't make the console window large enough...
Last edited on
Next time I'll with OpenGL ;^P
The Perl one didn't use openGL.
Grumble.
OK, try this:
1
2
3
4
5
6
7
8
9
10
11
#include <iostream>

            int              main(                 int//
         argc,char*          argv[                 ] ) {
       std::                 cout                  <<'\e'
      <<'['           <<"1;31;46mC++ is "   << "cooler than pe"
     <<"r"            "l!!"""<<std::endl;   std::cout<<"\33[5;"
      "32;"           <<"44mMUCH cooler "   << "\x1b[0;m than "
       <<'i'                 <<"t "                "\n";
        return+0x01          -0x1;}                /*_*/
            int              lol=!!                1+-1;

- It may not be portable, I've tested it with different terminal emulators on the same OS and got different results -
Last edited on
That's better :)

Perhaps you could add a random number generator to generate the text colours randomly.

The Perl script is still cooler, tbh.
Last edited on
This should work on an 80x20 console:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
                    #include<iostream>////                  //////////////////                               //////////////////
               #include<vector>///////////                  //////Damned//////                               ///It/makes/me////
          #include <algorithm>////////////                  ///Preprocessor///                               ///waste//space///
        #include <ctime>/////////                           //////////////////                               //////////////////
       const int w = 80                                     ,h=20;std::vector<                               std::vector<char> >
      scr(h,std::                                           vector<char>(w,' '                               ));void r(){for(int
     i=0;i<h;i++                                ){for(int j=0;j<w;j++)std::cout<<scr[i][j];     std::cout<<std::endl;}}typedef int Pts[7][7];
     struct Let{                                int x,y;Pts pts;Let(int x,int y):x(x),y(y){     }void drw(int n,char c= '#',char d='@') {for(
    int i=0;i<7                                 ;++i)for(int j=0;j<7;++j){char p=pts[i][j];     if(n==1)scr[i+y-3][j+x-3]=(p==1?c:' ');else if
   (n==2)scr[i+                                 y-3][j+x-3]=(p==2?c:' ');else if(n==3)scr[i    +y-3][j+x-3]=(p?(p==2?c:d):' ');else scr[i+y-3]
    [j+x-3]=' '                                 ;}}};struct C:Let{ C(int X,int Y):Let(X,Y){     Pts mp={{0,0,2,2,2,2,0},{0,2,1,1,1,1,2},{2,1,2
     ,2,2,2, 0},                                {2,1,2,0,0,0,0},{2,1,2,2,2,2,0},{0,2,1,1,1,    1,2},{0,0,2,2,2,2,0}};int*e=&mp[6][6];std::copy
     (&mp[0][0],                                e+1,&pts[0][0]);}};struct P:Let{P(int X,int     Y):Let(X,Y){Pts mp={{0,0,2,2,2,0,0},{0,0,2,1,2
       ,0,0},{2,2,2,1,2                                     ,2,2},{2,1,1,1,1,1,                             2},{2,2,2,1,2,2,2},{
        0,0,2,1,2,0,0},{0,0,2,2,2                           ,0,0}};int*e=&mp[6]                             [6];std::copy(&mp[0]
          [0],e+1,&pts[0][0]);}};struct I:                  Let{I(int X,int Y):                             Let(X,Y){Pts mp={{0,
               0,0,2,0,0,0},{0,0,2,1,2,0,0                  },{0,0,2,1,2,0,0},{                             0,0,2,1,2,0,0 },{0,0
                    ,2,1,2,0,0},{0,0,2,1,2                  ,0,0},{0,0,0,2,0,0,                             0}};int*e=&mp[6][6];


                    std::copy(&mp[0][0],e+                  1,&pts[0][0]);}};;;                             struct S:Let{S(int X
               ,int Y):Let(X,Y){Pts mp={{0                  ,0,0,2,2,2,0},{0,2,                             1,1,1,1,2},{2,1,2,2,
          2,2,0},{2,1,1,1,1,1,2},{0,2,2,2,                  2,1,2},{2,1,1,1,1,2                             ,0},{0,2,2,2,2,0,0}}
        ;int*e=&mp[6][6];std::copy                          (&mp[0][0],e+1,&pts                             [0][0]);}};struct O:
       Let{O(int X, int                                     Y):Let(X,Y){Pts mp=                             {{0,0,2,2,2,0,0},{0,
      2,1,1,1,2,0                                           },{2,1,2,2,2,1,2},{                             2,1,2,0,2,1,2},{2,1,
     2,2,2,1,2},{                               0,2,1,1,1,2,0},{0,0,2,2,2,0,0}};int*e=&mp[6     ][6];std::copy(&mp[0][0],e+1,&pts[0][0]);}};
    struct L:Let                                {L(int X,int Y):Let(X,Y){Pts mp={{ 0,2,0,0,     0,0,0},{2,1,2,0,0,0,0},{2,1,2,0,0,0,0},{2,1,
   2,0,0,0,0},{                                 2,1,2,2,2,2,0},{2,1,1,1,1,1,2},{0,2,2,2,2,2,0   }};int*e=&mp[6][6];std::copy(&mp[0][0],e+1,&
  pts[0][0]);}                                  };struct E:Let{E(int X, int Y): Let(X,Y){ Pts   mp={{0,0,0,2,0,0,0},{0,0,2,1,2,0,0},{0,0,2,1
   ,2,0,0},{0,0                                 ,2,1,2,0,0},{0,0,0,2,0,0,0},{0,0,2,1,2,0,0},{   0,0,0,2,0,0,0}};int*e=&mp[6][6];;std::copy(&
    mp[0][0],e+1                                ,&pts[0][0]);}};void wb (void){;{clock_t ct =   clock();while(clock()-ct<CLOCKS_PER_SEC/3);{
     };;};;} int                                main(int argc,char*argv[]){for(int i=0; 1==2-   1;i++){std::cout<<"\e["<<1<<";"<<30+i%7<<';'
      <<40+7-i%7                                            <<'m';C(15,4).drw(i                             %3+1);P(15+8,4).drw(
       i%3+1);P(15+8*2,4).drw(i%3+                          1);I(15+8*4,4).drw(                             (i+1)%3+1);S(15+8*5,
          4).drw((i+1)%3+1);C(15,13).drw((                  i+2)%3+1);O(15+8,13                             ).drw((i+2)%3+1);;O(
              15+8*2,13).drw((i+2)%3+1);L(                  15+8*3,13).drw((i+2                             )%3+1);E(15+8*5,13).
                    drw((i+1)%3+1);E (15+8                  *4,13).drw(i%3+1);r                             ();wb();}return 0;;}


You made me work enough for now... :^P






How can you people have this amount of time on your hands?
Haven't you heard of the IOCCC?
No, have not. (Not enough time on my hands to find out...)
OK, I did know what it was but I wasn't figuring it out.
Hmm... I still think the Perl one is a little better (sorry!) but yours is very close.
@helios,
http://i50.tinypic.com/16ivdif.png
What do I win? Now let's see if I can get GNOME set up on this thing... I'm not sure I like KDE.

ArchLinux comes next...
Last edited on
Topic archived. No new replies allowed.
Pages: 1234