Variable Typing (Was: An interesting programming challenge)

2015-04-12 Thread dunbarx
...@mangomultimedia.com To: How to use LiveCode use-livecode@lists.runrev.com Sent: Sat, Apr 11, 2015 4:08 pm Subject: Re: An interesting programming challenge On Saturday, April 11, 2015, Peter M. Brigham pmb...@gmail.com wrote: Wait, so LC8 will have typed variables? We will have to declare every

Re: An interesting programming challenge

2015-04-11 Thread Peter M. Brigham
Wait, so LC8 will have typed variables? We will have to declare every variable with its type before we use it? Or will this be optional? -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Apr 11, 2015, at 1:56 PM, Colin Holgate wrote: There’s some relevance to

Re: An interesting programming challenge

2015-04-11 Thread Geoff Canyon
On Sat, Apr 11, 2015 at 1:43 PM, Colin Holgate colinholg...@gmail.com wrote: I think it’s specifically to do with widgets you might make. Not normal stack scripts. And for now, widget code is actually slower than regular livecode -- it's expected to improve.

Re: An interesting programming challenge

2015-04-11 Thread Colin Holgate
I think it’s specifically to do with widgets you might make. Not normal stack scripts. On Apr 11, 2015, at 2:40 PM, Peter M. Brigham pmb...@gmail.com wrote: Wait, so LC8 will have typed variables? We will have to declare every variable with its type before we use it? Or will this be

Re: An interesting programming challenge

2015-04-11 Thread Trevor DeVore
On Saturday, April 11, 2015, Peter M. Brigham pmb...@gmail.com wrote: Wait, so LC8 will have typed variables? We will have to declare every variable with its type before we use it? Or will this be optional? Typing is optional. -- Trevor DeVore ___

Re: An interesting programming challenge

2015-04-11 Thread Colin Holgate
If I run the Javascript version on my iPad it’s typically 5 milliseconds http://colin.scienceninja.com/math/slices.html http://colin.scienceninja.com/math/slices.html On Apr 10, 2015, at 10:11 PM, Jerry Jensen j...@jhj.com wrote: On Apr 10, 2015, at 8:04 AM, Colin Holgate

Re: An interesting programming challenge

2015-04-11 Thread Colin Holgate
May have unearthed a reason for Javascript being so fast. If I run the same routine as ActionScript (the syntax is identical to Javascript for this example), the routine takes around 380 milliseconds. Still doing a good as LiveCode. But, if I change the list of numbers to be a Vector instead of

Re: An interesting programming challenge

2015-04-10 Thread Geoff Canyon
On Fri, Apr 10, 2015 at 12:02 PM, Peter Haworth p...@lcsql.com wrote: I don't think this is a fair comparison since the end results are totally different. In the array test, the result is a large number of values whereas in the simple variable test you end up with one value. I was emulating

Re: An interesting programming challenge

2015-04-10 Thread Jerry Jensen
On Apr 10, 2015, at 8:04 AM, Colin Holgate colinholg...@gmail.com wrote: I tried using Jerry’s approach under ActionScript, slightly modified to use arrays instead of strings, and it took just over 300 mS. Tried as Javascript too, and that seemed to be under 2 milliseconds! Wow! That