Fun (was Re: Cubist's first bug report)

Monte Goulding monte at appisle.net
Mon Jun 6 01:03:26 CEST 2016


> On 6 Jun 2016, at 6:06 AM, dsc at swcp.com wrote:
> 
>  I suspect that random(16) is being evaluated twice based on a first glance at the pattern.

I’ve taken a little look into it and yes it does appear the chunk is being evaluated twice:

Add left to right
  - get value to add by and evaluate chunk if any
  - get destination value and evaluate chunk if any
  - add
  - set destination value and evaluate chunk if any

So I think we can both fix this quirk and optimise things that mutate rather than replace the destination chunk (add, subtract, multiply, divide commands… are there others?) by setting the previously marked chunk rather than re-evaluating. Please submit a bug report so we can look into it further and work out whether I’m right or I just don’t know my way around the engine well enough yet ;-)

Cheers

Monte


More information about the use-livecode mailing list