Re: [Axiom-developer] Spad and its object model

2007-06-12 Thread Stephen Wilson
Gabriel Dos Reis <[EMAIL PROTECTED]> writes: > On Tue, 12 Jun 2007, Stephen Wilson wrote: > > | > | Global change to a hash would certainly cost us in execution time. > | > > | > Why does that cost more than what you have proposed so far? > | > | Lookup via hash vs. direct indexing? Over milli

Re: [Axiom-developer] Spad and its object model

2007-06-12 Thread Gabriel Dos Reis
On Tue, 12 Jun 2007, Stephen Wilson wrote: | > | Global change to a hash would certainly cost us in execution time. | > | > Why does that cost more than what you have proposed so far? | | Lookup via hash vs. direct indexing? Over millions of iterations? Im | confident the current implementatio

Re: [Axiom-developer] Spad and its object model

2007-06-12 Thread Stephen Wilson
Gabriel Dos Reis <[EMAIL PROTECTED]> writes: [...] > That is precisel where I disagree. > The current representation forces uses of integer as index. > And I'm back to my question: when you index the vtable with value 2, > what is the meaning of value 2? You have not answer that question so far

Re: [Axiom-developer] Spad and its object model

2007-06-11 Thread Gabriel Dos Reis
On Mon, 11 Jun 2007, Stephen Wilson wrote: | Gabriel Dos Reis <[EMAIL PROTECTED]> writes: | | > On Mon, 11 Jun 2007, Stephen Wilson wrote: | > | > | Gabriel Dos Reis <[EMAIL PROTECTED]> writes: | > | > | If the vtable can be interrogated with a variety of keys, allowing | > | > | useful mapping

Re: [Axiom-developer] Spad and its object model

2007-06-11 Thread Stephen Wilson
Gabriel Dos Reis <[EMAIL PROTECTED]> writes: > On Mon, 11 Jun 2007, Stephen Wilson wrote: > > | Gabriel Dos Reis <[EMAIL PROTECTED]> writes: > | > | If the vtable can be interrogated with a variety of keys, allowing > | > | useful mapping of elements, I dont see how a hash is any more > | > | fle

Re: [Axiom-developer] Spad and its object model

2007-06-11 Thread Gabriel Dos Reis
On Mon, 11 Jun 2007, Stephen Wilson wrote: | Gabriel Dos Reis <[EMAIL PROTECTED]> writes: | > | If the vtable can be interrogated with a variety of keys, allowing | > | useful mapping of elements, I dont see how a hash is any more | > | flexible. Perhaps you could provide an example? | > | > Did

Re: [Axiom-developer] Spad and its object model

2007-06-11 Thread Stephen Wilson
Gabriel Dos Reis <[EMAIL PROTECTED]> writes: > | If the vtable can be interrogated with a variety of keys, allowing > | useful mapping of elements, I dont see how a hash is any more > | flexible. Perhaps you could provide an example? > > Did I say "more flexible"? > > When you have an array and

Re: [Axiom-developer] Spad and its object model

2007-06-11 Thread Gabriel Dos Reis
Stephen Wilson <[EMAIL PROTECTED]> writes: | Gabriel Dos Reis <[EMAIL PROTECTED]> writes: | | > On Mon, 11 Jun 2007, Stephen Wilson wrote: | > | > | > I guess what I trying to get at is what are the benefits of those | > | > additional indirections over simple, hash table representation. | > |

Re: [Axiom-developer] Spad and its object model

2007-06-11 Thread Gabriel Dos Reis
On Mon, 11 Jun 2007, Waldek Hebisch wrote: | Gaby, did you look how Axiom uses arrays of function pointers? Yes. :-) | At | the first glance they are like vtables. But there is a fundamental | difference: Spad domain uses only its own domain vector -- it never | directly uses ancestor vector.

Re: [Axiom-developer] Spad and its object model

2007-06-11 Thread Stephen Wilson
Gabriel Dos Reis <[EMAIL PROTECTED]> writes: > On Mon, 11 Jun 2007, Stephen Wilson wrote: > > | > I guess what I trying to get at is what are the benefits of those > | > additional indirections over simple, hash table representation. > | > | I would imagine that the vast number of lookups would

Re: [Axiom-developer] Spad and its object model

2007-06-11 Thread Waldek Hebisch
> > Hi, > > I've been thinking about the following for a long time now, and I > susect it is time for me to let it go to the Axiom community for feedback. > > Spad fundamentally uses arrays of function pointers (also known as vtables) > as implementation technology for categories, domains,

Re: [Axiom-developer] Spad and its object model

2007-06-11 Thread Gabriel Dos Reis
On Mon, 11 Jun 2007, Stephen Wilson wrote: | > I guess what I trying to get at is what are the benefits of those | > additional indirections over simple, hash table representation. | | I would imagine that the vast number of lookups would suffice with an | integer index. Tiny fraction would req

Re: [Axiom-developer] Spad and its object model

2007-06-11 Thread Stephen Wilson
Gabriel Dos Reis <[EMAIL PROTECTED]> writes: > On Mon, 11 Jun 2007, Stephen Wilson wrote: > > | Gabriel Dos Reis <[EMAIL PROTECTED]> writes: > | > | > On Sun, 10 Jun 2007, Stephen Wilson wrote: > | > > | > | Hello Gaby, > | > | > | > | Gabriel Dos Reis <[EMAIL PROTECTED]> writes: > | > | [...]

