On 9/13/08 10:38 PM, Dick Kriesel [EMAIL PROTECTED] wrote:
Maybe the benefit of unsorted keys is faster execution. Why wait for a sort
if you don't need it?
I believe the logic in the realm of PHP and web pages and databases are
often-used functions such as
explode(' ',explode(',',
I believe that it's in the nature of hash tables (which is what Rev's
arrays are, I think) that they do not preserve the order of keys.
If so, then the engine would have to maintain an ordered index
separately. This would likely affect performance, so perhaps we
wouldn't always want it...
Also, there seems to be a speed advantage with using the multi-
dimesional arrays:
on mouseUp
put the millisecs into ts
repeat with i = 1 to 1000
repeat with j = 1 to 1000
put counting into tArray[i,j]
end repeat
end repeat
put the millisecs - ts into inTime
David Bovill wrote:
2008/9/14 Richard Gaskin ambassador at fourthworld.com
For accessing specific elements from large collections, arrays outperform
any lineoffset in lists or any other method I can think of by several orders
of magnitude.*
Read, It's a good hash mechanism. :)
When I need
On Sep 14, 2008, at 1:25 AM, Ken Ray wrote:
What benefit is it to the Rev developer (not the engine) to have
the keys
NOT sorted?
I can't think of a really good everyday example, but here's a made up
one: Suppose you're asking people for a list of possessions, and want
them to pick off
Mark-
Thanks for doing the timing on this. I believe it's not just
multidimensional arrays that are faster now, but a part of the new
engine changes is that arrays with solely numeric indices are treated
differently from associative arrays. They're about as close to the
metal as you can get and
Ken-
Saturday, September 13, 2008, 10:25:58 PM, you wrote:
What benefit is it to the Rev developer (not the engine) to have the keys
NOT sorted?
I agree. While I don't think it's a traditional role of arrays to have
their keys sorted and hash tables have their own internal key sorting,
I
2008/9/14 Richard Gaskin [EMAIL PROTECTED]
put tMyData[5] into tMySnippetA
put tMySnippetA[title]
put tMySnippetA[body]
Are there cases where putting your arrays inside of ordinal wrapper arrays
would be problematic?
Most of the time I don't want the complexity - the order I like best
From: Mark Wieder [EMAIL PROTECTED]
...
Maybe a property of arrays would do this:
set the sortorder of theDataA to empty -- unsorted, fastest
set the sortorder of theDataA to first input -- FIFO
set the sortorder of theDataA to last input -- LFIFO
set the sortorder of theDataA to alpha --
Mark you lost me on this thread somewhere:
2008/9/14 Mark Brownell [EMAIL PROTECTED]
We can have both worlds right now. If you need sorted and unsorted keys
order of entry per dimensional layer or not all you need do is add layer [9]
assuming you will never need layer 9.
Sorry what's layer
-Original Message-
From: David Bovill [EMAIL PROTECTED]
Mark - looking at your script this is NOT doing what we need. It is not
sorting the keys - it is simply sorting a list, which happens to be inside
of an array. By that I mean nothing is actually happening to the array - you
simply
This is all very clever (seriously!), but I think this thread is
simply talking about two different things. It is one thing to maintain
your own sorting information in arrays. It's another to pull the data
out of arrays, then sort it. But it's another entirely to have
sortable array. When
-Original Message-
From: Brian Yennie [EMAIL PROTECTED]
\
This is all very clever (seriously!), but I think this thread is
simply talking about two different things. It is one thing to maintain
your own sorting information in arrays. It's another to pull the data
out of arrays, then
Thank you all, for this discussion. Really. It was more informative
than the release notes could even hope to be. The exemplars of why
the new array features were so obviously useful helped me a lot in
exactly one way: I have no idea what you who promote these ``new''
features are on
Subject: Re: Arrays: new and old keys, i
Thank you all, for this discussion. Really. It was more informative
than the release notes could even hope to be. The exemplars of why
the new array features were so obviously useful helped me a lot in
exactly one way: I have no idea what you
2008/9/13 Mark Wieder [EMAIL PROTECTED]
Still not getting it here. I often do that with arrays, but I just use
a multipart key (and now I can use multidimensional array keys). I've
never needed to retrieve elements in the order added and still can't
see the utility of it. The following not
On Sep 13, 2008, at 12:36 AM, Mark Wieder wrote:
Friday, September 12, 2008, 10:22:26 AM, you wrote:
breakfast_menu
food
nameBelgian Waffles/name
price$5.95/price
descriptiontwo of our famous Belgian Waffles with
plenty of real
maple
On Sep 13, 2008, at 12:37 AM, John Vokey wrote:
Thank you all
--
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
Joe Lewis Wilkins
[EMAIL PROTECTED]
On 13 Sep 2008, at 09:37, John Vokey wrote:
Again, I ask, what have we gained by the ``new'' array features,
besides more brackets?
Maybe you're more of a hands on guy, and no explanation found on this
world will ever give you the same aha like trying it out yourself.
Barring that,
Multi-dimensional arrays are a powerful addition to Revolution as it
provides a basis for more powerful array manipulation features in the
engine moving forward. I feel that ordered keys form the basis for a
lot of those features.
Trevor DeVore
Good idea.
It's been a while but I believe
On Sep 13, 2008, at 12:22 PM, Mark Brownell wrote:
It's been a while but I believe that that ordering is how the Lists
worked in Director. You didn't assign them key names. They could
have parameters too, divided by : You just put data into an
ordered spot. To be honest I like the non
peoplelist = [[name:Tom,height:72,city:New York],
[name:Dick,height:68,city:San Francisco],
[name:Harry,height:74,city:New York]]
put peoplelist
-- [[#name: Tom, #height: 72, #city: New York], [#height:
68,#name: Dick, #city: San Francisco], [#name: Harry,
#height: 74, #city: New York]]
On Sep 13, 2008, at 12:53 PM, Mark Brownell wrote:
I'm going to do some experimenting now with Rev, or, have you
already discovered these array within array tricks in single lines
of code?
Just doing v3 update now. Will report back soon!
___
I'm going to do some experimenting now with Rev, or, have you
already discovered these array within array tricks in single lines
of code?
Just doing v3 update now. Will report back soon!
Wow, this is all coming back to me. The discussion list would fire up with two
or three chiming
On Sep 13, 2008, at 1:08 PM, Mark Brownell wrote:
Wow, this is all coming back to me. The discussion list would fire
up with two or three chiming in, in just a few seconds/minutes with
work arounds for coding with lists and parameter lists. There were
always these, beat ya moments.
I'm
-Original Message-
From: Colin Holgate [EMAIL PROTECTED]
On Sep 13, 2008, at 1:08 PM, Mark Brownell wrote:
Wow, this is all coming back to me. The discussion list would fire
up with two or three chiming in, in just a few seconds/minutes with
work arounds for coding with lists and
On Sep 13, 2008, at 12:22 PM, Mark Brownell wrote:
What about using after if you want order instead of into.
After could cause order for those that need it. It would be great
for me because I could do this:
put thisData after myArray[1][1]
put myArray[1][1][4] into holdParameterImageList
David-
Saturday, September 13, 2008, 3:41:51 AM, you wrote:
yes it is doable and not really hard. So I think we are on the same wave
length. We differ in that I'm complaining about it :)
g
For beginners - it is counter intuitive (I remember having to ask on list
about it when learning -
Trevor-
Saturday, September 13, 2008, 6:10:42 AM, you wrote:
Why force the developer to enforce an order after the fact? That is
My point is rather that there's no need to impose an order on data
that isn't ordered. Or at least not chronological order on xml data.
In addition once you have
On Sep 13, 2008, at 2:38 PM, Mark Wieder wrote:
Saturday, September 13, 2008, 6:10:42 AM, you wrote:
Why force the developer to enforce an order after the fact? That is
My point is rather that there's no need to impose an order on data
that isn't ordered. Or at least not chronological order
2008/9/13 Mark Wieder [EMAIL PROTECTED]
push title 1 onto theDataA[]
push title 2 onto theDataA[]
pop theDataA[] into tCurrentTitle
That would do me - except the most useful would be the ability to get the
full ordered index.
put the ordered keys of theDataA
Because you want to things
I don't want to take anything away from your very calid point about
arrays - but on a tangent mention a cuple of techniques I use to
overcome the problem with using the 'old' way.
Björnke von Gierke wrote:
I am constantly trying out systems for games, among other things
making maps. I have
That would do me - except the most useful would be the ability to get the
full ordered index.
put the ordered keys of theDataA
Because you want to things like:
repeat for each key sortedKey in theDataA
I've been watching this thread and I have to ask:
What benefit is it to the Rev
Ken Ray wrote:
What benefit is it to the Rev developer (not the engine) to have the keys
NOT sorted?
I mean, I understand why the *engine* may want to keep the keys in a special
order, but every time I work with the keys of an array, either (a) I don't
care what order they're in, or (b) I
Maybe the benefit of unsorted keys is faster execution. Why wait for a sort
if you don't need it?
On 9/13/08 10:25 PM, Ken Ray [EMAIL PROTECTED] wrote:
That would do me - except the most useful would be the ability to get the
full ordered index.
put the ordered keys of theDataA
One advantage is that dimensions of an array (ie. sub-arrays) can be
added and taken away in one simple line:
put someSubArray into tBigArray[1]
.
delete variable tBigArray[1]
avoiding the need to loop over the whole list of keys in order to
delete all elements with a particular value
On 12 Sep 2008, at 07:50, John Vokey wrote:
Can anybody explain what the new array format provides that the old
did not?
http://www.runrev.com/newsletter/july/issue53/newsletter1.php
If you read the above revup article, then all the new features are
described there. If that's too
2008/9/12 John Vokey [EMAIL PROTECTED]
Can anybody explain what the new array format provides that the old did
not?
Hi John - I'll give it a go. In simple terms it promises to replace my use
of the XML externals, and other general hierarchical data structures I use
frequently. I for one
Hi, John,
I don't have 3.0 yet, but this is my take on multidimesional arrays Rev
Associative arrays use keys that have to be unique.
Multidimensional arrays, the keys have to be unique at each level
arr[primary][secondary][tertiary]
arr[same][same][same] -- is allowed
Trevor-
Thursday, September 11, 2008, 2:20:36 PM, you wrote:
I'm thinking of how PHP behaves. Arrays in PHP know the order that
elements were added so that when you use foreach you get the elements
in that same order. I always found this very useful when working with
arrays in PHP.
AFAIK
On Sep 12, 2008, at 12:37 PM, Mark Wieder wrote:
But I'm sorry to say that I can't think of a situation in which
chronological order would be helpful. Obviously you've got a scenario
where this works - could you enlighten me?
I can try :-) Let's look at a few examples.
I will start with a
Can anybody explain what the new array format provides that the old
did not? All these bizarre examples seem not so much as exemplifying
the ``new'' features as to leave me baffled as to what added value
they provide. In NONE of the supposed or alleged examples have I seen
anything I could
2008/9/12 Mark Wieder [EMAIL PROTECTED]
Trevor-
Thursday, September 11, 2008, 2:20:36 PM, you wrote:
I'm thinking of how PHP behaves. Arrays in PHP know the order that
elements were added so that when you use foreach you get the elements
in that same order. I always found this very
Trevor-
Friday, September 12, 2008, 10:22:26 AM, you wrote:
To finish with, let's look at another XML example I grabbed from one
of the w3schools samples.
breakfast_menu
food
nameBelgian Waffles/name
price$5.95/price
descriptiontwo
David-
Friday, September 12, 2008, 2:23:23 PM, you wrote:
Mark I often need the chronological order. Examples of the top I my head
include routines to parse, scripts and create outlines for handlers, or wiki
text and construct outlines for titles, or tree structures where i want to
store the
Me too! I am frustrated that once again Rev ships new features without
full docs or full examples.
Please anyone who deeply understands the new arrays teach all,
thanks. :-)
Better yet a small library of wrappers that finish them off.
Just for the record, I did bug report the missing doc
On Sep 11, 2008, at 1:08 PM, Andrew Meit wrote:
Me too! I am frustrated that once again Rev ships new features
without full docs or full examples.
Please anyone who deeply understands the new arrays teach all,
thanks. :-)
Better yet a small library of wrappers that finish them off.
Just for
Great Trevor - was wandering where I'd read your article!
2008/9/11 Trevor DeVore [EMAIL PROTECTED]
As for writing a wrapper, what sorts of routines are you looking for? There
are three features I would really like to see but none of these can really
be handled by a library. They need to be
On Sep 11, 2008, at 3:10 PM, David Bovill wrote:
1) Ability to reference an multi-dimensional keys dynamically.
Right now we
have to build the array key reference and then use 'do'.
Yes - that was the first problem I came across. I wanted to write a
recursive function, and since you don't
2008/9/11 Trevor DeVore [EMAIL PROTECTED]
On Sep 11, 2008, at 3:10 PM, David Bovill wrote:
1) Ability to reference an multi-dimensional keys dynamically. Right now
we
have to build the array key reference and then use 'do'.
Yes - that was the first problem I came across. I wanted to
On Sep 11, 2008, at 4:27 PM, David Bovill wrote:
I have another scenario where I had to resort to 'do' though. I'm
converting
SQL queries to a hierarchal array but unlike XML SQL results have
no sense
of hierarchy. So I have a couple of 'do' statements in the code
which I will
promptly
Trevor-
Thursday, September 11, 2008, 11:32:39 AM, you wrote:
3) Ability to reference elements of an array in the order they were
added to the array:
put element 5 of theArrayA
I don't think this is properly the function of an array. If you're
talking about adding engine support for LIFO or
On 11 Sep 2008, at 22:49, Trevor DeVore wrote:
put some string into theValue
put [people][1][name] into theKey ## assume you didn't know the
full path to the key in advance.
put put theValue into theArrayA theKey into theDo
do theDo
I'm not sure I understand the problem here, what
On Sep 11, 2008, at 5:02 PM, Björnke von Gierke wrote:
On 11 Sep 2008, at 22:49, Trevor DeVore wrote:
put some string into theValue
put [people][1][name] into theKey ## assume you didn't know the
full path to the key in advance.
put put theValue into theArrayA theKey into theDo
do theDo
On Sep 11, 2008, at 4:59 PM, Mark Wieder wrote:
I don't think this is properly the function of an array. If you're
talking about adding engine support for LIFO or FIFO stacks or queues
then that's a slightly different topic. But trying to access array
elements in the order they were added is a
Now I understand, I didn't consider not to tell rev how many sub
arrays there would be. I have no clue when this would be useful
though, maybe you can explain that?
At first I wanted to write an example function that uses the
paramCount, so it would automatically fill the array in a switch
On Sep 11, 2008, at 5:55 PM, Björnke von Gierke wrote:
Now I understand, I didn't consider not to tell rev how many sub
arrays there would be. I have no clue when this would be useful
though, maybe you can explain that?
Sure. One thing that the ability to dynamically specify a key would do
I see now, but I'm still thinking about alternatives that make you not
use do. You say your script is recursively walking trough the XML.
But that would allow to only use a one dimensional array assignment. I
tried to look at your code, but it's too hard for me to understand, oh
and I also
On Sep 11, 2008, at 8:53 PM, Björnke von Gierke wrote:
I see now, but I'm still thinking about alternatives that make you
not use do. You say your script is recursively walking trough the
XML. But that would allow to only use a one dimensional array
assignment. I tried to look at your
On 11-Sep-08, at 7:24 PM, [EMAIL PROTECTED] wrote:
On Sep 11, 2008, at 5:55 PM, Björnke von Gierke wrote:
Now I understand, I didn't consider not to tell rev how many sub
arrays there would be. I have no clue when this would be useful
though, maybe you can explain that?
Sure. One thing
->
Re: Arrays: new and old keys, i and, man am I annoyed
use-revolution
-- Thread --
-- Date --
<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http:/
->
Re: Arrays: new and old keys, i and, man am I annoyed
use-revolution
-- Thread --
-- Date --
<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http:/
ass="subject">[net-trade] Forex Trading 50 Pips Daily
50 Pips Daily !!
Kirim email ke
{IT-Reks} JO#104190 : VB.Net / Sharepoint developers ( Only Local Candid
it-reks
-- Thread --
--
->
Re: Arrays: new and old keys, i and, man am I annoyed
use-revolution
-- Thread --
-- Date --
<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http:/
->
Re: Arrays: new and old keys, i and, man am I annoyed
use-revolution
-- Thread --
-- Date --
<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http:/
rl = "006792";
google_color_text = "00";
//-->
Re: Arrays: new and old keys, i
Joe Lewis Wilkins
Re: Arrays: new and old keys, i
Björnke von Gierke
Named item order [was : Arrays: new and old keys, i]
Alex Tweedly
Re: Arrays: new and old keys, i and, ma
66 matches
Mail list logo