Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Zombywuf
Mar 29, 2008

Avenging Dentist posted:

Um yeah, I'm an American, we have a habit of fighting the UK.

I don't think you understand the gravity of the situation.

Adbot
ADBOT LOVES YOU

Triple Tech
Jul 28, 2006

So what, are you quitting to join Homo Explosion?

tripwire posted:

I was looking through some of those "fail"s and couldn't figure out how one of them was getting this text it operates on:

That's interesting. Is it reading its own prompt?

Bhaal
Jul 13, 2001
I ain't going down alone
Dr. Infant, MD
I thought win # 20 was kinda cute and clever, but I also think I'd kill myself if my coworkers behaved like this day in, day out.

code:
#define Write   f void _(n)_(i)_(n_)_(j)(*a)();j y(a l){x j 
#define and     etc j 
#define x       l(0);return(j)y;} 
#define r(q)    (*q)();f q 
#define _(u)    r(o##u)r(p##u)r(_##u)r(u) 
#define as      (a l){putc 
#define f       typedef 
#define etc     stdout);!l?0:x 
#define in      (*

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

      Write A as in "ACK", and B as in "Berzerkeley",
    and C as in "C", and D as in "Don't Do That, Then!",
  and E as in "EMACS", and F as in "Foo", and G as in "GNU",
and H as in "Hack", and              I as in "INTERCAL", and
J as in "Job Security",              and K as in "Klu(d)ge",
and L as in "Linux   ",
and M as in "Magic   ",
and N as in "Net ", and
O as in "Obfuscated  ",
and P as in "PDP-11  ",
and Q as in "Quux    ",
and R as in "RTFM    ",
and S as in "Sendmail",
and T as in "TCP/IP  ",
and U as in "Unix", and              V as in "VI (/bin/vi)",
  and W as in "Wizard",              and X as in "Xyzzy...",
    and Y as in "YKYBHTLW", and Z as in "Zen", and _ as in
      " " "[space]", and nl as in "\n" "[new line]", etc

int main()
{
    (H)(E)(L)(L)(O) (_) (W)(O)(R)(L)(D) (nl);

    exit(0);
}

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

Zombywuf posted:

I don't think you understand the gravity of the situation.
Oh, I think I do.

