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

Re: [MacPerl] Speaking of Pi



> Yay! This is great. And now that you've done it (even if there might 
> be some further tweaks), it seems way easier than I expected, which 
> attests to your skill, [Mac]Perl's capabilities, and the Mac's 
> coolitude. I'll be high in the Sierras for the next several days 
> (*without electronics*), so when I get back I'll find a suitable 
> irrational prize for you...

Well, it can't be my skill, 'cause I'm not *THAT* good.  The Mac is cool, 
but that goes without saying.  That leaves MacPerl, and you'll get no 
arguments from me there.

When all is said and done, the script just sort of *happened*.  Creede 
threw out the reasonably long iteration of pi I needed, and I already had 
the speaking routines. A little tweeking to get the speech manager to say 
the numbers one at a time, drop in some recycled code, and I was halfway 
there!

Right now, the conditional that tests the return value from MacPerl::Ask, 
doesn't check for valid numeric values (ie, it won't complain if you 
enter text)  It does check to see if your number is within the valid 
range.  I could generate digits of pi algorithmically, slowing the 
execution a LOT, but allowing aribitrary precision.

It's a pretty simple hack actually.  My attempt to keep the discussion of 
Pi on topic (thus maintaining my near-legendary reputation for being 
off-topic and on-topic at the same time
 ;-).

Can we put it on the MacPerl Pages?

--B

# Fungal Parataxonomy                   Mycology Information (Mycoinfo)
# Webmaster, Staff Writer      **The World's First Mycology E-Journal**   
# <mailto:webmaster@mycoinfo.com>            <http://www.mycoinfo.com/> 
#
# First they ignore you. Then they laugh at you. Then they fight you.
# Then you win.                                     --Mohandas Gandhi


===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org