Re: World's First JAPH

2001-08-24 Thread Ask Bjoern Hansen

[EMAIL PROTECTED] (Ian Phillipps) writes:

> I *think* this will work with perl 2, but I don't have a copy to
> hand ATM

http://mirrors.valueclick.com/pub/perl/really-ancient-perls/oldperl/dist/leo/src/perl2/

or

http://mirrors.valueclick.com/pub/perl/really-ancient-perls/oldperl/dist/dex/perl/2.000-2.001/



 - ask

-- 
ask bjoern hansen, http://ask.netcetera.dk/   !try; do();



Re: World's First JAPH

2001-08-23 Thread Neil Kandalgaonkar

On Wed, Aug 22, 2001 at 12:28:49PM -0700, Randal L. Schwartz wrote:

> Fine rules for JAPH version 1.0.  

This is all well and good, but the JAPH that can be
specified is not the true JAPH. 

We've had JAPHs in combined perl and postscript. JAPHs 
that print out "Just another Perl / Unix Hacker" which
require the addition of "Unix" and Unix to work! Others
that are merely aesthetically pleasing, but entirely
straightforward.

-- 
Neil Kandalgaonkar, ActiveState
ASPN - ActiveState Programmer Network
http://ASPN.ActiveState.com/



Re: World's First JAPH

2001-08-23 Thread Abigail

On Thu, Aug 23, 2001 at 08:00:37AM -0400, Ronald J Kimball wrote:
> 
> For the golf tournament, we decided that the one-liners had to be on one
> line.  This was mostly because embedding newlines in strings *on the
> command line* depends on the shell.


Oh, I'd say it was that embedded newlines are impossible in *ONE* liners.



Abigail



Re: World's First JAPH

2001-08-23 Thread John Porter

> > [EMAIL PROTECTED] wrote:
> > >> Embedding newlines inside quotes is controversial;
> > >> doubtless, some golfers and japhers would seek to
> > >> ban this perhaps shady practice.

If Andrew's comments were meant to be taken in the context
of golf, then I misunderstood and I apologize.
I thought he meant for perl programming in general.


-- 
John Porter




RE: World's First JAPH

2001-08-23 Thread Bicknell, Frank

... and if someone else runs it for you, suitably negative values of
nothing!  :)

(length ($japh) < 0)

-Original Message-
From: Abigail [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 22, 2001 16:26
To: Paul Johnson
Cc: Newton, Philip; '[EMAIL PROTECTED]'; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: World's First JAPH


On Wed, Aug 22, 2001 at 12:00:10PM +0200, Paul Johnson wrote:
> On Wed, Aug 22, 2001 at 11:48:27AM +0200, Newton, Philip wrote:
> > Ian Phillipps wrote:
> > > What *is* the world's shortest JAPH, anyway?
> > 
> > Well, if you're allowed to use modules:
> > 
> > perl -MJ -ej
> > 
> > for suitable values of J.pm and &J::j
> 
>   perl -MJ
> 
> for suitable values of J.pm and &J::import
> 
>   perl
> 
> for suitable values of PERL5OPT
> 
>   p
> 
> for suitable values of p


And nothing at all for suitable values of /var/spool/cron/crontabs/root.



Abigail



Re: World's First JAPH

2001-08-23 Thread Ronald J Kimball

On Thu, Aug 23, 2001 at 02:18:07PM +1000, [EMAIL PROTECTED] wrote:
> [EMAIL PROTECTED] wrote:
> >> Embedding newlines inside quotes is controversial;
> >> doubtless, some golfers and japhers would seek to
> >> ban this perhaps shady practice.
> 
> John Porter wrote:
> > Absolutely not.  Amongst C programmers, maybe (:-) but not
> > Perl programmers.  Where'd you get that strange idea?
> 
> I agree with you; I think it is OK.
> I think mis-spelling obfuscated was a dead giveway that
> I am new to all this stuff :-). I am not certain, but I
> sort of got the impression from:
> 
> http://linguist.dartmouth.edu/~rjk/perlgolf/holes.html
> 
> that the solutions in this golf tournament, at least,
> had to all be on one line, which would disqualify
> anyone attempting to embed a newline in a string.