code:
print eval '"'.


                                      ('{'^"\[").(
           ('{')^                   '[').('{'^'[').
        ('{'^'[').                ('{'^'[').('{'^'['
 ).('{'^'['  ).('{'              ^'[').('{'^'[').('{'
^'[').('{'^'[').('{'            ^'[').'_'.('{'^"\[").(
'{'^'[').('{'^"\[").(          '{'^'[').('{'^'[').('{'
  ^'[').('{'^('[')).(        '{'^'[').('{'^'[').('_').(
       '{'^'[').('{'^      '[').('{'^'[').('{'^'[').('{'
      ^'[').'_'.('{'     ^'[').'_'.('{'^'[').('{'^"\[").(
     '{'^'[').("\{"^   '[').('{'^'[').'_'.('{'^'[')."\_".(
    '{'^'[').("\{"^   '[').('{'^'[').('{'^'[').('{'^('[')).(
    '{'^'[').("\{"^  '[').('{'^'[').('{'^'[').('{'^'[').('{'^
    '[').('{'^'[')  .('{'^'[').('{'^'[').('{'^'[').('{'^'[').
    ('{'^'[').('{'  ^'[').('{'^'[').('{'^'[').('{'^'[').("\{"^
    '[').('!'^'+').('{'^'[').('{'^'[').'_'.'_'.'_'.('{'^'[').(
    '{'^'[').'_'.'_'.('{'^'[').'_'.'|'.('{'^'[').'|'.'_'.("\{"^
     '[').('{'^'[').('{'^'[').'_'.'_'.'_'.'|'.('{'^'[').'|'.'_'
     .'_'.('{'^'[').'('.'_'.')'.('{'^'[').'|'.'_'.('{'^'[').('{'
      ^'[').'|'.('{'^'[').'('.'_'.')'.'_'.('{'^'[').'_'.'_'.('{'^
       '[').'_'.'_'.'_'.('{'^'[').('{'^'[').('{'^'[').'_'.'_'.'_'
        .('{'^'[').'_'.('{'^'[').('{'^'[').('{'^'[').'_'.('{' ^((
         '['))).('!'^'+').('{'^'[').'/'.('{'^'[').'_'.("\{"^  '['
          ).'\\'.'\\'.'/'.('{'^'[').'_'.'`'.(('{')^ '[').'|'  .+(
            '{'^'[').'_'.'_'.'|'.('{'^'[').('/').(  '{'^'['   ).+
             "\_". '_'.'|'.('{'^'[')."'".'_'.('{'   ^"\[").   (((
                   '\\'))).'\\'.'|'.('{'^('[')).    ('|').(   '{'
                   ^('[')).    '_'.('_'). "\|".(     ('{')^   ((
                   '['))).     '|'.('{'   ^'[').     "\|".(  ((
                   "\{"))^     '[').'|'   .('{'       ^'[')  .
                   ("'").      '_'.('{'   ^'['         ).((
                   '`')).     ('{'^'[')   .'_'         .''.
                    ('{'^     '[').''.    '\\'         .''.
                    '\\'.     (('{')^     '[')         .'/'
                    .''.     ("\{"^       '[')         .'_'
                    .''.     (((          '{')         )^((
                    '[')      )).         (((          (((
                    (((        (((       (((           (((
                    (((         (((     (((            (((
                    (((          (((   (((              ((
                    ((             '\\'))               ))
                    ))              )))))               ))
                    ))             ))))))))             ))
                   )))            )))) )))))            ))
                  )))           ).'\\'  .''.           (((
                 '{')         )^"\[").   '|'          .''.
               ("\{"^                                "\[").
             '|'.('{'                               ^"\[").
                                      '|'.('!'^'+'
           ).'|'.                   ('{'^'[').('{'^
        '[')."\_".                '_'.'/'.('{'^'[').
 '('.('_').  "\|".(              '{'^'[').'|'.(('{')^
'[').'|'.'_'.(('{')^            '[').('{'^'[').('\\').
'\\'.'_'.'_'.('{'^'['          ).'\\'.'\\'.('{'^"\[").
  '|'.('{'^'[').'|'.(        '{'^'[').'|'.('{'^'[').'|'
       .('{'^'[').'|'      .'_'.('{'^'[').('{'^'[').'|'.
      ('{'^'[').'|'.     ('{'^'[').'|'.('{'^'[').'|'.('{'
     ^'[').'|'.('{'^   '[').'|'.('{'^'[').'|'.('{'^('[')).
    '|'.('{'^'[').(   '{'^'[').'_'.'_'.'/'.('{'^'[').'|'.'_'
    .'|'.('{'^'[').  '|'.('!'^'+').('{'^'[').'\\'.'\\'.('_').
    '_'.'_'.('|').  '\\'.'\\'.'_'.'_'.','.'_'."\|".'\\'.'\\'.
    '_'.'_'."\|".(  '{'^'[').'|'.'_'.'_'.'_'.'/'.'_'.'|'.('{'^
    '[').'|'.'_'.'|'.'_'.'|'.'\\'.'\\'.'_'.'_'.'|'.('{'^"\[").
    '|'.'_'.'|'.'_'.'|'.'_'.'|'.('{'^'[').'|'.'_'.'|'.('{'^'[')
     .'|'.'_'.'|'.'\\'.'\\'.'_'.'_'.'_'.'|'.'\\'.'\\'.'_'."\_".
     ','.('{'^'[').'|'.('!'^'+').('{'^'[').('{'^'[').('{'^'[').(
      '{'^'[').('{'^'[').('{'^'[').('{'^'[').('{'^'[').('{'^'[').
       ('{'^'[').('{'^'[').('{'^'[').('{'^'[').('{'^'[').('{'^'['
        ).('{'^'[').('{'^'[').('{'^'[').('{'^'[').('{'^'[').( '{'
         ^'[').('{'^'[').('{'^'[').('{'^'[').('{'^'[').('{'^  '['
          ).('{'^'[').('{'^'[').('{'^'[').('{'^'[') .(('{')^  '['
            ).('{'^'[').('{'^'[').('{'^'[').("\{"^  "\[").(   '{'
             ^'[') .('{'^'[').('{'^'[').('{'^'[')   .("\{"^   '['
                   ).('{'^'[').('{'^'[').(('{')^    "\[").(   '{'
                   ^"\[").(    '{'^'[').( ('{')^     '[').(   ((
                   "\{"))^     ('[')).(   ('{')^     '[').(  ((
                   "\{"))^     ('[')).(   "\{"^       '[').  (
                   ('{')^      ('[')).(   '{'^         '[')
                   .('{'^     '[').('{'   ^'['         ).+(
                    "\{"^     '[').'|'    .'_'         .'_'
                    .'_'.     ('/').(     '{'^         '[')
                    .''.     ("\!"^       '+')         .'"'
                    ;$:=     '.'          ^'~'         ;$~=
                    '@'|      '('         ;$^          =((
                    ')'        ))^       '['           ;$/
                    =((         '`'     ))|            '.'
                    ;$,          =((   '('              ))
                    ^+             '}';$\               =(
                    ((              '`'))               )|
                    ((             '!'));$:             =(
                   ')'            )^(( '}'))            ;(
                  $~)           ="\*"|  '`';           $^=
                 '+'^         "\_";$/=   '&'          |'@'
               ;($,)=                                ('[')&
             "\~";$\=                               ','^'|'
                                                                     

