Scripting competition

Jim Bufalini jim at visitrieve.com
Tue May 12 17:23:22 EDT 2009


What I think is really significant about what Jerry did is that it
demonstrates how because numbers in Rev are really "strings" that you can
perform math calculations on, and ability to interchangeably treat a chunk
as numeric or string (due to the lack of typing), Rev is able to transcend
the limitations of the math processor of a machine!

Now I don't purport to understand exactly what Jerry is doing and will have
to study it more because, before this challenge, I didn't know Fibonacci
from Liberace, and still don't. I just know they are both dead. ;-) 

But it is obvious from his code he is taking a number and using it in a
string. Nice work Jerry and someday I hope to understand why it works. ;-)

I put in 1000 and it calculated it out. (BTW for 211, it dropped from around
321 ms to 20 ms by not updating the field each time). Also, for those who
have explicitVars turned on, I forgot that if you also use GLX2, it has a
choice under the Script menu to *Declare temp vars in handler/script*. :-)
So you don't have to turn off explicitVars to work with a script like
Jerry's that doesn't have vars declared.

Aloha from Hawaii

Jim Bufalini


> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com [mailto:use-revolution-
> bounces at lists.runrev.com] On Behalf Of Jerry J
> Sent: Tuesday, May 12, 2009 8:01 AM
> To: use-revolution at lists.runrev.com
> Subject: Re: Scripting competition
> 
> > From: Sarah Reichelt <sarah.reichelt at gmail.com>
> >
> > It is vastly better to assemble all the data into a variable and only
> > put it into the field once.
> > By making that change, I got the running time for your script down
> > from 1022 milliseconds to 21!
> 
> That I knew, but to see the difference in numbers is astounding!
> 
> Thanks,
> Jerry J
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list