For the golf tournament, we decided that the one-liners had to be on one
line.  This was mostly because embedding newlines in strings *on the
command line* depends on the shell.

sh:

perl -e 'die "Hi!
"'

csh:

perl -e 'die "Hi!\
"'


We allowed the subroutine solutions to span multiple lines, however.

sub golf {
die "Hi!
"
}


Anyway, don't take the rules from that golf tournament as official for
anything but that golf tournmanent.


Ronad



Re: World's First JAPH

2001-08-22 Thread Jas Nagra


Or sometimes:

die"Just another $^X hacker
"

jas

[EMAIL PROTECTED] writes:

> Ian Phillipps wrote:
> > What *is* the world's shortest JAPH, anyway? I would be disappointed if
> > it were just 'print ""'
> 
> If we ban external programs, is this the shortest?
> die"Just another Perl hacker
> "
> Note the elegant embedding of newline inside the quotes
> (saves a character over \n :-).
> 
> Abigail's JAPH 1.0 specification allows writing to stderr
> and does not specify the program return code, so using
> die would seem to be kosher.
> 
> Embedding newlines inside quotes is controversial;
> doubtless, some golfers and japhers would seek to
> ban this perhaps shady practice.
> 
> Andrew.



Re: World's First JAPH

2001-08-22 Thread Steve Lane

[EMAIL PROTECTED] wrote:
> 
> Ian Phillipps wrote:
> > What *is* the world's shortest JAPH, anyway? I would be disappointed if
> > it were just 'print ""'
> 
> If we ban external programs, is this the shortest?
> die"Just another Perl hacker
> "

if external programs -that come with Perl-
are allowed, you can:

print`perldoc -qj`=~/"(.+)"/
--
Steve Lane <[EMAIL PROTECTED]>



Re: World's First JAPH

2001-08-22 Thread Andrew . Savige

[EMAIL PROTECTED] wrote:
>> Embedding newlines inside quotes is controversial;
>> doubtless, some golfers and japhers would seek to
>> ban this perhaps shady practice.

John Porter wrote:
> Absolutely not.  Amongst C programmers, maybe (:-) but not
> Perl programmers.  Where'd you get that strange idea?

I agree with you; I think it is OK.
I think mis-spelling obfuscated was a dead giveway that
I am new to all this stuff :-). I am not certain, but I
sort of got the impression from:

http://linguist.dartmouth.edu/~rjk/perlgolf/holes.html

that the solutions in this golf tournament, at least,
had to all be on one line, which would disqualify
anyone attempting to embed a newline in a string.

Also, the golf score would perhaps be different on different
platforms (1 for LF on Unix; 2 for CRLF on Windows) which
may cause debate on what is the "true" golf score.

Andrew.



Re: World's First JAPH

2001-08-22 Thread John Porter

[EMAIL PROTECTED] wrote:
> Embedding newlines inside quotes is controversial;
> doubtless, some golfers and japhers would seek to
> ban this perhaps shady practice.

Absolutely not.  Amongst C programmers, maybe (:-) but not
Perl programmers.  Where'd you get that strange idea?

-- 
John Porter




Re: World's First JAPH

2001-08-22 Thread Andrew . Savige

Ian Phillipps wrote:
> What *is* the world's shortest JAPH, anyway? I would be disappointed if
> it were just 'print ""'

If we ban external programs, is this the shortest?
die"Just another Perl hacker
"
Note the elegant embedding of newline inside the quotes
(saves a character over \n :-).

Abigail's JAPH 1.0 specification allows writing to stderr
and does not specify the program return code, so using
die would seem to be kosher.

Embedding newlines inside quotes is controversial;
doubtless, some golfers and japhers would seek to
ban this perhaps shady practice.

Andrew.




Re: World's First JAPH

2001-08-22 Thread Abigail

