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

2002-11-04 Thread Richard Gaskin
[EMAIL PROTECTED] 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/006141.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
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
 Tel: 323-225-3717   AIM: FourthWorldInc

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



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

2002-11-04 Thread xbury . cs
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;fourthworld.com]
 Sent: 04 November 2002 13:07
 To: [EMAIL PROTECTED]
 Subject: Re: Request for comments on C-Structs to MC structs...
 
 
 [EMAIL PROTECTED] 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
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
 Tel: 323-225-3717   AIM: FourthWorldInc

___
metacard mailing list
[EMAIL PROTECTED]
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
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



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

2002-11-04 Thread Pierre Sahores
[EMAIL PROTECTED] a écrit :
 
 Hi gals and guys,
 
 If some of you are interested, i've mentioned earlier in the meta-time-space
 continuum that I was porting C++ programs to Metacard.
 
 In these programs I have extensive struct variables to port, and some
 include arrays of structs inside of structs, etc... Big mess I got into!
 Using properties doesn't help and creating the structs/pointer space inside
 a string variable seems overkill...
 
 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]

For me, it works. And this too, without any speed hole because the
contents length of test[y] is in about some octets  :

put test[x] into item 1 of test[y] -- mc is automatically creating the
needed items range
put test2[x] into item 2 of test[y]

or even this :

put abunchoflinesofdata  ,  anotherbunch into test[x]
put test[x] into test[y]

and so on
 
 will this work and be reliable? Limits known?
 
 TIA
 Xavier
 
 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
 ___
 metacard mailing list
 [EMAIL PROTECTED]
 http://lists.runrev.com/mailman/listinfo/metacard

-- 
Cordialement, Pierre Sahores

Inspection académique de Seine-Saint-Denis.
Applications et bases de données WEB et VPN
Qualifier et produire l'avantage compétitif
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



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

2002-11-04 Thread Richard Gaskin
[EMAIL PROTECTED] wrote:

 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...

What speeds are you getting in your tests.  Here, getting data from object
properties is _much_ faster than from fields.

But morever, you only need to do it once during initialization to read the
data from an object into an array, and again while saving to store the array
in the object.

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge 2.0: Publish any database on any site
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
 Tel: 323-225-3717   AIM: FourthWorldInc

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard