Re: Load-Bearing Warnings

2005-02-02 Thread Abigail
On Tue, Sep 14, 2004 at 07:40:37AM +0300, Gaal Yahas wrote:
 
 Anyway, since most systems don't have it either, I almost always put -w
 on the #! line even if my script is bound to run on 5.8, which supports
 the warnings pragma, to exploit the behavior you encountered here. Looks
 like I wasn't the only one.


I'd prefer to put -- there instead.



Abigail


pgpapui2lkHEz.pgp
Description: PGP signature


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 beast was often a challenge.  Fortunately, I
haven't had to use that hardware in a long, long time (~1989)!

--
Eric Krohn


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 able to dock to easily.

Of course it would!

  =
   |
   +
   |

Larry's probably been there a couple of times...

 Examples:
   print -+-'23a'# prints 23
   print -+-'3.00'   # prints 3=09
   print -+-'1.2e3'  # prints 1200
 =09
 I know 0+ does the trick too, but binary + has a relatively low
 precedence. Perl will automatically numerify the arguments of the *
 operator but won't do so for x, !~ or =3D~. Hence this operator is =
 useful
 for removing unsightly parenthesises from some expressions.
 
   print 0+'20GBP'   x 3;  # Wrong. Prints 20   =3D=3D
 0+20GBP20GBP20GBP
   print (0+'20GBP') x 3;  # Wrong. x 3 is applied to the return of
 print
   print((0+'20GBP') x 3); # Right, but too Lispy=20
   print -+-'20GBP'  x 3;  # Right. Spacestation to the rescue!
 
 Unfortunately -+- is bugged [*], but I'll leave these as gotcha's for
 your production code. :-)
 
 
 
 Cheers,
 
 Alistair
 
 [*] You might want to consider: print-+- '-2B'  x 5;  # Bug?
 
 
 ---
 
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D
 Registered Office:
 Marks and Spencer plc
 Waterside House
 35 North Wharf Road
 London
 W2 1NW
 
 Registered No. 214436 in England and Wales.
 
 Telephone (020) 7935 4422
 =46acsimile (020) 7487 2670
 
 www.marksandspencer.com
 
 Please note that electronic mail may be monitored.
 
 This e-mail is confidential. If you received it by mistake, please =
 let us know and then delete it from your system; you should not =
 copy, disclose, or distribute its contents to anyone nor act in =
 reliance on this e-mail, as this is prohibited and may be unlawful.
--
Jose Alves de Castro [EMAIL PROTECTED]
  http://jose-castro.org/


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 during a golf tournament (anyone remember
 which one?).
 
 IIRC, Ton's ~- invention allows you to eliminate the parens in:
 
 $y = ($x-1)*4;
 
 by using instead:
 
 $y = ~-$x*4;
 
 saving a whopping two strokes. This trick should work on any
 twos complement machine -- and I'm not aware of any perl running
 on any non twos complement machine.

will not work if $x  0

 
 /-\
 
 
 Find local movie times and trailers on Yahoo! Movies.
 http://au.movies.yahoo.com
 


-- 
Vladi Belperchinov-Shabanski [EMAIL PROTECTED] [EMAIL PROTECTED]
Personal home page at http://cade.datamax.bg/
DataMax SA   http://www.datamax.bg
there is still one truth on which we can depend
we've started something we can never end


pgpXeOAMawvJG.pgp
Description: PGP signature


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
=()=  goatse
~-inchworm on a stick high-precedence numification
~~inchwormscalar
@{[]}   join $, ...
-+-   spacestationhigh-precedence numification
Not bad for a start.
Hey Philippe, why don't you give the name we found for @{[]} ?
Sébastien Aperghis-Tramoni
 -- - --- -- - -- - --- -- - --- -- - --[ http://maddingue.org ]
Close the world, txEn eht nepO


Re: Secret operators

2005-02-02 Thread Quantum Mechanic

--- Philippe 'BooK' Bruhat [EMAIL PROTECTED]
wrote:
 
 symbolnicknameRole
 --
 =   spaceship   documented
 operator
 
 0+venus   numification
 }{eskimo greeting END{} in
 one-liners
 =()=  goatse
 ~-inchworm on a stick
 high-precedence numification
 ~~inchwormscalar
 @{[]}   join $, ...
 -+-   spacestation   
 high-precedence numification
 

Other naming suggestions:

 ~- inchworm
or cotton candy (on a stick)
 ~~ caterpillar
 @{[]}cyclops (one eye with eyebrows,
mustache, and square mouth)
 -+-cross-hair (or half cross-hair)
or vanishing point (horizon line)
or reticule
 ]-[   Frowning Sam (resembles the Muppet
named Sam the Eagle)
Beaker (the nerdish Muppet with the
perpetual surprised look)


=
~~
Quantum Mechanics: The dreams stuff is made of



__ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 



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
 http://groups-beta.google.com/group/comp.lang.perl/msg/1d82c7c3f3e94266

 y///c aka Abigail's Length Horror The Abigaillate 1990s

Although I agree about the name, the inventor seems to have been The
Hall, Jun 22 1996
 http://groups-beta.google.com/group/comp.lang.perl.misc/msg/7680c5d579b5fc23

 stuff value into $\ for printing  The van der Pijll  2001

I'm almost sure that I've seen a very early post by Larry, Randal, or
Tom Christiansen (most probably Larry), where this trick is used. I did
come up with it independently, though.

gr,Eu


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: http://www.chrisdolan.net/public.key


PGP.sig
Description: This is a digitally signed message part


Re: Load-Bearing Warnings

2005-02-02 Thread Robert G. Werner
Abigail wrote:
On Tue, Sep 14, 2004 at 07:40:37AM +0300, Gaal Yahas wrote:
Anyway, since most systems don't have it either, I almost always put -w
on the #! line even if my script is bound to run on 5.8, which supports
the warnings pragma, to exploit the behavior you encountered here. Looks
like I wasn't the only one.

I'd prefer to put -- there instead.

Abigail
Hasn't perl had the warnings pragma since 5.6.1?
--
In Reach Technology:http://www.inreachtech.net/
Robert G. Werner
[EMAIL PROTECTED]
Tel: 559.304.5122
I WILL NOT SHOW OFF
I WILL NOT SHOW OFF
I WILL NOT SHOW OFF
I WILL NOT SHOW OFF
	Bart Simpson on chalkboard in episode 7F21


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
frogs face.

-- 
Bart.