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

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

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

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

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

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

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

RE: Secret operators

2005-02-04 Thread McGlinchy, Alistair
Yitzchak Scott-Thoennes [mailto:[EMAIL PROTECTED] wrote: On Tue, Feb 01, 2005 at 09:02:56PM -, McGlinchy, Alistair wrote: Unfortunately -+- is bugged [*], but I'll leave these as gotcha's for your production code. :-) [*] You might want to consider: print-+- '-2B' x 5;

Re: Secret operators

2005-02-04 Thread Rafael Garcia-Suarez
José Castro wrote in perl.fwp : Apart from the secret eskimo greeting and the goatse operator, can anyone tell me about other secret operators? I think nobody mentioned the toothpick operator yet. /\/\// Exists also in extra-large version. -- Tsk tsk, that's not an O'Reilly title. You

Re: Secret operators

2005-02-04 Thread Yanick Champoux
Andrew Savige wrote: @{[]} join $, ... My better half proposes to call this one the papoose operator. Joy, `/anick

Re: Secret operators

2005-02-04 Thread Philippe 'BooK' Bruhat
Le vendredi 04 février 2005 à 09:42, Yanick Champoux écrivait: Andrew Savige wrote: @{[]} join $, ... My better half proposes to call this one the papoose operator. Or the trolley operator (as in supermarkets), where you stuff everything you want to

Re: Secret operators

2005-02-03 Thread Philippe 'BooK' Bruhat
Le mercredi 02 février 2005 à 21:36, Sébastien Aperghis-Tramoni écrivait: Philippe 'BooK' Bruhat wrote: So we have : symbolnicknameRole -- = spaceship documented operator 0+venus

Re: Secret operators

2005-02-03 Thread Randal L. Schwartz
Eugene == Eugene van der Pijll [EMAIL PROTECTED] writes: @{[]} aka ???The Schwartz early 1990s Eugene The Larry, May 1 1994 Eugene http://groups-beta.google.com/group/comp.lang.perl/msg/1d82c7c3f3e94266 The array version was actually discussed in private email

Re: Secret operators

2005-02-03 Thread Yitzchak Scott-Thoennes
On Wed, Feb 02, 2005 at 04:20:05PM +0200, Vladi Belperchinov-Shabanski wrote: On Wed, 2 Feb 2005 12:33:35 +1100 (EST) Andrew Savige [EMAIL PROTECTED] wrote: Jos_ Castro wrote: Apart from the secret eskimo greeting and the goatse operator, can anyone tell me about other secret

Re: Secret operators

2005-02-02 Thread Eric Krohn
Andrew Savige wrote: twos complement machine -- and I'm not aware of any perl running on any non twos complement machine. I ported Perl 1.0 (and probably 2.0) to UNIX 1100 (UNIX as guest OS on Univac 1100). The machine was 36-bit, ones complement, word addressable. Porting software to this

Re: Secret operators

2005-02-02 Thread José Castro
* McGlinchy, Alistair ([EMAIL PROTECTED]) wrote: Hi All, High in fun, but low in usefulness is -+- , a high precedence string numerifier. It sort of looks like an A C Clarke style spacestation so that's what I've been calling it. Although I'm not too sure that Larry's spaceship =3D would be

Re: Secret operators

2005-02-02 Thread Vladi Belperchinov-Shabanski
On Wed, 2 Feb 2005 12:33:35 +1100 (EST) Andrew Savige [EMAIL PROTECTED] wrote: Jos_ Castro wrote: Apart from the secret eskimo greeting and the goatse operator, can anyone tell me about other secret operators? Let's not forget the Ton Hospel high-precedence decrement operator ~- invented

Re: Secret operators

2005-02-02 Thread Sébastien Aperghis-Tramoni
Philippe 'BooK' Bruhat wrote: So we have : symbolnicknameRole -- = spaceship documented operator 0+venus numification }{eskimo greeting END{} in one-liners

Re: Secret operators

2005-02-02 Thread Quantum Mechanic
--- Philippe 'BooK' Bruhat [EMAIL PROTECTED] wrote: symbolnicknameRole -- = spaceship documented operator 0+venus numification }{eskimo greeting

Re: Secret operators

2005-02-02 Thread Eugene van der Pijll
Andrew Savige schreef: The table below is based on wild guesswork. If there are any oldbies listening, please chime in with corrections. Not an oldbie, but... @{[]} aka ???The Schwartz early 1990s The Larry, May 1 1994

Re: Secret operators

2005-02-02 Thread Chris Dolan
On Feb 2, 2005, at 2:36 PM, Sébastien Aperghis-Tramoni wrote: Hey Philippe, why don't you give the name we found for @{[]} ? It looks like a guy lying on his side in a straightjacket to me. Chris -- Chris Dolan, Software Developer, www.chrisdolan.net Public key:

Re: Secret operators

2005-02-02 Thread Bart Lateur
On Tue, 1 Feb 2005 11:49:57 +, José Castro wrote:can anyone tell me about other secret operators? I just produced this in my own code, I think it would qualify. Take this expression in list context: cond ? foo : () I'm talking about the 3 characters at the end: : (). I'd call it a

Re: Secret operators

2005-02-01 Thread Philippe 'BooK' Bruhat
Le mardi 01 février 2005 à 11:49, José Castro écrivait: Hi, guys. Apart from the secret eskimo greeting and the goatse operator, can anyone tell me about other secret operators? Examples: eskimo: }{ goatse: =()= eskimo usage: perl -ne '}{print $.' goatse usage: perl -e

Re: Secret operators

2005-02-01 Thread Vladi Belperchinov-Shabanski
On Tue, 1 Feb 2005 11:49:57 + Jos_ Castro [EMAIL PROTECTED] wrote: Hi, guys. Apart from the secret eskimo greeting and the goatse operator, can anyone tell me about other secret operators? Examples: eskimo: }{ goatse: =()= eskimo usage: perl -ne '}{print $.' perl

Re: Secret operators

2005-02-01 Thread Philippe 'BooK' Bruhat
Le mardi 01 février 2005 à 18:57, Vladi Belperchinov-Shabanski écrivait: On Tue, 1 Feb 2005 15:57:33 +0100 [EMAIL PROTECTED] (Philippe 'BooK' Bruhat) wrote: There's also @{[]} but I don't know f it has a name. Usage: print splatt @{[ ... ]} pow where ... is any valid expression,

Re: Secret operators

2005-02-01 Thread Andy_Bach
Can I get that just a little slower? $b = () = /u/g; is the same as: @a = /u/g; $b = @a; I understand what happens, but it appears to be assigning to an empty list - is that filling up the list, so to speak? Or is it just that it makes the 'result' of /u/g assign in array/list

Re: Secret operators

2005-02-01 Thread Georg Moritz
From the keyboard of [EMAIL PROTECTED] [01.02.05,11:15]: Can I get that just a little slower? $b = () = /u/g; is the same as: @a = /u/g; $b = @a; it's not the same. perl -le '$_=foo; print $b =()= /o/g' 2 perl -le '$_=foo; print @b =()= /o/g' perl -le '$_=foo; print /o/g' oo

Re: Secret operators

2005-02-01 Thread José Castro
* Ronald J Kimball ([EMAIL PROTECTED]) wrote: You can assign two elements to a one-element list: ($foo) = (1, 2); You can even assign two elements to an empty list: () = (1, 2); In each case, any extra elements are simply discarded, but the result of the assignment in scalar

Re: Secret operators

2005-02-01 Thread Jeff Yoak
On Tue, 2005-02-01 at 03:49, Jos Castro wrote: Hi, guys. Apart from the secret eskimo greeting and the goatse operator, can anyone tell me about other secret operators? Examples: eskimo: }{ goatse: =()= eskimo usage: perl -ne '}{print $.' This is wonderfully deranged. I

Re: Secret operators

2005-02-01 Thread José Castro
* Jeff Yoak ([EMAIL PROTECTED]) wrote: eskimo usage: perl -ne '}{print $.' This is wonderfully deranged. I haven't seen it before, but it was immediately clear what it does. goatse usage: perl -e '$_=zbrughau;$b=()=/u/g;print $b' This is probably even more wonderfully deranged as

Re: Secret operators

2005-02-01 Thread Quantum Mechanic
--- José Castro [EMAIL PROTECTED] wrote: * Quantum Mechanic ([EMAIL PROTECTED]) wrote: $foo = ($bar) = (9,8,7); RHS list ($bar) array $bar - 7 (rest discarded) No, no, no. $bar - 9 Yes, that was a typo -- thanks. It's the same as $foo = ($bar,

Re: Secret operators

2005-02-01 Thread Andrew Savige
José Castro wrote: Apart from the secret eskimo greeting and the goatse operator, can anyone tell me about other secret operators? Let's not forget the Ton Hospel high-precedence decrement operator ~- invented during a golf tournament (anyone remember which one?). IIRC, Ton's ~- invention

Re: Secret operators

2005-02-01 Thread Andrew Savige
Philippe 'BooK' Bruhat wrote: So we have : symbolnicknameRole -- = spaceship documented operator 0+venus numification }{eskimo greeting END{} in