Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-29 Thread Trevor DeVore
On Wed, Aug 27, 2014 at 11:59 AM, Richard Gaskin wrote: > > All keys in associative arrays are strings, and currently LC only supports > associative arrays. The string may consist of numerals only, but it's > still a string. > > It would seem that Trevor rebuilds the array on deletes. It would

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-27 Thread Richard Gaskin
Bob Sneidar wrote: > Come to think of it, Trevor Devore seems to have found a way for > numerically indexed arrays to have their keys in order in sqlYoga. > Also, when you get the dgData of a data grid, the array is > “numerically indexed” by which I mean the keys of the array are > numbers, and

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-27 Thread Bob Sneidar
Good luck getting RunRev to deprecate anything. One of their huge selling points has always been backwards compatibility. Bob S On Aug 20, 2014, at 09:56 , Jacques Hausser mailto:jacques.haus...@unil.ch>> wrote: What I suggested is ONLY to deprecate (not suppress, just deprecate) the two par

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-27 Thread Bob Sneidar
Didn’t know that thanks Pete. Bob S On Aug 20, 2014, at 09:33 , Peter Haworth wrote: > I wouldn't be in favor of using {}. Problem is that LC currently accepts > those characters as delimiters for the keys of an array. I don't use them > on purpose but every now and again I notice I typed o

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-27 Thread Bob Sneidar
Come to think of it, Trevor Devore seems to have found a way for numerically indexed arrays to have their keys in order in sqlYoga. Also, when you get the dgData of a data grid, the array is “numerically indexed” by which I mean the keys of the array are numbers, and they are in numerical order.

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-27 Thread Bob Sneidar
The second command generates an error, just like adding one + 1. But that brings up an interesting point: Can an indexed array contain associative arrays and vis versa? Nice little pickle. And how do you tell, or is it important necessarily to tell? Bob S On Aug 20, 2014, at 08:23 , j...@sous

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-20 Thread Jacques Hausser
Le 20 août 2014 à 19:32, Richard Gaskin a écrit : > Jacques Hausser wrote: > > > I fully agree with Bill about the ease of implementing the necessary > > matrix operations functions in LC language - I did it, actually, for > > what I needed, like computing eigenvalues and eigenvectors. It's not

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-20 Thread William Prothero
Richard: Google “calculate eigenvectors”. There are many references and the code is pretty standard math, no licensing. It’s taught in most linear algebra classes at the college level. Bill William A. Prothero http://earthednet.org/ ___ use-livecode

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-20 Thread Richard Gaskin
Peter Haworth wrote: On Wed, Aug 20, 2014 at 9:50 AM, Richard Gaskin wrote: get tArray[1,2] Thanks for the explanation Richard. So the only difference is that they are one dimensional but the keys can kind of express multiple dimensions by being numeric and separated by commas? Are the keys

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-20 Thread Peter Haworth
On Wed, Aug 20, 2014 at 9:50 AM, Richard Gaskin wrote: > get tArray[1,2] Thanks for the explanation Richard. So the only difference is that they are one dimensional but the keys can kind of express multiple dimensions by being numeric and separated by commas? Are the keys limited to the two di

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-20 Thread Richard Gaskin
Jacques Hausser wrote: > I fully agree with Bill about the ease of implementing the necessary > matrix operations functions in LC language - I did it, actually, for > what I needed, like computing eigenvalues and eigenvectors. It's not > even so slow if your matrices are not enormous ! That's pr

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-20 Thread Jacques Hausser
Bill and Richard, I fully agree with Bill about the ease of implementing the necessary matrix operations functions in LC language - I did it, actually, for what I needed, like computing eigenvalues and eigenvectors. It's not even so slow if your matrices are not enormous ! And just today, I got

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-20 Thread Peter Haworth
Forgot to say that I'm not sure I see the need for indexed arrays. Then again, I'm also not sure I understand the difference. If it's just that deleting a key shuffles all the other keys up, it's pretty trivial to do that in a script as is inserting a new key and shuffling the other keys down. I

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-20 Thread Richard Gaskin
Peter Haworth wrote: > I may be misunderstanding but does that imply it's still possible to > create "old style" arrays in Livecode? As a relative newcomer to LC, > I've only ever known about the current form of arrays and wouldn't > know how to set about creating one of the original arrays. An

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-20 Thread Peter Haworth
I wouldn't be in favor of using {}. Problem is that LC currently accepts those characters as delimiters for the keys of an array. I don't use them on purpose but every now and again I notice I typed one by mistake. Seems like a backwards compatibility problem. Pete lcSQL Software

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-20 Thread Peter Haworth
On Wed, Aug 20, 2014 at 6:57 AM, Richard Gaskin wrote: > > transpose command - works on the old style arrays only. I wonder > > why they don't mark those commands a deprecated? > > Because they still work and are supported for the foreseeable future. Hi Richard, I may be misunderstanding but d

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-20 Thread Earthednet-wp
Richard, I'm still pretty new to livecode, so my first exposure to LC arrays left me a bit skeptical. I am an experienced Director programmer and had gotten very fluent with lingo "property lists", which is the closest analogy to the LC array. In Lingo (Director's main language), there are state

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-20 Thread jbv
I was thinking : set the indexedarray of myArray to true set the indexedarray of myArray to false but then what happens when you switch that property from true to false for the same array within a handler ? Same question for "{}" notation : what happens when the same handler contains these 2 succ

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-20 Thread Bob Sneidar
How about using {} instead of []? Bob S On Aug 20, 2014, at 07:24 , Richard Gaskin mailto:ambassa...@fourthworld.com>> wrote: So if we were to propose that LiveCode add indexed arrays, the first thing we'll want to do is come up with the syntax for specifying those when those are what we wan

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-20 Thread Richard Gaskin
Across many programming languages we see two primary types of arrays: indexed and associative. Both are useful, each with their own strengths and weaknesses. Neither is broken, and nether is a complete superset of the other. All arrays offer a single variable as a collection of pointers to

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-20 Thread Richard Gaskin
Peter Haworth wrote: > On Tue, Aug 19, 2014 at 5:35 PM, Alex Tweedly wrote: > >> But you get them (I think) just with "add", etc. > > Yes, thanks Alex, I missed that. It seems that multiply also works > that way so I guess the matrixMultiply command must be like the > transpose command - works o

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-20 Thread Graham Samuel
Thanks to thanks to Peter Haworth, Alex Tweedly and Jacques Hausser for helping me understand why i'm confused! I have tried to start a conversation on the improve list about Jacques' suggestion. Graham On 20 Aug 2014, at 10:02, Jacques Hausser wrote: > > Le 20 août 2014 à 03:48, Peter Hawor

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-20 Thread Jacques Hausser
Le 20 août 2014 à 03:48, Peter Haworth a écrit : > Yes, thanks Alex, I missed that. It seems that multiply also works that > way so I guess the matrixMultiply command must be like the transpose > command - works on the old style arrays only. I wonder why they don't mark > those commands a depr

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-19 Thread Peter Haworth
On Tue, Aug 19, 2014 at 5:35 PM, Alex Tweedly wrote: > But you get them (I think) just with "add", etc. Yes, thanks Alex, I missed that. It seems that multiply also works that way so I guess the matrixMultiply command must be like the transpose command - works on the old style arrays only. I

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-19 Thread Alex Tweedly
On 20/08/2014 00:58, Peter Haworth wrote: There's also the matrixMultiply command. It only works on numerically-keyed, single dimension arrays. Not sure why there isn't a matrixAdd/Subtract/Divide/etc but there's no mention of them in the dictionary. But you get them (I think) just with "add

Re: Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-19 Thread Peter Haworth
Hi Graham, See below for what I can contribute to this Pete lcSQL Software Home of lcStackBrowser and SQLiteAdmin On Tue, Aug 19, 2014 at 1:44 PM, Graham Samuel > > > > In LC, I think (but I

Arrays in LC [was: Re: [TAO] value() to obtain pointer functionality]

2014-08-19 Thread Graham Samuel
This is long, so skip it if you're in a hurry... Long ago, in use-list terms, when I was up to my neck in visitors (in one country) and a new baby (in another), I read Richard's post below and it made me think how little I understand LC arrays. Now the visitors have gone and the baby has put on