click

Blotto Skorzany fucked around with this message at 23:47 on Jul 9, 2009

tripwire
Nov 19, 2004

        ghost flow

Otto Skorzeny posted:

Oh, I think I do.

code:
print eval '"'.


                                      ('{'^"\[").(
           ('{')^                   '[').('{'^'[').
        ('{'^'[').                ('{'^'[').('{'^'['
 ).('{'^'['  ).('{'              ^'[').('{'^'[').('{'
^'[').('{'^'[').('{'            ^'[').'_'.('{'^"\[").(
'{'^'[').('{'^"\[").(          '{'^'[').('{'^'[').('{'
  ^'[').('{'^('[')).(        '{'^'[').('{'^'[').('_').(
       '{'^'[').('{'^      '[').('{'^'[').('{'^'[').('{'
      ^'[').'_'.('{'     ^'[').'_'.('{'^'[').('{'^"\[").(
     '{'^'[').("\{"^   '[').('{'^'[').'_'.('{'^'[')."\_".(
    '{'^'[').("\{"^   '[').('{'^'[').('{'^'[').('{'^('[')).(
    '{'^'[').("\{"^  '[').('{'^'[').('{'^'[').('{'^'[').('{'^
    '[').('{'^'[')  .('{'^'[').('{'^'[').('{'^'[').('{'^'[').
    ('{'^'[').('{'  ^'[').('{'^'[').('{'^'[').('{'^'[').("\{"^
    '[').('!'^'+').('{'^'[').('{'^'[').'_'.'_'.'_'.('{'^'[').(
    '{'^'[').'_'.'_'.('{'^'[').'_'.'|'.('{'^'[').'|'.'_'.("\{"^
     '[').('{'^'[').('{'^'[').'_'.'_'.'_'.'|'.('{'^'[').'|'.'_'
     .'_'.('{'^'[').'('.'_'.')'.('{'^'[').'|'.'_'.('{'^'[').('{'
      ^'[').'|'.('{'^'[').'('.'_'.')'.'_'.('{'^'[').'_'.'_'.('{'^
       '[').'_'.'_'.'_'.('{'^'[').('{'^'[').('{'^'[').'_'.'_'.'_'
        .('{'^'[').'_'.('{'^'[').('{'^'[').('{'^'[').'_'.('{' ^((
         '['))).('!'^'+').('{'^'[').'/'.('{'^'[').'_'.("\{"^  '['
          ).'\\'.'\\'.'/'.('{'^'[').'_'.'`'.(('{')^ '[').'|'  .+(
            '{'^'[').'_'.'_'.'|'.('{'^'[').('/').(  '{'^'['   ).+
             "\_". '_'.'|'.('{'^'[')."'".'_'.('{'   ^"\[").   (((
                   '\\'))).'\\'.'|'.('{'^('[')).    ('|').(   '{'
                   ^('[')).    '_'.('_'). "\|".(     ('{')^   ((
                   '['))).     '|'.('{'   ^'[').     "\|".(  ((
                   "\{"))^     '[').'|'   .('{'       ^'[')  .
                   ("'").      '_'.('{'   ^'['         ).((
                   '`')).     ('{'^'[')   .'_'         .''.
                    ('{'^     '[').''.    '\\'         .''.
                    '\\'.     (('{')^     '[')         .'/'
                    .''.     ("\{"^       '[')         .'_'
                    .''.     (((          '{')         )^((
                    '[')      )).         (((          (((
                    (((        (((       (((           (((
                    (((         (((     (((            (((
                    (((          (((   (((              ((
                    ((             '\\'))               ))
                    ))              )))))               ))
                    ))             ))))))))             ))
                   )))            )))) )))))            ))
                  )))           ).'\\'  .''.           (((
                 '{')         )^"\[").   '|'          .''.
               ("\{"^                                "\[").
             '|'.('{'                               ^"\[").
                                      '|'.('!'^'+'
           ).'|'.                   ('{'^'[').('{'^
        '[')."\_".                '_'.'/'.('{'^'[').
 '('.('_').  "\|".(              '{'^'[').'|'.(('{')^
'[').'|'.'_'.(('{')^            '[').('{'^'[').('\\').
'\\'.'_'.'_'.('{'^'['          ).'\\'.'\\'.('{'^"\[").
  '|'.('{'^'[').'|'.(        '{'^'[').'|'.('{'^'[').'|'
       .('{'^'[').'|'      .'_'.('{'^'[').('{'^'[').'|'.
      ('{'^'[').'|'.     ('{'^'[').'|'.('{'^'[').'|'.('{'
     ^'[').'|'.('{'^   '[').'|'.('{'^'[').'|'.('{'^('[')).
    '|'.('{'^'[').(   '{'^'[').'_'.'_'.'/'.('{'^'[').'|'.'_'
    .'|'.('{'^'[').  '|'.('!'^'+').('{'^'[').'\\'.'\\'.('_').
    '_'.'_'.('|').  '\\'.'\\'.'_'.'_'.','.'_'."\|".'\\'.'\\'.
    '_'.'_'."\|".(  '{'^'[').'|'.'_'.'_'.'_'.'/'.'_'.'|'.('{'^
    '[').'|'.'_'.'|'.'_'.'|'.'\\'.'\\'.'_'.'_'.'|'.('{'^"\[").
    '|'.'_'.'|'.'_'.'|'.'_'.'|'.('{'^'[').'|'.'_'.'|'.('{'^'[')
     .'|'.'_'.'|'.'\\'.'\\'.'_'.'_'.'_'.'|'.'\\'.'\\'.'_'."\_".
     ','.('{'^'[').'|'.('!'^'+').('{'^'[').('{'^'[').('{'^'[').(
      '{'^'[').('{'^'[').('{'^'[').('{'^'[').('{'^'[').('{'^'[').
       ('{'^'[').('{'^'[').('{'^'[').('{'^'[').('{'^'[').('{'^'['
        ).('{'^'[').('{'^'[').('{'^'[').('{'^'[').('{'^'[').( '{'
         ^'[').('{'^'[').('{'^'[').('{'^'[').('{'^'[').('{'^  '['
          ).('{'^'[').('{'^'[').('{'^'[').('{'^'[') .(('{')^  '['
            ).('{'^'[').('{'^'[').('{'^'[').("\{"^  "\[").(   '{'
             ^'[') .('{'^'[').('{'^'[').('{'^'[')   .("\{"^   '['
                   ).('{'^'[').('{'^'[').(('{')^    "\[").(   '{'
                   ^"\[").(    '{'^'[').( ('{')^     '[').(   ((
                   "\{"))^     ('[')).(   ('{')^     '[').(  ((
                   "\{"))^     ('[')).(   "\{"^       '[').  (
                   ('{')^      ('[')).(   '{'^         '[')
                   .('{'^     '[').('{'   ^'['         ).+(
                    "\{"^     '[').'|'    .'_'         .'_'
                    .'_'.     ('/').(     '{'^         '[')
                    .''.     ("\!"^       '+')         .'"'
                    ;$:=     '.'          ^'~'         ;$~=
                    '@'|      '('         ;$^          =((
                    ')'        ))^       '['           ;$/
                    =((         '`'     ))|            '.'
                    ;$,          =((   '('              ))
                    ^+             '}';$\               =(
                    ((              '`'))               )|
                    ((             '!'));$:             =(
                   ')'            )^(( '}'))            ;(
                  $~)           ="\*"|  '`';           $^=
                 '+'^         "\_";$/=   '&'          |'@'
               ;($,)=                                ('[')&
             "\~";$\=                               ','^'|'
                                                                     
