develooper Front page | perl.fwp | Postings from November 2007

Re: new "!"-based secret operators

Thread Previous | Thread Next
From:
Uri Guttman
Date:
November 30, 2007 08:58
Subject:
Re: new "!"-based secret operators
Message ID:
x7eje7pt6m.fsf@mail.sysarch.com
>>>>> "DK" == Dmitry Karasik <dmitry@karasik.eu.org> writes:

  DK>   $x +=!! $y  is same as $x++ if $y;
  DK>   $x -=!! $y       --    $x-- if $y;
  DK>   $x +=!  $y       --    $x++ unless $y;
  DK>   $x -=!  $y       --    $x-- unless $y;

  DK>    $n = int( $items / $max) + (( $items % $max) ? 1 : 0);
  DK>    $n = int( $items / $max) +!!+ $items % $max;

  DK>    0 !~! 0 = 1
  DK>    0 !~! 1 = 0
  DK>    1 !~! 0 = 0
  DK>    1 !~! 1 = 0

  DK>     !()            -- true  
  DK>     !%!            -- false

  DK> These two deserve to be named the Mongolian constants, because !%!
  DK> really resembles that soyombo thingy on the mongolian national flag
  DK> ( http://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Flag_of_Mongolia.svg/125px-Flag_of_Mongolia.svg.png ).
  DK> I was even tempted to say Mongolian Tao constants, because the thingy actually
  DK> contains the yin-yang sign, which can be also thought as a graphical representation of
  DK> a non-boolean, yet definitely binary logic :)

you, sir, have altogether too much free time!! would you like to stop
wasting your life and help improve some cpan modules of mine? :)

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About