[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[FWP] inscrutable code formatting (was 100 point words)



At 2:57 PM -0700 7/23/99, lr@hpl.hp.com wrote:
>    perl -ne'$t=0;$t+=ord(uc)-64 for split//;$t-46||print'
>
>Do we have a winner yet?

No, but we have a loser (me), in that I have to get my eyeballs
back in place after trying to unscrew this inscrutable[1] bit of
code.  I'm not trying to be a party-pooper; I realize that this
was part of a series of "how ters [sic] can I make this?" code
submissions.  Nonetheless, _I_ would appreciate it if authors
would include expanded versions of this genre of code, as:

   perl -ne'$t=0;$t+=ord(uc)-64 for split//;$t-46||print'

   perl -ne '
     $t =  0;
     $t += ord(uc) - 64 for split //;
     $t -  46 || print
   '

Tight code is more interesting than missing whitespace (IMHO :).

-r

[1]  "The Sexual Urge of the Camel" is attributed to A.P. Herbert,
      but a number of alternative versions (found in a Metacrawler
      search) indicate that there's clearly MTOW _not_ TDI...

  The sexual urge of the camel
  Is stronger than anyone thinks
  One night, in a moment of passion,
  It attempted to bugger the Sphinx.
 
  But the Sphinx's posterior orifice
  Is lined with the sands of the Nile,
  Which accounts for the hump on the camel
  And the Sphinx's inscrutable smile.

Alternate version 1:

  The sexual urge of the camel
  is greater than anyone thinks;
  After several months in the desert
  it attempted a rape on the Sphinx.

  Now the intimate parts of that lady
  are sunk 'neath the sands of the Nile
  Hence the hump on the back of the camel
  And the Sphinx's inscrutable smile!

Alternate version 2:

   The sexual urge of the camel
   is greater than most people think.
   In moments of unrepressed passion,
   it makes rude attempts at the Sphynx.

   But the Sphynx's posterior entrance
   is blocked by the sands of the Nile,
   which accounts for the hump in the camel
   and the Sphynx's inscrutable smile.

Alternate version 3:

  The sexual urge of the camel
  is greater than anyone thinks,
  For this preposterous mammal
  attempted to roger the Sphinx!

  Now the Sphinx's exterior orifice
  was clogged with the sands of the Nile,
  Which accounts for the hump on the camel
  and the Sphinx's inscrutable smile!

Alternate version 4:

  The sexual urge of the camel
  Is greater than anyone thinks.
  And often in moments of passion,
  He attempts to make love to the Sphinx.

  But the Sphinx's posterior entrance
  Is blocked by the sands of the Nile.
  Which accounts for the hump on the camel
  And the Sphinx's inscrutable smile!
--
Rich Morin:          rdm@cfcl.com, +1 650-873-7841, http://www.ptf.com/~rdm
Prime Time Freeware: info@ptf.com, +1 408-433-9662, http://www.ptf.com
MacPerl: http://www.macperl.com,       http://www.ptf.com/ptf/products/MPPE
MkLinux: http://www.mklinux.apple.com, http://www.ptf.com/ptf/products/MKLP

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe