Gaby,
Thank you for this work. The error message reminds me of a wish: I
would really like it if the compiler could pretty print the code that
it displays. Reading the lisp notation is still awkward for me years
later and I know that it puts off some potential new users. Even if
de-compiling
> (
Bill Page writes:
| On Mon, Oct 24, 2011 at 7:36 PM, Gabriel Dos Reis wrote:
| > ...
| > Bill Page writes:
| > | So it is a coincidence that the compiler happens to choose 0@P or that
| > | the representation of all of these candidates is the same so that it
| > | does not matter?
| >
| > It is m
On Mon, Oct 24, 2011 at 7:36 PM, Gabriel Dos Reis wrote:
> ...
> Bill Page writes:
> | So it is a coincidence that the compiler happens to choose 0@P or that
> | the representation of all of these candidates is the same so that it
> | does not matter?
>
> It is mostly concidence. The explanation i
Bill Page writes:
| On Mon, Oct 24, 2011 at 6:49 PM, Gabriel Dos Reis wrote:
| > ...
| > Another example: Consider the function leftLcm from
| > NonCommutativeOperatorDivision(P,F) where
| > P: MonogenicLinearOperator(F)
| > F: Field
| >
| > the function definition is:
| >
| >
On Mon, Oct 24, 2011 at 6:49 PM, Gabriel Dos Reis wrote:
> ...
> Another example: Consider the function leftLcm from
> NonCommutativeOperatorDivision(P,F) where
> P: MonogenicLinearOperator(F)
> F: Field
>
> the function definition is:
>
> leftLcm(a,b) ==
> a = 0 =>b
>
Gabriel Dos Reis writes:
| The algebra is full of examples where things work by a sheer amount of
| luck. Consider the function rightPower in functor MonadWithUnit:
|
| rightPower(a: %,n: NonNegativeInteger) ==
| zero? n => 1
| res := 1
| for i in 1..n repeat res :=
Bill Page writes:
| Doesn't the compiler already know that the value of res is returned
| from the function?
No. At the point where the compiler is processing the local assignment
res := 1
it has no clue that it will be used later as the retuned value.
| Therefore infers that res
Doesn't the compiler already know that the value of res is returned
from the function? Therefore infers that res must be of type % ? Even
in
zero? n => 1
you have the question of what is type of 1.
On Mon, Oct 24, 2011 at 6:22 PM, Gabriel Dos Reis wrote:
>
> The algebra is full of examples whe
The algebra is full of examples where things work by a sheer amount of
luck. Consider the function rightPower in functor MonadWithUnit:
rightPower(a: %,n: NonNegativeInteger) ==
zero? n => 1
res := 1
for i in 1..n repeat res := res * a
res
What should be the
Waldek Hebisch writes:
| I wrote:
| >
| > Gabriel Dos Reis wrote:
| > >
| > > Waldek Hebisch writes:
|
| > > |
| > > | new : (NonNegativeInteger, S) -> %
| > > |
| > > | So the first argument to 'new' must be 'NonNegativeInteger' and the
| > > | second must be '%'.
| > >
| > > 1. ne
Waldek Hebisch writes:
| Gabriel Dos Reis wrote:
| >
| > Waldek Hebisch writes:
| >
| > | Gabriel Dos Reis
| > | >
| > | >
| > | > Consider the definition of ModMonoid:
| > | > --8<---8<8<--
| > | > )abbrev domain MODMON ModMonic
| > |
I wrote:
>
> Gabriel Dos Reis wrote:
> >
> > Waldek Hebisch writes:
> > |
> > | new : (NonNegativeInteger, S) -> %
> > |
> > | So the first argument to 'new' must be 'NonNegativeInteger' and the
> > | second must be '%'.
> >
> > 1. new, expects its second *argument* to be of type %.
Bill Page wrote:
>
> On Mon, Oct 24, 2011 at 1:02 PM, Gabriel Dos Reis wrote:
> >
> > There is nothing reasonable about it. =A0The way that most AXIOM compilers
> > do overload resolution (even in faces of ambiguity) is to pick the first
> > from a list that makes the compilation works, regardless
"Prof. Dr. Johannes Grabmeier" writes:
| thanks for the honor - or not: I am not the author of this domain.
|
OK, I will unregister the voodoo ownership.
(but it was meant as honor :-)
| It is a "mutable domain"
|
| )bo PUSH('ModMonic, $mutableDomains)
Yes, but that is a different matter fr
Bill Page writes:
| On Mon, Oct 24, 2011 at 1:02 PM, Gabriel Dos Reis wrote:
| > ...
| > Waldek Hebisch writes:
| > | I would not call this voodoo: the compiler performs reasonable type
| > | inference.
| >
| > There is nothing reasonable about it. The way that most AXIOM compilers
| > do overlo
Gabriel Dos Reis wrote:
>
> Waldek Hebisch writes:
>
> | Gabriel Dos Reis
> | >
> | >
> | > Consider the definition of ModMonoid:
> | > --8<---8<8<--
> | > )abbrev domain MODMON ModMonic
> | > ++ Description:
> | > ++ This pack
On Mon, Oct 24, 2011 at 1:02 PM, Gabriel Dos Reis wrote:
> ...
> Waldek Hebisch writes:
> | I would not call this voodoo: the compiler performs reasonable type
> | inference.
>
> There is nothing reasonable about it. The way that most AXIOM compilers
> do overload resolution (even in faces of ambi
Waldek Hebisch writes:
| Gabriel Dos Reis
| >
| >
| > Consider the definition of ModMonoid:
| > --8<---8<8<--
| > )abbrev domain MODMON ModMonic
| > ++ Description:
| > ++ This package \undocumented
| >
| > ModMonic(R,Rep)
Gabriel Dos Reis
>
>
> Consider the definition of ModMonoid:
> --8<---8<8<--
> )abbrev domain MODMON ModMonic
> ++ Description:
> ++ This package \undocumented
>
> ModMonic(R,Rep): C == T
>
> Its description does not have
Bill Page writes:
| On Mon, Oct 24, 2011 at 8:54 AM, Gabriel Dos Reis wrote:
| > ...
| > Now, consider the capsule-level variable "power". It is declared as
| >
| > power:PrimitiveArray(%)
| >
| > then later assigned to as
| >
| > power := new(0,0)
| >
| > There are two lexi
On Mon, Oct 24, 2011 at 8:54 AM, Gabriel Dos Reis wrote:
> ...
> Now, consider the capsule-level variable "power". It is declared as
>
> power:PrimitiveArray(%)
>
> then later assigned to as
>
> power := new(0,0)
>
> There are two lexical occurences of the literal '0' in there
Consider the definition of ModMonoid:
--8<---8<8<--
)abbrev domain MODMON ModMonic
++ Description:
++ This package \undocumented
ModMonic(R,Rep): C == T
where
R: Ring
Rep: UnivariatePolynomialCategory(R)
22 matches
Mail list logo