Re: Secret operators: the documentation

2012-04-06 Thread Michael R . Wolf
On Mar 16, 2012, at 4:44 AM, Philippe Bruhat (BooK) wrote:

 A few years back, I started to write a manual page about Perl secret 
 operators,
 with the goal of getting it into the official Perl documentation at some 
 point.



A few comments…

1.  It would be nice to do a bit of documentation on *why* or *how* some of 
these work.  Perhaps a Deparse would be sufficient (as in Eskimo greeting), but 
English is also a good tool.

For starters, I didn't figure out how Ornate double-bladed sword worked.  I'm 
sure I could have created the trail alone, but it would be nice to follow 
someone else's blaze.

2. Given how dangerous this one could be (to a psyche) if researched deeply 
(years of therapy…)

 =( )=Goatse  scalar / list context
 
I'd suggest another name -- Saturn.  Yes, snicker if you will.  Saturn *is* the 
son of the Greek deity Uranus, but that's only a 2nd order, inside joke.  The 
operator looks like Saturn, even when spaces are inserted (as will be likely 
with syntax formatting editors or perltidy(1))!

=( )=Saturn   scalar / list context
= ( ) =  Saturn   scalar / list context

Keep the old name if you wish, but add one that's more psychologically healthy, 
too!!!  (P.S.  Thanks for the warning.  That's just plain *responsible* 
behavior to the community!!!  One image could ruin someone's whole view of 
Perl.)

Michael

-- 
Michael R. Wolf
All mammals learn by playing!
michaelrw...@att.net





Re: Secret operators: the documentation

2012-04-03 Thread Andrew Savige


I wonder if --$| and $|--, very popular in golf, and described
by japhy as the magical flip flop variable at:

 http://www.nntp.perl.org/group/perl.fwp/2002/01/msg1367.html

qualifies as a secret operator?

/-\


Re: Secret operators: the documentation

2012-04-03 Thread Philippe Bruhat (BooK)
On Mon, Apr 02, 2012 at 06:28:56PM +0200, Alexis Sukrieh wrote:
 Le 16 mars 2012 12:44, Philippe Bruhat (BooK)
 philippe.bru...@free.fr a écrit :
  So,
 
  A few years back, I started to write a manual page about Perl secret 
  operators,
  with the goal of getting it into the official Perl documentation at some 
  point.
 [...]
  Patches welcome.
 
  When it's stabilized enough, I'll send a patch to p5p.
 
 Nice work :)
 
 I have a question though;
 
 Did you change your mind about the A word of warning section? It
 sounds that it won't fit well in the official Perl documentation ;)
 

I've pushed a branch on the Perl source tree, and Abigail already
patched the module a bit.
http://perl5.git.perl.org/perl.git/shortlog/refs/heads/book/perlsecret

The word of warning still holds. The page is specifically not listed
in the main perl.pod manual page. The idea is to hide it a little, so that
people who know about it can easily point inquiring minds to it, while not
making these official.

I also wrote a test script (t/japh/secret.t) and it helped a lot in refining
exactly how and when each of those worked.

-- 
 Philippe Bruhat (BooK)

 Did I err?  (Groo, in too many issues to count - ...and *YES* he did!)


Re: Secret operators: the documentation

2012-04-03 Thread Philippe Bruhat (BooK)
On Tue, Apr 03, 2012 at 03:43:54AM -0700, Andrew Savige wrote:
 
 
 I wonder if --$| and $|--, very popular in golf, and described
 by japhy as the magical flip flop variable at:
 
  http://www.nntp.perl.org/group/perl.fwp/2002/01/msg1367.html
 
 qualifies as a secret operator?
 

I have had several requests for adding more obscure constructs (see
https://github.com/book/perlsecret/issues). My rule has been to keep
only the well-known operators, or the ones that had a nickname that
corresponded to their looks, not their function.

Under that rulle, the magical flip-flop wouldn't have fit.

Anyway, I guess others can decide what gets in when the branch merged
into blead.

-- 
 Philippe Bruhat (BooK)

 Out of the worst can often come the best.
(Moral from Groo The Wanderer #57 (Epic))


Re: Secret operators: the documentation

2012-04-03 Thread John Douglas Porter

Philippe Bruhat (BooK) philippe.bru...@free.fr wrote:
 Andrew Savige wrote:
  
  I wonder if --$| and $|--, ... described
  by japhy as the magical flip flop variable
  qualifies as a secret operator?
 
 My rule has been to keep
 only the well-known operators, or the ones that had a
 nickname that
 corresponded to their looks, not their function.
 
 Under that rulle, the magical flip-flop wouldn't have fit.

Not to mention the fact that it's not an operator. :-)

-- 
john many jars porter



Re: Secret operators: the documentation

2012-04-02 Thread Alexis Sukrieh
Le 16 mars 2012 12:44, Philippe Bruhat (BooK)
philippe.bru...@free.fr a écrit :
 So,

 A few years back, I started to write a manual page about Perl secret 
 operators,
 with the goal of getting it into the official Perl documentation at some 
 point.
[...]
 Patches welcome.

 When it's stabilized enough, I'll send a patch to p5p.

Nice work :)

I have a question though;

Did you change your mind about the A word of warning section? It
sounds that it won't fit well in the official Perl documentation ;)

My two cents!


Re: Secret operators: the documentation

2012-04-02 Thread Pau Amma
On Mon, April 2, 2012 4:28 pm, Alexis Sukrieh wrote:
 Le 16 mars 2012 12:44, Philippe Bruhat (BooK)
 philippe.bru...@free.fr a écrit :
 So,

 A few years back, I started to write a manual page about Perl secret
 operators,
 [...]
 I have a question though;

 Did you change your mind about the A word of warning section? It
 sounds that it won't fit well in the official Perl documentation ;)

Version I saw last week-end includes:

===
You're welcome to try these at home, but they might not be safe for work!
===

Is that what you were thinking of?



Re: Secret operators: the documentation

2012-03-16 Thread Daniel Bruder
Also don't forget it is expandable, and as it is, still (erotic?) perl :-)

perl -e 'print ~~ =  = ~~ = ~~+0'


On 16 March 2012 12:44, Philippe Bruhat (BooK) philippe.bru...@free.frwrote:

 So,

 A few years back, I started to write a manual page about Perl secret
 operators,
 with the goal of getting it into the official Perl documentation at some
 point.

 Somehow I got interested in that again, and started to really work on it.
 The current work in progress is availabled at:
 https://github.com/book/perlsecret

 I've already included most of the feedback from the discussions on ~~.

 Patches welcome.

 When it's stabilized enough, I'll send a patch to p5p.

 --
  Philippe Bruhat (BooK)

  Too many believe only in the belief.
(Moral from Groo The Wanderer #58
 (Epic))