Question about wizard Perl programmers

Discussion in 'Perl Misc' started by LovesHisLittleShad, Mar 5, 2007.

  1. Is it my imagination, or is Perl a million times harder than other
    languages? Looking at books on all the languages of the past (I'm a
    programmer), I've notices that Perl is the only one that seems greek
    in most chapters, with very little explanation of what the people are
    doing.

    Am I wrong, or does the Perl language literally attract the wizards of
    the world to it, more than other languages? Consider the following
    code someone wrote that I found on a web site:

    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

    Run it and see what it does. How in the world did someone come up
    with this?
    Who are these people?
     
    LovesHisLittleShad, Mar 5, 2007
    #1
    1. Advertising

  2. LovesHisLittleShad

    Uri Guttman Guest

    >>>>> "L" == LovesHisLittleShad <> writes:

    L> Is it my imagination, or is Perl a million times harder than other
    L> languages? Looking at books on all the languages of the past (I'm a
    L> programmer), I've notices that Perl is the only one that seems greek
    L> in most chapters, with very little explanation of what the people are
    L> doing.

    you must not be a very good programmer if perl books leave you
    behind. or you are reading the wrong perl books.

    L> Am I wrong, or does the Perl language literally attract the wizards of
    L> the world to it, more than other languages? Consider the following
    L> code someone wrote that I found on a web site:

    i say the wizards recognize perl for the great language that it is. it
    makes easy things easy and hard things possible. it is more fun to code
    in than any other language i have known (which is too many).

    L> not exp log srand xor s qq qx xor
    L> s x x length uc ord and print chr
    L> ord for qw q join use sub tied qx
    L> xor eval xor print qq q q xor int
    L> eval lc q m cos and print chr ord
    L> for qw y abs ne open tied hex exp
    L> ref y m xor scalar srand print qq
    L> q q xor int eval lc qq y sqrt cos
    L> and print chr ord for qw x printf
    L> each return local x y or print qq
    L> s s and eval q s undef or oct xor
    L> time xor ref print chr int ord lc
    L> foreach qw y hex alarm chdir kill
    L> exec return y s gt sin sort split

    L> Run it and see what it does. How in the world did someone come up
    L> with this?

    i won't run it. but you can run it through a deparser and it will be
    much clearer. and that isn't production code but a perl hack. why do you
    care about it?

    and you can write bad code in any language. in fact, most code is badly
    written as it is a skill just like any other and some people are just
    better at it than others. and because coding is something a grade
    schooler can start to learn and morons can get jobs in java sweat shops,
    most real code is crap.

    L> Who are these people?

    me.

    uri


    --
    Uri Guttman ------ -------- http://www.stemsystems.com
    --Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
    Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
     
    Uri Guttman, Mar 5, 2007
    #2
    1. Advertising

  3. LovesHisLittleShad

    ~greg Guest

    "LovesHisLittleShad" > wrote
    >
    > 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
    >
    > ...
    > Who are these people?




    Dylan Thomas wrote that.
     
    ~greg, Mar 5, 2007
    #3
  4. LovesHisLittleShad

    Jamie Guest

    In <>,
    "LovesHisLittleShad" <> mentions:
    >Is it my imagination, or is Perl a million times harder than other
    >languages? Looking at books on all the languages of the past (I'm a
    >programmer), I've notices that Perl is the only one that seems greek
    >in most chapters, with very little explanation of what the people are
    >doing.


    I'd say perl is about the easiest language to actually work in, though
    it did take a couple weeks to get my mind wrapped around some of the
    basic ideas. (file handles really confused me at first)

    The reason it's easy (especially to unix-folk) is that you can apply
    much of what you've learned in perl to general unix system tasks,
    the opposite is also true to some extent.

    I've been using it now for so many years it feels like a second language,
    but.. there are still things yet to be discovered. I like that,
    you never really "learn" it and consequently, it seldom gets boring.

    >Am I wrong, or does the Perl language literally attract the wizards of
    >the world to it, more than other languages? Consider the following
    >code someone wrote that I found on a web site:


    I don't know about wizards, but, historically I've noticed it attracted
    a lot of.. well.. what I'd call "snobs" or "punks" but, checking back
    on the newsgroup, it looks like things have improved a great deal! (either
    that or I'm becomming more and more snobbish myself and therefore don't
    notice it hehehe)

    >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
    >
    >Run it and see what it does. How in the world did someone come up
    >with this?
    >Who are these people?


    Creative people, I'd say.

    I won't run it, and I certainly wouldn't rely on anything written in that style
    for important stuff, but there is nothing wrong with being creative. I have
    done stuff in perl, purely for the fun of it.

    The joy of perl can in some cases, be it's own reward. The program need
    not actually do anything.

    Jamie
    --
    http://www.geniegate.com Custom web programming
    Perl * Java * UNIX User Management Solutions
     
    Jamie, Mar 5, 2007
    #4
  5. LovesHisLittleShad

    Guest

    On Mar 4, 10:30 pm, Uri Guttman <> wrote:
    > it makes easy things easy and hard things possible.


    Isnt it "it makes difficult things easy and the impossible possible"
     
    , Mar 5, 2007
    #5
  6. LovesHisLittleShad

    Uri Guttman Guest

    >>>>> "k" == krakle <> writes:

    k> On Mar 4, 10:30 pm, Uri Guttman <> wrote:
    >> it makes easy things easy and hard things possible.


    k> Isnt it "it makes difficult things easy and the impossible possible"

    it was difficult for me to remember that. :)

    uri

    --
    Uri Guttman ------ -------- http://www.stemsystems.com
    --Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
    Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
     
    Uri Guttman, Mar 5, 2007
    #6
  7. "LovesHisLittleShad" <> schrieb im Newsbeitrag
    news:...
    >
    > Run it and see what it does.


    I guess I am that kind of guy who just runs strange code that was posted in
    some newsgroup on the internet just because of curiosity.

    If anyone cares, the code produces this string:

    just another perl hacker

    Why it does this, is beyond me.

    Cheers,
    Marco.
     
    Marco Neumann, Mar 5, 2007
    #7
  8. "Uri Guttman" typed:

    > it is more fun to code in than any other language i have known (which is
    > too many).


    To each, their own.

    I find Python much more fun to code in than Perl. I have been coding in
    Perl longer than in Python, though, but having dived into Pythonic waters
    (so to speak), I prefer Python over Perl whenever I have the room to do so.

    --
    Ayaz Ahmed Khan

    Falling in love makes smoking pot all day look like the ultimate in
    restraint.
    -- Dave Sim, author of "Cerebus".
     
    Ayaz Ahmed Khan, Mar 5, 2007
    #8
  9. LovesHisLittleShad

    Alex Guest

    LovesHisLittleShad wrote:
    > Am I wrong, or does the Perl language literally attract the wizards of
    > the world to it, more than other languages? Consider the following
    > code someone wrote that I found on a web site:


    Well, you can write impossible-to-read code in just about any langugage.
    Consider the following snippet of legal Java code:

    /* Just Java
    Peter van der Linden
    April 1, 1996.

    \u0050\u0076\u0064\u004c\u0020\u0031\u0020\u0041\u0070\u0072\u0039\u0036
    \u002a\u002f\u0020\u0063\u006c\u0061\u0073\u0073\u0020\u0068\u0020\u007b
    \u0020\u0020\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0020\u0020\u0020
    \u0073\u0074\u0061\u0074\u0069\u0063\u0020\u0020\u0076\u006f\u0069\u0064
    \u006d\u0061\u0069\u006e\u0028\u0020\u0053\u0074\u0072\u0069\u006e\u0067
    \u005b\u005d\u0061\u0029\u0020\u007b\u0053\u0079\u0073\u0074\u0065\u006d
    \u002e\u006f\u0075\u0074\u002e\u0070\u0072\u0069\u006e\u0074\u006c\u006e
    \u0028\u0022\u0048\u0069\u0021\u0022\u0029\u003b\u007d\u007d\u002f\u002a

    */

    It compiles and runs. Does this make Java a very difficult language? (It
    simply prints "Hi!", in case you're interested.)

    --
    Alex
    e-mail: Domain is iki dot fi. Local-part is alext.
    local-part at domain
     
    Alex, Mar 5, 2007
    #9
  10. LovesHisLittleShad

    Mirco Wahab Guest

    Alex wrote:
    > Well, you can write impossible-to-read code in just about any langugage.
    > Consider the following snippet of legal Java code:
    >
    > /* Just Java
    > Peter van der Linden
    > April 1, 1996.
    >
    > \u0050\u0076\u0064\u004c\u0020\u0031\u0020\u0041\u0070\u0072\u0039\u0036
    > \u002a\u002f\u0020\u0063\u006c\u0061\u0073\u0073\u0020\u0068\u0020\u007b
    > \u0020\u0020\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0020\u0020\u0020
    > \u0073\u0074\u0061\u0074\u0069\u0063\u0020\u0020\u0076\u006f\u0069\u0064
    > \u006d\u0061\u0069\u006e\u0028\u0020\u0053\u0074\u0072\u0069\u006e\u0067
    > \u005b\u005d\u0061\u0029\u0020\u007b\u0053\u0079\u0073\u0074\u0065\u006d
    > \u002e\u006f\u0075\u0074\u002e\u0070\u0072\u0069\u006e\u0074\u006c\u006e
    > \u0028\u0022\u0048\u0069\u0021\u0022\u0029\u003b\u007d\u007d\u002f\u002a
    >
    > */
    >
    > It compiles and runs. Does this make Java a very difficult language? (It
    > simply prints "Hi!", in case you're interested.)


    It does, in Perl also print (almost) the same:


    print map chr hex, split /\\u00/, '
    \u0050\u0076\u0064\u004c\u0020\u0031\u0020\u0041\u0070\u0072\u0039\u0036
    \u002a\u002f\u0020\u0063\u006c\u0061\u0073\u0073\u0020\u0068\u0020\u007b
    \u0020\u0020\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0020\u0020\u0020
    \u0073\u0074\u0061\u0074\u0069\u0063\u0020\u0020\u0076\u006f\u0069\u0064
    \u006d\u0061\u0069\u006e\u0028\u0020\u0053\u0074\u0072\u0069\u006e\u0067
    \u005b\u005d\u0061\u0029\u0020\u007b\u0053\u0079\u0073\u0074\u0065\u006d
    \u002e\u006f\u0075\u0074\u002e\u0070\u0072\u0069\u006e\u0074\u006c\u006e
    \u0028\u0022\u0048\u0069\u0021\u0022\u0029\u003b\u007d\u007d\u002f\u002a
    ';

    Regards

    M.
     
    Mirco Wahab, Mar 5, 2007
    #10
  11. LovesHisLittleShad

    Mirco Wahab Guest

    LovesHisLittleShad wrote:
    > not exp log srand xor s qq qx xor
    > ...
    > exec return y s gt sin sort split
    >
    > Run it and see what it does. How in the world
    > did someone come up with this?


    This looks, for me, clearly like 'Art'.
    Perl allows people to take a profane thing,
    a (computing) machinery, - which generally
    does not reveal what it is to the observer -
    and turns this upside down by *pretending*
    to *be* something else (a literal text, a
    sequence of technical terms) which hides
    the profane thing completely behind a new
    "sense" or "form".

    This is Art. Don't be mislead ;-)

    > Who are these people?


    These people are artists, and they
    are dead serious in giving boring
    daily stuff an appearance that
    transcends it to the extreme in
    'having no more profane use' ...

    my €0,05

    Regards

    M.
     
    Mirco Wahab, Mar 5, 2007
    #11
  12. LovesHisLittleShad

    Mirco Wahab Guest

    Alex wrote:
    > It compiles and runs. Does this make Java a very difficult language? (It
    > simply prints "Hi!", in case you're interested.)


    In the "java version", there seems to
    be an error, as is obvious from the
    perl output. Maybe one has to put
    the last two codes on the start
    of the whole sequence, like:

    >---------------------------------+

    |
    V

    print map chr hex,split/\\u/,'\u002f\u002a
    \u0050\u0076\u0064\u004c\u0020\u0031\u0020\u0041\u0070\u0072\u0039\u0036
    \u002a\u002f\u0020\u0063\u006c\u0061\u0073\u0073\u0020\u0068\u0020\u007b
    \u0020\u0020\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0020\u0020\u0020
    \u0073\u0074\u0061\u0074\u0069\u0063\u0020\u0020\u0076\u006f\u0069\u0064
    \u006d\u0061\u0069\u006e\u0028\u0020\u0053\u0074\u0072\u0069\u006e\u0067
    \u005b\u005d\u0061\u0029\u0020\u007b\u0053\u0079\u0073\u0074\u0065\u006d
    \u002e\u006f\u0075\u0074\u002e\u0070\u0072\u0069\u006e\u0074\u006c\u006e
    \u0028\u0022\u0048\u0069\u0021\u0022\u0029\u003b\u007d\u007d'
    V
    |
    <-------------------------------------------------------------+

    Does the original code really work in Java?

    Regards

    M.
     
    Mirco Wahab, Mar 5, 2007
    #12
  13. LovesHisLittleShad

    Alex Guest

    Mirco Wahab wrote:

    >> It compiles and runs. Does this make Java a very difficult language? (It
    >> simply prints "Hi!", in case you're interested.)

    >
    > It does, in Perl also print (almost) the same:


    <nitpick>Your code prints the Java code that prints "Hi!", including the
    comment delimiters.</nitpick> However, I think your code is a good
    example of the beauty of perl, ie. how to easily convert illegible text
    into legible.

    --
    Alex
    e-mail: Domain is iki dot fi. Local-part is alext.
    local-part at domain
     
    Alex, Mar 5, 2007
    #13
  14. LovesHisLittleShad

    Alex Guest

    Mirco Wahab wrote:

    > In the "java version", there seems to
    > be an error, as is obvious from the
    > perl output. Maybe one has to put
    > the last two codes on the start
    > of the whole sequence, like:


    Not sure what you mean, but did you notice the unterminated comment
    marker in the original java code? Of course, the "obfuscated" code
    terminates that comment, so the beginning of the garbage is irrelevant.
    Similarly, the last line (readable) line terminates a comment which is
    started in the obfuscated code.

    > Does the original code really work in Java?


    As I said, it compiles, runs and prints "Hi!" on JRE 1.5.0_05. Include
    the comment markers when copying+pasting.

    --
    Alex
    e-mail: Domain is iki dot fi. Local-part is alext.
    local-part at domain
     
    Alex, Mar 5, 2007
    #14
  15. LovesHisLittleShad

    Mirco Wahab Guest

    Alex wrote:
    > As I said, it compiles, runs and prints "Hi!" on JRE 1.5.0_05. Include
    > the comment markers when copying+pasting.


    Ooops, yes, "the comment markers" of your posting!

    I see. My fault.


    Thanks,

    Mirco
     
    Mirco Wahab, Mar 5, 2007
    #15
  16. Marco Neumann <> wrote:
    >
    > "LovesHisLittleShad" <> schrieb im Newsbeitrag
    > news:...
    >>
    >> Run it and see what it does.

    >
    > I guess I am that kind of guy who just runs strange code that was posted in
    > some newsgroup on the internet just because of curiosity.
    >
    > If anyone cares, the code produces this string:
    >
    > just another perl hacker
    >
    > Why it does this, is beyond me.



    http://en.wikipedia.org/wiki/Just_another_Perl_hacker


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Mar 5, 2007
    #16
  17. Hello, Sherm, Hello Tad

    Thanks for your pointers. I did not know the JAPH aspect of the perl
    culture.

    Greetings from Germany,
    Marco.
     
    Marco Neumann, Mar 5, 2007
    #17
  18. >>>>> "L" == LovesHisLittleShad <> writes:

    L> Is it my imagination, or is Perl a million times harder than
    L> other languages?

    It's your imagination.

    L> Looking at books on all the languages of the past (I'm a
    L> programmer), I've notices that Perl is the only one that seems
    L> greek in most chapters, with very little explanation of what
    L> the people are doing.

    Make sure you read books at a level appropriate to your understanding.
    If you are just starting out, you'll be lost with a high-level book.
    And there are a lot of bad Perl books out there; here's a good one,
    that's available online legally:
    http://www.perl.org/books/beginning-perl/

    Perl has the property that you can learn a little bit of it and get
    useful stuff done, especially if you're familiar with C or Unix, but
    it also has a lot of flexibility and power for the experts. A book
    aimed at experts who are familiar with Perl will seem like Greek to a
    beginner, just as _Advanced Programming in the Unix Environment_ will
    seem like Greek to a beginner in C.

    Charlton





    --
    Charlton Wilbur
     
    Charlton Wilbur, Mar 5, 2007
    #18
  19. The sentient life form Ayaz Ahmed Khan posted the following:

    > I find Python much more fun to code in than Perl. I have been coding in
    > Perl longer than in Python, though, but having dived into Pythonic waters
    > (so to speak), I prefer Python over Perl whenever I have the room to do
    > so.


    But it's not nearly as powerful as Perl...
     
    De Vliegende Hollander, Mar 5, 2007
    #19
  20. LovesHisLittleShad

    Guest

    On Mar 4, 8:30 pm, Uri Guttman <> wrote:

    > you can run it through a deparser and it will be much clearer.


    I have never heard of a Perl deparser. How would I do this?
     
    , Mar 5, 2007
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. rusi
    Replies:
    0
    Views:
    445
  2. Stephan Vladimir Bugaj
    Replies:
    0
    Views:
    162
    Stephan Vladimir Bugaj
    May 5, 2013
  3. Stephan Vladimir Bugaj
    Replies:
    0
    Views:
    131
    Stephan Vladimir Bugaj
    May 5, 2013
  4. Fábio Santos
    Replies:
    0
    Views:
    123
    Fábio Santos
    May 5, 2013
  5. Chris Angelico
    Replies:
    0
    Views:
    311
    Chris Angelico
    May 5, 2013
Loading...

Share This Page