:psyduck:

dancavallaro
Sep 10, 2006
My title sucks

Otto Skorzeny posted:

Oh, I think I do.

...ridiculous Perl poo poo...

WHAT THE MOTHER gently caress HOW DOES THAT WORK?

ymgve
Jan 2, 2004


:dukedog:
Offensive Clock
I think they should have picked a different phrase than "Hello world", because almost everyone has made obscure code to write it out. Look at some of those pieces of art - I would bet that very few of them were written in response to the ad.

Mustach
Mar 2, 2003

In this long line, there's been some real strange genes. You've got 'em all, with some extras thrown in.
This is the only good Perl program:
code:
#!/usr/bin/perl
$_='
         $q ="\                   47"; wh
        ile                           ($ ;=
      $z                +=              .5 ){
    %c=           $r=0;$/ ="";whi         le(2
   0+          $z>($;+=.05)){$c{int$       _+ 2
  6+         2*($              r+= .0       2) *
 s          in$                   ;}{1       -$_
+1         0+           int        $r*c       o s
$         ;}         =1for(0.       .1)        }$
t        =r         ever se;$        /.        =`
c        le        ar     `.         "         #!
/        usr       /bi             n/         pe
rl       \n\       $_ =$q        \n"          ;
fo        r$y        (1..20){$c{$_}          {
$ y       }? $         /.=chop$t            :
 ($/        . ="                          \4
 0")         for(0.                    .53)          ;
   $/.        ="\n"}pri            nt"$/$          q;
   s; ".         chr(9 2)."s;;g;eval\n           "}

';s;\s;;g;eval

dancavallaro
Sep 10, 2006
My title sucks

ymgve posted:

I think they should have picked a different phrase than "Hello world", because almost everyone has made obscure code to write it out. Look at some of those pieces of art - I would bet that very few of them were written in response to the ad.

Exactly. I didn't bother sending them anything but if I did, it would have been this that I did for EC in a class once:

code:
int*_(___,____){return(___%____==0)?(int[]){0,1}:(int[]){*(_(____,___%____)+1),*_(____,___%____)-*(_(____,___%____)+1)*(___/____)};}
main(){int __[]={0xC33,0x1458,0x106F,0x78,0x922,0x9AF,0x1458,0x48,0xF0,0x318,0};
int *___=&__[0];while(*___)putchar(*_(*___++,-0x1EEF));}
Hint: those hex numbers aren't ASCII codes.

sensual donkey punching
Mar 13, 2004

=)
Nap Ghost

tef posted:

hello world in prolog :v:

code like this gives me great pleasure. reminds me of the ever popular pastime of writing unnecessary forth interpreters

BigRedDot
Mar 6, 2008

sensual donkey punching posted:

code like this gives me great pleasure. reminds me of the ever popular pastime of writing unnecessary forth interpreters
The Sun PROM Monitor comes to mind.

ymgve
Jan 2, 2004


:dukedog:
Offensive Clock
I might have accidentally a Hello World

php:
<?php
 
// ninja coders don't need any stinkin' image libaries
 
print("Please wait, calculating...<br>");
 
function gen_bg() {
    $img=array_fill(0,20000,0);
    for($i=0;$i<20000;$i++)
        $img[$i]=rand(0,3);
    return $img;
}
 
function place_text($b,$w,$xoff,$yoff){
    $img gen_bg();
    for ($x=0;$x<$w;$x++)
        for($y=0;$y<40;$y++)
            if($b[$x/8]>>($y/8)&1)
                $img[($y+$yoff)*200+$x+$xoff]=7;
    return $img;
}
 
function encode($img){
    $d="";
    foreach($img as $p)
        $d.=chr($p*16+8);
    return $d."\t";
}
 
function build_gif($frames){
    $res "GIF89a\xc8\0\x64\0\xa2\0\0";
    for ($i=0;$i<8;$i++){
        $c=chr(0+$i*36);
        $res.=$c.$c.$c;
    }
    $res.="\x21\xff\x0bNETSCAPE2.0\x03\x01\x0\x0\x0";
    foreach($frames as $frame){
        $res.="\x21\xf9\x04\x04\x0a\0\0\0\x2c\0\0\0\0\xc8\0\x64\0\0\x03";
        foreach(str_split($frame,255) as $c)
            $res.=chr(strlen($c)).$c;
        $res.="\0";
    }
    return $res."\x3B";
}
 
$frames = array();
for ($i=0;$i<15;$i++) $frames[]=encode(place_text(array(31,4,31,0,31,21,17,0,31,16,16,0,31,16,16,0,31,17,31),152,rand(19,29),rand(25,35)));
for ($i=0;$i<5;$i++)  $frames[]=encode(gen_bg());
for ($i=0;$i<15;$i++) $frames[]=encode(place_text(array(15,16,15,16,15,0,31,17,31,0,31,5,26,0,31,16,16,0,31,17,14),168,rand(11,21),rand(25,35)));
for ($i=0;$i<5;$i++)  $frames[]=encode(gen_bg());
 
echo '<img src="data:image/gif;base64,'.base64_encode(build_gif($frames)).'">'
?>

Golden Dragon
Apr 9, 2007

Always speak politely to an enraged Dragon

dancavallaro posted:

Exactly. I didn't bother sending them anything but if I did, it would have been this that I did for EC in a class once:

code:
int*_(___,____){return(___%____==0)?(int[]){0,1}:(int[]){*(_(____,___%____)+1),*_(____,___%____)-*(_(____,___%____)+1)*(___/____)};}
main(){int __[]={0xC33,0x1458,0x106F,0x78,0x922,0x9AF,0x1458,0x48,0xF0,0x318,0};
int *___=&__[0];while(*___)putchar(*_(*___++,-0x1EEF));}
Hint: those hex numbers aren't ASCII codes.

And you would have failed for using a while loop!

tripwire
Nov 19, 2004

        ghost flow

Otto Skorzeny posted:

Oh, I think I do.

code:
perl camels
Did you write this yourself or just copy+paste it from somewhere? I'm curious how it was made... I only understand perl a tiny bit, but it seems like it would have had to be generated by another program. How/why does the program work, and how would you go about writing a program to generate it?

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

tripwire posted:

Did you write this yourself or just copy+paste it from somewhere? I'm curious how it was made... I only understand perl a tiny bit, but it seems like it would have had to be generated by another program. How/why does the program work, and how would you go about writing a program to generate it?

There's a cpan module for everything, and several for most things; the one I used was Acme::EyeDrops


e: Did you really think there was a place on the internet where I could have copy+pasted an obfuscated/beautified perl program that outputs 'eat poo poo limeys' in block letters?

Blotto Skorzany fucked around with this message at 14:56 on Jul 10, 2009

tripwire
Nov 19, 2004

        ghost flow

Otto Skorzeny posted:

There's a cpan module for everything, and several for most things; the one I used was Acme::EyeDrops


e: Did you really think there was a place on the internet where I could have copy+pasted an obfuscated/beautified perl program that outputs 'eat poo poo limeys' in block letters?
I didn't run the program I assumed it was "hello world" :downs:

Meat Beat Agent
Aug 5, 2007

felonious assault with a sproinging boner

tripwire posted:

I didn't run the program I assumed it was "hello world" :downs:

I think it's about time one phrase replaced the other

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip
Anyways the way the thing works is by making a regex that matches the code you want to execute then eval'ing it; since perl regexes can execute perl code there are ways to do this without calling 'eval' but whatever

huge sesh
Jun 9, 2008

I've always thought this one was real pretty
code:
not exp log srand xor s qq qx xor
s x x length uc ord and print chr
ord for qw q join use sub tied qx
xor eval xor print qq q q xor int
eval lc q m cos and print chr ord
for qw y abs ne open tied hex exp
ref y m xor scalar srand print qq
q q xor int eval lc qq y sqrt cos
and print chr ord for qw x printf
each return local x y or print qq
s s and eval q s undef or oct xor
time xor ref print chr int ord lc
foreach qw y hex alarm chdir kill
exec return y s gt sin sort split

Scaevolus
Apr 16, 2007

huge sesh posted:

I've always thought this one was real pretty
code:
not exp log srand xor s qq qx xor
s x x length uc ord and print chr
ord for qw q join use sub tied qx
xor eval xor print qq q q xor int
eval lc q m cos and print chr ord
for qw y abs ne open tied hex exp
ref y m xor scalar srand print qq
q q xor int eval lc qq y sqrt cos
and print chr ord for qw x printf
each return local x y or print qq
s s and eval q s undef or oct xor
time xor ref print chr int ord lc
foreach qw y hex alarm chdir kill
exec return y s gt sin sort split
that's one of the coolest JAPHs I've seen

oldkike
Jan 10, 2003

hey

www.pleasegimmeadollar.com
Nothing like reading some code, and then suddenly being transformed to lovely bar music
code:
ptr->close(); //closing time, you don't have to go home but you can't stay here

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"
code:
void refresh(int piPass){
    if (piPass == 0){
      refresh(1);
      refresh(2);
      refresh(3);
    }
    else {
        if (piPass == 1){
            // lots of code here
        }
        else {
            if (piPass == 2){
                // lots of code here
            }
        }
    }
}
:psyduck:

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"
P.S. I'll find my third pass

Who took my third pass

Who found my third pass

Filburt Shellbach
Nov 6, 2007

Apni tackat say tujay aaj mitta juu gaa!
Wait. What's wrong with recursion.

spiritual bypass
Feb 19, 2008

Grimey Drawer

Sartak posted:

Wait. What's wrong with recursion.

The programmer could've accomplished the same thing without any conditional branching or recursion, but he went out of his way to make it a confusing mess.

deedee megadoodoo
Sep 28, 2000
Two roads diverged in a wood, and I, I took the one to Flavortown, and that has made all the difference.


Sartak posted:

Wait. What's wrong with recursion.

Nothing. Recursion should be used when recursion is needed. It's obviously not needed in that case.

sonic bed head
Dec 18, 2003

this is naturual, baby!
From my very own keyboard with my very own brain. It took me at least a minute to re-understand what I was doing. I caught it in a few hours when I was looking over everything, but I had written this quickly to fix a error if there is no element with id "anywhere".

code:
if(($("anywhere") || {}).checked)
{
$("city").value = "anywhere";
}

Flobbster
Feb 17, 2005

"Cadet Kirk, after the way you cheated on the Kobayashi Maru test I oughta punch you in tha face!"

sonic bed head posted:

From my very own keyboard with my very own brain. It took me at least a minute to re-understand what I was doing. I caught it in a few hours when I was looking over everything, but I had written this quickly to fix a error if there is no element with id "anywhere".

code:
if(($("anywhere") || {}).checked)
{
$("city").value = "anywhere";
}

I actually kinda like this. It's better than $("anywhere") && $("anywhere").checked because you're not resolving it twice (unless $() does some caching; it's been a while since I've used any of those JS libraries), and it saves valuable keystrokes in declaring a temp variable.

It was obvious to me right away what the intent was, but yeah, I can see it being somewhat cryptic to someone, and probably best avoided in general.

sonic bed head
Dec 18, 2003

this is naturual, baby!

Flobbster posted:

I actually kinda like this. It's better than $("anywhere") && $("anywhere").checked because you're not resolving it twice (unless $() does some caching; it's been a while since I've used any of those JS libraries), and it saves valuable keystrokes in declaring a temp variable.

It was obvious to me right away what the intent was, but yeah, I can see it being somewhat cryptic to someone, and probably best avoided in general.

I only fear for other people who look at it. I would like if this became a common javascript idiom, but currently I think that it would take most people way longer than it should to understand what's going on. Sadly neither Prototype nor jQuery cache anything so it is faster without using temp variables.

savetheclocktower
Sep 23, 2004

You wait and see, Mr. Caruthers. I will be president! I'll be the most powerful president in the history of America. And I'm gonna clean up this country!

sonic bed head posted:

Sadly neither Prototype nor jQuery cache anything so it is faster without using temp variables.

Caching is loving hard because IDs can change — and elements can be added to and removed from the page. Caching would require listening for DOM mutation events in order to know when to invalidate the cache, but only Firefox supports said events, and when you listen for them it throws Firefox into a crazy-rear end mode that slows everything down, thereby defeating the original purpose. Web development is an infinite gauntlet of cosmic jokes.

nbv4
Aug 21, 2002

by Duchess Gummybuns

Janin posted:

code:
void refresh(int piPass){
    if (piPass == 0){
      refresh(1);
      refresh(2);
      refresh(3);
    }
    else {
        if (piPass == 1){
            // lots of code here
        }
        else {
            if (piPass == 2){
                // lots of code here
            }
        }
    }
}
:psyduck:

nigga needs to learn himself some elseif

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"

nbv4 posted:

nigga needs to learn himself some elseif

that's not the problem here

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Janin posted:

that's not the problem here

it's recursive in how lovely it is, that's loving amazing

Mill Town
Apr 17, 2006

Ryouga Inverse posted:

it's recursive in how lovely it is, that's loving amazing

Haha, I didn't even notice the lack of else if. I just saw the unrolled for-case loop.

Goat Bastard
Oct 20, 2004

Mill Town posted:

Haha, I didn't even notice the lack of else if. I just saw the unrolled for-case loop.

It's not quite a for-case though, is it? If refresh(1) is called then the pass == 2 stuff gets skipped, and similar for refresh(2).

Note: I am in no way defending this lovely method.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Goat Bastard posted:

It's not quite a for-case though, is it? If refresh(1) is called then the pass == 2 stuff gets skipped, and similar for refresh(2).

Note: I am in no way defending this lovely method.

right, that happens in for-case too, the difference is that here the for loop is accomplished by recursion

Mill Town
Apr 17, 2006

Goat Bastard posted:

It's not quite a for-case though, is it? If refresh(1) is called then the pass == 2 stuff gets skipped, and similar for refresh(2).

Note: I am in no way defending this lovely method.

Well, it's the same assuming each case: ends in a break. Is that normal in the for-case paradigm or not? I don't remember. :P

Goat Bastard
Oct 20, 2004

Ryouga Inverse posted:

right, that happens in for-case too, the difference is that here the for loop is accomplished by recursion

Yup, but only if it is initially called as refresh(0), right? So if the calling method was something like
code:
public void stupidity() {
	//blah blah
	refresh(0);
	//blah blah blah
	refresh(2);
}
then only the first call would behave like a for-case, and the second would just do the pass == 2 stuff.

I do understand why everything about that method is wrong though.

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"

Goat Bastard posted:

Yup, but only if it is initially called as refresh(0), right?

To my knowledge, it's only called from one other procedure, as refresh(0).

Adbot
ADBOT LOVES YOU

haveblue
Aug 15, 2005



Toilet Rascal
My favorite part is the extra call to refresh(3) which does literally nothing.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply