Computer Science Canada Obfuscated Perl |
Author: | apomb [ Thu May 29, 2008 12:44 am ] | ||||
Post subject: | Obfuscated Perl | ||||
Fascinates the pants off me. I always wondered how anyone could be so proficient at Unix/Perl that they could write something like this:
and the output be:
Protip: Highlight the code part and squint or, if you run any type of unix (mac included) just copy the code as obfuscated.pl and run it at your command line |
Author: | rdrake [ Thu May 29, 2008 1:33 am ] | ||||
Post subject: | Re: Obfuscated Perl | ||||
I could write Hello World in Perl and it'd still look obfuscated . Seriously though, I really love the camel:
Edit: It outputs this over and over again:
|
Author: | rizzix [ Thu May 29, 2008 9:05 am ] |
Post subject: | RE:Obfuscated Perl |
It's very easy to obfuscate code. It's much harder to decrypt obfuscated code. |
Author: | Prabhakar Ragde [ Sat May 31, 2008 6:36 am ] |
Post subject: | RE:Obfuscated Perl |
It's very easy to write obfuscated Perl. It's much harder to write clear Perl. --PR |
Author: | wtd [ Sat May 31, 2008 11:41 am ] |
Post subject: | RE:Obfuscated Perl |
I find it rather easy to write clear Perl, actually. It's just a matter of actually knowing the language and understanding its idioms. |
Author: | michaelp [ Sat May 31, 2008 6:05 pm ] |
Post subject: | RE:Obfuscated Perl |
I'm wondering how that can even be code. I was thinking about using Perl as a new language to learn, but then I decided to learn Python instead. |
Author: | apomb [ Mon Jun 02, 2008 12:35 pm ] |
Post subject: | RE:Obfuscated Perl |
I, too am enjoying writing clear perl programs, this diversion into obfuscation is just entertainment. I'm finally seeing the power of simplicity. |
Author: | wtd [ Mon Jun 02, 2008 12:46 pm ] |
Post subject: | RE:Obfuscated Perl |
The biggest "wow!" when I first learned Perl all those years ago was probably having powerful data structures (arrays, hashes) at my disposal, and having them very easily accessible. Not to say this is exclusively a Perl advantage, but it still gets it more right than a lot of other, more popular languages. Oh, and once you "get" how the Perl type system works, it's a lot easier to understand the whole thing. |
Author: | apomb [ Wed Jun 11, 2008 1:33 pm ] |
Post subject: | RE:Obfuscated Perl |
I find Ruby and perl similar in that regard, wtd, since ive gotten equally into both languages. |
Author: | wtd [ Wed Jun 11, 2008 2:44 pm ] |
Post subject: | RE:Obfuscated Perl |
I thought you would. It really is one of their great strengths, especially as it helps with keeping the library simple. |