Ralf Hemmecke wrote: > > On 09/10/2015 07:32 AM, Abhinav Baid wrote: > >> PS: I'll try to produce a patch to change Set to List in lodof2.spad. > >> > > > > I just did that. [1] > > There was a Set FA in the code too, so I changed that also. > > > > [1] > > https://github.com/fandango-/fricas/commit/81ca9a8067d94c1287dd98f4dec3df02b8e199ac > > > > > > > > Thanks, > > Abhinav. > > Thank you. And yes, now the Aldor stuff compiles, but I wonder why it > already works. > > Aldor should probably have complained about this statement as well. > > https://github.com/fricas/fricas/blob/master/src/algebra/lodof2.spad#L281 > > semi : Table(FA, UP) := table() > > since we have > > FA ==> Record(factor : UP, exponent : Integer) > > and > > https://github.com/fricas/fricas/blob/master/src/algebra/table.spad#L99 > > Table(Key : SetCategory, Entry : Type) : Exports == Implementation where
Do you compile the whole domain? IIRC during build of Aldor interface you just compile interface (category) stuff and implementation does not matter. The line aboove is in implementation part while GEM appeared in exported signature. > Anyway, Abhinav, I'd like to make some comments to your code. > > https://github.com/fricas/fricas/blob/master/src/algebra/lodof2.spad#L284 > > for i in v for ii in 1..(#v)-1 repeat > restl := rest(v, ii) > > This looks somewhat ugly to me. Since v is a list of factors, one can > assert that it's never the empty list, so something like > There is an obscure Spad syntax intended for such situation: for i in v for restl in tails(rest(v)) repeat should work here. The 'restl in tails(rest(v))' part assigns successive tails of 'rest(v)' to 'restl'. AFAICS this construct is currently unused in algebra and does not work in the interpreter. I think we should either use it or remove it. > > As for the variable 'semi'. It is only important if 'option="semireg". > Feels to me like you are wasting time computing 'semi' it if this option > is not set. Main effort goes into 'unsafe' which is needed. -- Waldek Hebisch [email protected] -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.
