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 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-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 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] URL: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 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 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 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?
dieJust 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 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 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?
 dieJust 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 Jas Nagra


Or sometimes:

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