On Wed, Aug 22, 2001 at 06:46:43PM -0400, Keith C. Ivey wrote:
> Abigail <[EMAIL PROTECTED]> wrote:
> 
> > Being the one who has given several talks about Japhs, I've
> > decreed that a Japh uses the following rules:
> > 
> >- It prints "Just another Perl Hacker" with some reasonable
> >  captalization, followed by optional punctuation (comma,
> >  dot) followed by an optional newline.
> 
> What is "reasonable capitalization"?  I can see a case for 
> capitalizing every word, I suppose (though I'd prefer 
> capitalizing only "Just" and "Perl"), but what is the rationale 
> for capitalizing "Hacker" but not "another"?  Unless you're 
> writing German or 18th-century English or are related to the 
> minister in "Yes, (Prime) Minister", it seems that "hacker" 
> should be lowercase, like any other common noun.

That depends whether you see "hacker" as a noun or as a name/label
of a group. ;-) Or to be more specific, I consider "Perl Hacker"
to form a single name.


Abigail



Re: World's First JAPH

2001-08-22 Thread Keith C. Ivey

Abigail <[EMAIL PROTECTED]> wrote:

> Being the one who has given several talks about Japhs, I've
> decreed that a Japh uses the following rules:
> 
>- It prints "Just another Perl Hacker" with some reasonable
>  captalization, followed by optional punctuation (comma,
>  dot) followed by an optional newline.

What is "reasonable capitalization"?  I can see a case for 
capitalizing every word, I suppose (though I'd prefer 
capitalizing only "Just" and "Perl"), but what is the rationale 
for capitalizing "Hacker" but not "another"?  Unless you're 
writing German or 18th-century English or are related to the 
minister in "Yes, (Prime) Minister", it seems that "hacker" 
should be lowercase, like any other common noun.

-- 
Keith C. Ivey <[EMAIL PROTECTED]>
Washington, DC



Re: World's First JAPH

2001-08-22 Thread Abigail

On Wed, Aug 22, 2001 at 12:00:10PM +0200, Paul Johnson wrote:
> On Wed, Aug 22, 2001 at 11:48:27AM +0200, Newton, Philip wrote:
> > Ian Phillipps wrote:
> > > What *is* the world's shortest JAPH, anyway?
> > 
> > Well, if you're allowed to use modules:
> > 
> > perl -MJ -ej
> > 
> > for suitable values of J.pm and &J::j
> 
>   perl -MJ
> 
> for suitable values of J.pm and &J::import
> 
>   perl
> 
> for suitable values of PERL5OPT
> 
>   p
> 
> for suitable values of p


And nothing at all for suitable values of /var/spool/cron/crontabs/root.



Abigail



Re: World's First JAPH

2001-08-22 Thread Paul Johnson

On Wed, Aug 22, 2001 at 11:48:27AM +0200, Newton, Philip wrote:
> Ian Phillipps wrote:
> > What *is* the world's shortest JAPH, anyway?
> 
> Well, if you're allowed to use modules:
> 
> perl -MJ -ej
> 
> for suitable values of J.pm and &J::j

  perl -MJ

for suitable values of J.pm and &J::import

  perl

for suitable values of PERL5OPT

  p

for suitable values of p


Hmmm.

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net



Re: World's First JAPH

2001-08-22 Thread Randal L. Schwartz

> "Abigail" == Abigail  <[EMAIL PROTECTED]> writes:

Abigail> Being the one who has given several talks about Japhs, I've decreed
Abigail> that a Japh uses the following rules:

Abigail>- It prints "Just another Perl Hacker" with some reasonable
Abigail>  captalization, followed by optional punctuation (comma,
Abigail>  dot) followed by an optional newline. Some flexibility
Abigail>  in rules makes for more Japhs. Printing to either STDOUT
Abigail>  or STDERR is allowed.
Abigail>- It doesn't print anything else.
Abigail>- The program uses at most 4 lines, each line at most 80 characters.
Abigail>- It uses obscure or surprising syntax.

Fine rules for JAPH version 1.0.  I lay claim to JAPH version 0.0, though. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



Re: World's First JAPH

2001-08-22 Thread Ilmari Karonen


On Wed, 22 Aug 2001, Abigail wrote:
> 
> Using a comma and a newline gives you 26 characters, which is interesting
> because there are 26 characters in the alphabet.