Re: [Axiom-developer] Spad and its object model

2007-06-11 Thread Ralf Hemmecke
Hi Franz, that is a question that should be sent to [EMAIL PROTECTED] I got http://wiki.axiom-developer.org/public/aldor-linux-x86_64-v1.0.2.bin and so far it works fine from with in axiom (debian etch amd64). Is this a true 64bit version? however with your instructions I get aldor -laldor

Re: [Axiom-developer] Spad and its object model

2007-06-11 Thread Stephen Wilson
Ralf Hemmecke <[EMAIL PROTECTED]> writes: > > One basic rule would be that a domain `functor' memoizes its > > arguments, and always returns the same object for equal arguments, > > performing any required initialization on the first call. > > Of course you know that globally defined functors

Re: [Axiom-developer] Spad and its object model

2007-06-11 Thread Franz Lehner
Send complaints to Stephen Watt and Lauretiu Dragan. But if you have a 64bit machine that could be some problem. There should be a hint by Christian Aistleitner concerning the 64bit problem in the aldor-l archive. this made me curious. I got http://wiki.axiom-developer.org/public/aldor-linux-x

Re: [Axiom-developer] Spad and its object model

2007-06-11 Thread Ralf Hemmecke
> One basic rule would be that a domain `functor' memoizes its > arguments, and always returns the same object for equal arguments, > performing any required initialization on the first call. Of course you know that globally defined functors can be called in a local environment which would allow

Re: [Axiom-developer] Spad and its object model

2007-06-11 Thread Gabriel Dos Reis
On Mon, 11 Jun 2007, Stephen Wilson wrote: | Gabriel Dos Reis <[EMAIL PROTECTED]> writes: | | > On Sun, 10 Jun 2007, Stephen Wilson wrote: | > | > | Hello Gaby, | > | | > | Gabriel Dos Reis <[EMAIL PROTECTED]> writes: | > | [...] | > | > However, I do believe the use of arrays has inherent pr

Re: [Axiom-developer] Spad and its object model

2007-06-11 Thread Stephen Wilson
Gabriel Dos Reis <[EMAIL PROTECTED]> writes: > On Sun, 10 Jun 2007, Stephen Wilson wrote: > > | Hello Gaby, > | > | Gabriel Dos Reis <[EMAIL PROTECTED]> writes: > | [...] > | > However, I do believe the use of arrays has inherent problems in > | > terms of maintaining coherence of function po

Re: [Axiom-developer] Spad and its object model

2007-06-11 Thread Stephen Wilson
Thanks for doing the tests Ralf. The results do not suprise me, so I guess my memory is OK is this regard. Ralf Hemmecke <[EMAIL PROTECTED]> writes: [...] > It is more interesting to ask what happens in an interactive > environment. So let's try. > > woodpecker:~/scratch>aldor -gloop >

Re: [Axiom-developer] Spad and its object model

2007-06-11 Thread Gabriel Dos Reis
On Sun, 10 Jun 2007, Stephen Wilson wrote: | Hello Gaby, | | Gabriel Dos Reis <[EMAIL PROTECTED]> writes: | [...] | > However, I do believe the use of arrays has inherent problems in | > terms of maintaining coherence of function pointers assigned to slots. | > Because the mapping from declara

Re: [Axiom-developer] Spad and its object model

2007-06-11 Thread Ralf Hemmecke
On 06/11/2007 02:55 PM, Stephen Wilson wrote: Hi Ralf, Ralf Hemmecke <[EMAIL PROTECTED]> writes: If you extend Integer then it will not be visible globally. Clearly, it is visible only for those things that "see" the extension. Of course you are completely correct. The specific issue I was t

Re: [Axiom-developer] Spad and its object model

2007-06-11 Thread Stephen Wilson
Hi Ralf, Ralf Hemmecke <[EMAIL PROTECTED]> writes: > If you extend Integer then it will not be visible globally. Clearly, > it is visible only for those things that "see" the extension. Of course you are completely correct. The specific issue I was trying to point out is illustrated by the follo

Re: [Axiom-developer] Spad and its object model

2007-06-11 Thread Ralf Hemmecke
IIRC new exports introduced by `extend' are not visible to previous definitions, except via `has' predicates which execute during runtime. Are there other issues involved? I do not understand. What is a "previous" definition in Aldor? If you extend Integer then it will not be visible global

Re: [Axiom-developer] Spad and its object model

2007-06-11 Thread Martin Rubey
Stephen Wilson <[EMAIL PROTECTED]> writes: > I would need a clear picture of what the semantics would be for "post facto > extensions". Do you sugest following Aldor explicitly? In any case, please try to "stay" compatible with Aldor semantics as far as possible! > IIRC new exports introduced

Re: [Axiom-developer] Spad and its object model

2007-06-10 Thread Stephen Wilson
Hello Gaby, Gabriel Dos Reis <[EMAIL PROTECTED]> writes: [...] > However, I do believe the use of arrays has inherent problems in > terms of maintaining coherence of function pointers assigned to slots. > Because the mapping from declarations order to integer has lost important > informations (

[Axiom-developer] Spad and its object model

2007-06-10 Thread Gabriel Dos Reis
Hi, I've been thinking about the following for a long time now, and I susect it is time for me to let it go to the Axiom community for feedback. Spad fundamentally uses arrays of function pointers (also known as vtables) as implementation technology for categories, domains, packages, and i