Request for comments on C-Structs to MC structs...

xbury.cs at clearstream.com xbury.cs at clearstream.com
Mon Nov 4 08:26:01 EST 2002


Richard,

Thanks but there is a speed issue here... Accessing data in properties of
objects
is/or must be just as slow as accessing a field... Which is why im not using
groups
of fields to re-create these structures...

It's the same reason im not using item x of line y of Zcontainer.
it's plain simpler and faster to use 2 items over thousands of lines than
100's of items across 2 lines...

Arrays seem to be the last solution before going back to C

What would be nice is to have multi-dimensional arrays like in C, basic
X[a][b][c]...[z]

or 

assigning properties to containers 
put x into the color of myobject[x]

Scott? Feasible? 

Meanwhile, my solution is the following:
X[a][b][c]...[z] = x[a(i^3)+b(i^2)+c(i^1)+d(i^0)]...[z] where {a,b..,z} is a
polynomial serie sigma((x(sub base i)) ^ (i-1))
and where i is the max(number of elements in any dimension)
the only danger is passing the limit of array elements too easily...
(2^54)-1...

  repeat with l = 1 to NUM_layers
    repeat with i = 1 to Net_Layer[l]
      repeat with j = 0 to net_layer_units[l-1]
        put l*100+i*10+j into va -- virtual array dimension
        put RandomEqualREAL(-0.5, 0.5) into Net_Layer_Weight[va]
      end repeat
    end repeat
  end repeat

any better ideas are welcome! Using nuclear fusion power to start a light
bulb!


> -----Original Message-----
> From: Richard Gaskin [mailto:ambassador at fourthworld.com]
> Sent: 04 November 2002 13:07
> To: metacard at lists.runrev.com
> Subject: Re: Request for comments on C-Structs to MC structs...
> 
> 
> xbury.cs at clearstream.com wrote:
> 
> > Before I go bananas (or meta-tutti-fruity), I'd like to ask 
> if anyone has
> > tried nesting arrays into arrays?
> > 
> > put abunchoflinesofdata into test[x] -- this works
> > put anotherbunch into test2[x] -- this also will work
> > put test[x] into test[y]
> > put test2[x] into test[y+1]
> > 
> > will this work and be reliable? Limits known?
> 
> Is abunchoflinesofdata an array itself?  I've never tried 
> that.  If it's
> just a chunk it should work.
> 
> Another option for storing hierarchically-structured data is to use MC
> properties and propertysets in native objects:
> 
> <http://lists.runrev.com/pipermail/use-revolution/2002-July/00
6141.html>

Remember that you can store and retrieve arrays from objects by setting the
properties of the current propertyset of the object to an array:

  -- Create an array:
  put "hello world" into tMyArray[1]
  --
  -- Tell MC which propertyset to work with:
  set the propertyset of stack "storage" to "ArrayData"
  --
  -- Set all of the key-value pairs of the storage object to
  -- the key-value pairs of the array:
  set the properties of stack "storage" to tArrayData


-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge 2.0: Publish any database on any site
 ___________________________________________________________
 Ambassador at FourthWorld.com       http://www.FourthWorld.com
 Tel: 323-225-3717                       AIM: FourthWorldInc

_______________________________________________
metacard mailing list
metacard at lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Visit us at http://www.clearstream.com
                                                          
IMPORTANT MESSAGE

Internet communications are not secure and therefore Clearstream International does not accept legal responsibility for the contents of this message.

The information contained in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Any views expressed in this e-mail are those of the individual sender, except where the sender specifically states them to be the views of Clearstream International or of any of its affiliates or subsidiaries.

END OF DISCLAIMER



More information about the metacard mailing list