print @{{split//,"buitdtcsxrprlrhognqlvkshjhweoekeuctafanPaJy,r m e z\n"}}{a..z}


> Being the one who has given several talks about Japhs, I've decreed
> that a Japh uses the following rules:
> 
>- It prints "Just another Perl Hacker" with some reasonable
>  captalization, followed by optional punctuation (comma,
>  dot) followed by an optional newline. Some flexibility
>  in rules makes for more Japhs. Printing to either STDOUT
>  or STDERR is allowed.
>- It doesn't print anything else.

So is this .sig a JAPH, then, or is it not?  :-)

-- 
# Ilmari Karonen -- http://www.sci.fi/~iltzu/
s''n4|9|21|3|n1\2||2|(_-<2_|4_`1|3\3_1\2_|3\3-_)2_|n\__/\_,_|___/\__|2\__,_|_|
1_|\___/\__|_|1_|\___|_|nn4_1\9|3|14|n4__/1-_)2_|1|5\3_`1|2_|1!1/2-_)2_|n3_|1\
___|_|2_|2_|1_|\__,_|\__|_i_\\\___|_|1)n45/n',y/n\n/\n/d,s/\d+/$"x$&/eg,print;






Re: World's First JAPH

2001-08-22 Thread Abigail

On Wed, Aug 22, 2001 at 06:30:11AM -0700, Randal L. Schwartz wrote:
> > "Andrew" == Andrew Savige <[EMAIL PROTECTED]> writes:
> 
> Andrew> Now, I have from the original source that a JAPH purist should
> Andrew> terminate it with a comma, and not a new line. :-)
> 
> I've *always* claimed that.  :-)
> 
> The nice thing is that it's also 25 characters long, and some of my
> early JAPHs did nice 5x5 rotations and transformations based on that.


Replacing a comma with a newline doesn't change the number of characters.

Using a comma and a newline gives you 26 characters, which is interesting
because there are 26 characters in the alphabet.


Being the one who has given several talks about Japhs, I've decreed
that a Japh uses the following rules:

   - It prints "Just another Perl Hacker" with some reasonable
 captalization, followed by optional punctuation (comma,
 dot) followed by an optional newline. Some flexibility
 in rules makes for more Japhs. Printing to either STDOUT
 or STDERR is allowed.
   - It doesn't print anything else.
   - The program uses at most 4 lines, each line at most 80 characters.
   - It uses obscure or surprising syntax.


Abigail



Re: World's First JAPH

2001-08-22 Thread Randal L. Schwartz

> "Andrew" == Andrew Savige <[EMAIL PROTECTED]> writes:

Andrew> Now, I have from the original source that a JAPH purist should
Andrew> terminate it with a comma, and not a new line. :-)

I've *always* claimed that.  :-)

The nice thing is that it's also 25 characters long, and some of my
early JAPHs did nice 5x5 rotations and transformations based on that.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



Re: World's First JAPH

2001-08-22 Thread Newton, Philip

Paul Johnson wrote:
> On Wed, Aug 22, 2001 at 11:48:27AM +0200, Newton, Philip wrote:
> > Ian Phillipps wrote:
> > > What *is* the world's shortest JAPH, anyway?
> > 
> > Well, if you're allowed to use modules:
> > 
> > perl -MJ -ej
> > 
> > for suitable values of J.pm and &J::j
> 
>   perl -MJ
> 
> for suitable values of J.pm and &J::import
> 
>   perl
> 
> for suitable values of PERL5OPT
> 
>   p
> 
> for suitable values of p

Oh, all right:



for suitable values of $ENV{PS1}. But that's *really* cheating.

Cheers,
Philip
-- 
Philip Newton <[EMAIL PROTECTED]>
All opinions are my own, not my employer's.
If you're not part of the solution, you're part of the precipitate.



Re: World's First JAPH

2001-08-22 Thread Newton, Philip

Ian Phillipps wrote:
> What *is* the world's shortest JAPH, anyway?

Well, if you're allowed to use modules:

perl -MJ -ej

for suitable values of J.pm and &J::j

Cheers,
Philip
-- 
Philip Newton <[EMAIL PROTECTED]>
All opinions are my own, not my employer's.
If you're not part of the solution, you're part of the precipitate.



Re: World's First JAPH

2001-08-22 Thread Ian Phillipps

On Wed, 22 Aug 2001 at 11:32:18 +1000, [EMAIL PROTECTED] wrote:

> >From [EMAIL PROTECTED] (Randal Schwartz) 1 Feb 90 22:28:58 GMT
> @a=split(/(\d)/,"4Hacker,2another3Perl1Just");shift(@a);%a=@a;
> print "@a{1..4}";

66:

%a=("",split /(\d)/,"4Hacker,2another3Perl1Just");print"@a{1..4}";

I *think* this will work with perl 2, but I don't have a copy to hand ATM
I have used pad+split in this way for real before now...

What *is* the world's shortest JAPH, anyway? I would be disappointed if
it were just 'print ""'

Ian



Re: World's First JAPH

2001-08-22 Thread Andrew . Savige

> "Andrew" == Andrew Savige <[EMAIL PROTECTED]> writes:

Andrew> The editor of the Guinness Book of Records is eager
Andrew> to identify the World's First JAPH.

Randal L. Schwartz wrote:
> Is this for real?  So far, I'm thinking it's all an interesting
> facade.  But are you really TALKING to someone?

Alas, I am only talking to myself. In the near term, I suppose
it is unlikely the Guinness Book of Records will add a JAPH
section -- unless a Perl Monger gets the editor's job :-).

Randal L. Schwartz wrote:
> but I got tired with writing that, so I made it an executable line:
>
>print "Just another Perl hacker,"
> It's too bad we've lost the original Perl mailing list archives for
> all time, and the early CLP archives, since those got bit when the
> disk pack was either erased or crashed at convex where Tom C had been
> keeping them.

Thanks for the info.
I suppose the best we can leave the historians is that the World's
First JAPH was written by Randal L. Schwartz in 1988 and sent to
the mailing list that predated the comp.lang.perl newsgroup, and
consisted of:
  print "Just another Perl hacker,"

Now, I have from the original source that a JAPH purist should
terminate it with a comma, and not a new line. :-)

Andrew.



Re: World's First JAPH

2001-08-21 Thread Randal L. Schwartz

> "Andrew" == Andrew Savige <[EMAIL PROTECTED]> writes:

Andrew> The editor of the Guinness Book of Records is eager
Andrew> to identify the World's First JAPH.

Is this for real?  So far, I'm thinking it's all an interesting
facade.  But are you really TALKING to someone?

Andrew> In particular, he wants to know:
Andrew>  1) the JAPH content
Andrew>  2) who sent it and to whom
Andrew>  3) date/time sent
Andrew>  4) site where it was composed
Andrew> He further enquires as to whether any form of tourist
Andrew> attraction has been built at the site where it was
Andrew> composed.

Heh.

Andrew> http://history.perl.org/PerlTimeline.html states that JAPHs
Andrew> began in 1988, and suggests the first one might have been:
Andrew>  print "Just another Perl hacker,"
Andrew> Yet the earliest one listed at http://www.cpan.org/misc/japh is:

Andrew> From [EMAIL PROTECTED] (Randal Schwartz) 1 Feb 90 22:28:58 GMT
Andrew> @a=split(/(\d)/,"4Hacker,2another3Perl1Just");shift(@a);%a=@a;
Andrew> print "@a{1..4}";

Andrew> Does anyone know the World's First JAPH?

Well, I typed it, and I believe it was sent to the mailing list that
predated the comp.lang.perl newsgroup.  Concurrent and prior to that,
I was signing my Usenet posts as

Just another __ hacker,

where __ was apropos to the group I was in (Unix, C, etc).
When I got to the Perl group, of course it became

Just another Perl hacker,

but I got tired with writing that, so I made it an executable line:

print "Just another Perl hacker,"

and when I got tired of that, I started to add some convolution:

print "Just another Perl hacker," unless $I_am_crazy

and so on.  The JAPH archive picks up a bit later, since it was
covering just the interesting ones about a year or so after I started
doing something besides the plain print (or the text line before
that).

It's too bad we've lost the original Perl mailing list archives for
all time, and the early CLP archives, since those got bit when the
disk pack was either erased or crashed at convex where Tom C had been
keeping them.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!