Re: What the heck is active data?

2003-09-01 Thread Dan Sugalski
At 10:57 AM +0200 8/29/03, Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: Most objects in Parrot will be dealt with by reference, Dou you have anything about references? I'm thinking about putting in a default CRef PMC class, which delegates almost all its methods to

[CVS ci] Ref class-1 (was: What the heck is active data?)

2003-09-01 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: At 10:57 AM +0200 8/29/03, Leopold Toetsch wrote: Dou you have anything about references? I'm thinking about putting in a default CRef PMC class, which delegates almost all its methods to CSELF-cache.pmc_val, autogenerated inside pmc2c.pl. Yeah, that was

Re: What the heck is active data?

2003-08-29 Thread Benjamin Goldberg
Dan Sugalski wrote: I've talked about this before and generally I've assumed that people know what I'm talking about, but that's not true anymore, so an explanation of this is in order. Active Data is data that takes some active role in its use--reading, writing, modifying, deleting, or

Re: What the heck is active data?

2003-08-29 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: Most objects in Parrot will be dealt with by reference, Dou you have anything about references? I'm thinking about putting in a default CRef PMC class, which delegates almost all its methods to CSELF-cache.pmc_val, autogenerated inside pmc2c.pl.

Re: What the heck is active data?

2003-08-29 Thread Piers Cawley
Benjamin Goldberg [EMAIL PROTECTED] writes: Or, rather, it doesn't matter if we are or not, since perl, python, and ruby are all untyped so there's not much to be done, and full type inferencing's a halting-problem sort of thing. (Though a useful subset of many programs can be analyzed enough

Re: What the heck is active data?

2003-08-29 Thread Benjamin Goldberg
Piers Cawley wrote: Benjamin Goldberg [EMAIL PROTECTED] writes: [snip] Reading or writing from the hash does a lookup in the backing database and reads or writes from it. A handy thing, with the variable getting in the way of reads or writes to itself. However, you can do this with plain

What the heck is active data?

2003-08-27 Thread Dan Sugalski
I've talked about this before and generally I've assumed that people know what I'm talking about, but that's not true anymore, so an explanation of this is in order. Active Data is data that takes some active role in its use--reading, writing, modifying, deleting, or using in some activity.

Re: What the heck is active data?

2003-08-27 Thread Matt Fowles
Dan~ I still don't see why this necessitates keyed variants of all the ops. Couldn't we have a prepkeyed op which would return a specialized pmc to use in the next op? Thus instead of set P0, P1[P2] we would have prepkey P3, P1[P2] set P0, p# similarly add P0[IO], P1 would become prepkey

Re: What the heck is active data?

2003-08-27 Thread Luke Palmer
Matt Fowles writes: Dan~ I still don't see why this necessitates keyed variants of all the ops. Couldn't we have a prepkeyed op which would return a specialized pmc to use in the next op? Yes, we could. But it would be in exchange for both speed (because we're allocating a new pmc each

Re: What the heck is active data?

2003-08-27 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: ...is operator overloading. Addition may not really be addition, if one or the other of the data in the operation overloads the addition operator. pdd02 has 7 vtable slots for Cadd. How will use overload '+' = \my_add; look like in Parrot? leo

Re: What the heck is active data?

2003-08-27 Thread Dan Sugalski
On Wed, 27 Aug 2003, Matt Fowles wrote: Dan~ I still don't see why this necessitates keyed variants of all the ops. Couldn't we have a prepkeyed op which would return a specialized pmc to use in the next op? We could--perl 5 uses a variant of this where active aggregates return a

Re: What the heck is active data?

2003-08-27 Thread Dan Sugalski
On Wed, 27 Aug 2003, Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: ...is operator overloading. Addition may not really be addition, if one or the other of the data in the operation overloads the addition operator. pdd02 has 7 vtable slots for Cadd. How will use

Re: What the heck is active data?

2003-08-27 Thread Dan Sugalski
On Wed, 27 Aug 2003, TOGoS wrote: The part that affects us is that we can't tell at compiletime whether assignment is rebinding or is a get/set, because we could have code like: kitchentemp = new('kitchenroom'); bedroomtemp = new('bedroom'); bedroomtemp =

Re: What the heck is active data?

2003-08-27 Thread TOGoS
Most objects in Parrot will be dealt with by reference, which is to say that the PMC that a name is bound to is not an object, but rather a reference PMC that points to the object PMC. An assign, in that case, just copies the value in the source reference (which is the pointer to the

Re: What the heck is active data?

2003-08-27 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: foreach loopvar (1..1) { total[loopvar] = somedata[loopvar] + otherdata[loopvar]; } If either (or both) of somedata or otherdata isn't an array of PMCs, there's going to be an awful lot of temporary PMC creation, which is a waste. You