home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / alt / hackers / 1359 < prev    next >
Encoding:
Internet Message Format  |  1992-09-02  |  1.5 KB

  1. Xref: sparky alt.hackers:1359 talk.bizarre:28733
  2. Newsgroups: alt.hackers,talk.bizarre
  3. Path: sparky!uunet!ulowell!news.bbn.com!usc!cs.utexas.edu!hellgate.utah.edu!fcom.cc.utah.edu!fcom.cc.utah.edu!jon
  4. From: jon@zeus.med.utah.edu (Jonathan Byrd)
  5. Subject: Re: Your very own Magic 8 Ball simulator
  6. In-Reply-To: jim@rand.org's message of 3 Sep 92 04:05:43 GMT
  7. Message-ID: <JON.92Sep3103952@zeus.med.utah.edu>
  8. Sender: news@fcom.cc.utah.edu
  9. Organization: University of Utah
  10. References: <1992Sep1.232614.15386@wdl.loral.com>
  11.     <1992Sep3.014309.1325@terminator.cc.umich.edu> <3760@randvax.rand.org>
  12. Date: 3 Sep 92 10:39:52
  13. Approved: Yes!
  14. Lines: 40
  15.  
  16. In article <3760@randvax.rand.org> jim@rand.org (Jim Gillogly) writes:
  17.  
  18.    #!/usr/bin/perl
  19.  
  20.    srand(time|$$);
  21.    print
  22.    (
  23.        "YES.",
  24.        "You may rely on it.",
  25.        "It is decidedly so.",
  26.        "Yes, definitely.",
  27.        "Without a doubt.",
  28.        "It is certain.",
  29.        "Most likely.",
  30.        "Outlook good.",
  31.        "Signs point to `yes.'",
  32.        "As I see it, yes.",
  33.        "Reply hazy, try again.",
  34.        "Concentrate and ask again.",
  35.        "Ask again later.",
  36.        "Better not tell you now.",
  37.        "Cannot predict now.",
  38.        "My sources say, `No.'",
  39.        "Very doubtful.",
  40.        "Don't count on it.",
  41.        "Outlook not so good.",
  42.        "My reply is: No."
  43.    )[rand(20)] . "\n";
  44.  
  45. pah!  you're not done yet.  where the fuck is the part that parses the
  46. input?
  47.  
  48. example:
  49.  
  50. if(x = strcmp(input_string, "Should I staple myself to the carpet and
  51. beg mommy to vacuum-fuck me?") == 0) printf("Without a doubt.\n")
  52.  
  53. --
  54. jonathan byrd
  55. jon@apollo.med.utah.edu
  56.