Question about wizard Perl programmers

  • Thread starter LovesHisLittleShad
  • Start date
L

LovesHisLittleShad

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?
 
U

Uri Guttman

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
 
G

~greg

"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.
 
J

Jamie

In said:
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
 
U

Uri Guttman

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

it was difficult for me to remember that. :)

uri
 
M

Marco Neumann

LovesHisLittleShad said:
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.
 
A

Ayaz Ahmed Khan

"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".
 
A

Alex

LovesHisLittleShad said:
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.)
 
M

Mirco Wahab

Alex said:
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.
 
M

Mirco Wahab

LovesHisLittleShad said:
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.
 
M

Mirco Wahab

Alex said:
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.
 
A

Alex

Mirco said:
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.
 
A

Alex

Mirco said:
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.
 
M

Mirco Wahab

Alex said:
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
 
M

Marco Neumann

Hello, Sherm, Hello Tad

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

Greetings from Germany,
Marco.
 
C

Charlton Wilbur

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
 
D

De Vliegende Hollander

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...
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top