Re: ping Purl Gurl? Beginner Level Perl



In article <wdCdnZapcvkC4wfbnZ2dnUVZ_uOmnZ2d@xxxxxxxxxxxx>,
Purl Gurl <purlgurl@xxxxxxxxxxxx> wrote:
blmblm wrote:

Purl Gurl wrote:
blmblm wrote:

select STDOUT;$|=1;
@v248=(a .. z);@v216=qw(1 11 12 1 11 12 -8
18 -13 14 19 -18 14 -1 0 3 -7 4 17 18 4 11 5);
$v167="\n";$v223="\b";undef$v169;print$v167
x($v216[0]*2);for($v161=1;$v161<=$v216[20]/2;$v161++){
foreach$v182(@v216){if(($v161==1)||($v161==$v216[22])){
$v248[abs($v182)]=~tr/a-z/n-za-m/;}if($v182<0){
print" ";&D($v161**2);}print$v248[abs($v182)];
if($v182==$v216[22]){print".";&D($v161**2);}
if(($v161==1)){$v248[abs($v182)]=~tr/a-z/n-za-m/;}}
print$v223 x($v216[22]**2+5);}print$v167 x($v216[20]/2);
sub D{select$v169,$v169,$v169,.10*(shift(@_));}

"Respectfully submitted", as they say.


Ha! Ha! Now ain't you a cute ass!

* adjusts her respect-o-meter *

You just went up eight notches on my respect-o-meter.
Now you are eight out of one-hundred points.

Surprise! I actually know something! I guess the money the
taxpayers spent financing (some of) my fancy graduate degrees
wasn't a waste! though the years fixing 15-year-old FORTRAN
written by other people probably helped in this situation too,
as did the hours trying to help beginning students find bugs
in their code.

* demure smile *

Now *that*'s acting.

I would give you ten notches if your first appearing
sentence read, "You stupid stringless yo-yo!" or of
the same silly nature.

You do deserve to have your ego masturbated. Many, almost
all of the boys, the self-proclaimed gods of Perl, require
days and days to figure out my code. Some never could.

Sorry about the 7 bit browser versus an 8 bit browser.
This is easy to forget. You did very well substituting
in 7 bit replacements.

There are only a handful of High ASCII characters which
will work with perl core. Finding those which work and
which do not work, required a lot of trial and error.
For some functions, a set of characters will work, for
other functions, no go.

I wasted some time trying to understand how a variable could
be named simply "@" or "$" (contrary to what the man pages [1]
were telling me), before deciding that rather than trying
to understand the code by reading it I should just run it.
Once that worked (sort of), I opened the code in a text editor.
vim in a text-only window didn't do a whole lot better than
trn with the high-ASCII characters, but there were enough
clues ....

[1] Is this a term known in the Windows world? Explanation
on request. Or you may have enough exposure to Unix/Linux
to know.

I am especially impressed with your keeping track of where
you are in those arrays. This is not easy and a single wrong
number will make all totally FUBAR.

Sure. Which is why one of the first things I did was to
make a copy of the array in comments and .... Actually now
that I think about, there's a better way. Well, as an excellent
Perl programmer you can fill in the details for yourself.

I did dumb down my code
a little bit on math functions to give you a better chance.

My code is written for two reasons. First is an exercise
in obfuscation. Yes, a bit tricky to pull out whitespace
and have code still run. Other reason is simply to annoy
those self-proclaimed gods of Perl.

Well, stripping out whitespace isn't really a problem, is it?
Putting it back in, now that's a bit of a pain (though it's
probably automatable). But taking it out is easy. You just
have to get everything working *first*.

(Over the years I've come across examples of deliberately
obfuscated code, but I hadn't previously been interested enough
to dig into many of them. I don't think this is going to be
a new hobby for me, but once was kind of fun.)

Two or three times a year, the boys get to masturbating
their egos with JAPH signature code. This is unique code
which prints, "Just Another Perl Hacker." Randal Schwartz
started this years back. Randal and I go back many years
and have an exceptionally interesting past. I surprised
you have not discovered this crazy connection between
Randal and Purl Gurl Net.

Nope. My perusals of comp.lang.perl.misc have been quite
cursory.

To annoy those boys, I began writing obfuscated code which
prints "Purl Gurl Rocks!" in rather unique and constantly
changing ways, while code runs. This is my personal response
to their ego masturbation JAPH junkola.

Next time, I expect the first appearing line to actually
"say something" before vanishing and being replaced.

It does. Read the code. Since you're been in Usenetland for
many years, I thought you might be amused by the relationship
between the first line of text and the second.

Your
code performs well but is not near as fancy as mine; my
code is more active, certainly more assertive and sends
a very clear message throughout, in keeping with Rey's
comments about the two of us.

* meows *

For trivia, you do not need to flush the print buffer
with Perl. Runs fine without your first line.

Maybe on your system [2]. On mine, if I remove that first
line I get different behavior, completely consistent with its
meaning as described in the "perlfunc" man page. Re-read my
description of your program's output.

[2] It *would* be interesting and useful, however, to know
a little about the environment in which you're running these
programs. My guess is Windows' command shell (command.exe?),
though I could be wrong. It would be completely unsurprising
to me to learn that the Windows command shell and bash (my
current Linux shell) don't behave exactly the same with regard
to buffering of STDOUT. Something that might be interesting --
replace the "1" in that line with a "0" and tell me whether
the program behaves differently in your environment. (It does
in mine.)

--
Decline To State
(But the e-mail address in the header should work.)
.



Relevant Pages