in reply to Re: The REAL reason for why they choose PHP over Perl.
in thread The REAL reason for why they choose PHP over Perl.

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^3: The REAL reason for why they choose PHP over Perl.
by Your Mother (Archbishop) on Oct 18, 2018 at 19:16 UTC

    No, it’s not. It’s contrived propaganda that turns a fun exercise for those who enjoy puzzles into the same FUD slung by Perl haters. I’ve never once, in hundreds of thousands of lines of production Perl seen anything remotely like that example. You can write illegible, highly golfed code in any language. Perl’s varied expressiveness is one of its defining, and endearing, features.

      > Perl haters

      There were no Perl haters before PHP Inc. got millions in venture capital funding and went corporate in 1999.

        Since 97% of the Perl hate I’ve encountered in the wild came from Java and Python users and both languages were around before 1999—and Java, despite its corporate support, is so philosophically removed from Perl that anyone who likes it couldn’t like Perl—I’m’a hafta say, nope.

      stop feeding? yeah
Re^3: The REAL reason for why they choose PHP over Perl.
by LanX (Saint) on Oct 18, 2018 at 20:37 UTC
    Read Wikipedia

    > Code golf is a type of recreational computer programming competition in which participants strive to achieve the shortest possible source code that implements a certain algorithm. Playing code golf is known as "golf scripting".

    And as already demonstrated is not very difficult to "normalize" the code again with B::Deparse

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

    update

    C:\>perl -MO=Deparse,-p $,=42;for(34,0,-3,9,-11,11,-17,7,-5){$*.=pack'c'=>$,+=$_}for(reverse s +plit//=>$* ){$%++?$ %%2?push@C,$_,$":push@c,$_,$":(push@C,$_,$")&&push@c,$"}$C[$# +C]=$/;($#C >$#c)?($ c=\@C)&&($ C=\@c):($ c=\@c)&&($C=\@C);$%=$|;for(@$c){print$_^ +$$C[$%++]} __DATA__ ($, = 42); foreach $_ ((34, 0, (-3), 9, (-11), 11, (-17), 7, (-5))) { ($* .= pack('c', ($, += $_))); } foreach $_ (reverse(split(//, $*, 0))) { (($%++) ? (($% % 2) ? push(@C, $_, $") : push(@c, $_, $")) : (push +(@C, $_, $") && push(@c, $"))); } ($C[$#C] = $/); (($#C > $#c) ? (($c = (\@C)) && ($C = (\@c))) : (($c = (\@c)) && ($C = + (\@C)))); ($% = $|); foreach $_ (@$c) { print(($_ ^ $$C[$%++])); } __DATA__

    I added -p flag for parens to make precedence clearer.

    most special variables are just used for obfuscation and don't serve any need.

    output is - surprisingly - chargrill

        > , presumably from this node in the obfuscated section: New Signature?

        or maybe he copied it from the signature of the post he replied to? ;-)

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Re^3: The REAL reason for why they choose PHP over Perl.
by stevieb (Canon) on Oct 18, 2018 at 23:35 UTC

    Due to your proper punctuation, grammar, spelling and capitalization, I have to assume you're not an idiot.

    Therefore, I'd have to assume that you bit this from somewhere, and didn't find it in anything resembling production Perl code.

    I'm fluent in numerous languages, and believe me, I've seen more disturbing and troublesome production code in other languages I know that are far harder to read than that.

    My very first real obfu from many years ago. I admit, all of the techniques, variances and oddities used came from my experience in writing production-worthy code at the time that resembled what I was learning to achieve. Very basic obfu, but as others have stated, obfuscated Perl code can easily be expanded to an understandable nature using perl and some basic, standard extensions (modules), so your attempt at inflaming others is as obtuse as it is ridiculous. Nice troll though!

    use 5.10.0; $p=japh;push@a,w();$s=j4;sub n{"8fbac6c6e252"};unshift@a, "b4d6c7ea52a7";$k=crypt($s,$p);$o="aeafa7cfdbd58c";@h= map{sprintf"%x",ord($_)}split//,$k;push@a,$o;$a[3]=pop@a; $a[2]=n();sub w{"bcb3d8dec8dd"}$x.=$_ for@a;@b=($x=~m/..?/g); push@z,@h until @z>@b;for(@b){push@japh,hex($_)-hex($z [$n]);$n++;}say map{chr$_}@japh;
      > Due to your proper punctuation, grammar, spelling and capitalization, I have to assume you're not an idiot.

      Upvoted you spontaneously because I overlooked the "not". So sorry! :(

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

      stop feeding
        Yep, troll activity increased lately.

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Re^3: The REAL reason for why they choose... Perl.
by Anonymous Monk on Oct 18, 2018 at 18:54 UTC
    #!/usr/bin/perl use B::Deparse; my $deparse = B::Deparse->new; print $deparse->coderef2text(\&wtf); sub wtf { $,=42;for(34,0,-3,9,-11,11,-17,7,-5){$*.=pack'c'=>$,+=$_}for(reverse s +plit//=>$* ){$%++?$ %%2?push@C,$_,$":push@c,$_,$":(push@C,$_,$")&&push@c,$"}$C[$# +C]=$/;($#C >$#c)?($ c=\@C)&&($ C=\@c):($ c=\@c)&&($C=\@C);$%=$|;for(@$c){print$_^ +$$C[$%++]} }